Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
run_h1analysis.C File Reference

Detailed Description

View in nbviewer Open in SWAN
Macro driving the analysis can specify file name and type

.- type == 0 : normal

  • type = 1 : use AClic to compile selector
  • type = 2 : use a fill list and then process the fill list///
//----------------------------------------
void run_h1analysis(int type = 0, const char * h1dir = 0) {
std::cout << "Run h1 analysis " << std::endl;
// create first the chain with all the files
TChain chain("h42");
if (h1dir) {
gSystem->Setenv("H1",h1dir);
}
else
gSystem->Setenv("H1","http://root.cern/files/h1/");
std::cout << "Creating the chain" << std::endl;
chain.SetCacheSize(20*1024*1024);
chain.Add("$H1/dstarmb.root");
chain.Add("$H1/dstarp1a.root");
chain.Add("$H1/dstarp1b.root");
chain.Add("$H1/dstarp2.root");
TString selectionMacro = gSystem->GetDirName(__FILE__) + "/h1analysis.C";
if (type == 0)
chain.Process(selectionMacro);
else if (type == 1) {
// use AClic ( add a + at the end
selectionMacro += "+";
chain.Process(selectionMacro);
}
else if (type == 2) {
chain.Process(selectionMacro,"fillList");
chain.Process(selectionMacro,"useList");
}
}
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
R__EXTERN TSystem * gSystem
Definition TSystem.h:561
A chain is a collection of files containing TTree objects.
Definition TChain.h:33
Basic string class.
Definition TString.h:139
virtual void Setenv(const char *name, const char *value)
Set environment variable.
Definition TSystem.cxx:1649
virtual TString GetDirName(const char *pathname)
Return the directory name in pathname.
Definition TSystem.cxx:1032
Author

Definition in file run_h1analysis.C.