]>
Commit | Line | Data |
---|---|---|
a282bf09 | 1 | #ifndef ALIEVE_TRDModule_H |
2 | #define ALIEVE_TRDModule_H | |
3 | ||
4 | ///////////////////////////////////////////////////////////////////////// | |
5 | // | |
6 | // - AliEVE implementation - | |
7 | // The common structure of a TRD module (SM, Stack or Chamber) | |
8 | // - TRDModule - structure of TRD module for visualisation | |
9 | // - TRDModuleEditor - UI | |
10 | // | |
11 | // by A.Bercuci (A.Bercuci@gsi.de) Fri Oct 27 2006 | |
12 | /////////////////////////////////////////////////////////////////////// | |
13 | ||
14 | #ifndef ROOT_TNamed | |
15 | #include <TNamed.h> | |
16 | #endif | |
17 | ||
18 | #ifndef ROOT_TGedFrame | |
19 | #include <TGedFrame.h> | |
20 | #endif | |
21 | ||
22 | class TObject; | |
23 | class TGWindow; | |
24 | class TGCheckButton; | |
25 | class TGNumberEntry; | |
26 | class TGColorSelect; | |
27 | ||
28 | namespace Alieve { | |
29 | ||
30 | class TRDModule : public TNamed | |
31 | { | |
32 | friend class TRDModuleEditor; | |
33 | friend class TRDNode; | |
34 | friend class TRDChamber; | |
35 | public: | |
f5790a4c | 36 | TRDModule(const char *typ="XXX", Int_t id=0); |
a282bf09 | 37 | virtual ~TRDModule() {} |
38 | ||
14217b5f | 39 | virtual Bool_t GetDigitsBox(){return fDigitsBox;} |
40 | virtual Bool_t GetDigitsLog(){return fDigitsLog;} | |
41 | virtual UShort_t GetDigitsThreshold(){return fDigitsThreshold;} | |
a282bf09 | 42 | virtual Int_t GetID(){return fDet;} |
43 | virtual void Paint(Option_t* option="")=0; | |
44 | virtual void Reset()=0; | |
45 | ||
46 | protected: | |
47 | // UI section | |
48 | Bool_t fLoadHits, fRnrHits; | |
49 | Bool_t fLoadDigits, fRnrDigits, fDigitsLog, fDigitsBox; | |
50 | Bool_t kDigitsNeedRecompute; | |
51 | ||
52 | Bool_t fLoadRecPoints, fRnrRecPoints; | |
53 | Bool_t fLoadTracklets, fRnrTracklets; | |
54 | ||
55 | Int_t fDet; // detector number | |
56 | UShort_t fDigitsThreshold; // digits threshold | |
57 | ClassDef(TRDModule,1) // Structure holder for TRD chamber | |
58 | }; | |
59 | ||
60 | ||
61 | class TRDModuleEditor : public TGedFrame | |
62 | { | |
63 | public: | |
64 | TRDModuleEditor(const TGWindow* p=0, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground()); | |
65 | ~TRDModuleEditor(); | |
66 | ||
67 | virtual void SetModel(TObject* obj); | |
68 | ||
69 | void ModifyDigitsView(); | |
70 | void SetThreshold(Long_t thres); | |
71 | void UpdateChamber(); | |
72 | void UpdateClusters(Pixel_t); | |
73 | void UpdateHits(Pixel_t); | |
74 | ||
75 | protected: | |
76 | TRDModule* fM; | |
77 | ||
78 | private: | |
79 | TGCheckButton *fDisplayHits; | |
80 | TGColorSelect *fHitsColor; | |
81 | TGCheckButton *fDisplayDigits, *fToggleLog, *fToggleBox, *fThreshold; | |
82 | TGNumberEntry *fThresValue; | |
83 | TGCheckButton *fDisplayClusters; | |
84 | TGColorSelect *fClustersColor; | |
85 | TGCheckButton *fDisplayTracks; | |
86 | ||
87 | ClassDef(TRDModuleEditor,1) // Editor for TRDModule | |
88 | }; | |
89 | } | |
90 | ||
91 | #endif |