File indexing completed on 2025-01-18 09:55:25
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012 #ifndef DDG4_RUNPARAMETERS_H
0013 #define DDG4_RUNPARAMETERS_H
0014
0015 #include <map>
0016 #include <string>
0017 #include <vector>
0018
0019
0020
0021 namespace dd4hep {
0022
0023
0024 namespace sim {
0025
0026
0027
0028
0029
0030
0031 class RunParameters {
0032 protected:
0033 std::map<std::string, std::vector<int>> m_intValues {};
0034 std::map<std::string, std::vector<float>> m_fltValues {};
0035 std::map<std::string, std::vector<std::string>> m_strValues {};
0036 std::map<std::string, std::vector<double>> m_dblValues {};
0037 int m_runNumber = -1;
0038
0039 public:
0040
0041 RunParameters() = default;
0042
0043 ~RunParameters() = default;
0044
0045
0046 void setRunNumber(int runNumber);
0047
0048 int runNumber() const { return m_runNumber; }
0049
0050
0051 template <class T> void ingestParameters(T const& source);
0052
0053 template <class T> void extractParameters(T& destination);
0054
0055
0056 auto const& intParameters() const { return m_intValues; }
0057
0058 auto const& fltParameters() const { return m_fltValues; }
0059
0060 auto const& strParameters() const { return m_strValues; }
0061
0062 auto const& dblParameters() const { return m_dblValues; }
0063
0064 };
0065
0066 }
0067 }
0068 #endif