Logo ROOT   6.30.04
Reference Guide
 All Namespaces Files Pages
h1analysisTreeReader.h
Go to the documentation of this file.
1 #ifndef h1analysisTreeReader_h
2 #define h1analysisTreeReader_h
3 
4 #include "TTreeReader.h"
5 #include "TTreeReaderValue.h"
6 #include "TTreeReaderArray.h"
7 #include "TSelector.h"
8 #include "TEntryList.h"
9 #include "TH2.h"
10 #include "TF1.h"
11 
12 class h1analysisTreeReader : public TSelector {
13 public:
14  TTreeReader myTreeReader;//!
15 
16  TTreeReaderValue<Float_t> fPtds_d; //!
17  TTreeReaderValue<Float_t> fEtads_d; //!
18  TTreeReaderValue<Float_t> fDm_d; //!
19  TTreeReaderValue<Int_t> fIk; //!
20  TTreeReaderValue<Int_t> fIpi; //!
21  TTreeReaderValue<Int_t> fIpis; //!
22  TTreeReaderValue<Float_t> fPtd0_d; //!
23  TTreeReaderValue<Float_t> fMd0_d; //!
24  TTreeReaderValue<Float_t> fRpd0_t; //!
25  TTreeReaderArray<Int_t> fNhitrp; //!
26  TTreeReaderArray<Float_t> fRstart; //!
27  TTreeReaderArray<Float_t> fRend; //!
28  TTreeReaderArray<Float_t> fNlhk; //!
29  TTreeReaderArray<Float_t> fNlhpi; //!
30  TTreeReaderValue<Int_t> fNjets; //!
31 
32  TH1F *hdmd;//!
33  TH2F *h2;//!
34 
35  Bool_t useList;//!
36  Bool_t fillList;//!
37  TEntryList *elist;//!
38  Long64_t fProcessed;//!
39 
40  h1analysisTreeReader(TTree* /*tree*/=0) :
41  myTreeReader(),
42  fPtds_d (myTreeReader, "ptds_d" ),
43  fEtads_d (myTreeReader, "etads_d" ),
44  fDm_d (myTreeReader, "dm_d" ),
45  fIk (myTreeReader, "ik" ),
46  fIpi (myTreeReader, "ipi" ),
47  fIpis (myTreeReader, "ipis" ),
48  fPtd0_d (myTreeReader, "ptd0_d" ),
49  fMd0_d (myTreeReader, "md0_d" ),
50  fRpd0_t (myTreeReader, "rpd0_t" ),
51  fNhitrp (myTreeReader, "nhitrp" ),
52  fRstart (myTreeReader, "rstart" ),
53  fRend (myTreeReader, "rend" ),
54  fNlhk (myTreeReader, "nlhk" ),
55  fNlhpi (myTreeReader, "nlhpi" ),
56  fNjets (myTreeReader, "njets" )
57  {
58  Reset();
59  };
60 
61  virtual ~h1analysisTreeReader() { }
62  void Reset();
63 
64  int Version() const {return 1;}
65  void Begin(TTree *);
66  void SlaveBegin(TTree *);
67  void Init(TTree *myTree) { myTreeReader.SetTree(myTree); }
68  Bool_t Notify();
69  Bool_t Process(Long64_t entry);
70  void SetOption(const char *option) { fOption = option; }
71  void SetObject(TObject *obj) { fObject = obj; }
72  void SetInputList(TList *input) {fInput = input;}
73  TList *GetOutputList() const { return fOutput; }
74  void SlaveTerminate();
75  void Terminate();
76 
77  ClassDef(h1analysisTreeReader,0);
78 };
79 
80 //_____________________________________________________________________
81 void h1analysisTreeReader::Reset()
82 {
83  // Reset the data members to theit initial value
84 
85  hdmd = 0;
86  h2 = 0;
87  elist = 0;
88  fillList = kFALSE;
89  useList = kFALSE;
90  fProcessed = 0;
91 }
92 
93 #endif