![]() |
Belle II Software
release-06-01-15
|
A static class to control supported input modules. More...
#include <InputController.h>
Static Public Member Functions | |
static bool | canControlInput () |
Is there an input module to be controlled. | |
static void | setCanControlInput (bool on) |
Call this function from supported input modules. | |
static void | setNextEntry (long entry) |
Set the file entry to be loaded the next time event() is called. More... | |
static long | getNextEntry () |
Return entry number set via setNextEntry(). | |
static void | setNextEntry (long exp, long run, long event) |
Set the file entry to be loaded the next time event() is called, by evt/run/exp number. More... | |
static long | getNextExperiment () |
Return experiment number set via setNextEntry(). | |
static long | getNextRun () |
Return run number set via setNextEntry(). | |
static long | getNextEvent () |
Return event number set via setNextEntry(). | |
static long | getCurrentEntry () |
returns the entry number currently loaded. | |
static long | numEntries () |
Returns total number of entries in the event tree. More... | |
static std::string | getCurrentFileName () |
Return name of current file in loaded chain (or empty string if none loaded). | |
static void | eventLoaded (long entry) |
Indicate that an event (in the given entry) was loaded and reset all members related to the next entry. | |
static void | setChain (const TChain *chain) |
Set the loaded TChain (event durability). | |
static void | resetForChildProcess () |
Reset InputController (e.g. More... | |
Static Private Attributes | |
static bool | s_canControlInput = false |
Is there an input module to be controlled? | |
static long | s_nextEntry = -1 |
entry to be loaded the next time event() is called in an input module. More... | |
static long | s_nextExperiment = -1 |
Experiment number to load next. More... | |
static long | s_nextRun = -1 |
Run number to load next. | |
static long | s_nextEvent = -1 |
Event (not entry!) to load next. | |
static long | s_currentEntry = 0 |
current entry in file. | |
static const TChain * | s_chain = nullptr |
Opened TChain (event durability). | |
A static class to control supported input modules.
You can use setNextEntry() to request loading of any event in 0..numEntries()-1, which will be done the next time the input module's event() function is called.
Use canControlInput() to check wether control is actually possible.
Definition at line 27 of file InputController.h.
|
static |
Returns total number of entries in the event tree.
If no file is opened, zero is returned.
Definition at line 46 of file InputController.cc.
|
static |
Reset InputController (e.g.
after forking a thread)
Definition at line 23 of file InputController.cc.
|
inlinestatic |
Set the file entry to be loaded the next time event() is called.
This is mainly useful for interactive applications (e.g. event display).
The input module should call eventLoaded() after the entry was loaded.
Definition at line 41 of file InputController.h.
|
inlinestatic |
Set the file entry to be loaded the next time event() is called, by evt/run/exp number.
The input module should call eventLoaded() after the entry was loaded.
Definition at line 50 of file InputController.h.
|
staticprivate |
entry to be loaded the next time event() is called in an input module.
-1 indicates that execution should continue normally.
Definition at line 100 of file InputController.h.
|
staticprivate |