DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
EventParameters.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_EVENTPARAMETERS_H
13 #define DDG4_EVENTPARAMETERS_H
14 
15 #include <map>
16 #include <string>
17 #include <vector>
18 
19 
21 namespace dd4hep {
22 
24  namespace sim {
25 
27 
32  protected:
33  int m_runNumber = -1;
34  int m_eventNumber = -1;
35  std::map<std::string, std::vector<int>> m_intValues {};
36  std::map<std::string, std::vector<float>> m_fltValues {};
37  std::map<std::string, std::vector<std::string>> m_strValues {};
38  std::map<std::string, std::vector<double>> m_dblValues {};
39 
40  public:
42  EventParameters() = default;
44  ~EventParameters() = default;
45 
47  void setRunNumber(int runNumber);
48  void setEventNumber(int eventNumber);
50  int runNumber() const { return m_runNumber; }
52  int eventNumber() const { return m_eventNumber; }
53 
55  template <class T> void ingestParameters(T const& source);
57  template <class T> void extractParameters(T& destination);
58 
60  auto const& intParameters() const { return m_intValues; }
62  auto const& fltParameters() const { return m_fltValues; }
64  auto const& strParameters() const { return m_strValues; }
66  auto const& dblParameters() const { return m_dblValues; }
67 
68  };
69 
70  } /* End namespace sim */
71 } /* End namespace dd4hep */
72 #endif // DDG4_EVENTPARAMETERS_H
dd4hep::sim::EventParameters::~EventParameters
~EventParameters()=default
Default destructor.
dd4hep::sim::EventParameters::intParameters
auto const & intParameters() const
Get the int event parameters.
Definition: EventParameters.h:60
dd4hep::sim::EventParameters::fltParameters
auto const & fltParameters() const
Get the float event parameters.
Definition: EventParameters.h:62
dd4hep::sim::EventParameters::setRunNumber
void setRunNumber(int runNumber)
Set the event parameters.
Definition: EventParameters.cpp:20
dd4hep::sim::EventParameters::m_strValues
std::map< std::string, std::vector< std::string > > m_strValues
Definition: EventParameters.h:37
dd4hep::sim::EventParameters::strParameters
auto const & strParameters() const
Get the string event parameters.
Definition: EventParameters.h:64
dd4hep::sim::EventParameters::setEventNumber
void setEventNumber(int eventNumber)
Definition: EventParameters.cpp:23
dd4hep::sim::EventParameters::EventParameters
EventParameters()=default
Initializing constructor.
dd4hep::sim::EventParameters::m_eventNumber
int m_eventNumber
Definition: EventParameters.h:34
dd4hep::sim::EventParameters::m_runNumber
int m_runNumber
Definition: EventParameters.h:33
dd4hep::sim::EventParameters::ingestParameters
void ingestParameters(T const &source)
Copy the parameters from source.
Definition: HepMC3FileReader.cpp:41
dd4hep::sim::EventParameters::extractParameters
void extractParameters(T &destination)
Put parameters into destination.
Definition: Geant4Output2LCIO.cpp:46
dd4hep::sim::EventParameters::m_intValues
std::map< std::string, std::vector< int > > m_intValues
Definition: EventParameters.h:35
dd4hep::sim::EventParameters
Event extension to pass input event data to output event.
Definition: EventParameters.h:31
dd4hep::sim::EventParameters::m_fltValues
std::map< std::string, std::vector< float > > m_fltValues
Definition: EventParameters.h:36
dd4hep::sim::EventParameters::dblParameters
auto const & dblParameters() const
Get the double event parameters.
Definition: EventParameters.h:66
dd4hep
Namespace for the AIDA detector description toolkit.
Definition: AlignmentsCalib.h:28
dd4hep::sim::EventParameters::eventNumber
int eventNumber() const
Get the event number.
Definition: EventParameters.h:52
dd4hep::sim::EventParameters::runNumber
int runNumber() const
Get the run number.
Definition: EventParameters.h:50
dd4hep::sim::EventParameters::m_dblValues
std::map< std::string, std::vector< double > > m_dblValues
Definition: EventParameters.h:38