LDMX Software
Toggle main menu visibility
Main Page
Related Pages
Namespaces
Namespace List
Namespace Members
All
Functions
Variables
Typedefs
Classes
Class List
Class Index
Class Hierarchy
Class 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
y
z
~
Functions
_
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
~
Variables
a
b
c
d
e
f
g
h
i
k
l
m
n
o
p
q
r
s
t
u
v
w
x
y
z
Typedefs
Enumerations
Enumerator
Related Symbols
Files
File List
File Members
All
Functions
Macros
Framework
include
Framework
RunHeader.h
1
#ifndef FRAMEWORK_EVENT_RUNHEADER_H_
2
#define FRAMEWORK_EVENT_RUNHEADER_H_
3
4
/*~~~~~~~~~~*/
5
/* ROOT */
6
/*~~~~~~~~~~*/
7
#include "TObject.h"
8
9
/*~~~~~~~~~~~~~~~~*/
10
/* C++ StdLib */
11
/*~~~~~~~~~~~~~~~~*/
12
#include <map>
13
#include <string>
14
15
/*~~~~~~~~~~~~~~~*/
16
/* Framework */
17
/*~~~~~~~~~~~~~~~*/
18
#include "Framework/Version.h"
19
20
namespace
ldmx {
21
57
class
RunHeader
{
58
public
:
64
RunHeader
(
int
runNumber);
65
71
RunHeader
() =
default
;
72
74
virtual
~RunHeader
() {}
75
77
int
getRunNumber
()
const
{
return
runNumber_
; }
78
80
const
std::string &
getDetectorName
()
const
{
return
detectorName_
; }
81
83
void
setDetectorName
(
const
std::string &det) {
detectorName_
= det; }
84
89
const
std::string &
getSoftwareTag
()
const
{
return
softwareTag_
; }
90
94
const
std::string &
getLdmxswVersion
()
const
{
return
ldmxsw_version_
; }
95
97
const
std::string &
getDescription
()
const
{
return
description_
; }
98
100
void
setDescription
(
const
std::string &des) {
description_
= des; }
101
108
int
getRunStart
()
const
{
return
runStart_
; }
109
115
void
setRunStart
(
const
int
runStart) {
runStart_
= runStart; }
116
122
int
getRunEnd
()
const
{
return
runEnd_
; }
123
129
void
setRunEnd
(
const
int
runEnd) {
runEnd_
= runEnd; }
130
137
int
getNumTries
()
const
{
return
numTries_
; }
138
149
void
setNumTries
(
const
int
numTries) {
numTries_
= numTries; }
150
157
int
getIntParameter
(
const
std::string &name)
const
{
158
return
intParameters_
.at(name);
159
}
157
int
getIntParameter
(
const
std::string &name)
const
{
…
}
160
162
const
std::map<std::string, int> &
getIntParameters
()
const
{
163
return
intParameters_
;
164
}
162
const
std::map<std::string, int> &
getIntParameters
()
const
{
…
}
165
172
void
setIntParameter
(
const
std::string &name,
int
value) {
173
intParameters_
[name] = value;
174
}
172
void
setIntParameter
(
const
std::string &name,
int
value) {
…
}
175
182
float
getFloatParameter
(
const
std::string &name)
const
{
183
return
floatParameters_
.at(name);
184
}
182
float
getFloatParameter
(
const
std::string &name)
const
{
…
}
185
187
const
std::map<std::string, float> &
getFloatParameters
()
const
{
188
return
floatParameters_
;
189
}
187
const
std::map<std::string, float> &
getFloatParameters
()
const
{
…
}
190
197
void
setFloatParameter
(
const
std::string &name,
float
value) {
198
floatParameters_
[name] = value;
199
}
197
void
setFloatParameter
(
const
std::string &name,
float
value) {
…
}
200
207
std::string
getStringParameter
(
const
std::string &name)
const
{
208
return
stringParameters_
.at(name);
209
}
207
std::string
getStringParameter
(
const
std::string &name)
const
{
…
}
210
212
const
std::map<std::string, std::string> &
getStringParameters
()
const
{
213
return
stringParameters_
;
214
}
212
const
std::map<std::string, std::string> &
getStringParameters
()
const
{
…
}
215
222
void
setStringParameter
(
const
std::string &name, std::string value) {
223
stringParameters_
[name] = value;
224
}
222
void
setStringParameter
(
const
std::string &name, std::string value) {
…
}
225
233
void
stream
(std::ostream &s)
const
;
234
236
void
Print
()
const
;
237
249
friend
std::ostream &
operator<<
(std::ostream &s,
const
ldmx::RunHeader
&h) {
250
h.
stream
(s);
251
return
s;
252
}
249
friend
std::ostream &
operator<<
(std::ostream &s,
const
ldmx::RunHeader
&h) {
…
};
253
254
private
:
256
int
runNumber_
{0};
257
259
std::string
detectorName_
{
""
};
260
262
std::string
description_
{
""
};
263
265
int
runStart_
{0};
266
268
int
runEnd_
{0};
269
284
int
numTries_
{0};
285
290
std::string
softwareTag_
{GIT_SHA1};
291
295
std::string
ldmxsw_version_
{LDMXSW_VERSION};
296
298
std::map<std::string, int>
intParameters_
;
299
301
std::map<std::string, float>
floatParameters_
;
302
304
std::map<std::string, std::string>
stringParameters_
;
305
306
ClassDef(
RunHeader
, 5);
307
308
};
// RunHeader
57
class
RunHeader
{
…
};
309
310
}
// namespace ldmx
311
312
#endif
// _FRAMEWORK_EVENT_RUN_HEADER_H_
ldmx::RunHeader
Run-specific configuration and data stored in its own output TTree alongside the event TTree in the o...
Definition
RunHeader.h:57
ldmx::RunHeader::getIntParameter
int getIntParameter(const std::string &name) const
Get an int parameter value.
Definition
RunHeader.h:157
ldmx::RunHeader::softwareTag_
std::string softwareTag_
git SHA-1 hash associated with the software tag used to generate this file.
Definition
RunHeader.h:290
ldmx::RunHeader::setFloatParameter
void setFloatParameter(const std::string &name, float value)
Set a float parameter value.
Definition
RunHeader.h:197
ldmx::RunHeader::getStringParameter
std::string getStringParameter(const std::string &name) const
Get a string parameter value.
Definition
RunHeader.h:207
ldmx::RunHeader::RunHeader
RunHeader()=default
Default constructor.
ldmx::RunHeader::stream
void stream(std::ostream &s) const
Stream this object into the input ostream.
Definition
RunHeader.cxx:15
ldmx::RunHeader::getFloatParameter
float getFloatParameter(const std::string &name) const
Get a float parameter value.
Definition
RunHeader.h:182
ldmx::RunHeader::setRunEnd
void setRunEnd(const int runEnd)
Set the end time of the run in seconds since epoch.
Definition
RunHeader.h:129
ldmx::RunHeader::getIntParameters
const std::map< std::string, int > & getIntParameters() const
Get a const reference to all int parameters.
Definition
RunHeader.h:162
ldmx::RunHeader::setDetectorName
void setDetectorName(const std::string &det)
Set the name of the detector that was used in this run.
Definition
RunHeader.h:83
ldmx::RunHeader::detectorName_
std::string detectorName_
Detector name.
Definition
RunHeader.h:259
ldmx::RunHeader::setStringParameter
void setStringParameter(const std::string &name, std::string value)
Set a string parameter value.
Definition
RunHeader.h:222
ldmx::RunHeader::~RunHeader
virtual ~RunHeader()
Destructor.
Definition
RunHeader.h:74
ldmx::RunHeader::description_
std::string description_
Run description.
Definition
RunHeader.h:262
ldmx::RunHeader::getSoftwareTag
const std::string & getSoftwareTag() const
Definition
RunHeader.h:89
ldmx::RunHeader::getNumTries
int getNumTries() const
Get the total number of tries that were done during the production of this run.
Definition
RunHeader.h:137
ldmx::RunHeader::numTries_
int numTries_
Total number of events that were begun during the production of this run.
Definition
RunHeader.h:284
ldmx::RunHeader::getLdmxswVersion
const std::string & getLdmxswVersion() const
Definition
RunHeader.h:94
ldmx::RunHeader::setRunStart
void setRunStart(const int runStart)
Set the run start time in seconds since epoch.
Definition
RunHeader.h:115
ldmx::RunHeader::getDescription
const std::string & getDescription() const
Definition
RunHeader.h:97
ldmx::RunHeader::floatParameters_
std::map< std::string, float > floatParameters_
Map of float parameters.
Definition
RunHeader.h:301
ldmx::RunHeader::getRunStart
int getRunStart() const
Get the start time of the run in seconds since epoch.
Definition
RunHeader.h:108
ldmx::RunHeader::stringParameters_
std::map< std::string, std::string > stringParameters_
Map of string parameters.
Definition
RunHeader.h:304
ldmx::RunHeader::Print
void Print() const
Print a string desciption of this object.
Definition
RunHeader.cxx:34
ldmx::RunHeader::getDetectorName
const std::string & getDetectorName() const
Definition
RunHeader.h:80
ldmx::RunHeader::getRunEnd
int getRunEnd() const
Get the end time of the run in seconds since epoch.
Definition
RunHeader.h:122
ldmx::RunHeader::operator<<
friend std::ostream & operator<<(std::ostream &s, const ldmx::RunHeader &h)
Stream this object to an output stream.
Definition
RunHeader.h:249
ldmx::RunHeader::setDescription
void setDescription(const std::string &des)
Set the description of this run.
Definition
RunHeader.h:100
ldmx::RunHeader::intParameters_
std::map< std::string, int > intParameters_
Map of int parameters.
Definition
RunHeader.h:298
ldmx::RunHeader::runStart_
int runStart_
Run start in seconds since epoch.
Definition
RunHeader.h:265
ldmx::RunHeader::getFloatParameters
const std::map< std::string, float > & getFloatParameters() const
Get a const reference to all float parameters.
Definition
RunHeader.h:187
ldmx::RunHeader::setNumTries
void setNumTries(const int numTries)
Set the total number of tries that were done during the production of this run.
Definition
RunHeader.h:149
ldmx::RunHeader::ldmxsw_version_
std::string ldmxsw_version_
ldmx-sw software version
Definition
RunHeader.h:295
ldmx::RunHeader::getStringParameters
const std::map< std::string, std::string > & getStringParameters() const
Get a const reference to all string parameters.
Definition
RunHeader.h:212
ldmx::RunHeader::runNumber_
int runNumber_
Run number.
Definition
RunHeader.h:256
ldmx::RunHeader::setIntParameter
void setIntParameter(const std::string &name, int value)
Set an int parameter value.
Definition
RunHeader.h:172
ldmx::RunHeader::getRunNumber
int getRunNumber() const
Definition
RunHeader.h:77
ldmx::RunHeader::runEnd_
int runEnd_
Run end in seconds since epoch.
Definition
RunHeader.h:268
Generated by
1.12.0