source: trunk/MagicSoft/Mars/mtrigger/MTriggerCell.h@ 4692

Last change on this file since 4692 was 4264, checked in by stamerra, 20 years ago
*** empty log message ***
File size: 1.2 KB
Line 
1#ifndef MARS_MTriggerCell
2#define MARS_MTriggerCell
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_TArrayF
12#include <TArrayF.h>
13#endif
14
15class MTriggerCell : public MParContainer, public MCamEvent
16{
17 friend class MReportTrigger;
18private:
19 static const Int_t gsNCells=32; //Number of fields with cell rates
20 // 19 cells and 12 dummy
21
22 TArrayF fCellRate; // Array of the measured L1 cell rates
23
24public:
25 MTriggerCell() : fCellRate(gsNCells)
26 {
27 fName = "MTriggerCell";
28 fTitle = "Container for the measured cell rates";
29 }
30
31 Float_t GetMean() const { return fCellRate.GetSum()/fCellRate.GetSize(); }
32
33 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const
34 {
35 if (idx > gsNCells)
36 return kFALSE;
37
38 val = fCellRate[idx];
39 return val>0;
40 }
41
42 Double_t operator[](const Int_t idx)
43 {
44 if (idx > gsNCells)
45 return kFALSE;
46
47 return fCellRate[idx];
48 }
49
50 void DrawPixelContent(Int_t num) const
51 {
52 }
53
54 ClassDef(MTriggerCell, 1) // Container for the trigger cell rates
55};
56
57#endif
Note: See TracBrowser for help on using the repository browser.