LCIO  02.17
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
LCParametersImpl.h
Go to the documentation of this file.
1 // -*- C++ -*-
2 #ifndef EVENT_LCPARAMETERSIMPL_H
3 #define EVENT_LCPARAMETERSIMPL_H 1
4 
5 #include "EVENT/LCParameters.h"
6 #include "IMPL/AccessChecked.h"
7 
8 #include <map>
9 #include <vector>
10 
11 namespace IMPL {
12 
13 
14  class LCRunHeaderImpl ;
15  class LCEventImpl ;
17 
22 
23 
37 
38  friend class LCRunHeaderImpl ;
39  friend class LCEventImpl ;
40  friend class LCCollectionVec ;
41 
42  public:
43 
44  LCParametersImpl() ;
45 
47  virtual ~LCParametersImpl() { /* nop */; }
48 
51  virtual int getIntVal(const std::string & key) const ;
52 
55  virtual float getFloatVal(const std::string & key) const ;
56 
59  virtual double getDoubleVal(const std::string & key) const ;
60 
63  virtual const std::string & getStringVal(const std::string & key) const ;
64 
68  virtual EVENT::IntVec & getIntVals(const std::string & key, EVENT::IntVec & values) const ;
69 
73  virtual EVENT::FloatVec & getFloatVals(const std::string & key, EVENT::FloatVec & values) const ;
74 
78  virtual EVENT::DoubleVec & getDoubleVals(const std::string & key, EVENT::DoubleVec & values) const ;
79 
83  virtual EVENT::StringVec & getStringVals(const std::string & key, EVENT::StringVec & values) const ;
84 
87  virtual const EVENT::StringVec & getIntKeys( EVENT::StringVec & keys) const ;
88 
91  virtual const EVENT::StringVec & getFloatKeys(EVENT::StringVec & keys) const ;
92 
95  virtual const EVENT::StringVec & getDoubleKeys(EVENT::StringVec & keys) const ;
96 
99  virtual const EVENT::StringVec & getStringKeys(EVENT::StringVec & keys) const ;
100 
103  virtual int getNInt(const std::string & key) const ;
104 
107  virtual int getNFloat(const std::string & key) const ;
108 
111  virtual int getNDouble(const std::string & key) const ;
112 
115  virtual int getNString(const std::string & key) const ;
116 
119  virtual void setValue(const std::string & key, int value) ;
120 
123  virtual void setValue(const std::string & key, float value) ;
124 
127  virtual void setValue(const std::string & key, double value) ;
128 
131  virtual void setValue(const std::string & key, const std::string & value) ;
132 
135  virtual void setValues(const std::string & key, const EVENT::IntVec & values);
136 
139  virtual void setValues(const std::string & key, const EVENT::FloatVec & values);
140 
143  virtual void setValues(const std::string & key, const EVENT::DoubleVec & values) ;
144 
147  virtual void setValues(const std::string & key, const EVENT::StringVec & values);
148 
149 
150  protected:
151 
152  mutable IntMap _intMap{} ;
153  mutable FloatMap _floatMap{} ;
154  mutable DoubleMap _doubleMap{} ;
155  mutable StringMap _stringMap{} ;
156 
157  }; // class
158 } // namespace IMPL
159 #endif /* ifndef EVENT_LCPARAMETERSIMPL_H */
virtual const EVENT::StringVec & getIntKeys(EVENT::StringVec &keys) const
Returns a list of all keys of integer parameters.
virtual EVENT::IntVec & getIntVals(const std::string &key, EVENT::IntVec &values) const
Adds all integer values for the given key to values.
Implementation of the LCCollection using (inheriting from) an STL vector of LCObjects.
Implementation of the main event class.
Definition: LCEventImpl.h:31
virtual int getNString(const std::string &key) const
The number of string values stored for this key.
virtual EVENT::StringVec & getStringVals(const std::string &key, EVENT::StringVec &values) const
Adds all string values for the given key to values.
virtual double getDoubleVal(const std::string &key) const
Returns the first double value for the given key.
virtual EVENT::DoubleVec & getDoubleVals(const std::string &key, EVENT::DoubleVec &values) const
Adds all double values for the given key to values.
virtual int getNFloat(const std::string &key) const
The number of float values stored for this key.
virtual ~LCParametersImpl()
Destructor.
virtual void setValues(const std::string &key, const EVENT::IntVec &values)
Set integer values for the given key.
virtual const std::string & getStringVal(const std::string &key) const
Returns the first string value for the given key.
virtual int getNInt(const std::string &key) const
The number of integer values stored for this key.
STL class.
std::map< std::string, EVENT::StringVec > StringMap
Implementation of LCRunHeader.
Implementation of Simple interface to store generic named parameters of type int, float and string...
virtual float getFloatVal(const std::string &key) const
Returns the first float value for the given key.
Simple interface to store generic named parameters of type int, float and string. ...
Definition: LCParameters.h:28
virtual int getNDouble(const std::string &key) const
The number of double values stored for this key.
std::map< std::string, EVENT::DoubleVec > DoubleMap
virtual EVENT::FloatVec & getFloatVals(const std::string &key, EVENT::FloatVec &values) const
Adds all float values for the given key to values.
virtual const EVENT::StringVec & getFloatKeys(EVENT::StringVec &keys) const
Returns a list of all keys of float parameters.
virtual const EVENT::StringVec & getStringKeys(EVENT::StringVec &keys) const
Returns a list of all keys of string parameters.
virtual const EVENT::StringVec & getDoubleKeys(EVENT::StringVec &keys) const
Returns a list of all keys of double parameters.
Controls access to objects.
Definition: AccessChecked.h:18
virtual void setValue(const std::string &key, int value)
Set integer value for the given key.
std::map< std::string, EVENT::IntVec > IntMap
virtual int getIntVal(const std::string &key) const
Returns the first integer value for the given key.
std::map< std::string, EVENT::FloatVec > FloatMap