]> git.uio.no Git - u/mrichter/AliRoot.git/blob - EVE/EveDet/AliEveTPCLoader.h
adding new sample component for RAW data analysis
[u/mrichter/AliRoot.git] / EVE / EveDet / AliEveTPCLoader.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 AliEveTPCLoader_H
11 #define AliEveTPCLoader_H
12
13 #include <TEveElement.h>
14 #include <vector>
15
16 class AliRawReaderRoot;
17
18 class AliEveTPCData;
19 class AliEveTPCSector2D;
20 class AliEveTPCSector3D;
21
22 //------------------------------------------------------------------------------
23 // AliEveTPCLoader
24 //
25 // GUI front-end for loading and displaying of TPC data in a stand-alone mode.
26 //
27
28 class AliEveTPCLoader : public TEveElementList
29 {
30   friend class AliEveTPCLoaderEditor;
31
32 public:
33   AliEveTPCLoader(const Text_t* n="AliEveTPCLoader", const Text_t* t=0);
34   virtual ~AliEveTPCLoader();
35
36   virtual void RemoveElementLocal(TEveElement* el);
37   virtual void RemoveElementsLocal();
38
39   void SetFile(const Text_t* f) { fFile = f; }
40   void SetDoubleSR(Bool_t d)    { fDoubleSR = d; }
41
42   const Text_t* GetTPCEquipementMap() const  { return fTPCEquipementMap; }
43   void SetTPCEquipementMap(const Text_t* em) { fTPCEquipementMap = em; }
44   AliRawReaderRoot* GetReader()        const { return fReader; }
45   void SetReader(AliRawReaderRoot* reader)   { fReader = reader; }
46   AliEveTPCData* GetData() const { return fData; }
47   void     SetData(AliEveTPCData* d);
48
49   void OpenFile();
50   void LoadEvent();
51   void NextEvent(Bool_t rewindOnEnd=kTRUE);
52   void GotoEvent(Int_t event);
53   static void* LoopEvent(AliEveTPCLoader* loader);
54
55   void UpdateSectors(Bool_t dropNonPresent=kFALSE);
56   void ReloadSectors();
57   void CreateSectors3D();
58   void DeleteSectors3D();
59
60   void SetInitParams(Int_t mint, Int_t maxt, Int_t thr, Int_t maxval=128);
61
62 protected:
63   TString           fFile;      // File holding raw-data.
64   Int_t             fEvent;     // Current event.
65   Bool_t            fDoubleSR;  // Set to true for double sampling-rate.
66
67   TString           fTPCEquipementMap; // Equipement-map file-name, if set passed to raw-reader.
68   AliRawReaderRoot *fReader;           // Raw-data reader.
69   AliEveTPCData    *fData;             // TPC data container.
70
71   std::vector<AliEveTPCSector2D*> fSec2Ds; // 2D sector representations.
72   std::vector<AliEveTPCSector3D*> fSec3Ds; // 3D sector representations.
73
74   Bool_t   fSetInitSectorParams; // If true, initial parameters of 2D and 3D sectors are set from values below.
75   Int_t    fInitMinTime;         // Min time for display.
76   Int_t    fInitMaxTime;         // Max time for display.
77   Int_t    fInitThreshold;       // Threshold.
78   Int_t    fInitMaxVal;          // Maximum-signal value (all signals above mapped to saturation color).
79
80 private:
81   AliEveTPCLoader(const AliEveTPCLoader&);            // Not implemented
82   AliEveTPCLoader& operator=(const AliEveTPCLoader&); // Not implemented
83
84   ClassDef(AliEveTPCLoader, 0); // Front-end for stand-alone inspection of TPC raw-data.
85 };
86
87 #endif