source: branches/Corsika7500Compatibility/mcamera/MCameraTH.h@ 19921

Last change on this file since 19921 was 8955, checked in by tbretz, 17 years ago
*** empty log message ***
File size: 2.2 KB
Line 
1/* ======================================================================== *\
2! $Name: not supported by cvs2svn $:$Id: MCameraTH.h,v 1.8 2008-06-14 14:19:03 tbretz Exp $
3\* ======================================================================== */
4#ifndef MARS_MCameraTH
5#define MARS_MCameraTH
6
7#ifndef MARS_MParContainer
8#include "MParContainer.h"
9#endif
10#ifndef MARS_MCamEvent
11#include "MCamEvent.h"
12#endif
13
14#ifndef ROOT_TArrayC
15#include <TArrayC.h>
16#endif
17
18class MCameraTD;
19
20class MCameraTH : public MParContainer, public MCamEvent
21{
22 friend class MReportCC;
23 friend class MReportRec;
24private:
25 TArrayC fTH; // [au] discriminator thresholds
26 Bool_t fIsValid; // fTH contains valid information
27
28 Bool_t InterpreteTH(TString &str, Int_t ver, MCameraTD &td);
29
30public:
31 MCameraTH(Int_t size=577, const char *name=NULL, const char *title=NULL);
32
33 Byte_t operator[](Int_t i) { return fTH[i]; }
34
35 Byte_t GetMin() const;
36 Byte_t GetMax() const;
37
38 void Print(Option_t *opt=NULL) const;
39
40 void Invalidate() { fTH.Reset(); fIsValid=kFALSE; }
41
42 void SetValid(Bool_t v=kTRUE) { fIsValid=v; }
43 Bool_t IsValid() const { return fIsValid; }
44
45 Bool_t GetPixelContent(Double_t &val, Int_t idx, const MGeomCam &cam, Int_t type=0) const
46 {
47 if (idx>=fTH.GetSize())
48 return kFALSE;
49
50 // FIXME: This is a stupid workaround to describe the trigger area
51 // and only valid for the MAGIC-I camera!
52 if (idx>=397 ||
53 (idx>=339 && idx<=345) ||
54 (idx>=279 && idx<=283) ||
55 (idx>=331 && idx<=334) ||
56 (idx>=394 && idx<=396) ||
57 (idx>=271 && idx<=273) ||
58 (idx>=329 && idx<=330) ||
59 (idx>=383 && idx<=389) ||
60 (idx>=319 && idx<=323) ||
61 (idx>=289 && idx<=293) ||
62 (idx>=350 && idx<=356) ||
63 (idx>=299 && idx<=303) ||
64 (idx>=361 && idx<=367) ||
65 (idx>=309 && idx<=313) ||
66 (idx>=372 && idx<=378))
67 return kFALSE;
68
69 val = fTH[idx];
70 return val>0;
71 }
72 void DrawPixelContent(Int_t num) const
73 {
74 }
75
76 ClassDef(MCameraTH, 2) // Storage Container for the discriminator thresholds
77};
78
79#endif
Note: See TracBrowser for help on using the repository browser.