|
SLIC
6.1.1
Simulation for the Linear Collider (SLIC) - Geant4 simulation application
|
A queue of G4 commands to be executed in order. More...
#include <CommandQueue.hh>
Public Types | |
| typedef std::string | CommandType |
| typedef std::vector< std::string > | CommandVectorType |
| typedef size_t | SizeType |
Public Types inherited from Module | |
| enum | ModuleStatus { eOkay = 0 , eNotInitialized = 1 , eBadState = 2 , eFatalError = 3 } |
Public Member Functions | |
| CommandQueue () | |
| virtual | ~CommandQueue () |
| void | add (const char *command) |
| void | add (const CommandType &command) |
| void | clear () |
| CommandVectorType::iterator | cmdsBegin () |
| CommandVectorType::iterator | cmdsEnd () |
| void | execute () |
| CommandVectorType::iterator | find (const std::string &command) |
| void | printOut () |
Public Member Functions inherited from Module | |
| virtual | ~Module () |
| virtual void | beginEvent (const G4Event *) |
| virtual void | beginRun (const G4Run *) |
| virtual void | cleanup () |
| bool | deleteOnExit () |
| virtual void | endEvent (const G4Event *) |
| virtual void | endRun (const G4Run *) |
| const std::string & | getName () const |
| ModuleStatus | getStatus () const |
| virtual void | initialize () |
| LogStream & | log () |
| virtual void | postTracking (const G4Track *) |
| virtual void | preTracking (const G4Track *) |
| virtual void | reset () |
| virtual void | stepping (const G4Step *) |
Private Attributes | |
| CommandVectorType | m_commands |
Additional Inherited Members | |
Public Attributes inherited from Module | |
| bool | m_deleteOnExit |
| LogStream * | m_log |
| std::string | m_name |
| ModuleStatus | m_status |
Protected Member Functions inherited from Module | |
| Module (const std::string &name, bool deleteOnExit=true, bool autoRegister=true) | |
A queue of G4 commands to be executed in order.
Definition at line 18 of file CommandQueue.hh.
| typedef std::string CommandType |
Definition at line 22 of file CommandQueue.hh.
| typedef std::vector<std::string> CommandVectorType |
Definition at line 21 of file CommandQueue.hh.
| typedef size_t SizeType |
Definition at line 23 of file CommandQueue.hh.
|
inline |
Class constructor.
Definition at line 30 of file CommandQueue.hh.
|
inlinevirtual |
Class destructor.
Definition at line 37 of file CommandQueue.hh.
|
inline |
Add a command to the queue.
| [in] | command | The Geant4 command to add to the queue. |
Definition at line 52 of file CommandQueue.hh.
References CommandQueue::add().
|
inline |
Add a command to the queue.
| [in] | command | The Geant4 command to add to the queue. |
Definition at line 44 of file CommandQueue.hh.
References CommandQueue::m_commands.
Referenced by CommandQueue::add(), CommandLineProcessor::process(), CommandLineProcessor::processOption(), and CommandLineProcessor::processOptions().
|
inline |
Clear all the commands in the queue.
Definition at line 86 of file CommandQueue.hh.
References CommandQueue::m_commands.
Referenced by SlicApplication::run().
|
inline |
Get the begin iterator of the queue.
Definition at line 61 of file CommandQueue.hh.
References CommandQueue::m_commands.
Referenced by CommandQueue::execute(), and CommandQueue::printOut().
|
inline |
Get the end iterator of the queue.
Definition at line 69 of file CommandQueue.hh.
References CommandQueue::m_commands.
Referenced by CommandQueue::execute(), and CommandQueue::printOut().
| void execute | ( | ) |
Execute the commands in the queue sequentially.
Definition at line 17 of file CommandQueue.cc.
References CommandQueue::cmdsBegin(), and CommandQueue::cmdsEnd().
Referenced by SlicApplication::run().
| CommandQueue::CommandVectorType::iterator find | ( | const std::string & | command | ) |
Find the first command that matches a string.
| [in] | command | The macro command to find. |
Definition at line 24 of file CommandQueue.cc.
References CommandQueue::m_commands.
| void printOut | ( | ) |
Print the queue to the log.
Definition at line 7 of file CommandQueue.cc.
References LOG::always, CommandQueue::cmdsBegin(), CommandQueue::cmdsEnd(), LOG::done, and Module::log().
Referenced by SlicApplication::run().
|
private |
Definition at line 98 of file CommandQueue.hh.
Referenced by CommandQueue::add(), CommandQueue::clear(), CommandQueue::cmdsBegin(), CommandQueue::cmdsEnd(), and CommandQueue::find().