LDMX Software
RunHeader.cxx
1
2#include "Framework/RunHeader.h"
3
4/*~~~~~~~~~~~~~~~~*/
5/* C++ StdLib */
6/*~~~~~~~~~~~~~~~~*/
7#include <iostream>
8
9ClassImp(ldmx::RunHeader);
10
11namespace ldmx {
12
13RunHeader::RunHeader(int runNumber) : runNumber_(runNumber) {}
14
15void RunHeader::stream(std::ostream &s) const {
16 s << "RunHeader { run: " << getRunNumber() << ", numTries: " << getNumTries()
17 << ", detectorName: " << getDetectorName()
18 << ", description: " << getDescription() << "\n";
19 s << " intParameters: "
20 << "\n";
21 for (const auto &[key, val] : intParameters_)
22 s << " " << key << " = " << val << "\n";
23 s << " floatParameters: "
24 << "\n";
25 for (const auto &[key, val] : floatParameters_)
26 s << " " << key << " = " << val << "\n";
27 s << " stringParameters: "
28 << "\n";
29 for (const auto &[key, val] : stringParameters_)
30 s << " " << key << " = " << val << "\n";
31 s << "}";
32}
33
34void RunHeader::Print() const { stream(std::cout); }
35
36} // namespace ldmx
Run-specific configuration and data stored in its own output TTree alongside the event TTree in the o...
Definition RunHeader.h:54
RunHeader()=default
Default constructor.
void stream(std::ostream &s) const
Stream this object into the input ostream.
Definition RunHeader.cxx:15
int getNumTries() const
Get the total number of tries that were done during the production of this run.
Definition RunHeader.h:129
const std::string & getDescription() const
Definition RunHeader.h:89
std::map< std::string, float > floatParameters_
Map of float parameters.
Definition RunHeader.h:288
std::map< std::string, std::string > stringParameters_
Map of string parameters.
Definition RunHeader.h:291
void Print() const
Print a string desciption of this object.
Definition RunHeader.cxx:34
const std::string & getDetectorName() const
Definition RunHeader.h:77
std::map< std::string, int > intParameters_
Map of int parameters.
Definition RunHeader.h:285
int getRunNumber() const
Definition RunHeader.h:74