メインページ   モジュール   クラス階層   アルファベット順一覧   構成   ファイル一覧   構成メンバ   ファイルメンバ   関連ページ  

Trootinit.h

解説を見る。
00001 // =====================================================================
00002 //  $Id: Trootinit.h,v 1.4 2003/07/30 16:17:11 goiwai Exp $
00003 //  $Name: CLDAQ-1-07-00 $
00004 //
00005 //  $Log: Trootinit.h,v $
00006 //  Revision 1.4  2003/07/30 16:17:11  goiwai
00007 //  ファイルにコミットログをつけることにしました.
00008 //
00009 // =====================================================================
00010 #ifndef __TROOTINIT_H
00011 #define __TROOTINIT_H
00012 //#ifdef __CLDAQ_ROOT_USE
00013 
00014 #include <TROOT.h>
00015 #include <TSystem.h>
00016 #include <TApplication.h> 
00017 #include <TStyle.h>
00018 #include <TGraph.h>
00019 #include <TGraphErrors.h>
00020 #include <TH1.h>
00021 #include <TH2.h>
00022 #include <TCanvas.h>
00023 #include <TNtuple.h>
00024 #include <TFile.h>
00025 #include <TPad.h>
00026 #include <TF1.h>
00027 #include <TLegend.h>
00028 #include <TPaveText.h>
00029 #include <TRandom.h>
00030 #include <TStopwatch.h>
00031 #include <TGaxis.h>
00032 #include <TLatex.h>
00033 #include <TPaveStats.h>
00034 
00035 #include "Tglobals.h"
00036 
00037 inline static TApplication* rootinit( const Tstring& name = "ROOTANALYSER", Tint* argc = 0, Tchar** argv = 0 )
00038 {
00039   TApplication* app = new TApplication( name.c_str(), argc, argv );
00040   gROOT -> Reset( 0 );
00041 
00042   // ===================================================================
00043   const Float_t padmargint = 0.12;
00044   const Float_t padmarginb = 0.12;
00045   const Float_t padmarginr = 0.04;
00046   const Float_t padmarginl = 0.12;
00047   //const Color_t histfillcolor = 21;
00048   const Int_t optstat = 1111110;
00049   const Int_t optfit = 1111;
00050   const Int_t transparence = 10;
00051   //const Int_t titlecolor = transparence;
00052   const Float_t titlew = 1.0 - padmarginl - padmarginr;
00053   const Float_t titleh = padmargint / 2.0;
00054   const Float_t titlex = padmarginl;
00055   const Float_t titley = 1.0 - titleh + padmargint / 10.0;
00056 
00057   const Int_t statcolor = transparence;
00058   const Float_t statx = 1.0 - padmarginr;
00059   const Float_t statw = 0.32;
00060   const Float_t staty = 1.0 - padmargint;
00061   const Int_t framefillcolor = transparence;
00062   const Int_t canvascolor = transparence;
00063   //const Float_t datex = 0.88;
00064   //const Float_t datey = 0.91;
00065   //const Int_t maxdigits = 6;
00066 
00067   const Style_t markerstyle = 21;
00068   //const Color_t markercolor = 2;
00069   //const Size_t markersize = 1;
00070   //const Color_t funccolor = 4;
00071   //const Style_t funcstyle = 1;
00072   //const Width_t funcwidth = 5;
00073   // ===================================================================
00074 
00075 
00076 
00077   // Pad
00078   gStyle -> SetPadTickX( kTRUE );
00079   gStyle -> SetPadTickY( kTRUE );
00080   //gStyle -> SetPadGridX( kTRUE );
00081   //gStyle -> SetPadGridY( kTRUE );
00082   gStyle -> SetPadBorderSize( 0 );
00083   gStyle -> SetPadBorderMode( 0 );
00084   gStyle -> SetPadTopMargin( padmargint );
00085   gStyle -> SetPadBottomMargin( padmarginb );
00086   gStyle -> SetPadRightMargin( padmarginr );
00087   gStyle -> SetPadLeftMargin( padmarginl );
00088 
00089 
00090 
00091   // Status
00092   gStyle -> SetStatBorderSize( 1 );
00093   gStyle -> SetStatColor( statcolor );
00094   gStyle -> SetStatStyle( 0 );
00095   gStyle -> SetStatX( statx );
00096   gStyle -> SetStatW( statw );
00097   gStyle -> SetStatY( staty );
00098 
00099 
00100   // Frame
00101   //gStyle -> SetFrameFillColor( 21 );
00102   //gStyle -> SetFrameFillColor( 3 );
00103   //gStyle -> SetFrameFillStyle( 1001 );
00104   gStyle -> SetFrameBorderMode( 0 );
00105   gStyle -> SetFrameBorderSize( 0 );
00106   gStyle -> SetFrameFillColor( framefillcolor );
00107   gStyle -> SetFrameFillStyle( 0 );
00108 
00109 
00110 
00111   // Canvas
00112   gStyle -> SetCanvasBorderMode( 0 );
00113   gStyle -> SetCanvasBorderSize( 0 );
00114   gStyle -> SetCanvasColor( canvascolor );
00115 
00116 
00117 
00118   // Histogram
00119   //gStyle -> SetHistFillColor( transparence );
00120 
00121   // Marker
00122   gStyle -> SetMarkerStyle( markerstyle );
00123   //gStyle -> SetMarkerColor( markercolor );
00124   //gStyle -> SetMarkerSize( markersize );
00125 
00126 
00127   // Function
00128   //gStyle -> SetFuncColor( funccolor );
00129   //gStyle -> SetFuncStyle( funcstyle );
00130   //gStyle -> SetFuncWidth( funcwidth );
00131 
00132 
00133 
00134 
00135 
00136   // Option
00137   gStyle -> SetOptStat( optstat );
00138   gStyle -> SetOptFit( optfit );
00139 
00140 
00141   // title
00142   gStyle -> SetTitleBorderSize( 0 );
00143   gStyle -> SetTitleStyle( 0 );
00144   gStyle -> SetTitleX( titlex );
00145   gStyle -> SetTitleY( titley );
00146   gStyle -> SetTitleW( titlew );
00147   gStyle -> SetTitleH( titleh );
00148 
00149 
00150 
00151   //  TGaxis *axis;
00152   //  Int_t kCenterTitle = 1<<12;
00153   //TGaxis::SetMaxDigits( maxdigits );
00154   gStyle -> SetPaperSize( TStyle::kA4 );
00155 
00156 
00157   // Date
00158   //gStyle -> SetOptDate( 3 );
00159   //gStyle -> SetDateX( datex );
00160   //gStyle -> SetDateY( datey );
00161 
00162   // Palette
00163   gStyle -> SetPalette( 1 );
00164 
00165   return( app );
00166 }
00167 
00168 //#endif
00169 #endif

CLDAQ - a Class Library for Data AcQuisition (Version 1.7.0)
Go IWAI <goiwai@users.sourceforge.jp>