LDMX Software
Framework
src
Framework
RunHeader.cxx
1
2
#include "Framework/RunHeader.h"
3
4
/*~~~~~~~~~~~~~~~~*/
5
/* C++ StdLib */
6
/*~~~~~~~~~~~~~~~~*/
7
#include <iostream>
8
9
ClassImp(
ldmx::RunHeader
);
10
11
namespace
ldmx {
12
13
RunHeader::RunHeader
(
int
run_number) : run_number_(run_number) {}
14
15
void
RunHeader::stream
(std::ostream& s)
const
{
16
s <<
"RunHeader { run: "
<<
getRunNumber
() <<
", numTries: "
<<
getNumTries
()
17
<<
", completed: "
<< (
isCompleted
() ?
"true"
:
"false"
)
18
<<
", detectorName: "
<<
getDetectorName
()
19
<<
", description: "
<<
getDescription
() <<
"\n"
;
20
s <<
" intParameters: "
<<
"\n"
;
21
for
(
const
auto
& [key, val] :
int_parameters_
)
22
s <<
" "
<< key <<
" = "
<< val <<
"\n"
;
23
s <<
" floatParameters: "
<<
"\n"
;
24
for
(
const
auto
& [key, val] :
float_parameters_
)
25
s <<
" "
<< key <<
" = "
<< val <<
"\n"
;
26
s <<
" stringParameters: "
<<
"\n"
;
27
for
(
const
auto
& [key, val] :
string_parameters_
)
28
s <<
" "
<< key <<
" = "
<< val <<
"\n"
;
29
s <<
"}"
;
30
}
31
32
void
RunHeader::print
()
const
{
stream
(std::cout); }
33
34
}
// namespace ldmx
ldmx::RunHeader
Run-specific configuration and data stored in its own output TTree alongside the event TTree in the o...
Definition
RunHeader.h:67
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::int_parameters_
std::map< std::string, int > int_parameters_
Map of int parameters.
Definition
RunHeader.h:339
ldmx::RunHeader::string_parameters_
std::map< std::string, std::string > string_parameters_
Map of string parameters.
Definition
RunHeader.h:345
ldmx::RunHeader::float_parameters_
std::map< std::string, float > float_parameters_
Map of float parameters.
Definition
RunHeader.h:342
ldmx::RunHeader::getNumTries
int getNumTries() const
Get the total number of tries that were done during the production of this run.
Definition
RunHeader.h:155
ldmx::RunHeader::getDescription
const std::string & getDescription() const
Definition
RunHeader.h:115
ldmx::RunHeader::getDetectorName
const std::string & getDetectorName() const
Definition
RunHeader.h:98
ldmx::RunHeader::isCompleted
bool isCompleted() const
Check whether the file holding this run was closed cleanly.
Definition
RunHeader.h:177
ldmx::RunHeader::print
void print() const
Print a string desciption of this object.
Definition
RunHeader.cxx:32
ldmx::RunHeader::getRunNumber
int getRunNumber() const
Definition
RunHeader.h:95
Generated by
1.12.0