TPCCondData
GasConditions.h
Go to the documentation of this file.
1 #ifndef GasConditions_h
2 #define GasConditions_h 1
3 
4 //C++
5 #include "iostream"
6 #include "string"
7 
8 //LCIO
9 #include "lcio.h"
10 #include "EVENT/LCGenericObject.h"
11 #include "IMPL/LCGenericObjectImpl.h"
12 
13 namespace tpcconddata{
14 
15 class GasConditions ;
16 
19 class GasConditions : public EVENT::LCGenericObject {
20 
21 public:
22 
25  GasConditions();
26 
29  GasConditions(EVENT::LCObject* obj);
30 
32  virtual ~GasConditions();
33 
36  float getMixture( int Content ) const;
37 
39  float getTemperature() const;
40 
42  float getPressure() const;
43 
45  float getOverPressure() const;
46 
48  float getFlow() const;
49 
51  float getWaterContent() const;
52 
54  float getOxygenContent() const;
55 
56  void setMixture( int Content, float Value );
57  void setTemperature( float Value );
58  void setPressure( float Value );
59  void setOverPressure( float Value );
60  void setFlow( float Value );
61  void setWaterContent( float Value );
62  void setOxygenContent( float Value );
63 
64  static std::string getRevision();
65  static std::string getDefaultColName();
66 
67  void print( std::ostream& os = std::cout ) const;
68 
69  IMPL::LCGenericObjectImpl* obj(){return myObj;}
70 
71  virtual int id(){ return myObj->id();}
72 
73  // ---- need to implement LCGenericObject interface:
74 
75  int getNInt() const;
76  int getNFloat() const;
77  int getNDouble() const;
78 
79  int getIntVal(int index) const;
80  float getFloatVal(int index) const;
81  double getDoubleVal(int index) const;
82 
83  bool isFixedSize() const {return false;};
84 
85  const std::string getTypeName() const {
86  return "GasConditions";
87  }
88  const std::string getDataDescription() const {
89  return std::string("i:NContents,MixtureContents,")+
90  std::string("f:Temperture,Preasure,Overpreasure,Flow,")+
91  std::string("WaterContent,OxygenContent,MixtureFractions");
92  }
93 
94 protected:
95 
96  bool createObj;
97  IMPL::LCGenericObjectImpl* myObj;
98 
99  int getNMixtureContents() const;
100  int getContent( int Index ) const;
101  float getFraction( int Index ) const;
102  void setFraction( int Index, float Fraction );
103  void addMixtureContents( int Content, float Fraction );
104 
105 }; // class
106 
107  std::ostream &operator<<(std::ostream &os, const GasConditions &gc);
108 }
109 
110 #endif
IMPL::LCGenericObjectImpl * obj()
Definition: GasConditions.h:69
void setTemperature(float Value)
float getTemperature() const
return the temperature of the gas in C
virtual ~GasConditions()
Important for memory handling.
float getOxygenContent() const
return the oxygen content in the gas in ppmV
const std::string getTypeName() const
Definition: GasConditions.h:85
float getFloatVal(int index) const
void setFlow(float Value)
void setOxygenContent(float Value)
GasConditions()
constructor wich only sets channel
void setPressure(float Value)
float getFlow() const
return the flow of the gas in l/h
float getFraction(int Index) const
const std::string getDataDescription() const
Definition: GasConditions.h:88
std::ostream & operator<<(std::ostream &os, const ADCChannelMapping &acm)
void setMixture(int Content, float Value)
void print(std::ostream &os=std::cout) const
float getOverPressure() const
return the over pressure of the sytem (to the athmosphere) in mbar
void setWaterContent(float Value)
static std::string getDefaultColName()
void addMixtureContents(int Content, float Fraction)
double getDoubleVal(int index) const
void setOverPressure(float Value)
int getIntVal(int index) const
void setFraction(int Index, float Fraction)
class to store the condition of the gas in a gaseous detector (e.g.
Definition: GasConditions.h:19
float getWaterContent() const
return the water content in the gas in ppmV
static std::string getRevision()
Definition: GasConditions.cc:9
float getPressure() const
return the pressure of the gas in hPa
IMPL::LCGenericObjectImpl * myObj
Definition: GasConditions.h:97
float getMixture(int Content) const
return fraction of the mixtrue of the gas in of the following contents
int getContent(int Index) const