Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

BDSwicDevice.h

Go to the documentation of this file.
00001 
00036 #ifndef BDSWICDEVICE_H
00037 #define BDSWICDEVICE_H
00038 
00039 #include <RawData/RawBeamSwicData.h>
00040 
00041 class BDSwicDevice : public RawBeamSwicData 
00042 {
00043 public:
00044 
00046     enum MonitorType {
00047         kUnknown = 0,
00048         kProfile,               
00049         kHadron,                
00050         kMuon,                  
00051         kWire                   
00052     };
00053 
00060     BDSwicDevice();
00061     
00066     BDSwicDevice(const RawBeamData& swic_data);
00067 
00068     virtual ~BDSwicDevice();
00069 
00075     virtual void SetData(const RawBeamData& swic_data);
00076 
00086     bool SetPeds(const std::vector<double>& peds);
00087 
00103     virtual bool SetMask(const std::vector<double>& mask);
00104 
00105 
00115     bool SetNoise(const std::vector<double>& noise);
00116     
00125     void SetScale(double scale);
00126 
00132     void SetMvPerADC(double mvperadc);
00133 
00136     void SetGainCorrection(double gain);
00137 
00144     void SetCapacitance(double cap);
00145 
00152     virtual double GetVoltage(int index) const;
00153 
00156     double GetCharge(int index) const;
00157 
00163     double GetTotalVoltage();
00164 
00170     double GetTotalCharge();
00171 
00173     MonitorType GetMonitorType() { return fType; }
00174 
00181     double GetNoise(int index) const;
00182 
00183  private:
00184 
00185     std::vector<double> fPeds, fMask, fNoise;
00186     double fMvPerADC, fScale, fGain, fCap;
00187     std::vector<int> fData;     // cache
00188 
00189     MonitorType fType;
00190 
00191     void UpdateType();
00192 };                              // end of class BDSwicDevice
00193 
00194 #endif  // BDSWICDEVICE_H
00195 

Generated on Mon Feb 15 11:06:24 2010 for loon by  doxygen 1.3.9.1