![]() |
Diana Software
|
Diana Reconstruction program. More...
Public Types | |
| enum | SequenceStatus { kSequenceConfig , kSequenceInit , kSequenceDo , kSequenceDone } |
Public Member Functions | |
| QSequence (const std::string &) | |
| Ctor that takes the name of the sequence as argument. More... | |
| virtual | ~QSequence () |
| Default dtor. More... | |
| bool | Run () |
| The core of the sequence. Loops over Init's, Do's and Done's. More... | |
| void | Dump (std::ostream &) const |
| Dump the content of the sequence. More... | |
| const QGlobalDataManager & | GlobalData () const |
| Access to the global data manager for the sequence. More... | |
| QGlobalDataManager & | GlobalData () |
| Access to the global data manager for the sequence. More... | |
| void | SetRunAgain (bool b) |
| Run the sequence again. More... | |
| bool | GetRunAgain () const |
| Check if this sequence is going to be rerun. More... | |
| unsigned int | GetIteration () const |
| size_t | GetNumber () const |
| Get the number of this sequence. More... | |
| SequenceStatus | GetSequenceStatus () const |
| Get the sequence status (Config/Init/Do/Done) More... | |
| const QError & | JumpToEvent (Long64_t event, QBaseModule *caller) |
| Jump to an event in a particular in a module. More... | |
| void | PrintEvents (const QEvent &ev, const QEventList &evList) const |
| Print the event list. More... | |
| void | PrintGlobal () const |
| Print the global data. More... | |
| void | CheckModuleWithNeighbours () |
| Check if any of the modules have neighbours. More... | |
| std::string | GetReaderName () const |
| Get the name of the reader. More... | |
| std::string | GetWriterName () const |
| Get the name of the writer. More... | |
| std::string | GetDriverName () const |
| Get the name of the driver. More... | |
Public Member Functions inherited from QNamed | |
| QNamed () | |
| QNamed (const std::string &Name) | |
| virtual | ~QNamed () |
| const std::string & | GetName () const |
| void | SetName (const std::string &name) |
Private Member Functions | |
| void | SaveConfig () |
| Save the config data to file. More... | |
Private Attributes | |
| QReader * | p_Reader |
| Pointer to the reader. More... | |
| QWriter * | p_Writer |
| Pointer to the writer. More... | |
| QDriver * | p_Driver |
| Pointer to a driver. More... | |
| std::vector< QBaseModule * > | modules |
| The list of the modules. More... | |
| QGlobalDataManager | fGlobalData |
| Global variables that a module can save. More... | |
| unsigned int | fIteration |
| Iterations counter. More... | |
| bool | fRunAgain |
| Run again. More... | |
| QRWCommon | fRWCommon |
| The Reader/Writer data shared between the reader and writer. More... | |
| SequenceStatus | fSequenceStatus |
| Status of the current sequence. More... | |
| QSequenceConfig | fConfig |
| Sequence config data. More... | |
Static Private Attributes | |
| static size_t | fCounter = 0 |
| Static sequence counter. More... | |
Friends | |
| class | QModuleFactory |
Diana Reconstruction program.
This is the class that handles a diana sequence. It collects all the modules in a particular sequence, runs the init methods, do methods and done methods.
Definition at line 40 of file QSequence.hh.
| Enumerator | |
|---|---|
| kSequenceConfig | |
| kSequenceInit | |
| kSequenceDo | |
| kSequenceDone | |
Definition at line 43 of file QSequence.hh.
| QSequence::QSequence | ( | const std::string & | n | ) |
Ctor that takes the name of the sequence as argument.
Definition at line 22 of file QSequence.cc.
References QSequenceConfig::Clear(), QGlobalDataManager::Clear(), fConfig, fCounter, fGlobalData, fIteration, QSequenceConfig::fName, and modules.
|
virtual |
Default dtor.
Definition at line 32 of file QSequence.cc.
References QOptions::CheckAtDefault(), QOptions::CheckNotGet(), QGlobalDataManager::Clear(), QGlobalReaderDispatcher::Clear(), QGlobalWriterDispatcher::Clear(), DebugMsg, fGlobalData, QMessageHandler::Get(), QOptions::GetInstance(), QGlobalReaderDispatcher::GetInstance(), QGlobalWriterDispatcher::GetInstance(), QNamed::GetName(), InfoMsg, QBaseModule::isEnabled(), modules, p_Driver, p_Reader, p_Writer, QMessageHandler::Send(), and WarnMsg.
| void QSequence::CheckModuleWithNeighbours | ( | ) |
Check if any of the modules have neighbours.
Definition at line 298 of file QSequence.cc.
References DebugMsg, ErrorMsg, QMessageHandler::Get(), QNamed::GetName(), QBaseModule::GetName(), modules, QBaseModule::NeedNeighbours(), QReader::NeighboursOn(), p_Driver, p_Reader, p_Writer, and QMessageHandler::Send().
Referenced by Run().
| void QSequence::Dump | ( | std::ostream & | o | ) | const |
Dump the content of the sequence.
Definition at line 70 of file QSequence.cc.
References QNamed::GetName(), QBaseModule::GetName(), QBaseModule::isEnabled(), modules, p_Driver, p_Reader, p_Writer, and QBaseModule::UpdateEnableFlag().
| std::string QSequence::GetDriverName | ( | ) | const |
Get the name of the driver.
Definition at line 397 of file QSequence.cc.
References QBaseModule::GetName(), and p_Driver.
|
inline |
\breif Get the current iteration of the sequence
Definition at line 83 of file QSequence.hh.
References fIteration.
Referenced by QBaseModule::GetIteration(), PrintEvents(), Run(), and SaveConfig().
|
inline |
| std::string QSequence::GetReaderName | ( | ) | const |
Get the name of the reader.
Definition at line 387 of file QSequence.cc.
References QBaseModule::GetName(), and p_Reader.
|
inline |
Check if this sequence is going to be rerun.
Definition at line 81 of file QSequence.hh.
References fRunAgain.
Referenced by QBaseModule::GetRunAgain().
|
inline |
Get the sequence status (Config/Init/Do/Done)
Definition at line 87 of file QSequence.hh.
References fSequenceStatus.
Referenced by PrintEvents().
| std::string QSequence::GetWriterName | ( | ) | const |
Get the name of the writer.
Definition at line 392 of file QSequence.cc.
References QBaseModule::GetName(), and p_Writer.
|
inline |
Access to the global data manager for the sequence.
Each sequence has variables that can be stored by modules. This function provides access to the data manager.
Definition at line 72 of file QSequence.hh.
References fGlobalData.
|
inline |
Access to the global data manager for the sequence.
Each sequence has variables that can be stored by modules. This function provides access to the data manager.
Definition at line 65 of file QSequence.hh.
References fGlobalData.
Referenced by QBaseModule::BeginBase(), QBaseModule::EndBase(), QBaseModule::GlobalData(), QBaseModule::ProcessBase(), and Run().
| const QError & QSequence::JumpToEvent | ( | Long64_t | event, |
| QBaseModule * | caller | ||
| ) |
Jump to an event in a particular in a module.
Definition at line 325 of file QSequence.cc.
References QReader::BaseJumpToEvent(), err, QBaseModule::GetName(), p_Reader, and QERR_UNKNOWN_ERR.
Referenced by QDriver::JumpToEvent().
| void QSequence::PrintEvents | ( | const QEvent & | ev, |
| const QEventList & | evList | ||
| ) | const |
Print the event list.
Definition at line 336 of file QSequence.cc.
References QEvent::Dump(), QEventList::Empty(), ErrorMsg, QMessageHandler::Get(), GetIteration(), QNamed::GetName(), QEvent::GetOwner(), GetSequenceStatus(), InfoMsg, kSequenceConfig, kSequenceDo, kSequenceInit, QMessageHandler::Send(), and QEventList::Size().
Referenced by Run().
| void QSequence::PrintGlobal | ( | ) | const |
Print the global data.
Definition at line 376 of file QSequence.cc.
References QGlobalDataManager::Dump(), ErrorMsg, fGlobalData, QMessageHandler::Get(), QNamed::GetName(), InfoMsg, and QMessageHandler::Send().
Referenced by Run().
| bool QSequence::Run | ( | ) |
The core of the sequence. Loops over Init's, Do's and Done's.
Definition at line 90 of file QSequence.cc.
References QBaseModule::BeginBase(), CheckModuleWithNeighbours(), QEventAssembler::Clear(), QEventList::Clear(), QEventAssembler::Consolidate(), QBaseModule::EndBase(), err, ErrorMsg, fConfig, fGlobalData, fIteration, QSequenceConfig::fModules, fRunAgain, QReader::fRWCommon, fRWCommon, QWriter::fRWCommon, fSequenceStatus, QMessageHandler::Get(), QGlobalDataManager::Get(), QProcessStatus::GetError(), QEventAssembler::GetEvent(), QOptions::GetInstance(), QProcessStatus::GetInstance(), QOptions::GetInt(), GetIteration(), QNamed::GetName(), GlobalData(), QProcessStatus::HasChanged(), InfoMsg, QBaseModule::isEnabled(), QProcessStatus::isError(), QProcessStatus::isExiting(), QProcessStatus::isRunning(), kSequenceConfig, kSequenceDo, kSequenceDone, kSequenceInit, modules, NoFilterMsg, QProcessStatus::Notify(), p_Driver, p_Reader, p_Writer, PanicMsg, PrintEvents(), PrintGlobal(), QBaseModule::ProcessBase(), QERR_GLOBAL_GENERIC, QERR_GLOBAL_HANDLE, QERR_SUCCESS, SaveConfig(), QMessageHandler::Send(), QGlobalDataManager::Set(), QGlobalDataManager::SetInputVersion(), QDriver::SetModulesList(), QGlobalDataManager::SetOwner(), QDriver::StopRun(), and WarnMsg.
Referenced by QFrameWork::Run().
|
private |
Save the config data to file.
Definition at line 402 of file QSequence.cc.
References DebugMsg, fConfig, QRWCommon::fFrameWorkConfigOld, fGlobalData, fRWCommon, QFrameWorkConfig::fSequences, QMessageHandler::Get(), GlobalHandle< Q >::Get(), QGlobalDataManager::Get(), QError::GetDescription(), GlobalHandle< Q >::GetError(), GetIteration(), QNamed::GetName(), InfoMsg, GlobalHandle< Q >::IsValid(), QMessageHandler::Send(), GlobalHandle< Q >::Set(), QGlobalDataManager::Set(), and QGlobalDataManager::SetOwner().
Referenced by Run().
|
inline |
Run the sequence again.
Modules can force the framework to rerun the sequence they belong to.
Definition at line 79 of file QSequence.hh.
Referenced by QBaseModule::SetRunAgain().
|
friend |
Definition at line 138 of file QSequence.hh.
|
private |
Sequence config data.
Definition at line 133 of file QSequence.hh.
Referenced by QModuleFactory::Init(), QSequence(), Run(), and SaveConfig().
|
staticprivate |
Static sequence counter.
Definition at line 124 of file QSequence.hh.
Referenced by GetNumber(), and QSequence().
|
private |
Global variables that a module can save.
Definition at line 115 of file QSequence.hh.
Referenced by GlobalData(), PrintGlobal(), QSequence(), Run(), SaveConfig(), and ~QSequence().
|
private |
Iterations counter.
Definition at line 118 of file QSequence.hh.
Referenced by GetIteration(), QSequence(), and Run().
|
private |
Run again.
Definition at line 121 of file QSequence.hh.
Referenced by GetRunAgain(), Run(), and SetRunAgain().
|
private |
The Reader/Writer data shared between the reader and writer.
Definition at line 127 of file QSequence.hh.
Referenced by Run(), and SaveConfig().
|
private |
Status of the current sequence.
Definition at line 130 of file QSequence.hh.
Referenced by GetSequenceStatus(), and Run().
|
private |
The list of the modules.
Definition at line 112 of file QSequence.hh.
Referenced by CheckModuleWithNeighbours(), Dump(), QModuleFactory::Init(), QSequence(), Run(), and ~QSequence().
|
private |
Pointer to a driver.
Definition at line 110 of file QSequence.hh.
Referenced by CheckModuleWithNeighbours(), Dump(), GetDriverName(), QModuleFactory::Init(), Run(), and ~QSequence().
|
private |
Pointer to the reader.
Definition at line 106 of file QSequence.hh.
Referenced by CheckModuleWithNeighbours(), Dump(), GetReaderName(), QModuleFactory::Init(), JumpToEvent(), Run(), and ~QSequence().
|
private |
Pointer to the writer.
Definition at line 108 of file QSequence.hh.
Referenced by CheckModuleWithNeighbours(), Dump(), GetWriterName(), QModuleFactory::Init(), Run(), and ~QSequence().