EIC Software
Reference for
EIC
simulation and reconstruction software on GitHub
Home page
Related Pages
Modules
Namespaces
Classes
Files
External Links
File List
File Members
EIC Software
Deprecated List
Modules
Namespaces
Classes
Files
File List
acts
BeastMagneticField
delphes_EIC
Doxygen_Assist
east
eic-smear
EicRoot
eicsmear-jetexample
eicsmeardetectors
EicToyModel
estarlight
Fun4All-lmon
fun4all_coresoftware
blob
master
calibrations
generators
offline
database
framework
ffamodules
ffaobjects
EventHeader.cc
EventHeader.h
EventHeaderLinkDef.h
EventHeaderv1.cc
EventHeaderv1.h
EventHeaderv1LinkDef.h
EventHeaderv2.cc
EventHeaderv2.h
EventHeaderv2LinkDef.h
FlagSave.h
FlagSaveLinkDef.h
FlagSavev1.cc
FlagSavev1.h
FlagSavev1LinkDef.h
RunHeader.cc
RunHeader.h
RunHeaderLinkDef.h
RunHeaderv1.cc
RunHeaderv1.h
RunHeaderv1LinkDef.h
SyncDefs.h
SyncObject.cc
SyncObject.h
SyncObjectLinkDef.h
SyncObjectv1.cc
SyncObjectv1.h
SyncObjectv1LinkDef.h
frog
fun4all
fun4allraw
phool
phoolraw
packages
QA
simulation
fun4all_eic_qa
fun4all_eic_tutorials
fun4all_eicdetectors
fun4all_eicmacros
fun4all_g4jleic
fun4all_GenFit
fun4all_macros
fun4all_tutorials
g4exampledetector
g4lblvtx
online_distribution
PEPSI
doxygen_mainpage.h
File Members
External Links
•
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Friends
Macros
Groups
Pages
EventHeaderv1.cc
Go to the documentation of this file.
Or view
the newest version in sPHENIX GitHub for file EventHeaderv1.cc
1
#include "
EventHeaderv1.h
"
2
3
#include <cmath>
// for NAN
4
#include <iostream>
5
#include <utility>
// for pair
6
7
void
EventHeaderv1::Reset
()
8
{
9
RunNumber
= 0;
10
EvtSequence
= 0;
11
m_IntEventProperties
.clear();
12
m_FloatEventProperties
.clear();
13
return
;
14
}
15
16
void
EventHeaderv1::identify
(std::ostream &out)
const
17
{
18
out <<
"identify yourself: I am an EventHeaderv1 Object"
<< std::endl;
19
out <<
"Run Number: "
<<
RunNumber
20
<<
", Event no: "
<<
EvtSequence
21
<< std::endl;
22
auto
iter =
m_IntEventProperties
.begin();
23
while
(iter !=
m_IntEventProperties
.end())
24
{
25
out << iter->first <<
": "
<< iter->second << std::endl;
26
++iter;
27
}
28
auto
iterf =
m_FloatEventProperties
.begin();
29
while
(iterf !=
m_FloatEventProperties
.end())
30
{
31
out << iterf->first <<
": "
<< iterf->second << std::endl;
32
++iterf;
33
}
34
return
;
35
}
36
37
int
EventHeaderv1::isValid
()
const
38
{
39
return
((
RunNumber
) ? 1 : 0);
// return 1 if runnumber is not zero
40
}
41
42
void
EventHeaderv1::set_floatval
(
const
std::string &
name
,
const
float
fval)
43
{
44
m_FloatEventProperties
[
name
] = fval;
45
}
46
47
float
EventHeaderv1::get_floatval
(
const
std::string &
name
)
const
48
{
49
std::map<std::string, float>::const_iterator iter =
m_FloatEventProperties
.find(name);
50
if
(iter !=
m_FloatEventProperties
.end())
51
{
52
return
iter->second;
53
}
54
return
NAN;
55
}
56
57
void
EventHeaderv1::set_intval
(
const
std::string &
name
,
const
int64_t ival)
58
{
59
m_IntEventProperties
[
name
] = ival;
60
}
61
62
int64_t
EventHeaderv1::get_intval
(
const
std::string &
name
)
const
63
{
64
auto
iter =
m_IntEventProperties
.find(name);
65
if
(iter !=
m_IntEventProperties
.end())
66
{
67
return
iter->second;
68
}
69
return
-999999;
70
}
fun4all_coresoftware
blob
master
offline
framework
ffaobjects
EventHeaderv1.cc
Built by
Jin Huang
. updated:
Mon Jan 22 2024 12:43:43
using
1.8.2 with
EIC GitHub integration