]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveDet/AliEveTRDModule.h
fix user histogram management and style (Ben)
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveTRDModule.h
1 // $Id$
2 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
3
4 /**************************************************************************
5  * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
6  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
7  * full copyright notice.                                                 *
8  **************************************************************************/
9
10 #ifndef AliEveTRDModule_H
11 #define AliEveTRDModule_H
12
13 /////////////////////////////////////////////////////////////////////////
14 //
15 // - AliEVE implementation -
16 // The common structure of a TRD module (SM, Stack or Chamber)
17 //    - AliEveTRDModule - structure of TRD module for visualisation
18 //    - AliEveTRDModuleEditor - UI
19 //
20 // by A.Bercuci (A.Bercuci@gsi.de)   Fri Oct 27 2006
21 ///////////////////////////////////////////////////////////////////////
22
23 #include <TNamed.h>
24 #include <TGedFrame.h>
25
26 class TObject;
27 class TGWindow;
28 class TGCheckButton;
29 class TGNumberEntry;
30 class TGColorSelect;
31
32
33 class AliEveTRDModule : public TNamed
34 {
35   friend class AliEveTRDModuleEditor;
36   friend class AliEveTRDNode;
37   friend class AliEveTRDChamber;
38
39 public:
40   AliEveTRDModule(const char *typ="XXX", Int_t id=0);
41   virtual ~AliEveTRDModule() {}
42
43   virtual Bool_t GetDigitsBox() const {return fDigitsBox;}
44   virtual Bool_t GetDigitsLog() const {return fDigitsLog;}
45   virtual UShort_t GetDigitsThreshold() const {return fDigitsThreshold;}
46   virtual Int_t GetID() const {return fDet;}
47   virtual void  Paint(Option_t* option="")=0;
48   virtual void  Reset()=0;
49
50 protected:
51   // UI section
52   Bool_t        fLoadHits, fRnrHits, fLoadDigits;   // What to load.
53   Bool_t        fRnrDigits, fDigitsLog, fDigitsBox; // What to show.
54   Bool_t        fDigitsNeedRecompute;               // Need to recompute digits.
55
56   Bool_t        fLoadRecPoints, fRnrRecPoints; // What to do with recpoints.
57   Bool_t        fLoadTracklets, fRnrTracklets; // What to do with tracklets.
58
59   Int_t         fDet;             // detector number
60   UShort_t      fDigitsThreshold; // digits threshold
61
62 private:
63   AliEveTRDModule(const AliEveTRDModule&);            // Not implemented
64   AliEveTRDModule& operator=(const AliEveTRDModule&); // Not implemented
65
66   ClassDef(AliEveTRDModule, 0); // Structure holder for TRD chamber.
67 };
68
69
70 class AliEveTRDModuleEditor : public TGedFrame
71 {
72 public:
73   AliEveTRDModuleEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30,
74                         UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground());
75   virtual ~AliEveTRDModuleEditor() {}
76
77   virtual void SetModel(TObject* obj);
78
79   void  ModifyDigitsView();
80   void  SetThreshold(Long_t thres);
81   void  UpdateChamber();
82   void  UpdateClusters(Pixel_t);
83   void  UpdateHits(Pixel_t);
84
85 protected:
86   AliEveTRDModule* fM; // Model object.
87
88 private:
89   TGCheckButton *fDisplayHits; // Hit control.
90   TGColorSelect *fHitsColor;   // Hit color.
91   TGCheckButton *fDisplayDigits, *fToggleLog, *fToggleBox, *fThreshold; // Display toggles.
92   TGNumberEntry *fThresValue;       // Threshold weed.
93   TGCheckButton *fDisplayClusters;  // Cluster control.
94   TGColorSelect *fClustersColor;    // Cluster color.
95   TGCheckButton *fDisplayTracks;    // Track control.
96
97   AliEveTRDModuleEditor(const AliEveTRDModuleEditor&);            // Not implemented
98   AliEveTRDModuleEditor& operator=(const AliEveTRDModuleEditor&); // Not implemented
99
100   ClassDef(AliEveTRDModuleEditor, 0); // Editor for AliEveTRDModule.
101 };
102
103 #endif