MarlinTPC  1.2.0
GasConditions.h
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
float getTemperature() const
return the temperature of the gas in C
Definition: GasConditions.cc:56
virtual ~GasConditions()
Important for memory handling.
Definition: GasConditions.cc:43
float getOxygenContent() const
return the oxygen content in the gas in ppmV
Definition: GasConditions.cc:76
GasConditions()
constructor wich only sets channel
Definition: GasConditions.cc:17
float getFlow() const
return the flow of the gas in l/h
Definition: GasConditions.cc:68
float getOverPressure() const
return the over pressure of the sytem (to the athmosphere) in mbar
Definition: GasConditions.cc:64
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
Definition: GasConditions.cc:72
float getPressure() const
return the pressure of the gas in hPa
Definition: GasConditions.cc:60
float getMixture(int Content) const
return fraction of the mixtrue of the gas in of the following contents
Definition: GasConditions.cc:47