SFrame 3.6
|
The SCycleBase constituent responsible for running the cycle. More...
#include <core/include/SCycleBaseExec.h>
Public Member Functions | |
SCycleBaseExec () | |
Default constructor. | |
virtual void | Begin (TTree *) |
virtual void | SlaveBegin (TTree *) |
virtual void | Init (TTree *main_tree) |
virtual Bool_t | Notify () |
virtual Bool_t | Process (Long64_t entry) |
virtual void | SlaveTerminate () |
virtual void | Terminate () |
virtual Int_t | Version () const |
Function declaring the version of the selector. | |
virtual void | BeginCycle ()=0 throw ( SError ) |
Initialisation called at the beginning of a full cycle. | |
virtual void | EndCycle ()=0 throw ( SError ) |
Finalisation called at the end of a full cycle. | |
virtual void | BeginInputData (const SInputData &)=0 throw ( SError ) |
Initialisation called on the worker nodes for each input data type. | |
virtual void | EndInputData (const SInputData &)=0 throw ( SError ) |
Finalisation called on the worker nodes for each input data type. | |
virtual void | BeginMasterInputData (const SInputData &) throw ( SError ) |
Initialisation called on the client machine for each input data type. | |
virtual void | EndMasterInputData (const SInputData &) throw ( SError ) |
Finalisation called on the client machine for each input data type. | |
virtual void | BeginInputFile (const SInputData &)=0 throw ( SError ) |
Initialisation called for each input file. | |
virtual void | ExecuteEvent (const SInputData &, Double_t weight)=0 throw ( SError ) |
Function called for every event. |
The SCycleBase constituent responsible for running the cycle.
The code executing the cycle has been moved to this class. The idea is that the class only accesses the other parts of SCycleBase through the interfaces. So various parts (like SCycleBaseNTuple for ARA) can be exchanged for another one.
Definition at line 47 of file SCycleBaseExec.h.
SCycleBaseExec::SCycleBaseExec | ( | ) |
Default constructor.
The constructor just initialises some member variable(s).
Definition at line 40 of file SCycleBaseExec.cxx.
References REPORT_VERBOSE, and SCycleBaseBase::SetLogName().
void SCycleBaseExec::Begin | ( | TTree * | ) | [virtual] |
Definition at line 47 of file SCycleBaseExec.cxx.
References BeginMasterInputData(), REPORT_FATAL, REPORT_VERBOSE, ISCycleBaseConfig::SetConfInput(), ISCycleBaseHist::SetHistOutput(), ISCycleBaseNTuple::SetNTupleOutput(), and SError::what().
virtual void SCycleBaseExec::BeginCycle | ( | ) | throw ( SError ) [pure virtual] |
Initialisation called at the beginning of a full cycle.
Analysis-wide configurations, like the setup of some reconstruction algorithm based on properties configured in XML should be done here.
Referenced by SCycleController::ExecuteNextCycle().
virtual void SCycleBaseExec::BeginInputData | ( | const SInputData & | ) | throw ( SError ) [pure virtual] |
Initialisation called on the worker nodes for each input data type.
This is the place to declare the output variables for the output TTree(s). This is also the earliest point where histograms can be created.
Referenced by SlaveBegin().
virtual void SCycleBaseExec::BeginInputFile | ( | const SInputData & | ) | throw ( SError ) [pure virtual] |
Initialisation called for each input file.
This is the place to connect the input variables to the branches of the input tree(s).
Referenced by Notify().
virtual void SCycleBaseExec::BeginMasterInputData | ( | const SInputData & | ) | throw ( SError ) [inline, virtual] |
Initialisation called on the client machine for each input data type.
This function is mostly a placeholder for now. There is not much one can do here yet...
Definition at line 112 of file SCycleBaseExec.h.
Referenced by Begin().
virtual void SCycleBaseExec::EndCycle | ( | ) | throw ( SError ) [pure virtual] |
Finalisation called at the end of a full cycle.
This is the last function called after an analysis run, so it could be a good place to print some statistics about the running.
Referenced by SCycleController::ExecuteNextCycle().
virtual void SCycleBaseExec::EndInputData | ( | const SInputData & | ) | throw ( SError ) [pure virtual] |
Finalisation called on the worker nodes for each input data type.
Mainly used for printing input data statistics, or normalising efficiency histograms by hand.
Referenced by SlaveTerminate().
virtual void SCycleBaseExec::EndMasterInputData | ( | const SInputData & | ) | throw ( SError ) [inline, virtual] |
Finalisation called on the client machine for each input data type.
This function is mostly a placeholder for now. There is not much one can do here yet...
Definition at line 118 of file SCycleBaseExec.h.
Referenced by Terminate().
virtual void SCycleBaseExec::ExecuteEvent | ( | const SInputData & | , |
Double_t | weight | ||
) | throw ( SError ) [pure virtual] |
Function called for every event.
This is the function where the main analysis should be done. By the time it is called, all the input variables are filled with the contents of the actual event.
Referenced by Process().
void SCycleBaseExec::Init | ( | TTree * | main_tree | ) | [virtual] |
Definition at line 184 of file SCycleBaseExec.cxx.
References REPORT_VERBOSE.
Bool_t SCycleBaseExec::Notify | ( | ) | [virtual] |
Definition at line 192 of file SCycleBaseExec.cxx.
References BeginInputFile(), SLogger::endmsg(), SCycleConfig::GetCacheLearnEntries(), ISCycleBaseConfig::GetConfig(), ISCycleBaseNTuple::LoadInputTrees(), SCycleConfig::LOCAL, SCycleBaseBase::m_logger, REPORT_FATAL, REPORT_VERBOSE, ISCycleBaseHist::SetHistInputFile(), WARNING, and SError::what().
Bool_t SCycleBaseExec::Process | ( | Long64_t | entry | ) | [virtual] |
Definition at line 245 of file SCycleBaseExec.cxx.
References ISCycleBaseNTuple::CalculateWeight(), DEBUG, SLogger::endmsg(), ExecuteEvent(), ISCycleBaseConfig::GetConfig(), ISCycleBaseNTuple::GetEvent(), SInputData::GetEventsTotal(), SInputData::GetNEventsMax(), SCycleConfig::GetRunMode(), INFO, SCycleConfig::LOCAL, SCycleBaseBase::m_logger, REPORT_ERROR, REPORT_FATAL, REPORT_VERBOSE, SError::request(), SInputData::SetEventTreeEntry(), SError::SkipEvent, WARNING, and SError::what().
Referenced by SCycleController::ExecuteNextCycle().
void SCycleBaseExec::SlaveBegin | ( | TTree * | ) | [virtual] |
Definition at line 71 of file SCycleBaseExec.cxx.
References BeginInputData(), ISCycleBaseNTuple::CreateOutputTrees(), DEBUG, SLogger::endmsg(), SInputData::GetTrees(), SInputData::GetType(), SInputData::GetVersion(), INFO, SCycleBaseBase::m_logger, STreeType::OutputMetaTree, STreeType::OutputSimpleTree, SFrame::ProofOutputDirName, SFrame::ProofOutputFileName, SFrame::ProofOutputName, REPORT_FATAL, REPORT_VERBOSE, ISCycleBaseConfig::SetConfInput(), ISCycleBaseHist::SetHistOutput(), ISCycleBaseNTuple::SetNTupleOutput(), WARNING, and SError::what().
void SCycleBaseExec::SlaveTerminate | ( | ) | [virtual] |
Definition at line 300 of file SCycleBaseExec.cxx.
References ISCycleBaseNTuple::ClearCachedTrees(), DEBUG, EndInputData(), SLogger::endmsg(), SInputData::GetType(), SInputData::GetVersion(), INFO, SCycleBaseBase::m_logger, REPORT_FATAL, REPORT_VERBOSE, SFrame::RunStatisticsName, ISCycleBaseNTuple::SaveOutputTrees(), SError::what(), and ISCycleBaseHist::WriteHistObjects().
void SCycleBaseExec::Terminate | ( | ) | [virtual] |
Definition at line 357 of file SCycleBaseExec.cxx.
References EndMasterInputData(), REPORT_FATAL, REPORT_VERBOSE, and SError::what().
virtual Int_t SCycleBaseExec::Version | ( | ) | const [inline, virtual] |
Function declaring the version of the selector.
Definition at line 71 of file SCycleBaseExec.h.