source: trunk/MagicSoft/Mars/mcamera/MCameraTH.h@ 8605

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