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

Trootinit.h

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

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