source: trunk/MagicSoft/Mars/manalysis/MCurrents.h@ 2178

Last change on this file since 2178 was 2178, checked in by tbretz, 22 years ago
*** empty log message ***
File size: 1.3 KB
Line 
1#ifndef MARS_MCurrents
2#define MARS_MCurrents
3
4#ifndef MARS_MCamEvent
5#include "MCamEvent.h"
6#endif
7
8#ifndef ROOT_TArrayI
9#include <TArrayI.h>
10#endif
11
12#include <iostream.h>
13class MCurrents : public MCamEvent
14{
15private:
16 /*
17 "DC %s %s %02d %02d %02d %03d 577*%05d \n",
18 status1, status2, hour, minute, second, ms,
19 577 * pixel_DC_readout_in_nAmp
20 */
21 TString fStatus[2];
22 TArrayI fArray; // [nA] Unsigned Int!
23
24public:
25 MCurrents(Int_t size=577, const char *name=NULL, const char *title=NULL);
26
27 void SetCurrent(Int_t i, UInt_t val) { fArray[i] = (Int_t)val; }
28 UInt_t GetCurrent(Int_t i) const { return (*this)[i]; }
29 UInt_t &operator[](Int_t i) { return (UInt_t&)fArray[i]; }
30 const UInt_t &operator[](Int_t i) const { return (*this)[i]; }
31
32 UInt_t GetMin() const;
33 UInt_t GetMax() const;
34
35 void SetStatus1(const TString &str) { fStatus[0] = str; }
36 void SetStatus2(const TString &str) { fStatus[1] = str; }
37
38 void Print(Option_t *opt=NULL) const;
39
40 Bool_t GetPixelContent(Float_t &val, Int_t idx, Float_t ratio=1, Int_t type=0) const
41 {
42 val = (*this)[idx];
43 return val>0;
44 }
45 void DrawPixelContent(Int_t num) const
46 {
47 }
48
49 ClassDef(MCurrents, 1) // Storage Container for the Currents (PRELIMINARY)
50};
51
52#endif
Note: See TracBrowser for help on using the repository browser.