TPCCondData
WeatherConditions.cc
Go to the documentation of this file.
1 /* WeatherConditions.cc
2  * $Id$
3  */
4 
5 #include "WeatherConditions.h"
6 
7 namespace tpcconddata{
8 
10  return std::string("$Rev: 1592 $");
11 }
12 
14  return std::string("TPCWeatherConditions");
15 }
16 
18  setTemperature( 0 );
19  setPressure( 0 );
20  setRelHumidity( 0 );
21 }
22 
24 
26  return getFloatVal( 0 );
27 }
28 
30  return getFloatVal( 1 );
31 }
32 
34  return getFloatVal( 2 );
35 }
36 
38  obj()->setFloatVal( 0, Value);
39 }
40 
41 void WeatherConditions::setPressure( float Value ){
42  obj()->setFloatVal( 1, Value);
43 }
44 
46  obj()->setFloatVal( 2, Value);
47 }
48 
49 void WeatherConditions::print( std::ostream& os ) const {
50 
51  os<<"temperature: "<<getTemperature()<<" C"<<std::endl;
52  os<<"pressure: "<<getPressure()<<" hPa"<<std::endl;
53  os<<"rel. humidity: "<<getRelHumidity()<<" %"<<std::endl;
54 }
55 
56 std::ostream &operator<<(std::ostream &os, const WeatherConditions &wc) {
57  wc.print(os);
58  return os;
59 }
60 
61 }
float getRelHumidity() const
return relative humidity in %
float getTemperature() const
return the temperature in C
class to store the environment of a gaseous detector (e.g.
float getPressure() const
return the athmospheric pressure in hPa
void print(std::ostream &os=std::cout) const
std::ostream & operator<<(std::ostream &os, const ADCChannelMapping &acm)
static std::string getDefaultColName()
WeatherConditions()
constructor wich only sets channel
static std::string getRevision()
virtual ~WeatherConditions()
Important for memory handling.