#ifndef h1analysisTreeReader_h #define h1analysisTreeReader_h #include "TTreeReader.h" #include "TTreeReaderValue.h" #include "TTreeReaderArray.h" #include "TSelector.h" #include "TEntryList.h" #include "TH2.h" #include "TF1.h" class h1analysisTreeReader : public TSelector { public: TTreeReader myTreeReader;//! TTreeReaderValue fPtds_d; //! TTreeReaderValue fEtads_d; //! TTreeReaderValue fDm_d; //! TTreeReaderValue fIk; //! TTreeReaderValue fIpi; //! TTreeReaderValue fIpis; //! TTreeReaderValue fPtd0_d; //! TTreeReaderValue fMd0_d; //! TTreeReaderValue fRpd0_t; //! TTreeReaderArray fNhitrp; //! TTreeReaderArray fRstart; //! TTreeReaderArray fRend; //! TTreeReaderArray fNlhk; //! TTreeReaderArray fNlhpi; //! TTreeReaderValue fNjets; //! TH1F *hdmd;//! TH2F *h2;//! Bool_t useList;//! Bool_t fillList;//! TEntryList *elist;//! Long64_t fProcessed;//! h1analysisTreeReader(TTree* /*tree*/=0) : myTreeReader(), fPtds_d (myTreeReader, "ptds_d" ), fEtads_d (myTreeReader, "etads_d" ), fDm_d (myTreeReader, "dm_d" ), fIk (myTreeReader, "ik" ), fIpi (myTreeReader, "ipi" ), fIpis (myTreeReader, "ipis" ), fPtd0_d (myTreeReader, "ptd0_d" ), fMd0_d (myTreeReader, "md0_d" ), fRpd0_t (myTreeReader, "rpd0_t" ), fNhitrp (myTreeReader, "nhitrp" ), fRstart (myTreeReader, "rstart" ), fRend (myTreeReader, "rend" ), fNlhk (myTreeReader, "nlhk" ), fNlhpi (myTreeReader, "nlhpi" ), fNjets (myTreeReader, "njets" ) { Reset(); }; virtual ~h1analysisTreeReader() { } void Reset(); int Version() const {return 1;} void Begin(TTree *); void SlaveBegin(TTree *); void Init(TTree *myTree) { myTreeReader.SetTree(myTree); } Bool_t Notify(); Bool_t Process(Long64_t entry); void SetOption(const char *option) { fOption = option; } void SetObject(TObject *obj) { fObject = obj; } void SetInputList(TList *input) {fInput = input;} TList *GetOutputList() const { return fOutput; } void SlaveTerminate(); void Terminate(); ClassDef(h1analysisTreeReader,0); }; //_____________________________________________________________________ void h1analysisTreeReader::Reset() { // Reset the data members to theit initial value hdmd = 0; h2 = 0; elist = 0; fillList = kFALSE; useList = kFALSE; fProcessed = 0; } #endif