DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
RunParameters.h
Go to the documentation of this file.
1 //==========================================================================
2 // AIDA Detector description implementation
3 //--------------------------------------------------------------------------
4 // Copyright (C) Organisation europeenne pour la Recherche nucleaire (CERN)
5 // All rights reserved.
6 //
7 // For the licensing terms see $DD4hepINSTALL/LICENSE.
8 // For the list of contributors see $DD4hepINSTALL/doc/CREDITS.
9 //
10 //
11 //==========================================================================
12 #ifndef DDG4_RUNPARAMETERS_H
13 #define DDG4_RUNPARAMETERS_H
14 
15 #include <map>
16 #include <string>
17 #include <vector>
18 
19 
21 namespace dd4hep {
22 
24  namespace sim {
25 
27 
31  class RunParameters {
32  protected:
33  std::map<std::string, std::vector<int>> m_intValues {};
34  std::map<std::string, std::vector<float>> m_fltValues {};
35  std::map<std::string, std::vector<std::string>> m_strValues {};
36  std::map<std::string, std::vector<double>> m_dblValues {};
37  int m_runNumber = -1;
38 
39  public:
41  RunParameters() = default;
43  ~RunParameters() = default;
44 
48  int runNumber() const { return m_runNumber; }
49 
51  template <class T> void ingestParameters(T const& source);
53  template <class T> void extractParameters(T& destination);
54 
56  auto const& intParameters() const { return m_intValues; }
58  auto const& fltParameters() const { return m_fltValues; }
60  auto const& strParameters() const { return m_strValues; }
62  auto const& dblParameters() const { return m_dblValues; }
63 
64  };
65 
66  } /* End namespace sim */
67 } /* End namespace dd4hep */
68 #endif // DDG4_RUNPARAMETERS_H
dd4hep::sim::RunParameters::strParameters
auto const & strParameters() const
Get the string Run parameters.
Definition: RunParameters.h:60
dd4hep::sim::RunParameters::m_runNumber
int m_runNumber
Definition: RunParameters.h:37
dd4hep::sim::RunParameters::RunParameters
RunParameters()=default
Initializing constructor.
dd4hep::sim::RunParameters::dblParameters
auto const & dblParameters() const
Get the double Run parameters.
Definition: RunParameters.h:62
dd4hep::sim::RunParameters::m_dblValues
std::map< std::string, std::vector< double > > m_dblValues
Definition: RunParameters.h:36
dd4hep::sim::RunParameters
Extension to pass input run data to output run data.
Definition: RunParameters.h:31
dd4hep::sim::RunParameters::fltParameters
auto const & fltParameters() const
Get the float Run parameters.
Definition: RunParameters.h:58
dd4hep::sim::RunParameters::setRunNumber
void setRunNumber(int runNumber)
Set the Run parameters.
dd4hep::sim::RunParameters::~RunParameters
~RunParameters()=default
Default destructor.
dd4hep::sim::RunParameters::m_fltValues
std::map< std::string, std::vector< float > > m_fltValues
Definition: RunParameters.h:34
dd4hep::sim::RunParameters::extractParameters
void extractParameters(T &destination)
Put parameters into destination.
Definition: Geant4Output2LCIO.cpp:66
dd4hep::sim::RunParameters::runNumber
int runNumber() const
Get the run number.
Definition: RunParameters.h:48
dd4hep::sim::RunParameters::m_intValues
std::map< std::string, std::vector< int > > m_intValues
Definition: RunParameters.h:33
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::sim::RunParameters::m_strValues
std::map< std::string, std::vector< std::string > > m_strValues
Definition: RunParameters.h:35
dd4hep::sim::RunParameters::ingestParameters
void ingestParameters(T const &source)
Copy the parameters from source.
Definition: HepMC3FileReader.cpp:73
dd4hep::sim::RunParameters::intParameters
auto const & intParameters() const
Get the int Run parameters.
Definition: RunParameters.h:56