1 #ifndef SelectionManager_h 2 #define SelectionManager_h 4 #include "SelectionBase.hxx" 50 void CopySteps(const std::string& ssel1, const std::string& sbranch1, UInt_t first, UInt_t last,const std::string& ssel2, const std::string& sbranch2="trunk");
52 void CopySteps(const std::string& ssel1, UInt_t first, UInt_t last,const std::string& ssel2, const std::string& sbranch2="trunk"){
53 CopySteps(ssel1,"trunk",first,last,ssel2,sbranch2);
57 void CopySteps(const std::string& ssel1, const std::string& sbranch1, const std::string& ssel2, const std::string& sbranch2="trunk");
59 void CopySteps(const std::string& ssel1, const std::string& ssel2, const std::string& sbranch2="trunk"){
60 CopySteps(ssel1,"trunk",ssel2,sbranch2);
65 void CopyStep(const std::string& ssel1, const std::string& sbranch1, UInt_t istep, const std::string& ssel2, const std::string& sbranch2="trunk");
67 void CopyStep(const std::string& ssel1, UInt_t istep, const std::string& ssel2, const std::string& sbranch2="trunk"){
68 CopyStep(ssel1,"trunk",istep,ssel2,sbranch2);
void PrintStatistics()
Print #events passing cuts.
UInt_t _nEnabledSelections
number of enabled selections
void DumpSelections()
Print out the index, name and title of each selection for a given branch (no argument for all branche...
void CreateToyBoxArray(Int_t nevents)
Create the array of PreviousToyBox for all enabled selections.
bool ApplySelection(const std::string &name, AnaEventC &event, bool &redo)
Apply the selection that was registered with the given name.
UInt_t GetNMaxCuts()
Returns the maximum number of cuts in all selections.
UInt_t GetNEnabledSelections()
Returns the number of enabled selections.
bool PreSelectionPassed(const AnaEventC &event)
Chek if preselection cuts have been passed;.
std::vector< SelectionBase * > & GetSelections()
Return the map of selections.
UInt_t _nMaxBranches
maximum number of branches
UInt_t _nMaxCuts
maximum number of cuts
std::vector< SelectionBase * > _eventSelections
Internal storage fo the selections that were added.
void ReadSelections(const std::string &file)
void SetForceFillEventSummary(bool force)
void AddSelection(const std::string &name, const std::string &title, SelectionBase *sel, Int_t presel=-1)
Add a user selection to the selection manager.
UInt_t GetNMaxBranches()
Returns the maximum number of branches in all selections.
void DisableSelection(const std::string &sel)
Disable a selection.
void EnableSelection(const std::string &sel)
Enable a selection.
void FinalizeEvent(const AnaEventC &event)
Delete the PreviousToyBox pointer for the last toy of the event for all enabled selections.
SelectionBase * GetSelection(const std::string &name, bool print_error=true)
Return the selection that was registered with the given name. NULL if it does not exist...
void SetValidRunPeriods(const std::string &ssel1, const std::string validRunPeriods)
Method to set the valid run periods for this selection (e.g. Anti-neutrino selections should only be ...
void InitializeEvent(AnaEventC &event)
Initialize the EventBox for all enabled selections.