New files from Alexandru: TRD visualization.
[u/mrichter/AliRoot.git] / EVE / Alieve / TRDModule.h
CommitLineData
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
22class TObject;
23class TGWindow;
24class TGCheckButton;
25class TGNumberEntry;
26class TGColorSelect;
27
28namespace Alieve {
29
30 class TRDModule : public TNamed
31 {
32 friend class TRDModuleEditor;
33 friend class TRDNode;
34 friend class TRDChamber;
35 public:
36 TRDModule(const char *typ="XXX", const Int_t id=0);
37 virtual ~TRDModule() {}
38
39 virtual Int_t GetID(){return fDet;}
40 virtual void Paint(Option_t* option="")=0;
41 virtual void Reset()=0;
42
43 protected:
44 // UI section
45 Bool_t fLoadHits, fRnrHits;
46 Bool_t fLoadDigits, fRnrDigits, fDigitsLog, fDigitsBox;
47 Bool_t kDigitsNeedRecompute;
48
49 Bool_t fLoadRecPoints, fRnrRecPoints;
50 Bool_t fLoadTracklets, fRnrTracklets;
51
52 Int_t fDet; // detector number
53 UShort_t fDigitsThreshold; // digits threshold
54 ClassDef(TRDModule,1) // Structure holder for TRD chamber
55 };
56
57
58 class TRDModuleEditor : public TGedFrame
59 {
60 public:
61 TRDModuleEditor(const TGWindow* p=0, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
62 ~TRDModuleEditor();
63
64 virtual void SetModel(TObject* obj);
65
66 void ModifyDigitsView();
67 void SetThreshold(Long_t thres);
68 void UpdateChamber();
69 void UpdateClusters(Pixel_t);
70 void UpdateHits(Pixel_t);
71
72 protected:
73 TRDModule* fM;
74
75 private:
76 TGCheckButton *fDisplayHits;
77 TGColorSelect *fHitsColor;
78 TGCheckButton *fDisplayDigits, *fToggleLog, *fToggleBox, *fThreshold;
79 TGNumberEntry *fThresValue;
80 TGCheckButton *fDisplayClusters;
81 TGColorSelect *fClustersColor;
82 TGCheckButton *fDisplayTracks;
83
84 ClassDef(TRDModuleEditor,1) // Editor for TRDModule
85 };
86}
87
88#endif