Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
run_h1analysis.C
Go to the documentation of this file.
1/// \file
2/// \ingroup tutorial_tree
3/// \notebook -nodraw
4/// Macro driving the analysis can specify file name and type
5///
6/// .- type == 0 : normal
7/// - type = 1 : use AClic to compile selector
8/// - type = 2 : use a fill list and then process the fill list///
9///
10/// \macro_code
11///
12/// \author
13
14//----------------------------------------
15
16void run_h1analysis(int type = 0, const char * h1dir = 0) {
17
18 std::cout << "Run h1 analysis " << std::endl;
19
20 // create first the chain with all the files
21
22 TChain chain("h42");
23
24 if (h1dir) {
25 gSystem->Setenv("H1",h1dir);
26 }
27 else
28 gSystem->Setenv("H1","http://root.cern/files/h1/");
29
30
31 std::cout << "Creating the chain" << std::endl;
32
33 chain.SetCacheSize(20*1024*1024);
34 chain.Add("$H1/dstarmb.root");
35 chain.Add("$H1/dstarp1a.root");
36 chain.Add("$H1/dstarp1b.root");
37 chain.Add("$H1/dstarp2.root");
38
39 TString selectionMacro = gSystem->GetDirName(__FILE__) + "/h1analysis.C";
40
41 if (type == 0)
42 chain.Process(selectionMacro);
43 else if (type == 1) {
44 // use AClic ( add a + at the end
45 selectionMacro += "+";
46 chain.Process(selectionMacro);
47 }
48 else if (type == 2) {
49 chain.Process(selectionMacro,"fillList");
50 chain.Process(selectionMacro,"useList");
51 }
52}
53
54
55
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:555
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