]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/Alieve/TRDLoader.h
Use new naming conventions from QuadSet; increase x-width of SDD digits.
[u/mrichter/AliRoot.git] / EVE / Alieve / TRDLoader.h
1 #ifndef ALIEVE_TRDLoader_H
2 #define ALIEVE_TRDLoader_H
3
4 ////////////////////////////////////////////////////////////////////////
5 //                                                                      // - ALIEVE implementation -
6 // Loader for the TRD detector
7 //    - TRDLoader - loader of TRD data (simulation + measured)
8 //    - TRDLoaderEditor - UI
9 //
10 // by A.Bercuci (A.Bercuci@gsi.de)   Fri Oct 27 2006
11 ////////////////////////////////////////////////////////////////////////
12
13 #ifndef REVE_RenderElement_H
14 #include <Reve/RenderElement.h>
15 #endif
16
17 #ifndef ROOT_TNamed
18 #include <TNamed.h>
19 #endif
20
21 #ifndef ROOT_TString
22 #include <TString.h>
23 #endif
24
25 #ifndef ROOT_TGedFrame
26 #include <TGedFrame.h>
27 #endif
28
29 class AliRunLoader;
30 class AliTRDv1;
31 class AliTRDgeometry;
32
33 class TGCheckButton;
34 class TGNumberEntry;
35 class TGColorSelect;
36 class TGTextEntry;
37 class TTree;
38 namespace Reve {
39         class RGValuator;
40 }
41 namespace Alieve {
42         class TRDChamber;
43         enum DataTypes{
44                 kHits = 0,
45                 kDigits = 1,
46                 kClusters = 2,
47                 kESDs = 3 
48         };
49         class TRDLoader : public Reve::RenderElementListBase, public TNamed
50         {
51         friend class TRDLoaderEditor;
52         public:
53                 TRDLoader(const Text_t* n="TRDLoader", const Text_t* t=0);
54                 ~TRDLoader();
55
56         protected:
57                 virtual void            AddChambers(const int sm=-1, const int stk=-1, const int ly=-1);
58                 virtual TRDChamber*     GetChamber(const int d);
59                 virtual Bool_t  GoToEvent(const int ev);
60                 virtual Bool_t  LoadClusters(TTree *tC);
61                 virtual Bool_t  LoadDigits(TTree *tD);
62                 virtual Bool_t  LoadHits(TTree *tH);
63                 virtual Bool_t  LoadTracklets(TTree *tT);
64                 virtual Bool_t  Open(const char *file, const char *dir = ".");
65                 virtual void            Paint(Option_t *option="");
66                 virtual void            Unload();
67                 
68         protected:
69                 Bool_t  kLoadHits, kLoadDigits, kLoadClusters, kLoadTracks;
70                 Int_t           fSM, fStack, fLy; // supermodule, stack, layer
71                 TString fFilename; // name of data file 
72                 TString fDir; // data directory
73                 Int_t           fEvent; // current event to be displayed
74                         
75         private:
76                 AliTRDv1                                *fTRD; // the TRD detector
77                 AliTRDgeometry  *fGeo; // the TRD geometry
78                 AliRunLoader            *fRunLoader; // Run Loader
79                 
80                 ClassDef(TRDLoader, 1) // Alieve Loader class for the TRD detector
81         };
82
83
84         
85         class TRDLoaderEditor : public TGedFrame
86         {
87         public:
88                 TRDLoaderEditor(const TGWindow* p=0, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
89                 ~TRDLoaderEditor();
90
91                 virtual void    AddChambers();
92                 virtual void    FileOpen();
93                 virtual void    Load();
94                 virtual void    SetModel(TObject* obj);
95                 
96                 
97         protected:
98                 TRDLoader* fM;
99         TGTextEntry *fFile;
100                 Reve::RGValuator *fEvent;
101
102                 Reve::RGValuator *fSMNumber, *fStackNumber, *fPlaneNumber;
103                 TGCheckButton *fLoadHits, *fLoadDigits, *fLoadClusters, *fLoadTracks;
104                 
105                 ClassDef(TRDLoaderEditor,1) // Editor for TRDLoader
106         };
107 }
108 #endif