1#ifndef FIRE_RUNHEADER_H
2#define FIRE_RUNHEADER_H
7#include "fire/version/Version.h"
9#include "fire/io/Data.h"
10#include "fire/io/ParameterStorage.h"
92 template <
typename ParameterType>
94 return parameters_.get<ParameterType>(name);
104 template <
typename ParameterType>
106 parameters_.set(name,val);
128 detectorName_.clear();
129 description_.clear();
130 softwareTag_.clear();
161 template<
typename DataSet>
164 d.attach(
"start",runStart_);
165 d.attach(
"end",runEnd_);
166 d.attach(
"detectorName",detectorName_);
167 d.attach(
"description",description_);
168 d.attach(
"softwareTag",softwareTag_);
169 d.attach(
"parameters",parameters_);
183 long int runStart_{0};
204 std::map<std::string,int> intParameters_;
209 std::map<std::string,float> floatParameters_;
214 std::map<std::string,std::string> stringParameters_;
220 ClassDef(RunHeader, 5);
250class Data<ldmx::
RunHeader> :
public AbstractData<ldmx::RunHeader> {
258 explicit Data(
const std::string& path, Reader* input_file =
nullptr, ldmx::RunHeader* rh =
nullptr);
265 void load(h5::Reader& r)
final override;
276 void load(root::Reader& r)
final override;
283 void save(Writer& w)
final override;
290 void structure(Writer& w)
final override;
302 template <
typename MemberType>
303 void attach(
const std::string& name, MemberType& m) {
305 std::make_unique<Data<MemberType>>(this->path_ +
"/" + name, input_file_, &m));
Definitions for names of structures required by serialization methods.
General data set.
Definition: Data.h:90
Provides dynamic parameter storage by interfacing between a map to variants storing parameters and a ...
Definition: ParameterStorage.h:40
constexpr std::string_view GIT_SHA1
The git commit sha for this installation of fire.
Definition: Version.h.in:35
empty struct for connecting a instance of Data and the type it wraps
Definition: Access.h:22
static const std::string NUMBER_NAME
the name of the variable in event and run headers corresponding to their ID
Definition: Constants.h:20