]> git.uio.no Git - u/mrichter/AliRoot.git/blame - EVE/Alieve/TRDLoader.h
First big commit of the mchview program and its accompanying library,
[u/mrichter/AliRoot.git] / EVE / Alieve / TRDLoader.h
CommitLineData
a282bf09 1#ifndef ALIEVE_TRDLoader_H
2#define ALIEVE_TRDLoader_H
3
4////////////////////////////////////////////////////////////////////////
5// // - ALIEVE implementation -
edf0c4a0 6// Loader for the TRD detector - base class
a282bf09 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
14217b5f 17#ifndef ROOT_TString
18#include <TString.h>
19#endif
20
a282bf09 21#ifndef ROOT_TGedFrame
22#include <TGedFrame.h>
23#endif
24
a282bf09 25class AliTRDv1;
14217b5f 26class AliTRDgeometry;
a282bf09 27
a282bf09 28class TGNumberEntry;
29class TGColorSelect;
30class TGTextEntry;
31class TTree;
32namespace Reve {
33 class RGValuator;
34}
35namespace Alieve {
36 class TRDChamber;
edf0c4a0 37 class TRDLoaderManager;
38 enum TRDDataTypes{
a282bf09 39 kHits = 0,
40 kDigits = 1,
41 kClusters = 2,
edf0c4a0 42 kTracks = 3,
43 kRawRoot = 4,
44 kRawData = 5
a282bf09 45 };
edf0c4a0 46 class TRDLoader : public Reve::RenderElementList
a282bf09 47 {
48 friend class TRDLoaderEditor;
49 public:
edf0c4a0 50 TRDLoader(const Text_t* n="TRDLoader", const Text_t* t=0x0);
a282bf09 51 ~TRDLoader();
edf0c4a0 52 virtual void Paint(Option_t *option="");
53 virtual void SetDataType(TRDDataTypes type);
a282bf09 54 protected:
f5790a4c 55 virtual void AddChambers(int sm=-1, int stk=-1, int ly=-1);
56 virtual TRDChamber* GetChamber(int d);
57 virtual Bool_t GoToEvent(int ev);
14217b5f 58 virtual Bool_t LoadClusters(TTree *tC);
59 virtual Bool_t LoadDigits(TTree *tD);
14217b5f 60 virtual Bool_t LoadTracklets(TTree *tT);
61 virtual Bool_t Open(const char *file, const char *dir = ".");
14217b5f 62 virtual void Unload();
edf0c4a0 63
a282bf09 64 protected:
14217b5f 65 Bool_t kLoadHits, kLoadDigits, kLoadClusters, kLoadTracks;
66 Int_t fSM, fStack, fLy; // supermodule, stack, layer
67 TString fFilename; // name of data file
68 TString fDir; // data directory
69 Int_t fEvent; // current event to be displayed
70
edf0c4a0 71
72 AliTRDv1 *fTRD; // the TRD detector
73 AliTRDgeometry *fGeo; // the TRD geometry
a282bf09 74
75 ClassDef(TRDLoader, 1) // Alieve Loader class for the TRD detector
76 };
77
78
79
80 class TRDLoaderEditor : public TGedFrame
81 {
82 public:
83 TRDLoaderEditor(const TGWindow* p=0, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
84 ~TRDLoaderEditor();
85
86 virtual void AddChambers();
87 virtual void FileOpen();
88 virtual void Load();
edf0c4a0 89 virtual void SetEvent(Double_t ev){fM->fEvent = (Int_t)ev;}
a282bf09 90 virtual void SetModel(TObject* obj);
91
a282bf09 92 protected:
edf0c4a0 93 TRDLoader *fM;
94 TGTextEntry *fFile;
95 Reve::RGValuator *fEvent;
96 Reve::RGValuator *fSMNumber, *fStackNumber, *fPlaneNumber;
a282bf09 97
98 ClassDef(TRDLoaderEditor,1) // Editor for TRDLoader
99 };
edf0c4a0 100
a282bf09 101}
102#endif