Belle II Software
release-05-01-25
InputController.cc
1
#include <framework/core/InputController.h>
2
3
#include <TChain.h>
4
#include <TFile.h>
5
6
using namespace
Belle2
;
7
8
bool
InputController::s_canControlInput
=
false
;
9
long
InputController::s_nextEntry
= -1;
10
long
InputController::s_nextExperiment
= -1;
11
long
InputController::s_nextRun
= -1;
12
long
InputController::s_nextEvent
= -1;
13
long
InputController::s_currentEntry
= 0;
14
const
TChain*
InputController::s_chain
=
nullptr
;
15
16
void
InputController::resetForChildProcess
()
17
{
18
s_canControlInput
=
false
;
19
s_nextEntry
= -1;
20
s_nextExperiment
= -1;
21
s_nextRun
= -1;
22
s_nextEvent
= -1;
23
s_currentEntry
= 0;
24
//s_chain is not touched, so numEntries() still works
25
}
26
27
std::string
InputController::getCurrentFileName
()
28
{
29
if
(!
s_chain
)
30
return
""
;
31
32
const
TFile* f =
s_chain
->GetFile();
33
if
(!f)
34
return
""
;
35
36
return
f->GetName();
37
}
38
39
long
InputController::numEntries
()
40
{
41
if
(
s_chain
)
42
return
s_chain
->GetEntries();
43
44
return
0;
45
}
Belle2::InputController::resetForChildProcess
static void resetForChildProcess()
Reset InputController (e.g.
Definition:
InputController.cc:16
Belle2::InputController::s_nextEntry
static long s_nextEntry
entry to be loaded the next time event() is called in an input module.
Definition:
InputController.h:102
Belle2::InputController::s_nextExperiment
static long s_nextExperiment
Experiment number to load next.
Definition:
InputController.h:108
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:19
Belle2::InputController::s_nextEvent
static long s_nextEvent
Event (not entry!) to load next.
Definition:
InputController.h:114
Belle2::InputController::s_currentEntry
static long s_currentEntry
current entry in file.
Definition:
InputController.h:118
Belle2::InputController::s_chain
static const TChain * s_chain
Opened TChain (event durability).
Definition:
InputController.h:121
Belle2::InputController::numEntries
static long numEntries()
Returns total number of entries in the event tree.
Definition:
InputController.cc:39
Belle2::InputController::s_canControlInput
static bool s_canControlInput
Is there an input module to be controlled?
Definition:
InputController.h:96
Belle2::InputController::getCurrentFileName
static std::string getCurrentFileName()
Return name of current file in loaded chain (or empty string if none loaded).
Definition:
InputController.cc:27
Belle2::InputController::s_nextRun
static long s_nextRun
Run number to load next.
Definition:
InputController.h:111
framework
core
src
InputController.cc
Generated on Fri Nov 5 2021 03:51:52 for Belle II Software by
1.8.17