Belle II Software
release-08-01-10
|
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 bool | getEventMerging () |
Get if we are merging events from two paths. | |
static void | enableEventMerging (Module *steerRootInputModule) |
Set that we are merging events from two paths. | |
static void | setNextEntry (long entry, bool independentPath=false) |
Set the file entry to be loaded the next time event() is called. More... | |
static long | getNextEntry (bool independentPath=false) |
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 void | setSkippedEntries (long entries, bool independentPath=false) |
set the number of entries skipped by the RootInputModule. | |
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 (bool independentPath=false) |
returns the entry number currently loaded. | |
static long | getSkippedEntries (bool independentPath=false) |
returns the number of entries skipped by the RootInputModule. | |
static long | numEntries (bool independentPath=false) |
Returns total number of entries in the event tree. More... | |
static std::string | getCurrentFileName (bool independentPath=false) |
Return name of current file in loaded chain (or empty string if none loaded). | |
static void | eventLoaded (long entry, bool independentPath=false) |
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, bool independentPath=false) |
Set the loaded TChain (event durability). | |
static void | resetForChildProcess () |
Reset InputController (e.g. More... | |
static long | getNumEntriesToProcess () |
Necessary to make sure the ProgressModule shows reasonable output. | |
Static Private Attributes | |
static bool | s_canControlInput = false |
Is there an input module to be controlled? | |
static bool | s_doEventMerging = false |
Are we merging events from two paths? | |
static Module * | s_steerRootInputModule = nullptr |
Explicit pointer to steerRootInput. | |
static std::pair< long, long > | s_nextEntry = { -1, -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 std::pair< long, long > | s_eventNumbers |
number of events in paths if two input modules are used (independent paths) | |
static std::pair< long, long > | s_currentEntry = { 0, 0} |
current entry in file. More... | |
static std::pair< long, long > | s_skippedEntries = { 0, 0} |
entries skipped by RootInputModule (if any) Storing two values (second one if independent path is executed) | |
static std::pair< const TChain *, const TChain * > | s_chain = { nullptr, nullptr} |
Opened TChain (event durability). More... | |
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 30 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 81 of file InputController.cc.
|
static |
Reset InputController (e.g.
after forking a thread)
Definition at line 57 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 50 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 59 of file InputController.h.
|
staticprivate |
Opened TChain (event durability).
Storing two values (second one if independent path is executed)
Definition at line 148 of file InputController.h.
|
staticprivate |
current entry in file.
Storing two values (second one if independent path is executed)
Definition at line 138 of file InputController.h.
|
staticprivate |
entry to be loaded the next time event() is called in an input module.
Storing two values (second one if independent path is executed) -1 indicates that execution should continue normally.
Definition at line 118 of file InputController.h.
|
staticprivate |