////////////////////////////////////////////////////////// // This class has been automatically generated on // Tue Jan 23 17:52:15 2007 by ROOT version 5.10/00e // from TTree CollectionTree/CollectionTree // found on file: TopViewAANtuple.root ////////////////////////////////////////////////////////// #ifndef Info_h #define Info_h #include #include #include #include class Info { public : TTree *fChain; //!pointer to the analyzed TTree or TChain Int_t fCurrent; //!current Tree number in a TChain // Declaration of leave types Int_t RunNumber; Int_t EventNumber; Char_t StreamESD_ref[153]; Char_t StreamRDO_ref; Char_t Token[153]; Int_t TruthInstance; Int_t TruthCounter; Int_t TruthEventAndInstance; Int_t TruthRunNumber; Int_t TruthNInstance; Int_t FullRecoInstance; Int_t FullRecoCounter; Int_t FullRecoEventAndInstance; Int_t FullRecoRunNumber; Int_t FullRecoNInstance; Int_t FastSimInstance; Int_t FastSimCounter; Int_t FastSimEventAndInstance; Int_t FastSimRunNumber; Int_t FastSimNInstance; Int_t FullRecoAnaInstance; Int_t FullRecoAnaCounter; Int_t FullRecoAnaEventAndInstance; Int_t FullRecoAnaRunNumber; Int_t FullRecoAnaNInstance; Int_t FastSimAnaInstance; Int_t FastSimAnaCounter; Int_t FastSimAnaEventAndInstance; Int_t FastSimAnaRunNumber; Int_t FastSimAnaNInstance; Int_t TruthAnaInstance; Int_t TruthAnaCounter; Int_t TruthAnaEventAndInstance; Int_t TruthAnaRunNumber; Int_t TruthAnaNInstance; // List of branches TBranch *b_RunNumber; //! TBranch *b_EventNumber; //! TBranch *b_StreamESD_ref; //! TBranch *b_StreamRDO_ref; //! TBranch *b_Token; //! TBranch *b_TruthInstance; //! TBranch *b_TruthCounter; //! TBranch *b_TruthEventAndInstance; //! TBranch *b_TruthRunNumber; //! TBranch *b_TruthNInstance; //! TBranch *b_FullRecoInstance; //! TBranch *b_FullRecoCounter; //! TBranch *b_FullRecoEventAndInstance; //! TBranch *b_FullRecoRunNumber; //! TBranch *b_FullRecoNInstance; //! TBranch *b_FastSimInstance; //! TBranch *b_FastSimCounter; //! TBranch *b_FastSimEventAndInstance; //! TBranch *b_FastSimRunNumber; //! TBranch *b_FastSimNInstance; //! TBranch *b_FullRecoAnaInstance; //! TBranch *b_FullRecoAnaCounter; //! TBranch *b_FullRecoAnaEventAndInstance; //! TBranch *b_FullRecoAnaRunNumber; //! TBranch *b_FullRecoAnaNInstance; //! TBranch *b_FastSimAnaInstance; //! TBranch *b_FastSimAnaCounter; //! TBranch *b_FastSimAnaEventAndInstance; //! TBranch *b_FastSimAnaRunNumber; //! TBranch *b_FastSimAnaNInstance; //! TBranch *b_TruthAnaInstance; //! TBranch *b_TruthAnaCounter; //! TBranch *b_TruthAnaEventAndInstance; //! TBranch *b_TruthAnaRunNumber; //! TBranch *b_TruthAnaNInstance; //! Info(TTree *tree=0); virtual ~Info(); virtual Int_t Cut(Long64_t entry); virtual Int_t GetEntry(Long64_t entry); virtual Long64_t LoadTree(Long64_t entry); virtual void Init(TTree *tree); virtual void Loop(); virtual Bool_t Notify(); virtual void Show(Long64_t entry = -1); }; //#endif //#ifdef Info_cxx Info::Info(TTree *tree) { // if parameter tree is not specified (or zero), connect the file // used to generate this class and read the Tree. cout << "Starting Info::Info " << endl; if (tree == 0) { // TFile *f = (TFile*)gROOT->GetListOfFiles()->FindObject("TopViewAANtuple.root"); if (!f) { // f = new TFile("TopViewAANtuple.root"); } // tree = (TTree*)gDirectory->Get("CollectionTree"); } cout << "Starting Init(tree)" << endl; Init(tree); cout << "Init(tree) ended" << endl; cout << "Info::Info() ended" << endl; } Info::~Info() { if (!fChain) return; delete fChain->GetCurrentFile(); } Int_t Info::GetEntry(Long64_t entry) { // Read contents of entry. if (!fChain) return 0; return fChain->GetEntry(entry); } Long64_t Info::LoadTree(Long64_t entry) { // Set the environment to read one entry if (!fChain) return -5; Long64_t centry = fChain->LoadTree(entry); if (centry < 0) return centry; if (fChain->IsA() != TChain::Class()) return centry; TChain *chain = (TChain*)fChain; if (chain->GetTreeNumber() != fCurrent) { fCurrent = chain->GetTreeNumber(); Notify(); } return centry; } void Info::Init(TTree *tree) { // The Init() function is called when the selector needs to initialize // a new tree or chain. Typically here the branch addresses of the tree // will be set. It is normaly not necessary to make changes to the // generated code, but the routine can be extended by the user if needed. // Init() will be called many times when running with PROOF. cout << "Starting inside Init(tree)" << endl; // Set branch addresses if (tree == 0) return; fChain = tree; fCurrent = -1; fChain->SetMakeClass(1); cout << "Starting setting branchaddresses" << endl; fChain->SetBranchAddress("RunNumber",&RunNumber); cout << "RunNumber is set" << endl; fChain->SetBranchAddress("EventNumber",&EventNumber); fChain->SetBranchAddress("StreamESD_ref",StreamESD_ref); fChain->SetBranchAddress("StreamRDO_ref",&StreamRDO_ref); fChain->SetBranchAddress("Token",Token); fChain->SetBranchAddress("TruthInstance",&TruthInstance); fChain->SetBranchAddress("TruthCounter",&TruthCounter); fChain->SetBranchAddress("TruthEventAndInstance",&TruthEventAndInstance); fChain->SetBranchAddress("TruthRunNumber",&TruthRunNumber); fChain->SetBranchAddress("TruthNInstance",&TruthNInstance); fChain->SetBranchAddress("FullRecoInstance",&FullRecoInstance); fChain->SetBranchAddress("FullRecoCounter",&FullRecoCounter); fChain->SetBranchAddress("FullRecoEventAndInstance",&FullRecoEventAndInstance); fChain->SetBranchAddress("FullRecoRunNumber",&FullRecoRunNumber); fChain->SetBranchAddress("FullRecoNInstance",&FullRecoNInstance); fChain->SetBranchAddress("FastSimInstance",&FastSimInstance); fChain->SetBranchAddress("FastSimCounter",&FastSimCounter); fChain->SetBranchAddress("FastSimEventAndInstance",&FastSimEventAndInstance); fChain->SetBranchAddress("FastSimRunNumber",&FastSimRunNumber); fChain->SetBranchAddress("FastSimNInstance",&FastSimNInstance); fChain->SetBranchAddress("FullRecoAnaInstance",&FullRecoAnaInstance); fChain->SetBranchAddress("FullRecoAnaCounter",&FullRecoAnaCounter); fChain->SetBranchAddress("FullRecoAnaEventAndInstance",&FullRecoAnaEventAndInstance); fChain->SetBranchAddress("FullRecoAnaRunNumber",&FullRecoAnaRunNumber); fChain->SetBranchAddress("FullRecoAnaNInstance",&FullRecoAnaNInstance); fChain->SetBranchAddress("FastSimAnaInstance",&FastSimAnaInstance); fChain->SetBranchAddress("FastSimAnaCounter",&FastSimAnaCounter); fChain->SetBranchAddress("FastSimAnaEventAndInstance",&FastSimAnaEventAndInstance); fChain->SetBranchAddress("FastSimAnaRunNumber",&FastSimAnaRunNumber); fChain->SetBranchAddress("FastSimAnaNInstance",&FastSimAnaNInstance); fChain->SetBranchAddress("TruthAnaInstance",&TruthAnaInstance); fChain->SetBranchAddress("TruthAnaCounter",&TruthAnaCounter); fChain->SetBranchAddress("TruthAnaEventAndInstance",&TruthAnaEventAndInstance); fChain->SetBranchAddress("TruthAnaRunNumber",&TruthAnaRunNumber); fChain->SetBranchAddress("TruthAnaNInstance",&TruthAnaNInstance); cout << "branchadddresses are all set!" << endl; cout << "Starting Notify" << endl; Notify(); cout << "Notify ended " << endl; cout << "Init inside ended" << endl; } Bool_t Info::Notify() { // The Notify() function is called when a new file is opened. This // can be either for a new TTree in a TChain or when when a new TTree // is started when using PROOF. Typically here the branch pointers // will be retrieved. It is normaly not necessary to make changes // to the generated code, but the routine can be extended by the // user if needed. // Get branch pointers cout << "Notify inside start" << endl; fChain->SetBranchStatus("RunNumber", 1); cout << "Branch status set" << endl; b_RunNumber = fChain->GetBranch("RunNumber"); cout << "RunNumber branch address get!" << endl; b_EventNumber = fChain->GetBranch("EventNumber"); cout << "EventNumber branch address get!" << endl; b_StreamESD_ref = fChain->GetBranch("StreamESD_ref"); b_StreamRDO_ref = fChain->GetBranch("StreamRDO_ref"); b_Token = fChain->GetBranch("Token"); b_TruthInstance = fChain->GetBranch("TruthInstance"); b_TruthCounter = fChain->GetBranch("TruthCounter"); b_TruthEventAndInstance = fChain->GetBranch("TruthEventAndInstance"); b_TruthRunNumber = fChain->GetBranch("TruthRunNumber"); b_TruthNInstance = fChain->GetBranch("TruthNInstance"); b_FullRecoInstance = fChain->GetBranch("FullRecoInstance"); b_FullRecoCounter = fChain->GetBranch("FullRecoCounter"); b_FullRecoEventAndInstance = fChain->GetBranch("FullRecoEventAndInstance"); b_FullRecoRunNumber = fChain->GetBranch("FullRecoRunNumber"); b_FullRecoNInstance = fChain->GetBranch("FullRecoNInstance"); b_FastSimInstance = fChain->GetBranch("FastSimInstance"); b_FastSimCounter = fChain->GetBranch("FastSimCounter"); b_FastSimEventAndInstance = fChain->GetBranch("FastSimEventAndInstance"); b_FastSimRunNumber = fChain->GetBranch("FastSimRunNumber"); b_FastSimNInstance = fChain->GetBranch("FastSimNInstance"); b_FullRecoAnaInstance = fChain->GetBranch("FullRecoAnaInstance"); b_FullRecoAnaCounter = fChain->GetBranch("FullRecoAnaCounter"); b_FullRecoAnaEventAndInstance = fChain->GetBranch("FullRecoAnaEventAndInstance"); b_FullRecoAnaRunNumber = fChain->GetBranch("FullRecoAnaRunNumber"); b_FullRecoAnaNInstance = fChain->GetBranch("FullRecoAnaNInstance"); b_FastSimAnaInstance = fChain->GetBranch("FastSimAnaInstance"); b_FastSimAnaCounter = fChain->GetBranch("FastSimAnaCounter"); b_FastSimAnaEventAndInstance = fChain->GetBranch("FastSimAnaEventAndInstance"); b_FastSimAnaRunNumber = fChain->GetBranch("FastSimAnaRunNumber"); b_FastSimAnaNInstance = fChain->GetBranch("FastSimAnaNInstance"); b_TruthAnaInstance = fChain->GetBranch("TruthAnaInstance"); b_TruthAnaCounter = fChain->GetBranch("TruthAnaCounter"); b_TruthAnaEventAndInstance = fChain->GetBranch("TruthAnaEventAndInstance"); b_TruthAnaRunNumber = fChain->GetBranch("TruthAnaRunNumber"); b_TruthAnaNInstance = fChain->GetBranch("TruthAnaNInstance"); cout << "All branchaddresses obtained" << endl; cout << "Inside Notify ended" << endl; return kTRUE; } void Info::Show(Long64_t entry) { // Print contents of entry. // If entry is not specified, print current entry if (!fChain) return; fChain->Show(entry); } Int_t Info::Cut(Long64_t entry) { // This function may be called from Loop. // returns 1 if entry is accepted. // returns -1 otherwise. return 1; } #endif // #ifdef Info_cxx