////////////////////////////////////////////////////////// // This class has been automatically generated on // Fri Mar 24 15:49:42 2017 by ROOT version 6.08/04 // from TChain TriggerStatusData/ ////////////////////////////////////////////////////////// #ifndef SelSplitData_h #define SelSplitData_h #include #include #include #include #include #include #include #include #include // Header file for the classes stored in the TTree if any. //#include "../include/MSimCameraLayout.h" class SelSplitData : public TSelector { public : TTree *fChain; //!pointer to the analyzed TTree or TChain // Fixed size dimensions of array or collections stored in the TTree if any. SelSplitData(TTree * /*tree*/ =0) : fChain(0),fCutsFormula(0) { } virtual ~SelSplitData() { } virtual Int_t Version() const { return 2; } virtual void Begin(TTree *tree); virtual void SlaveBegin(TTree *tree); virtual void Init(TTree *tree); virtual Bool_t Notify(); virtual Bool_t Process(Long64_t entry); virtual Int_t GetEntry(Long64_t entry, Int_t getall = 0) { return fChain ? fChain->GetTree()->GetEntry(entry, getall) : 0; } virtual void SetOption(const char *option) { fOption = option; } virtual void SetObject(TObject *obj) { fObject = obj; } virtual void SetInputList(TList *input) { fInput = input; } virtual TList *GetOutputList() const { return fOutput; } virtual void SlaveTerminate(); virtual void Terminate(); private : TRandom3 rndmgen ; Double_t fSplitFrac ; TString fSplitName1, fSplitName2 ; TString fSplitDataSets ; TString fOutFileName ; TEntryList *elist_sub1, *elist_sub2 ; TEntryList *elist_sub1_cuts, *elist_sub2_cuts ; TTreeFormula *fCutsFormula ; Bool_t kAdditionalCuts = false ; TString fSelection ; ClassDef(SelSplitData,0); }; #endif #ifdef SelSplitData_cxx void SelSplitData::Init(TTree *tree) { // The Init() function is called when the selector needs to initialize // a new tree or chain. Typically here the branch addresses and branch // pointers of the tree will be set. // It is normally 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 on PROOF // (once per file to be processed). // Set branch addresses and branch pointers if (!tree) return; fChain = tree; fChain->SetMakeClass(1); if(fCutsFormula) { delete fCutsFormula ; fCutsFormula = 0 ; } if(!fCutsFormula) { if(kAdditionalCuts) { fCutsFormula = new TTreeFormula("CutFormula",fSelection.Data(),fChain->GetTree()) ; fCutsFormula -> SetQuickLoad(kTRUE) ; if(!fCutsFormula -> GetNdim()) { delete fCutsFormula ; fCutsFormula = 0 ; Error("Init","Invalid cut formula\n"); Abort("") ; } } } // fChain->SetBranchAddress("fUniqueID", &fUniqueID, &b_TriggerStatus_fUniqueID); // fChain->SetBranchAddress("fBits", &fBits, &b_TriggerStatus_fBits); } Bool_t SelSplitData::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. It is normally not necessary to make changes // to the generated code, but the routine can be extended by the // user if needed. The return value is currently not used. Info("Notify","processing file: %s",fChain->GetCurrentFile()->GetName()); if (elist_sub1 && elist_sub2 && fChain) { elist_sub1 -> SetTree(fChain); elist_sub2 -> SetTree(fChain); } else Warning("Notify","Error in setting entrylist tree\n") ; if (elist_sub1_cuts && fChain) elist_sub1_cuts -> SetTree(fChain); else Warning("Notify","Error in setting entrylist tree\n") ; if (elist_sub2_cuts && fChain) elist_sub2_cuts -> SetTree(fChain); else Warning("Notify","Error in setting entrylist tree\n") ; // if(fCutsFormula) // fCutsFormula -> UpdateFormulaLeaves() ; return kTRUE; } #endif // #ifdef SelSplitData_cxx