source: trunk/Mars/mcamera/MCameraHV.h@ 18162

Last change on this file since 18162 was 7489, checked in by tbretz, 19 years ago
*** empty log message ***
File size: 1.9 KB
Line 
1#ifndef MARS_MCameraHV
2#define MARS_MCameraHV
3
4#ifndef MARS_MCamEvent
5#include "MCamEvent.h"
6#endif
7#ifndef MARS_MParContainer
8#include "MParContainer.h"
9#endif
10
11#ifndef ROOT_TArrayS
12#include <TArrayS.h>
13#endif
14
15class MCameraHV : public MParContainer, public MCamEvent
16{
17 friend class MReportCamera;
18private:
19 Byte_t fStatus; // CaCo monitored status of the High Voltage [0-9], Cam.HV.PS_state
20 Bool_t fStatusRamping; // CaCo monitored status of ramping the HV, Cam.HV_state
21
22 Short_t fVoltageA; // [V] Measured voltage of power supply A, hvps1
23 Short_t fVoltageB; // [V] Measured voltage of power supply B, hvps2
24
25 Byte_t fCurrentA; // [mA] Measured current of power supply A, curr1
26 Byte_t fCurrentB; // [mA] Measured current of power supply B, curr2
27
28 TArrayS fHV; // [V] Measured high Voltages for all PMTs
29
30 TString fFileName; // Filename for the HV settings
31
32public:
33 MCameraHV() : fHV(577)
34 {
35 fName = "MCameraHV";
36 fTitle = "Container storing information about the Camera HV";
37 }
38
39 Byte_t GetStatus() const { return fStatus; }
40 Bool_t GetStatusRamping() const { return fStatusRamping; }
41
42 Short_t GetVoltageA() const { return fVoltageA; }
43 Short_t GetVoltageB() const { return fVoltageB; }
44
45 Byte_t GetCurrentA() const { return fCurrentA; }
46 Byte_t GetCurrentB() const { return fCurrentB; }
47
48 Float_t GetMean() const { return fHV.GetSum()/fHV.GetSize(); }
49
50 Double_t operator[](const UInt_t idx) { return fHV[idx]; }
51
52 void DrawPixelContent(Int_t num) const { }
53 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const
54 {
55 if (idx>=fHV.GetSize())
56 return kFALSE;
57
58 val = fHV[idx];
59 return val>0;
60 }
61
62 ClassDef(MCameraHV, 2) // Container storing information about the Camera HV
63};
64
65#endif
Note: See TracBrowser for help on using the repository browser.