X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=EVE%2FEveDet%2FAliEveTRDLoader.h;h=29a57d32ad4312b8a1340034ca986636e286ff14;hb=f4719a27e63a747e95744462751dde999759b032;hp=4fc841cb60d297d9042d2c133af80caf64fbc40d;hpb=cb4245bbbf0ab426f2add36f3749d182999eea84;p=u%2Fmrichter%2FAliRoot.git diff --git a/EVE/EveDet/AliEveTRDLoader.h b/EVE/EveDet/AliEveTRDLoader.h index 4fc841cb60d..29a57d32ad4 100644 --- a/EVE/EveDet/AliEveTRDLoader.h +++ b/EVE/EveDet/AliEveTRDLoader.h @@ -6,11 +6,11 @@ * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for * * full copyright notice. * **************************************************************************/ -#ifndef ALIEVE_TRDLoader_H -#define ALIEVE_TRDLoader_H +#ifndef AliEveTRDLoader_H +#define AliEveTRDLoader_H //////////////////////////////////////////////////////////////////////// -// // - ALIEVE implementation - +// - ALIEVE implementation - // Loader for the TRD detector - base class // - AliEveTRDLoader - loader of TRD data (simulation + measured) // - AliEveTRDLoaderEditor - UI @@ -32,69 +32,96 @@ class TTree; class TEveGValuator; - class AliEveTRDChamber; - class AliEveTRDLoaderManager; - enum TRDDataTypes{ - kHits = 0, - kDigits = 1, - kClusters = 2, - kTracks = 3, - kRawRoot = 4, - kRawData = 5 - }; - class AliEveTRDLoader : public TEveElementList - { - friend class AliEveTRDLoaderEditor; - public: - AliEveTRDLoader(const Text_t* n="AliEveTRDLoader", const Text_t* t=0x0); - ~AliEveTRDLoader(); - virtual void Paint(Option_t *option=""); - virtual void SetDataType(TRDDataTypes type); - protected: - virtual void AddChambers(int sm=-1, int stk=-1, int ly=-1); - virtual AliEveTRDChamber* GetChamber(int d); - virtual Bool_t GoToEvent(int ev); - virtual Bool_t LoadClusters(TTree *tC); - virtual Bool_t LoadDigits(TTree *tD); - virtual Bool_t LoadTracklets(TTree *tT); - virtual Bool_t Open(const char *file, const char *dir = "."); - virtual void Unload(); - - protected: - Bool_t kLoadHits, kLoadDigits, kLoadClusters, kLoadTracks; - Int_t fSM, fStack, fLy; // supermodule, stack, layer - TString fFilename; // name of data file - TString fDir; // data directory - Int_t fEvent; // current event to be displayed - - - AliTRDv1 *fTRD; // the TRD detector - AliTRDgeometry *fGeo; // the TRD geometry - - ClassDef(AliEveTRDLoader, 1) // Alieve Loader class for the TRD detector - }; - - - - class AliEveTRDLoaderEditor : public TGedFrame - { - public: - AliEveTRDLoaderEditor(const TGWindow* p=0, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground()); - ~AliEveTRDLoaderEditor(); - - virtual void AddChambers(); - virtual void FileOpen(); - virtual void Load(); - virtual void SetEvent(Double_t ev){fM->fEvent = (Int_t)ev;} - virtual void SetModel(TObject* obj); - - protected: - AliEveTRDLoader *fM; - TGTextEntry *fFile; - TEveGValuator *fEvent; - TEveGValuator *fSMNumber, *fStackNumber, *fPlaneNumber; - - ClassDef(AliEveTRDLoaderEditor,1) // Editor for AliEveTRDLoader - }; +class AliEveTRDChamber; +class AliEveTRDLoaderManager; + +class AliEveTRDLoader : public TEveElementList +{ + friend class AliEveTRDLoaderEditor; + +public: + enum TRDDataTypes { + kTRDHits = BIT(0), + kTRDDigits = BIT(1), + kTRDClusters = BIT(2), + kTRDTracklets= BIT(3), + kTRDRawRoot = BIT(4), + kTRDRawDate = BIT(5) + }; + + AliEveTRDLoader(const Text_t* n="AliEveTRDLoader", const Text_t* t=0); + virtual ~AliEveTRDLoader() {} + + virtual void AddChambers(int sm=-1, int stk=-1, int ly=-1); + virtual AliEveTRDChamber* GetChamber(int d); + virtual Int_t GetDataType() const {return fDataType;} + virtual Int_t GetEvent() const {return fEvent;} + virtual Bool_t GoToEvent(int ev); + Bool_t IsDataLinked() const {return TestBit(1);} + + virtual Bool_t Open(const char *file, const char *dir = "."); + inline virtual Bool_t NextEvent(Bool_t rewind = kTRUE); + virtual void Paint(Option_t *option=""); + + virtual void SetDataType(UChar_t type = 0){fDataType = type;} + + +protected: + virtual Bool_t LoadHits(TTree *tH); + virtual Bool_t LoadClusters(TTree *tC); + virtual Bool_t LoadDigits(TTree *tD); + virtual Bool_t LoadTracklets(TTree *trklTree); + void SetDataLinked(Bool_t linked = kTRUE) {SetBit(1, linked);} + + virtual void Unload(); + + UChar_t fDataType; // data type + //Bool_t fLoadHits, fLoadDigits, fLoadClusters, fLoadTracks; // flags for data-loading + Char_t fSM, fStack, fLy; // supermodule, stack, layer + Short_t fEvent; // current event to be displayed + AliTRDgeometry *fGeo; // the TRD geometry + TString fFilename; // name of data file + TString fDir; // data directory + +private: + AliEveTRDLoader(const AliEveTRDLoader&); // Not implemented + AliEveTRDLoader& operator=(const AliEveTRDLoader&); // Not implemented + + ClassDef(AliEveTRDLoader, 0); // Alieve Loader class for the TRD detector. +}; + +Bool_t AliEveTRDLoader::NextEvent(Bool_t) +{ + fEvent++; + return GoToEvent(fEvent); +} + +class AliEveTRDLoaderEditor : public TGedFrame +{ +public: + AliEveTRDLoaderEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30, + UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground()); + virtual ~AliEveTRDLoaderEditor() {} + + virtual void AddChambers(); + virtual void FileOpen(); + virtual void GoTo(); + virtual void Next(); + virtual void SetEvent(Double_t ev){fM->fEvent = (Int_t)ev;} + virtual void SetModel(TObject* obj); + +protected: + AliEveTRDLoader *fM; // Model object. + TGTextEntry *fFile; // File name weed. + TGTextButton *fBrowse; // browse button + TEveGValuator *fEvent; // Event no weed. + TEveGValuator *fSMNumber, *fStackNumber, *fPlaneNumber; // Detector id weeds. + +private: + AliEveTRDLoaderEditor(const AliEveTRDLoaderEditor&); // Not implemented + AliEveTRDLoaderEditor& operator=(const AliEveTRDLoaderEditor&); // Not implemented + + ClassDef(AliEveTRDLoaderEditor, 0); // Editor for AliEveTRDLoader. +}; #endif