00001
00002 #ifndef EVENT_LCPARAMETERSIMPL_H
00003 #define EVENT_LCPARAMETERSIMPL_H 1
00004
00005 #include "EVENT/LCParameters.h"
00006 #include "IMPL/AccessChecked.h"
00007
00008 #include <map>
00009 #include <vector>
00010
00011 namespace IMPL {
00012
00013
00014 class LCRunHeaderImpl ;
00015 class LCEventImpl ;
00016 class LCCollectionVec ;
00017
00018 typedef std::map< std::string, EVENT::IntVec > IntMap ;
00019 typedef std::map< std::string, EVENT::FloatVec > FloatMap ;
00020 typedef std::map< std::string, EVENT::StringVec > StringMap ;
00021
00022
00035 class LCParametersImpl : public EVENT::LCParameters , public AccessChecked{
00036
00037 friend class LCRunHeaderImpl ;
00038 friend class LCEventImpl ;
00039 friend class LCCollectionVec ;
00040
00041 public:
00042
00043 LCParametersImpl() ;
00044
00046 virtual ~LCParametersImpl() { ; }
00047
00050 virtual int getIntVal(const std::string & key) const ;
00051
00054 virtual float getFloatVal(const std::string & key) const ;
00055
00058 virtual const std::string & getStringVal(const std::string & key) const ;
00059
00063 virtual EVENT::IntVec & getIntVals(const std::string & key, EVENT::IntVec & values) const ;
00064
00068 virtual EVENT::FloatVec & getFloatVals(const std::string & key, EVENT::FloatVec & values) const ;
00069
00073 virtual EVENT::StringVec & getStringVals(const std::string & key, EVENT::StringVec & values) const ;
00074
00077 virtual const EVENT::StringVec & getIntKeys( EVENT::StringVec & keys) const ;
00078
00081 virtual const EVENT::StringVec & getFloatKeys(EVENT::StringVec & keys) const ;
00082
00085 virtual const EVENT::StringVec & getStringKeys(EVENT::StringVec & keys) const ;
00086
00089 virtual int getNInt(const std::string & key) const ;
00090
00093 virtual int getNFloat(const std::string & key) const ;
00094
00097 virtual int getNString(const std::string & key) const ;
00098
00101 virtual void setValue(const std::string & key, int value) ;
00102
00105 virtual void setValue(const std::string & key, float value) ;
00106
00109 virtual void setValue(const std::string & key, const std::string & value) ;
00110
00113 virtual void setValues(const std::string & key, const EVENT::IntVec & values);
00114
00117 virtual void setValues(const std::string & key, const EVENT::FloatVec & values);
00118
00121 virtual void setValues(const std::string & key, const EVENT::StringVec & values);
00122
00123
00124 protected:
00125
00126 mutable IntMap _intMap{} ;
00127 mutable FloatMap _floatMap{} ;
00128 mutable StringMap _stringMap{} ;
00129
00130 };
00131 }
00132 #endif