]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - EVE/EveDet/AliEveTRDLoader.h
Changes in order to modify also ITSonly tracks
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveTRDLoader.h
index b62b7fbc414543c711d6fe0dc4efa897bbd3b5cf..29a57d32ad4312b8a1340034ca986636e286ff14 100644 (file)
@@ -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
@@ -39,75 +39,89 @@ class AliEveTRDLoader : public TEveElementList
 {
   friend class AliEveTRDLoaderEditor;
 
-private:
-  AliEveTRDLoader(const AliEveTRDLoader&);            // Not implemented
-  AliEveTRDLoader& operator=(const AliEveTRDLoader&); // Not implemented
-
 public:
   enum TRDDataTypes {
-    kHits     = 0,
-    kDigits   = 1,
-    kClusters = 2,
-    kTracks   = 3,
-    kRawRoot  = 4,
-    kRawData  = 5
+    kTRDHits     = BIT(0),
+    kTRDDigits   = BIT(1),
+    kTRDClusters = BIT(2),
+    kTRDTracklets= BIT(3),
+    kTRDRawRoot  = BIT(4),
+    kTRDRawDate  = BIT(5)
   };
 
-public:
   AliEveTRDLoader(const Text_t* n="AliEveTRDLoader", const Text_t* t=0);
-  ~AliEveTRDLoader();
-  virtual void                 Paint(Option_t *option="");
-  virtual void         SetDataType(TRDDataTypes type);
+  virtual ~AliEveTRDLoader() {}
 
-protected:
   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 *tT);
-  virtual Bool_t       Open(const char *file, const char *dir = ".");
+  virtual Bool_t       LoadTracklets(TTree *trklTree);
+          void    SetDataLinked(Bool_t linked = kTRUE) {SetBit(1, linked);}
+
   virtual void         Unload();
 
-protected:
-  Bool_t       fLoadHits, fLoadDigits, fLoadClusters, fLoadTracks; // flags for data-loading
-  Int_t                fSM, fStack, fLy; // supermodule, stack, layer
+  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
-  Int_t                fEvent;           // current event to be displayed
 
+private:
+  AliEveTRDLoader(const AliEveTRDLoader&);            // Not implemented
+  AliEveTRDLoader& operator=(const AliEveTRDLoader&); // Not implemented
 
-  AliTRDv1                     *fTRD; // the TRD detector
-  AliTRDgeometry               *fGeo; // the TRD geometry
-
-  ClassDef(AliEveTRDLoader, 1); // Alieve Loader class for the TRD detector
+  ClassDef(AliEveTRDLoader, 0); // Alieve Loader class for the TRD detector.
 };
 
+Bool_t AliEveTRDLoader::NextEvent(Bool_t)
+{
+  fEvent++;
+  return GoToEvent(fEvent);
+}
 
 class AliEveTRDLoaderEditor : public TGedFrame
 {
-private:
-  AliEveTRDLoaderEditor(const AliEveTRDLoaderEditor&);            // Not implemented
-  AliEveTRDLoaderEditor& operator=(const AliEveTRDLoaderEditor&); // Not implemented
-
 public:
   AliEveTRDLoaderEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30,
                        UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground());
-  ~AliEveTRDLoaderEditor();
+  virtual ~AliEveTRDLoaderEditor() {}
 
   virtual void AddChambers();
   virtual void FileOpen();
-  virtual void Load();
+  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;
-  TGTextEntry          *fFile;
-  TEveGValuator                *fEvent;
-  TEveGValuator                *fSMNumber, *fStackNumber, *fPlaneNumber;
+  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,1); // Editor for AliEveTRDLoader
+  ClassDef(AliEveTRDLoaderEditor, 0); // Editor for AliEveTRDLoader.
 };
 
 #endif