Belle II Software
release-06-02-00
Main Page
Modules
Namespaces
Namespace List
Namespace Members
All
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
z
Functions
_
a
b
c
d
e
f
g
h
i
l
m
n
o
p
r
s
t
u
v
w
x
z
Variables
a
b
c
d
e
f
g
h
i
l
m
n
o
p
q
r
s
t
v
w
z
Typedefs
a
b
c
d
e
i
k
l
m
n
p
r
s
t
u
v
w
Enumerations
Enumerator
c
d
f
p
t
u
v
w
Classes
Class List
Class Hierarchy
Class Members
All
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
~
Variables
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
_
a
b
c
d
e
f
g
h
i
j
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
Enumerations
a
b
c
d
e
f
g
h
i
l
m
o
p
r
s
t
u
v
Enumerator
a
b
c
d
e
f
g
h
k
l
m
n
o
p
r
s
t
u
v
w
z
Related Functions
b
c
d
g
i
o
r
s
t
Files
File List
File Members
All
Functions
InputController.cc
1
/**************************************************************************
2
* basf2 (Belle II Analysis Software Framework) *
3
* Author: The Belle II Collaboration *
4
* *
5
* See git log for contributors and copyright holders. *
6
* This file is licensed under LGPL-3.0, see LICENSE.md. *
7
**************************************************************************/
8
#include <framework/core/InputController.h>
9
10
#include <TChain.h>
11
#include <TFile.h>
12
13
using namespace
Belle2
;
14
15
bool
InputController::s_canControlInput
=
false
;
16
long
InputController::s_nextEntry
= -1;
17
long
InputController::s_nextExperiment
= -1;
18
long
InputController::s_nextRun
= -1;
19
long
InputController::s_nextEvent
= -1;
20
long
InputController::s_currentEntry
= 0;
21
const
TChain*
InputController::s_chain
=
nullptr
;
22
23
void
InputController::resetForChildProcess
()
24
{
25
s_canControlInput
=
false
;
26
s_nextEntry
= -1;
27
s_nextExperiment
= -1;
28
s_nextRun
= -1;
29
s_nextEvent
= -1;
30
s_currentEntry
= 0;
31
//s_chain is not touched, so numEntries() still works
32
}
33
34
std::string
InputController::getCurrentFileName
()
35
{
36
if
(!
s_chain
)
37
return
""
;
38
39
const
TFile* f =
s_chain
->GetFile();
40
if
(!f)
41
return
""
;
42
43
return
f->GetName();
44
}
45
46
long
InputController::numEntries
()
47
{
48
if
(
s_chain
)
49
return
s_chain
->GetEntries();
50
51
return
0;
52
}
Belle2::InputController::s_chain
static const TChain * s_chain
Opened TChain (event durability).
Definition:
InputController.h:119
Belle2::InputController::numEntries
static long numEntries()
Returns total number of entries in the event tree.
Definition:
InputController.cc:46
Belle2::InputController::resetForChildProcess
static void resetForChildProcess()
Reset InputController (e.g.
Definition:
InputController.cc:23
Belle2::InputController::s_nextExperiment
static long s_nextExperiment
Experiment number to load next.
Definition:
InputController.h:106
Belle2::InputController::s_nextEvent
static long s_nextEvent
Event (not entry!) to load next.
Definition:
InputController.h:112
Belle2::InputController::s_currentEntry
static long s_currentEntry
current entry in file.
Definition:
InputController.h:116
Belle2::InputController::s_nextRun
static long s_nextRun
Run number to load next.
Definition:
InputController.h:109
Belle2::InputController::getCurrentFileName
static std::string getCurrentFileName()
Return name of current file in loaded chain (or empty string if none loaded).
Definition:
InputController.cc:34
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:100
Belle2::InputController::s_canControlInput
static bool s_canControlInput
Is there an input module to be controlled?
Definition:
InputController.h:94
Belle2
Abstract base class for different kinds of events.
Definition:
MillepedeAlgorithm.h:17
framework
core
src
InputController.cc
Generated on Thu Dec 28 2023 02:24:34 for Belle II Software by
1.9.1