source: trunk/MagicSoft/Mars/mcamera/MCameraHV.h@ 6091

Last change on this file since 6091 was 3985, checked in by jlopez, 21 years ago
*** empty log message ***
File size: 1.7 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
30public:
31 MCameraHV() : fHV(577)
32 {
33 fName = "MCameraHV";
34 fTitle = "Container storing information about the Camera HV";
35 }
36
37 Byte_t GetStatus() const { return fStatus; }
38 Bool_t GetStatusRamping() const { return fStatusRamping; }
39
40 Short_t GetVoltageA() const { return fVoltageA; }
41 Short_t GetVoltageB() const { return fVoltageB; }
42
43 Byte_t GetCurrentA() const { return fCurrentA; }
44 Byte_t GetCurrentB() const { return fCurrentB; }
45
46 Float_t GetMean() const { return fHV.GetSum()/fHV.GetSize(); }
47
48 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const
49 {
50 val = fHV[idx];
51 return val>0;
52 }
53
54 Double_t operator[](const UInt_t idx) { return fHV[idx]; }
55
56 void DrawPixelContent(Int_t num) const
57 {
58 }
59
60 ClassDef(MCameraHV, 1) // Container storing information about the Camera HV
61};
62
63#endif
Note: See TracBrowser for help on using the repository browser.