Fixed effc++ warnings.
authormtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Jan 2008 14:36:08 +0000 (14:36 +0000)
committermtadel <mtadel@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 22 Jan 2008 14:36:08 +0000 (14:36 +0000)
38 files changed:
EVE/EveBase/AliEveJetPlane.cxx
EVE/EveBase/AliEveJetPlane.h
EVE/EveBase/AliEveJetPlaneEditor.cxx
EVE/EveBase/AliEveJetPlaneEditor.h
EVE/EveBase/AliEveKineTools.cxx
EVE/EveBase/AliEveTrackFitter.cxx
EVE/EveBase/AliEveTrackFitter.h
EVE/EveBase/AliEveVSDCreator.cxx
EVE/EveBase/AliEveVSDCreator.h
EVE/EveDet/AliEveITSDigitsInfo.cxx
EVE/EveDet/AliEveITSDigitsInfo.h
EVE/EveDet/AliEveITSScaledModule.cxx
EVE/EveDet/AliEveITSScaledModule.h
EVE/EveDet/AliEveMUONChamber.cxx
EVE/EveDet/AliEveMUONChamber.h
EVE/EveDet/AliEveMUONChamberData.cxx
EVE/EveDet/AliEveMUONChamberData.h
EVE/EveDet/AliEveMUONChamberEditor.cxx
EVE/EveDet/AliEveMUONChamberEditor.h
EVE/EveDet/AliEveTOFSector.cxx
EVE/EveDet/AliEveTOFStrip.cxx
EVE/EveDet/AliEveTOFStrip.h
EVE/EveDet/AliEveTPCSectorViz.cxx
EVE/EveDet/AliEveTPCSectorViz.h
EVE/EveDet/AliEveTRDData.cxx
EVE/EveDet/AliEveTRDData.h
EVE/EveDet/AliEveTRDLoader.cxx
EVE/EveDet/AliEveTRDLoader.h
EVE/EveDet/AliEveTRDLoaderImp.cxx
EVE/EveDet/AliEveTRDLoaderImp.h
EVE/EveDet/AliEveTRDLoaderManager.cxx
EVE/EveDet/AliEveTRDLoaderManager.h
EVE/EveDet/AliEveTRDModule.cxx
EVE/EveDet/AliEveTRDModule.h
EVE/EveDet/AliEveTRDModuleImp.cxx
EVE/EveDet/AliEveTRDModuleImp.h
EVE/EveHLT/AliEveHOMERManager.cxx
EVE/EveHLT/AliEveHOMERManager.h

index 62e269b..d0040c1 100644 (file)
@@ -48,12 +48,18 @@ AliEveJetPlane::AliEveJetPlane(Int_t iev) :
 
   fGridColor(5),
 
+  fHMTrans(),
+  fJets(),
+  fTracks(),
+
   fRnrJets (kTRUE),
   fRnrTracks (kTRUE),
 
   fOneSelection (kTRUE),
   fTwoSelection (kFALSE),
 
+  fJet1(0), fJet2(0), fTrack1(0), fTrack2(0),
+
   fSelectionFlag (1)
 {
   SetMainColorPtr(&fGridColor);
index da55386..7f1f3eb 100644 (file)
@@ -24,8 +24,8 @@
 
 
 class AliEveJetPlane : public TEveElementList,
-                             public TAtt3D,
-                             public TAttBBox
+                      public TAtt3D,
+                      public TAttBBox
 {
   friend class AliEveJetPlaneGL;
 
@@ -76,10 +76,10 @@ public:
   void AddJet(AliAODJet jet);
   void AddTrack(AliAODTrack track);
 
-  Int_t GetNEtaDiv() const   { return fNEtaDiv; }
+  Int_t GetNEtaDiv() const  { return fNEtaDiv; }
   void  SetNEtaDiv(Int_t r) { fNEtaDiv = r; }
 
-  Int_t GetNPhiDiv() const   { return fNPhiDiv; }
+  Int_t GetNPhiDiv() const  { return fNPhiDiv; }
   void  SetNPhiDiv(Int_t r) { fNPhiDiv = r; }
 
   Bool_t GetRnrJets() const   { return fRnrJets; }
@@ -115,12 +115,12 @@ public:
   virtual Bool_t  CanEditMainColor()   { return kTRUE; }
 
   virtual Bool_t  CanEditMainHMTrans() { return kTRUE; }
-  virtual TEveTrans* PtrMainHMTrans()     { return &fHMTrans; }
+  virtual TEveTrans* PtrMainHMTrans()  { return &fHMTrans; }
 
   virtual void ComputeBBox();
   virtual void Paint(Option_t* option = "");
 
-  TEveTrans& RefHMTrans() { return fHMTrans; }
+  TEveTrans& RefHMTrans()                    { return fHMTrans; }
   void SetTransMatrix(Double_t* carr)        { fHMTrans.SetFrom(carr); }
   void SetTransMatrix(const TGeoMatrix& mat) { fHMTrans.SetFrom(mat);  }
 
index c8e27e5..0e4dad7 100644 (file)
@@ -181,15 +181,11 @@ ClassImp(AliEveJetPlaneEditor::StaticDataWindow)
 AliEveJetPlaneEditor::StaticDataWindow::StaticDataWindow(const TGWindow *p, const TGWindow *main,
                                                   UInt_t w, UInt_t h, UInt_t options) :
   TGTransientFrame(p, main, w, h, options),
-  fFrame1(0),
-  fOkButton(0),
-  fCancelButton(0),
-  fL1(0),
-  fL2(0),
-  fL3(0),
-  fL5(0),
+  fFrame1(0), fF2(0),
+  fOkButton(0), fCancelButton(0),
+  fL1(0), fL2(0), fL3(0), fL5(0),
   fTab(0),
-  fChk1(0),fChk2(0),fChk3(0),fChk4(0),fChk5(0)
+  fChk1(0), fChk2(0), fChk3(0), fChk4(0), fChk5(0)
 {
   // Create a dialog window. A dialog window pops up with respect to its
   // "main" window.
index cf00b4c..62ba66e 100644 (file)
@@ -66,6 +66,9 @@ public:
   class StaticDataWindow : public TGTransientFrame
   {
   private:
+    StaticDataWindow(const StaticDataWindow&);            // Not implemented
+    StaticDataWindow& operator=(const StaticDataWindow&); // Not implemented
+
     TGCompositeFrame    *fFrame1, *fF2;
     TGButton            *fOkButton, *fCancelButton;
     TGLayoutHints       *fL1, *fL2, *fL3, *fL5;
index e7bc886..604d8aa 100644 (file)
@@ -73,7 +73,7 @@ struct cmp_pathmark
   { return a->fTime < b->fTime; }
 };
 
-void slurp_tracks(map<Int_t, TEveTrack*>& tracks, TEveElement* cont, Bool_t recurse)
+void slurp_tracks(std::map<Int_t, TEveTrack*>& tracks, TEveElement* cont, Bool_t recurse)
 {
   TEveElement::List_i citer = cont->BeginChildren();
   while(citer != cont->EndChildren())
@@ -95,7 +95,7 @@ void AliEveKineTools::SetTrackReferences(TEveElement* cont, TTree* treeTR, Bool_
   static const TEveException eH("AliEveKineTools::ImportPathMarks");
 
   // Fill map
-  map<Int_t, TEveTrack*> tracks;
+  std::map<Int_t, TEveTrack*> tracks;
   slurp_tracks(tracks, cont, recurse);
 
   Int_t nPrimaries = (Int_t) treeTR->GetEntries();
@@ -115,7 +115,7 @@ void AliEveKineTools::SetTrackReferences(TEveElement* cont, TTree* treeTR, Bool_
       el->GetEntry(iPrimPart);
 
       Int_t last_label = -1;
-      map<Int_t, TEveTrack*>::iterator iter = tracks.end();
+      std::map<Int_t, TEveTrack*>::iterator iter = tracks.end();
       Int_t Nent =  arr->GetEntriesFast();
       for (Int_t iTrackRef = 0; iTrackRef < Nent; iTrackRef++)
       {
@@ -150,11 +150,11 @@ void AliEveKineTools::SortPathMarks(TEveElement* cont, Bool_t recurse)
   // Sort path-marks for all tracks by time.
 
   // Fill map
-  map<Int_t, TEveTrack*> tracks;
+  std::map<Int_t, TEveTrack*> tracks;
   slurp_tracks(tracks, cont, recurse);
 
   // sort
-  for(map<Int_t, TEveTrack*>::iterator j=tracks.begin(); j!=tracks.end(); ++j)
+  for(std::map<Int_t, TEveTrack*>::iterator j=tracks.begin(); j!=tracks.end(); ++j)
   {
     j->second->SortPathMarksByTime();
   }
index 89100c2..9249a0b 100644 (file)
 ClassImp(AliEveTrackFitter)
 
 AliEveTrackFitter::AliEveTrackFitter(const Text_t* name, Int_t n_points) :
-    TEvePointSet(name, n_points),
-
-    fGraphSelected(0),
-    fGraphFitted(0),
-
-    fRieman(0),
-    fConnected(kFALSE),
-    fTrackList(0)
+    TEvePointSet   (name, n_points),
+
+    fGraphSelected (0),
+    fGraphFitted   (0),
+    fAlpha         (0),
+    fRieman        (0),
+    fConnected     (kFALSE),
+    fTrackList     (0),
+    fMapPS         ()
 {
   // Constructor.
 
index 844a331..3e93ccd 100644 (file)
@@ -34,28 +34,34 @@ protected:
   struct Point_t
   {
     // inner structure to check duplicates
-    TEvePointSet* fPS;   // selected pointset
+    TEvePointSet   *fPS;   // selected pointset
     Int_t           fIdx;  // location in the point set array
-    Point_t(TEvePointSet* ps, Int_t i): fPS(ps), fIdx(i){}
+
+    Point_t(TEvePointSet* ps, Int_t i) : fPS(ps), fIdx(i) {}
+    Point_t(const Point_t& p) : fPS(p.fPS), fIdx(p.fIdx)  {}
+    Point_t& operator=(const Point_t& p)
+    { fPS = p.fPS; fIdx = p.fIdx; return *this; }
+
     bool operator<(const Point_t& o) const
     { if (fPS != o.fPS) return fPS < o.fPS; return fIdx < o.fIdx; }
   };
 
-  Float_t    fAlpha;          // transformation agle to local system (where x>>y)
-  AliRieman* fRieman;         // rieman fitter
+  Float_t    fAlpha;                // transformation agle to local system (where x>>y)
+  AliRieman* fRieman;               // rieman fitter
+
+  Bool_t     fConnected;            // object connected to pointset Ctrl-shift signal
 
-  Bool_t     fConnected;      // object connected to pointset Ctrl-shift signal
+  TEveTrackList* fTrackList;        // track list created with rieman fit
 
-  TEveTrackList* fTrackList; // track list created with rieman fit
+  std::map<Point_t, Int_t> fMapPS;  // map of selected points from different TEvePointSet
 
-  std::map<Point_t, Int_t> fMapPS; // map of selected points from different TEvePointSet
 public:
   AliEveTrackFitter(const Text_t* name, Int_t n_points=0);
   virtual ~AliEveTrackFitter();
 
   virtual void AddFitPoint(TEvePointSet*,Int_t);  // slot for PointCtrlClicked() signal
 
-  virtual void DestroyElements(); // *MENU*
+  virtual void DestroyElements();   // *MENU*
 
   virtual void Start();
   virtual void Stop();
index c1b80a8..37333b6 100644 (file)
@@ -35,9 +35,6 @@
 #include <TFile.h>
 #include <TError.h>
 
-
-using namespace std;
-
 //______________________________________________________________________________
 // AliEveVSDCreator
 //
@@ -47,7 +44,7 @@ ClassImp(AliEveVSDCreator)
 AliEveVSDCreator::AliEveVSDCreator(const Text_t* name, const Text_t* title) :
   TEveVSD(name, title),
 
-  mKineType (KT_Standard),
+  mKineType (kKT_Standard),
   mDataDir  ("."),
   mEvent    (0),
 
@@ -240,7 +237,7 @@ void AliEveVSDCreator::ConvertKinematics()
   fTreeK = new TTree("Kinematics", "TParticles sorted by Label");
 
   Int_t nentries = stack->GetNtrack();
-  vector<TEveMCTrack>  vmc(nentries);
+  std::vector<TEveMCTrack>  vmc(nentries);
   for (Int_t idx=0; idx<nentries; idx++) {
     TParticle* tp = stack->Particle(idx);
     vmc[idx]        = *tp;
@@ -290,7 +287,7 @@ void AliEveVSDCreator::ConvertKinematics()
   fTreeK->Branch("K", "TEveMCTrack",  &fpK, fBuffSize);
 
   printf("sizeofvmc = %d\n", vmc.size());
-  for(vector<TEveMCTrack>::iterator k=vmc.begin(); k!=vmc.end(); ++k) {
+  for(std::vector<TEveMCTrack>::iterator k=vmc.begin(); k!=vmc.end(); ++k) {
     TEveMCTrack& mct = *k;
     fK = mct;
 
@@ -349,7 +346,7 @@ void AliEveVSDCreator::ConvertHits()
   fTreeH =  new TTree("Hits", "Combined detector hits.");
   fTreeH->Branch("H", "TEveHit", &fpH, fBuffSize);
 
-  map<Int_t, Int_t> hmap;
+  std::map<Int_t, Int_t> hmap;
   // parameters for ITS, TPC hits filtering
   Float_t x,y,z, x1,y1,z1;
   Float_t tpc_sqr_res = mTPCHitRes*mTPCHitRes;
@@ -437,7 +434,7 @@ void AliEveVSDCreator::ConvertHits()
 
 
   //set geninfo
-  for(map<Int_t, Int_t>::iterator j=hmap.begin(); j!=hmap.end(); ++j) {
+  for(std::map<Int_t, Int_t>::iterator j=hmap.begin(); j!=hmap.end(); ++j) {
     GetGeninfo(j->first)->fNHits += j->second;
   }
 }
@@ -504,7 +501,7 @@ void AliEveVSDCreator::ConvertTPCClusters()
   // calculate xyz for a cluster and add it to container
   Double_t x,y,z;
   Float_t cs, sn, tmp;
-  map<Int_t, Int_t> cmap;
+  std::map<Int_t, Int_t> cmap;
 
   for (Int_t n=0; n<tree->GetEntries(); n++) {
     tree->GetEntry(n);
@@ -541,7 +538,7 @@ void AliEveVSDCreator::ConvertTPCClusters()
     }
   }
   //set geninfo
-  for(map<Int_t, Int_t>::iterator j=cmap.begin(); j!=cmap.end(); ++j) {
+  for(std::map<Int_t, Int_t>::iterator j=cmap.begin(); j!=cmap.end(); ++j) {
     GetGeninfo(j->first)->fNClus += j->second;
   }
 }
@@ -581,7 +578,7 @@ void AliEveVSDCreator::ConvertITSClusters()
   tree->SetBranchAddress("Clusters", &arr);
   Int_t nmods = tree->GetEntries();
   Float_t gc[3];
-  map<Int_t, Int_t> cmap;
+  std::map<Int_t, Int_t> cmap;
 
   for (Int_t mod=0; mod<nmods; mod++) {
     tree->GetEntry(mod);
@@ -621,7 +618,7 @@ void AliEveVSDCreator::ConvertITSClusters()
       }
     }
 
-    for(map<Int_t, Int_t>::iterator j=cmap.begin(); j!=cmap.end(); ++j) {
+    for(std::map<Int_t, Int_t>::iterator j=cmap.begin(); j!=cmap.end(); ++j) {
       GetGeninfo(j->first)->fNClus += j->second;
     }
   }
@@ -837,7 +834,7 @@ void AliEveVSDCreator::ConvertGenInfo()
   fTreeGI->Branch("K.", "TEveMCTrack",  &fpK);
   fTreeGI->Branch("R.", "TEveRecTrack", &fpR);
 
-  for (map<Int_t, TEveMCRecCrossRef*>::iterator j=mGenInfoMap.begin(); j!=mGenInfoMap.end(); ++j) {
+  for (std::map<Int_t, TEveMCRecCrossRef*>::iterator j=mGenInfoMap.begin(); j!=mGenInfoMap.end(); ++j) {
     fGI        = *(j->second);
     fGI.fLabel = j->first;
     fTreeK->GetEntry(j->first);
@@ -883,7 +880,7 @@ TEveMCRecCrossRef* AliEveVSDCreator::GetGeninfo(Int_t label)
 {
   // printf("get_geninfo %d\n", label);
   TEveMCRecCrossRef* gi;
-  map<Int_t, TEveMCRecCrossRef*>::iterator i = mGenInfoMap.find(label);
+  std::map<Int_t, TEveMCRecCrossRef*>::iterator i = mGenInfoMap.find(label);
   if(i == mGenInfoMap.end()) {
     gi =  new TEveMCRecCrossRef();
     mGenInfoMap[label] = gi;
index c91bf5e..7d7f52b 100644 (file)
@@ -24,7 +24,7 @@ class AliEveVSDCreator : public TEveVSD
   AliEveVSDCreator& operator=(const AliEveVSDCreator&); // Not implemented
 
 public:
-  enum KineType_e { KT_Standard, KT_ProtonProton };
+  enum KineType_e { kKT_Standard, kKT_ProtonProton };
 
 protected:
   void          MakeItsDigitsInfo();
index 491a70d..283ec65 100644 (file)
@@ -57,7 +57,10 @@ AliEveITSDigitsInfo::AliEveITSDigitsInfo() :
   fSPDmap(), fSDDmap(), fSSDmap(),
   fTree (0),
   fGeom (0),
-  fSegSPD(0), fSegSDD(0), fSegSSD(0)
+  fSegSPD     (0), fSegSDD     (0), fSegSSD     (0),
+  fSPDMinVal  (0), fSSDMinVal  (0), fSDDMinVal  (0), 
+  fSPDMaxVal  (0), fSSDMaxVal  (0), fSDDMaxVal  (0), 
+  fSPDHighLim (0), fSDDHighLim (0), fSSDHighLim (0)
 {
   // Default constructor.
 
@@ -133,7 +136,7 @@ AliEveITSDigitsInfo:: ~AliEveITSDigitsInfo()
   // Destructor.
   // Deletes the data-maps and the tree.
 
-  map<Int_t, TClonesArray*>::iterator j;
+  std::map<Int_t, TClonesArray*>::iterator j;
   for(j = fSPDmap.begin(); j != fSPDmap.end(); ++j)
     delete j->second;
   for(j = fSDDmap.begin(); j != fSDDmap.end(); ++j)
@@ -290,7 +293,7 @@ TClonesArray* AliEveITSDigitsInfo::GetDigits(Int_t mod, Int_t subdet)
     case 0:
     {
       TClonesArray* digitsSPD = 0;
-      map<Int_t, TClonesArray*>::iterator i = fSPDmap.find(mod);
+      std::map<Int_t, TClonesArray*>::iterator i = fSPDmap.find(mod);
       if (i == fSPDmap.end()) {
        if (fTree) {
          TBranch* br =  fTree->GetBranch("ITSDigitsSPD");
@@ -309,7 +312,7 @@ TClonesArray* AliEveITSDigitsInfo::GetDigits(Int_t mod, Int_t subdet)
     case 1:
     {
       TClonesArray* digitsSDD = 0;
-      map<Int_t, TClonesArray*>::iterator i = fSDDmap.find(mod);
+      std::map<Int_t, TClonesArray*>::iterator i = fSDDmap.find(mod);
       if (i == fSDDmap.end()) {
        if (fTree) {
          TBranch* br =  fTree->GetBranch("ITSDigitsSDD");
@@ -328,7 +331,7 @@ TClonesArray* AliEveITSDigitsInfo::GetDigits(Int_t mod, Int_t subdet)
     case 2:
     {
       TClonesArray* digitsSSD = 0;
-      map<Int_t, TClonesArray*>::iterator i = fSSDmap.find(mod);
+      std::map<Int_t, TClonesArray*>::iterator i = fSSDmap.find(mod);
       if (i == fSSDmap.end()) {
        if (fTree) {
          TBranch* br =  fTree->GetBranch("ITSDigitsSSD");
index 22e766a..b4eee9f 100644 (file)
@@ -78,9 +78,9 @@ private:
   void InitInternals();
 
 protected:
-  map<Int_t,  TClonesArray*> fSPDmap;     // Map from module-id to SPD data.
-  map<Int_t,  TClonesArray*> fSDDmap;     // Map from module-id to SDD data.
-  map<Int_t,  TClonesArray*> fSSDmap;     // Map from module-id to SSD data.
+  std::map<Int_t,  TClonesArray*> fSPDmap;     // Map from module-id to SPD data.
+  std::map<Int_t,  TClonesArray*> fSDDmap;     // Map from module-id to SDD data.
+  std::map<Int_t,  TClonesArray*> fSSDmap;     // Map from module-id to SSD data.
 
   void        SetITSSegmentation();
 
index 5106d7f..9df65a9 100644 (file)
@@ -21,7 +21,7 @@ ClassImp(AliEveDigitScaleInfo)
 
 AliEveDigitScaleInfo::AliEveDigitScaleInfo():
   fScale(1),
-  fStatType (ST_Average),
+  fStatType (kST_Average),
   fSyncPalette(kFALSE)
 {
 }
@@ -120,8 +120,8 @@ void AliEveITSScaledModule::LoadQuads()
   Int_t         c1, c2;          // original coordinates
 
   Int_t id;
-  map<Int_t, Int_t> dmap;
-  map<Int_t, Int_t>::iterator miter;
+  std::map<Int_t, Int_t> dmap;
+  std::map<Int_t, Int_t>::iterator miter;
   digits  = fInfo->GetDigits(fID, fDetID);
   ndigits = digits->GetEntriesFast();
 
@@ -320,13 +320,13 @@ void AliEveITSScaledModule::SetQuadValues()
     {
       using namespace TMath;
 
-      case AliEveDigitScaleInfo::ST_Occup:
+      case AliEveDigitScaleInfo::kST_Occup:
        v = Nint((100.0*sd->N) / (fNCx*fNCz));
        break;
-      case AliEveDigitScaleInfo::ST_Average:
+      case AliEveDigitScaleInfo::kST_Average:
        v = Nint((Double_t) sd->sum / sd->N);
        break;
-      case AliEveDigitScaleInfo::ST_Rms:
+      case AliEveDigitScaleInfo::kST_Rms:
        v = Nint(Sqrt(sd->sqr_sum) / sd->N);
        break;
     }
@@ -340,7 +340,7 @@ void AliEveITSScaledModule::SetQuadValues()
 void AliEveITSScaledModule::SyncPalette()
 {
   // printf("AliEveITSScaledModule::SyncPalette()\n");
-  if(fScaleInfo->GetStatType() == AliEveDigitScaleInfo::ST_Occup)
+  if(fScaleInfo->GetStatType() == AliEveDigitScaleInfo::kST_Occup)
   {
     // SPD
     AliEveITSModule::fgSPDPalette->SetLimits(0, 100);
index c0bc280..248f43b 100644 (file)
@@ -23,7 +23,7 @@
 class AliEveDigitScaleInfo : public TQObject, public TEveRefBackPtr
 {
 public:
-  enum StatType_e { ST_Occup, ST_Average, ST_Rms };
+  enum StatType_e { kST_Occup, kST_Average, kST_Rms };
 
   // Bool_t           fAutoUpdatePalette;
 private:
@@ -79,7 +79,7 @@ class AliEveITSScaledModule : public AliEveITSModule
 {
   friend class ITSSDSubEditor;
 private:
-  map<Int_t, ScaledDigit> fDigitsMap;
+  std::map<Int_t, ScaledDigit> fDigitsMap;
 
   AliEveITSScaledModule(const AliEveITSScaledModule&);            // Not implemented
   AliEveITSScaledModule& operator=(const AliEveITSScaledModule&); // Not implemented
index 5fac0f3..a0ccd5f 100644 (file)
@@ -29,20 +29,21 @@ ClassImp(AliEveMUONChamber)
 
 //______________________________________________________________________________
 AliEveMUONChamber::AliEveMUONChamber(Int_t id, const Text_t* n, const Text_t* t) :
-TEveElement(fFrameColor),
-TNamed(n,t),
-fMUONData(0),
-fFrameColor((Color_t)2),
-fRTS(1),
-fChamberID(0),
-fQuadSet1(n,t),
-fQuadSet2(n,t),
-fPointSet1(n),
-fPointSet2(n),
-fThreshold(0),
-fMaxVal(4096),
-fClusterSize(5),
-fHitSize(5)
+  TEveElement(fFrameColor),
+  TNamed(n,t),
+  fMUONData(0),
+  fFrameColor((Color_t)2),
+  fRTS(1),
+  fChamberID(0),
+  fQuadSet1(n,t),
+  fQuadSet2(n,t),
+  fPointSet1(n),
+  fPointSet2(n),
+  fThreshold(0),
+  fMaxVal(4096),
+  fClusterSize(5),
+  fHitSize(5),
+  fColorArray(0)
 {
   //
   // constructor
index e53d6a3..b5c6333 100644 (file)
@@ -24,23 +24,21 @@ class AliEveMUONChamberEditor;
 class AliEveMUONChamberGL;
 
 class AliEveMUONChamber : public TEveElement,
-                    public TNamed,
-                    public TAtt3D,
-                    public TAttBBox
-
+                         public TNamed,
+                         public TAtt3D,
+                         public TAttBBox
 {
-
   friend class AliEveMUONChamberGL;
   friend class AliEveMUONChamberEditor;
 
+private:
   AliEveMUONChamber(const AliEveMUONChamber&);            // Not implemented
   AliEveMUONChamber& operator=(const AliEveMUONChamber&); // Not implemented
 
- protected:
-
+protected:
   void UpdateQuads();
 
-  AliEveMUONData*         fMUONData;      // data for the current event
+  AliEveMUONData   *fMUONData;      // data for the current event
   Color_t           fFrameColor;    // main coloring
   UInt_t            fRTS;           //! Rendering Time Stamp
   Int_t             fChamberID;     // number of the chamber, 0 to 13
@@ -55,7 +53,8 @@ class AliEveMUONChamber : public TEveElement,
 
   void SetupColor(Int_t val, UChar_t* pix) const;
 
-  mutable UChar_t* fColorArray;
+  mutable UChar_t  *fColorArray;    // color-cache
+
   void     ClearColorArray();
   void     SetupColorArray() const;
   UChar_t* ColorFromArray(Int_t val) const;
index 8c73aae..518e65f 100644 (file)
@@ -37,7 +37,13 @@ ClassImp(AliEveMUONChamberData)
 AliMUONGeometryTransformer* AliEveMUONChamberData::fgTransformer = 0;
 
 //______________________________________________________________________________
-AliEveMUONChamberData::AliEveMUONChamberData(Int_t chamber)
+AliEveMUONChamberData::AliEveMUONChamberData(Int_t chamber) :
+  TObject(),
+  fChamberID(0),           
+  fNDetElem(0),            
+  fNDigits(0),             
+  fNClusters(0),           
+  fNHits(0)
 {
   //
   // constructor
index 8abd3e4..31871f3 100644 (file)
@@ -18,12 +18,10 @@ class AliMUONGeometryTransformer;
 
 class AliEveMUONChamberData : public TObject
 {
-
+private:
   AliEveMUONChamberData(const AliEveMUONChamberData&);            // Not implemented
   AliEveMUONChamberData& operator=(const AliEveMUONChamberData&); // Not implemented
 
-private:
-
   static AliMUONGeometryTransformer* fgTransformer;   // geometry transformer
 
 protected:
index 891c1e8..a0e835b 100644 (file)
@@ -37,7 +37,8 @@ AliEveMUONChamberEditor::AliEveMUONChamberEditor(const TGWindow *p,
   fM(0),
   fThreshold(0),
   fMaxVal(0),
-  fClusterSize(0)
+  fClusterSize(0),
+  fHitSize(0)
 {
   //
   // constructor
index 09b18ef..b7646e5 100644 (file)
@@ -24,11 +24,11 @@ class AliEveMUONChamber;
 
 class AliEveMUONChamberEditor : public TGedFrame
 {
-
+private:
   AliEveMUONChamberEditor(const AliEveMUONChamberEditor&);            // Not implemented
   AliEveMUONChamberEditor& operator=(const AliEveMUONChamberEditor&); // Not implemented
 
- protected:
+protected:
 
   AliEveMUONChamber* fM; // fModel dynamic-casted to AliEveMUONChamberEditor
 
index 7562dfc..4e48e79 100644 (file)
@@ -15,9 +15,7 @@
 
 #include <TStyle.h>
 
-using namespace std;
-
-Bool_t       AliEveTOFSector::fgStaticInitDone = kFALSE;
+Bool_t           AliEveTOFSector::fgStaticInitDone    = kFALSE;
 TEveFrameBox*    AliEveTOFSector::fgTOFsectorFrameBox = 0;
 TEveRGBAPalette* AliEveTOFSector::fgTOFsectorPalette  = 0;
 
@@ -34,37 +32,40 @@ AliEveTOFSector::AliEveTOFSector(const Text_t* n, const Text_t* t) :
   fSector(-1),
   fDx(0), fDy(0), fDz(0),
   fAutoTrans (kTRUE),
-  //fPlateFlag0(kTRUE), fPlateFlag1(kTRUE), fPlateFlag2(kTRUE), fPlateFlag3(kTRUE), fPlateFlag4(kTRUE),
-  fThreshold (5), fMaxVal    (80),
+  fMinTime   (0), fMaxTime (0),
+  fThreshold (5), fMaxVal  (80),
   fSectorID  (0),
+  fPlateFlag (0), fPlateFlag0(kFALSE), fPlateFlag1(kFALSE), fPlateFlag2(kFALSE), fPlateFlag3(kTRUE), fPlateFlag4(kFALSE),
+  fFrameColor(4),
+  fRnrFrame  (kFALSE),
   fGeoManager(0)
 {
 
   fPlateFlag = new Bool_t[5];
   for (Int_t ii=0; ii<5; ii++) fPlateFlag[ii]=kTRUE;
 
-
   fGeoManager = (TGeoManager*)gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
   if (!fGeoManager) {
     printf("ERROR: no TGeo\n");
   }
-
 }
+
 /* ************************************************************************ */
 
-AliEveTOFSector::AliEveTOFSector(TGeoManager *localGeoManager,
-                    Int_t nSector)
-  :
-  TEveQuadSet(Form("Sector%i",nSector)),
+AliEveTOFSector::AliEveTOFSector(TGeoManager *localGeoManager, Int_t nSector) :
+  TEveQuadSet(Form("Sector%i", nSector)),
   fTOFgeometry(new AliTOFGeometry()),
   fTOFarray(0x0),
   fTOFtree(0x0),
   fSector(nSector),
   fDx(0), fDy(0), fDz(0),
   fAutoTrans (kTRUE),
-  //fPlateFlag0(kTRUE), fPlateFlag1(kTRUE), fPlateFlag2(kTRUE), fPlateFlag3(kTRUE), fPlateFlag4(kTRUE),
-  fThreshold (5), fMaxVal    (80),
+  fMinTime   (0), fMaxTime (0),
+  fThreshold (5), fMaxVal  (80),
   fSectorID  (nSector),
+  fPlateFlag (0), fPlateFlag0(kFALSE), fPlateFlag1(kFALSE), fPlateFlag2(kFALSE), fPlateFlag3(kTRUE), fPlateFlag4(kFALSE),
+  fFrameColor(4),
+  fRnrFrame  (kFALSE),
   fGeoManager(localGeoManager)
 {
 
@@ -78,8 +79,8 @@ AliEveTOFSector::AliEveTOFSector(TGeoManager *localGeoManager,
   */
 
   InitModule();
-
 }
+
 /* ************************************************************************ */
 
 AliEveTOFSector::AliEveTOFSector(TGeoManager *localGeoManager,
@@ -93,9 +94,12 @@ AliEveTOFSector::AliEveTOFSector(TGeoManager *localGeoManager,
   fSector(nSector),
   fDx(0), fDy(0), fDz(0),
   fAutoTrans (kTRUE),
-  //fPlateFlag0(kTRUE), fPlateFlag1(kTRUE), fPlateFlag2(kTRUE), fPlateFlag3(kTRUE), fPlateFlag4(kTRUE),
-  fThreshold (5), fMaxVal    (80),
+  fMinTime   (0), fMaxTime (0),
+  fThreshold (5), fMaxVal  (80),
   fSectorID  (nSector),
+  fPlateFlag (0), fPlateFlag0(kFALSE), fPlateFlag1(kFALSE), fPlateFlag2(kFALSE), fPlateFlag3(kTRUE), fPlateFlag4(kFALSE),
+  fFrameColor(4),
+  fRnrFrame  (kFALSE),
   fGeoManager(localGeoManager)
 {
 
@@ -371,7 +375,7 @@ void AliEveTOFSector::SetMaxVal(Int_t mv)
 
 void AliEveTOFSector::DigitSelected(Int_t idx)
 {
-  // Override control-click from TEveQuadSet
+  // Override control-click from TEveQuadSet.
 
   DigitBase_t* qb   = GetDigit(idx);
   TObject* obj   = qb->fId.GetObject();
index a822311..ac53ca3 100644 (file)
@@ -6,6 +6,7 @@
  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
  * full copyright notice.                                                 *
  **************************************************************************/
+
 #include "AliEveTOFStrip.h"
 
 #include <TEveManager.h>
@@ -15,9 +16,7 @@
 
 #include <TStyle.h>
 
-using namespace std;
-
-Bool_t       AliEveTOFStrip::fgStaticInitDone = kFALSE;
+Bool_t           AliEveTOFStrip::fgStaticInitDone   = kFALSE;
 TEveFrameBox*    AliEveTOFStrip::fgTOFstripFrameBox = 0;
 TEveRGBAPalette* AliEveTOFStrip::fgTOFstripPalette  = 0;
 
@@ -31,7 +30,8 @@ AliEveTOFStrip::AliEveTOFStrip(const Text_t* n, const Text_t* t) :
   fTOFgeometry(new AliTOFGeometry()),
   fTOFarray(0),
   fSector(-1), fPlate(-1), fStrip(-1),
-  fDx(0), fDz(0)
+  fDx(0), fDz(0),
+  fGeoManager(0)
 {
 
   fGeoManager = (TGeoManager*)gEve->GetGeometry("$REVESYS/alice-data/alice_fullgeo.root");
@@ -41,9 +41,8 @@ AliEveTOFStrip::AliEveTOFStrip(const Text_t* n, const Text_t* t) :
 /* ************************************************************************ */
 
 AliEveTOFStrip::AliEveTOFStrip(TGeoManager *localGeoManager,
-                  Int_t nSector, Int_t nPlate, Int_t nStrip)
-  :
-  TEveQuadSet(Form("Strip%i",nStrip)),
+                              Int_t nSector, Int_t nPlate, Int_t nStrip) :
+  TEveQuadSet(Form("Strip%i", nStrip)),
   fTOFgeometry(new AliTOFGeometry()),
   fTOFarray(0),
   fSector(nSector), fPlate(nPlate), fStrip(nStrip),
@@ -59,10 +58,9 @@ AliEveTOFStrip::AliEveTOFStrip(TGeoManager *localGeoManager,
 /* ************************************************************************ */
 
 AliEveTOFStrip::AliEveTOFStrip(TGeoManager *localGeoManager,
-                  Int_t nSector, Int_t nPlate, Int_t nStrip,
-                  TClonesArray *tofArray)
-  :
-  TEveQuadSet(Form("Strip%i",nStrip)),
+                              Int_t nSector, Int_t nPlate, Int_t nStrip,
+                              TClonesArray *tofArray) :
+  TEveQuadSet(Form("Strip%i", nStrip)),
   fTOFgeometry(new AliTOFGeometry()),
   fTOFarray(tofArray),
   fSector(nSector), fPlate(nPlate), fStrip(nStrip),
index dacf60f..0e3c621 100644 (file)
@@ -33,9 +33,9 @@ protected:
   virtual void InitModule();
   virtual void SetTrans();
 
-  AliTOFGeometry* fTOFgeometry;
+  AliTOFGeometry *fTOFgeometry;
 
-  TClonesArray *fTOFarray;
+  TClonesArray   *fTOFarray;
 
   Int_t fSector;
   Int_t fPlate;
index d8be19b..1d9cd66 100644 (file)
@@ -45,6 +45,7 @@ AliEveTPCSectorViz::AliEveTPCSectorViz(const Text_t* n, const Text_t* t) :
 
   fFrameColor ((Color_t) 4),
   fRnrFrame   (kTRUE),
+  fHMTrans    (),
   fAutoTrans  (kFALSE),
   fRTS        (1),
 
index 38f4ece..9423373 100644 (file)
@@ -25,9 +25,9 @@ class AliEveTPCSector2D;  class AliEveTPCSector2DEditor;  class AliEveTPCSector2
 class AliEveTPCSector3D;  class AliEveTPCSector3DEditor;  class AliEveTPCSector3DGL;
 
 class AliEveTPCSectorViz : public TEveElement,
-                     public TNamed,
-                     public TAtt3D,
-                     public TAttBBox
+                          public TNamed,
+                          public TAtt3D,
+                          public TAttBBox
 {
   friend class AliEveTPCSectorVizEditor;
   friend class AliEveTPCSector2D;
@@ -41,27 +41,27 @@ class AliEveTPCSectorViz : public TEveElement,
   AliEveTPCSectorViz& operator=(const AliEveTPCSectorViz&); // Not implemented
 
 protected:
-  AliEveTPCData*    fTPCData;
-  Int_t       fSectorID;
+  AliEveTPCData    *fTPCData;
+  Int_t             fSectorID;
 
-  Int_t       fMinTime;
-  Int_t       fMaxTime;
-  Short_t     fThreshold;
-  Int_t       fMaxVal;
+  Int_t             fMinTime;
+  Int_t             fMaxTime;
+  Short_t           fThreshold;
+  Int_t             fMaxVal;
 
-  Bool_t      fRnrInn;
-  Bool_t      fRnrOut1;
-  Bool_t      fRnrOut2;
+  Bool_t            fRnrInn;
+  Bool_t            fRnrOut1;
+  Bool_t            fRnrOut2;
 
-  Color_t      fFrameColor;
-  Bool_t       fRnrFrame;
-  TEveTrans fHMTrans;
-  Bool_t       fAutoTrans;
-  UInt_t       fRTS;       //! Rendering TimeStamp
+  Color_t           fFrameColor;
+  Bool_t            fRnrFrame;
+  TEveTrans         fHMTrans;
+  Bool_t            fAutoTrans;
+  UInt_t            fRTS;       //! Rendering TimeStamp
 
-  void SetupColor(Int_t val, UChar_t* pix) const;
+  mutable UChar_t  *fColorArray;
 
-  mutable UChar_t* fColorArray;
+  void SetupColor(Int_t val, UChar_t* pix) const;
   void ClearColorArray();
   void SetupColorArray() const;
   UChar_t* ColorFromArray(Int_t val) const;
index a027262..019bc85 100644 (file)
@@ -6,6 +6,7 @@
  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
  * full copyright notice.                                                 *
  **************************************************************************/
+
 #include "AliEveTRDData.h"
 #include "AliEveTRDModuleImp.h"
 
 #include "AliTRDgeometry.h"
 #include "AliTRDdigitsManager.h"
 
-using namespace std;
-
 ClassImp(AliEveTRDHits)
 ClassImp(AliEveTRDDigits)
 ClassImp(AliEveTRDClusters)
 
 ///////////////////////////////////////////////////////////
-/////////////   AliEveTRDDigits             /////////////////////
+/////////////   AliEveTRDDigits       /////////////////////
 ///////////////////////////////////////////////////////////
 
-//________________________________________________________
-AliEveTRDDigits::AliEveTRDDigits(AliEveTRDChamber *p): TEveQuadSet("digits", ""), fParent(p)
+//______________________________________________________________________________
+AliEveTRDDigits::AliEveTRDDigits(AliEveTRDChamber *p) :
+  TEveQuadSet("digits", ""), fParent(p), fBoxes(), fData()
 {}
 
-//________________________________________________________
-void   AliEveTRDDigits::SetData(AliTRDdigitsManager *digits)
+//______________________________________________________________________________
+void AliEveTRDDigits::SetData(AliTRDdigitsManager *digits)
 {
 
-       fData.Allocate(fParent->rowMax, fParent->colMax, fParent->timeMax);
-//     digits->Expand();
-       for (Int_t  row = 0;  row <  fParent->rowMax;  row++)
-               for (Int_t  col = 0;  col <  fParent->colMax;  col++)
-                       for (Int_t time = 0; time < fParent->timeMax; time++) {
-                               if(digits->GetDigitAmp(row, col, time, fParent->GetID()) < 0) continue;
-                               fData.SetDataUnchecked(row, col, time, digits->GetDigitAmp(row, col, time, fParent->GetID()));
-       }
+  fData.Allocate(fParent->fRowMax, fParent->fColMax, fParent->fTimeMax);
+  //   digits->Expand();
+  for (Int_t  row = 0;  row <  fParent->fRowMax;  row++)
+    for (Int_t  col = 0;  col <  fParent->fColMax;  col++)
+      for (Int_t time = 0; time < fParent->fTimeMax; time++) {
+       if(digits->GetDigitAmp(row, col, time, fParent->GetID()) < 0) continue;
+       fData.SetDataUnchecked(row, col, time, digits->GetDigitAmp(row, col, time, fParent->GetID()));
+      }
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDDigits::ComputeRepresentation()
 {
   // Calculate digits representation according to user settings. The
@@ -68,17 +68,17 @@ void AliEveTRDDigits::ComputeRepresentation()
   Double_t cloc[4][3], cglo[3];
   Int_t color, dimension;
   fData.Expand();
-  for (Int_t  row = 0;  row <  fParent->rowMax;  row++) {
+  for (Int_t  row = 0;  row <  fParent->fRowMax;  row++) {
     rowSize = .5 * fParent->fPadPlane->GetRowSize(row);
     z = fParent->fPadPlane->GetRowPos(row) - rowSize;
 
-    for (Int_t  col = 0;  col <  fParent->colMax;  col++) {
+    for (Int_t  col = 0;  col <  fParent->fColMax;  col++) {
       colSize = .5 * fParent->fPadPlane->GetColSize(col);
       y = fParent->fPadPlane->GetColPos(col) - colSize;
       t0 = calibration->GetT0(fParent->fDet, col, row);
-      timeBinSize = calibration->GetVdrift(fParent->fDet, col, row)/fParent->samplingFrequency;
+      timeBinSize = calibration->GetVdrift(fParent->fDet, col, row)/fParent->fSamplingFrequency;
 
-      for (Int_t time = 0; time < fParent->timeMax; time++) {
+      for (Int_t time = 0; time < fParent->fTimeMax; time++) {
        charge = fData.GetDataUnchecked(row, col, time);
        if (charge < fParent->GetDigitsThreshold()) continue;
 
@@ -131,40 +131,41 @@ void AliEveTRDDigits::ComputeRepresentation()
   fData.Compress(1);
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDDigits::Paint(Option_t *option)
 {
-       if(fParent->GetDigitsBox()) fBoxes.Paint(option);
-       else TEveQuadSet::Paint(option);
+  if(fParent->GetDigitsBox()) fBoxes.Paint(option);
+  else TEveQuadSet::Paint(option);
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDDigits::Reset()
 {
-       TEveQuadSet::Reset(TEveQuadSet::kQT_FreeQuad, kTRUE, 64);
-       // MT fBoxes.fBoxes.clear();
-       fData.Reset();
+  TEveQuadSet::Reset(TEveQuadSet::kQT_FreeQuad, kTRUE, 64);
+  // MT fBoxes.fBoxes.clear();
+  fData.Reset();
 }
 
 ///////////////////////////////////////////////////////////
-/////////////   AliEveTRDHits               /////////////////////
+/////////////   AliEveTRDHits         /////////////////////
 ///////////////////////////////////////////////////////////
 
-//________________________________________________________
-AliEveTRDHits::AliEveTRDHits(AliEveTRDChamber *p):TEvePointSet("hits", 20), fParent(p)
+//______________________________________________________________________________
+AliEveTRDHits::AliEveTRDHits(AliEveTRDChamber *p) :
+  TEvePointSet("hits", 20), fParent(p)
 {}
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDHits::PointSelected(Int_t n)
 {
-       fParent->SpawnEditor();
-       AliTRDhit *h = dynamic_cast<AliTRDhit*>(GetPointId(n));
-       printf("\nDetector             : %d\n", h->GetDetector());
-       printf("Region of production : %c\n", h->FromAmplification() ? 'A' : 'D');
-       printf("TR photon            : %s\n", h->FromTRphoton() ? "Yes" : "No");
-       printf("Charge               : %d\n", h->GetCharge());
-       printf("MC track label       : %d\n", h->GetTrack());
-       printf("Time from collision  : %f\n", h->GetTime());
+  fParent->SpawnEditor();
+  AliTRDhit *h = dynamic_cast<AliTRDhit*>(GetPointId(n));
+  printf("\nDetector             : %d\n", h->GetDetector());
+  printf("Region of production : %c\n", h->FromAmplification() ? 'A' : 'D');
+  printf("TR photon            : %s\n", h->FromTRphoton() ? "Yes" : "No");
+  printf("Charge               : %d\n", h->GetCharge());
+  printf("MC track label       : %d\n", h->GetTrack());
+  printf("Time from collision  : %f\n", h->GetTime());
 }
 
 
@@ -172,38 +173,41 @@ void AliEveTRDHits::PointSelected(Int_t n)
 /////////////   AliEveTRDHits               /////////////////////
 ///////////////////////////////////////////////////////////
 
-//________________________________________________________
+//______________________________________________________________________________
 AliEveTRDClusters::AliEveTRDClusters(AliEveTRDChamber *p):AliEveTRDHits(p)
 {}
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDClusters::PointSelected(Int_t n)
 {
-       fParent->SpawnEditor();
-       AliTRDcluster *c = dynamic_cast<AliTRDcluster*>(GetPointId(n));
-       printf("\nDetector             : %d\n", c->GetDetector());
-       printf("Charge               : %f\n", c->GetQ());
-       printf("Sum S                : %4.0f\n", c->GetSumS());
-       printf("Time bin             : %d\n", c->GetLocalTimeBin());
-       printf("Signals              : ");
-       Short_t *cSignals = c->GetSignals();
-       for(Int_t ipad=0; ipad<7; ipad++) printf("%d ", cSignals[ipad]); printf("\n");
-       printf("Central pad          : %d\n", c->GetPadCol());
-       printf("MC track labels      : ");
-       for(Int_t itrk=0; itrk<3; itrk++) printf("%d ", c->GetLabel(itrk)); printf("\n");
-// Bool_t      AliCluster::GetGlobalCov(Float_t* cov) const
-// Bool_t      AliCluster::GetGlobalXYZ(Float_t* xyz) const
-// Float_t     AliCluster::GetSigmaY2() const
-// Float_t     AliCluster::GetSigmaYZ() const
-// Float_t     AliCluster::GetSigmaZ2() const
+  fParent->SpawnEditor();
+  AliTRDcluster *c = dynamic_cast<AliTRDcluster*>(GetPointId(n));
+  printf("\nDetector             : %d\n", c->GetDetector());
+  printf("Charge               : %f\n", c->GetQ());
+  printf("Sum S                : %4.0f\n", c->GetSumS());
+  printf("Time bin             : %d\n", c->GetLocalTimeBin());
+  printf("Signals              : ");
+  Short_t *cSignals = c->GetSignals();
+  for(Int_t ipad=0; ipad<7; ipad++) printf("%d ", cSignals[ipad]); printf("\n");
+  printf("Central pad          : %d\n", c->GetPadCol());
+  printf("MC track labels      : ");
+  for(Int_t itrk=0; itrk<3; itrk++) printf("%d ", c->GetLabel(itrk)); printf("\n");
+  // Bool_t    AliCluster::GetGlobalCov(Float_t* cov) const
+  // Bool_t    AliCluster::GetGlobalXYZ(Float_t* xyz) const
+  // Float_t   AliCluster::GetSigmaY2() const
+  // Float_t   AliCluster::GetSigmaYZ() const
+  // Float_t   AliCluster::GetSigmaZ2() const
 }
 
 ///////////////////////////////////////////////////////////
 /////////////   AliEveTRDHitsEditor         /////////////////////
 ///////////////////////////////////////////////////////////
-AliEveTRDHitsEditor::AliEveTRDHitsEditor(const TGWindow* p, Int_t width, Int_t height, UInt_t options, Pixel_t back) : TGedFrame(p, width, height, options, back)
+AliEveTRDHitsEditor::AliEveTRDHitsEditor(const TGWindow* p, Int_t width, Int_t height,
+                                        UInt_t options, Pixel_t back) :
+  TGedFrame(p, width, height, options, back),
+  fM(0)
 {
-       MakeTitle("TRD Hits");
+  MakeTitle("TRD Hits");
 
 }
 
@@ -212,21 +216,24 @@ AliEveTRDHitsEditor::~AliEveTRDHitsEditor()
 
 void AliEveTRDHitsEditor::SetModel(TObject* obj)
 {
-       fM = dynamic_cast<AliEveTRDHits*>(obj);
+  fM = dynamic_cast<AliEveTRDHits*>(obj);
 
-//     Float_t x, y, z;
-//     for(int ihit=0; ihit<fM->GetN(); ihit++){
-//             fM->GetPoint(ihit, x, y, z);
-//             printf("%3d : x=%6.3f y=%6.3f z=%6.3f\n", ihit, x, y, z);
-//     }
+  //   Float_t x, y, z;
+  //   for(int ihit=0; ihit<fM->GetN(); ihit++){
+  //           fM->GetPoint(ihit, x, y, z);
+  //           printf("%3d : x=%6.3f y=%6.3f z=%6.3f\n", ihit, x, y, z);
+  //   }
 }
 
 ///////////////////////////////////////////////////////////
-/////////////   AliEveTRDDigitsEditor       /////////////////////
+/////////////   AliEveTRDDigitsEditor /////////////////////
 ///////////////////////////////////////////////////////////
-AliEveTRDDigitsEditor::AliEveTRDDigitsEditor(const TGWindow* p, Int_t width, Int_t height, UInt_t options, Pixel_t back) : TGedFrame(p, width, height, options, back)
+AliEveTRDDigitsEditor::AliEveTRDDigitsEditor(const TGWindow* p, Int_t width, Int_t height,
+                                            UInt_t options, Pixel_t back) :
+  TGedFrame(p, width, height, options, back),
+  fM(0)
 {
-       MakeTitle("TRD Digits");
+  MakeTitle("TRD Digits");
 
 }
 
@@ -235,13 +242,13 @@ AliEveTRDDigitsEditor::~AliEveTRDDigitsEditor()
 
 void AliEveTRDDigitsEditor::SetModel(TObject* obj)
 {
-       fM = dynamic_cast<AliEveTRDDigits*>(obj);
-       fM->fParent->SpawnEditor();
-
-//     printf("Chamber %d", fM->fParent->GetID());
-//     for (Int_t  row = 0;  row <  fM->fParent->GetRowMax();  row++)
-//             for (Int_t  col = 0;  col <  fM->fParent->GetColMax();  col++)
-//                     for (Int_t time = 0; time < fM->fParent->GetTimeMax(); time++) {
-//                             printf("\tA(%d %d %d) = %d\n", row, col, time, fM->fData.GetDataUnchecked(row, col, time));
-//                     }
+  fM = dynamic_cast<AliEveTRDDigits*>(obj);
+  fM->fParent->SpawnEditor();
+
+  //   printf("Chamber %d", fM->fParent->GetID());
+  //   for (Int_t  row = 0;  row <  fM->fParent->GetRowMax();  row++)
+  //           for (Int_t  col = 0;  col <  fM->fParent->GetColMax();  col++)
+  //                   for (Int_t time = 0; time < fM->fParent->GetTimeMax(); time++) {
+  //                           printf("\tA(%d %d %d) = %d\n", row, col, time, fM->fData.GetDataUnchecked(row, col, time));
+  //                   }
 }
index 636719c..b05ccc4 100644 (file)
 #ifndef ALIEVE_TRDData_H
 #define ALIEVE_TRDData_H
 
-#ifndef REVE_QuadSet_H
 #include <TEveQuadSet.h>
-#endif
-
-#ifndef REVE_BoxSet_H
 #include <TEveBoxSet.h>
-#endif
-
-#ifndef REVE_PointSet_H
 #include <TEvePointSet.h>
-#endif
 
-#ifndef ROOT_TGedFrame
 #include <TGedFrame.h>
-#endif
+
 
 #include "AliTRDdataArrayI.h"
 
 class AliTRDdigitsManager;
+class AliEveTRDChamber;
+
+
+class AliEveTRDHits : public TEvePointSet
+{
+private:
+  AliEveTRDHits(const AliEveTRDHits&);            // Not implemented
+  AliEveTRDHits& operator=(const AliEveTRDHits&); // Not implemented
+
+public:
+  AliEveTRDHits(AliEveTRDChamber *p);
+
+  void PointSelected(Int_t n);
+
+protected:
+  AliEveTRDChamber *fParent;
+
+  ClassDef(AliEveTRDHits,1); // Base class for TRD hits visualisation
+};
+
+
+class AliEveTRDHitsEditor : public TGedFrame
+{
+private:
+  AliEveTRDHitsEditor(const AliEveTRDHitsEditor&);            // Not implemented
+  AliEveTRDHitsEditor& operator=(const AliEveTRDHitsEditor&); // Not implemented
+
+public:
+  AliEveTRDHitsEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30,
+                     UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground());
+  ~AliEveTRDHitsEditor();
 
-       class AliEveTRDChamber;
-       class AliEveTRDHits : public TEvePointSet
-       {
-       public:
-               AliEveTRDHits(AliEveTRDChamber *p);
+  virtual void SetModel(TObject* obj);
 
-               void PointSelected(Int_t n);
+protected:
+  AliEveTRDHits* fM;
 
-       protected:
-               AliEveTRDChamber *fParent;
+  ClassDef(AliEveTRDHitsEditor,1); // Editor for AliEveTRDHits
+};
 
-       ClassDef(AliEveTRDHits,1) // Base class for TRD hits visualisation
-       };
 
-       class AliEveTRDHitsEditor : public TGedFrame
-       {
-       public:
-               AliEveTRDHitsEditor(const TGWindow* p=0, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
-               ~AliEveTRDHitsEditor();
+class AliEveTRDDigits : public TEveQuadSet
+{
+  friend class AliEveTRDDigitsEditor;
 
-               virtual void SetModel(TObject* obj);
+private:
+  AliEveTRDDigits(const AliEveTRDDigits&);            // Not implemented
+  AliEveTRDDigits& operator=(const AliEveTRDDigits&); // Not implemented
 
-       protected:
-               AliEveTRDHits* fM;
+public:
+  AliEveTRDDigits(AliEveTRDChamber *p);
 
-       ClassDef(AliEveTRDHitsEditor,1) // Editor for AliEveTRDHits
-       };
+  void                 ComputeRepresentation();
+  void                 Paint(Option_t *opt="");
+  void                 Reset();
+  void                 SetData(AliTRDdigitsManager *digits);
 
+protected:
+  AliEveTRDChamber *fParent;
 
-       class AliEveTRDDigits : public TEveQuadSet
-       {
-       friend class AliEveTRDDigitsEditor;
-       public:
-               AliEveTRDDigits(AliEveTRDChamber *p);
+private:
+  TEveBoxSet           fBoxes;
+  AliTRDdataArrayI     fData;
 
-               void                    ComputeRepresentation();
-               void                    Paint(Option_t *opt="");
-               void                    Reset();
-               void                    SetData(AliTRDdigitsManager *digits);
+  ClassDef(AliEveTRDDigits,1); // Digits visualisation for TRD
+};
 
-       protected:
-               AliEveTRDChamber *fParent;
 
-       private:
-               TEveBoxSet                      fBoxes;
-               AliTRDdataArrayI        fData;
+class AliEveTRDDigitsEditor : public TGedFrame
+{
+private:
+  AliEveTRDDigitsEditor(const AliEveTRDDigitsEditor&);            // Not implemented
+  AliEveTRDDigitsEditor& operator=(const AliEveTRDDigitsEditor&); // Not implemented
 
-               ClassDef(AliEveTRDDigits,1) // Digits visualisation for TRD
-       };
+public:
+  AliEveTRDDigitsEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30,
+                       UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground());
+  ~AliEveTRDDigitsEditor();
 
-       class AliEveTRDDigitsEditor : public TGedFrame
-       {
-       public:
-               AliEveTRDDigitsEditor(const TGWindow* p=0, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
-               ~AliEveTRDDigitsEditor();
+  virtual void SetModel(TObject* obj);
 
-               virtual void SetModel(TObject* obj);
+protected:
+  AliEveTRDDigits* fM;
 
-       protected:
-               AliEveTRDDigits* fM;
+  ClassDef(AliEveTRDDigitsEditor,1); // Editor for AliEveTRDDigits
+};
 
-       ClassDef(AliEveTRDDigitsEditor,1) // Editor for AliEveTRDDigits
-       };
 
+class AliEveTRDClusters : public AliEveTRDHits
+{
+private:
+  AliEveTRDClusters(const AliEveTRDClusters&);            // Not implemented
+  AliEveTRDClusters& operator=(const AliEveTRDClusters&); // Not implemented
 
-       class AliEveTRDClusters : public AliEveTRDHits
-       {
-       public:
-               AliEveTRDClusters(AliEveTRDChamber *p);
+public:
+  AliEveTRDClusters(AliEveTRDChamber *p);
 
-               void PointSelected(Int_t n);
+  void PointSelected(Int_t n);
 
-       ClassDef(AliEveTRDClusters,1) // Base class for TRD clusters visualisation
-       };
+  ClassDef(AliEveTRDClusters,1); // Base class for TRD clusters visualisation
+};
 
 #endif
index f4f3b6a..7eab750 100644 (file)
 #include "AliTRDdigitsManager.h"
 #include "AliTRDgeometry.h"
 
-
 #include <algorithm>
 
-using namespace std;
 class AliTRDdataArrayI;
 
 ClassImp(AliEveTRDLoader)
 ClassImp(AliEveTRDLoaderEditor)
 
 ///////////////////////////////////////////////////////////
-/////////////         AliEveTRDLoader       /////////////////////
+/////////////     AliEveTRDLoader     /////////////////////
 ///////////////////////////////////////////////////////////
 
 
-//________________________________________________________
-AliEveTRDLoader::AliEveTRDLoader(const Text_t* n, const Text_t* t) : TEveElementList(n, t), fSM(-1), fStack(-1), fLy(-1), fEvent(0)
+//______________________________________________________________________________
+AliEveTRDLoader::AliEveTRDLoader(const Text_t* n, const Text_t* t) :
+  TEveElementList(n, t),
+  fLoadHits     (kFALSE), fLoadDigits (kFALSE),
+  fLoadClusters (kFALSE), fLoadTracks (kFALSE),
+  fSM           (-1),     fStack      (-1),     fLy(-1),
+  fFilename     (""),     fDir        ("."),
+  fEvent        (-1),
+  fTRD          (0x0),
+  fGeo          (new AliTRDgeometry())
 {
-       kLoadHits = kFALSE;
-       kLoadDigits = kFALSE;
-       kLoadClusters = kFALSE;
-       kLoadTracks = kFALSE;
-       fFilename = "";
-       fDir = ".";
-       fEvent  = -1;
-
-       fTRD           = 0x0;
-       fGeo = new AliTRDgeometry();
-
-       AliCDBManager *fCDBManager=AliCDBManager::Instance();
-       fCDBManager->SetDefaultStorage("local://$ALICE_ROOT");
-       fCDBManager->SetRun(0);
+  AliCDBManager *fCDBManager=AliCDBManager::Instance();
+  fCDBManager->SetDefaultStorage("local://$ALICE_ROOT");
+  fCDBManager->SetRun(0);
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 AliEveTRDLoader::~AliEveTRDLoader()
 {
-//     if(fChambers) {fChambers->clear(); delete fChambers;}
+  // if(fChambers) {fChambers->clear(); delete fChambers;}
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 template<class T>
 class ID
 {
 public:
-       ID( int value ) : id(value) {}
-       bool operator()(const T &t) const {
-               return ((dynamic_cast<AliEveTRDModule*>(t))->GetID() == id);
-       }
+  ID( int value ) : id(value) {}
+  bool operator()(const T &t) const {
+    return ((dynamic_cast<AliEveTRDModule*>(t))->GetID() == id);
+  }
 private:
-       const int id;
+  const int id;
 };
-void   AliEveTRDLoader::AddChambers(int sm, int stk, int ly)
+
+void AliEveTRDLoader::AddChambers(int sm, int stk, int ly)
 {
-       Int_t ism_start = (sm == -1) ?  0 : sm;
-       Int_t ism_stop  = (sm == -1) ? 18 : sm+1;
-       Int_t istk_start= (stk == -1)?  0 : stk;
-       Int_t istk_stop = (stk == -1)?  5 : stk+1;
-       Int_t ily_start = (ly == -1) ?  0 : ly;
-       Int_t ily_stop  = (ly == -1) ?  6 : ly+1;
-
-       List_i ichmb;
-       ichmb = fChildren.begin();
-       while(ichmb != fChildren.end()){
-               (*ichmb)->SetRnrSelf(kFALSE);
-               ichmb++;
-       }
-
-       AliEveTRDNode *SM=0x0, *STK=0x0;
-       AliEveTRDChamber *CHMB = 0x0;
-       int det;
-       for(int ism=ism_start; ism<ism_stop; ism++){
-               ichmb = find_if(fChildren.begin(), fChildren.end(), ID<TEveElement*>(ism));
-               if(ichmb != fChildren.end()){
-                       SM = (AliEveTRDNode*)(*ichmb);
-                       SM->SetRnrSelf(kTRUE);
-               }else{
-                 gEve->AddElement(SM = new AliEveTRDNode("SM", ism), this);
-                       SM->FindListTreeItem(gEve->GetListTree())->SetTipText(Form("Supermodule %2d", ism));
-               }
-               for(int istk=istk_start; istk<istk_stop; istk++){
-                       ichmb = find_if(SM->begin(), SM->end(), ID<TEveElement*>(istk));
-                       if(ichmb != SM->end()){
-                               STK = (AliEveTRDNode*)(*ichmb);
-                               STK->SetRnrSelf(kTRUE);
-                       }else{
-                         gEve->AddElement(STK = new AliEveTRDNode("Stack", istk), SM);
-                               STK->FindListTreeItem(gEve->GetListTree())->SetTipText(Form("SM %2d Stack %1d", ism, istk));
-                       }
-                       for(int ily=ily_start; ily<ily_stop; ily++){
-                               det = fGeo->GetDetector(ily, istk, ism);
-                               ichmb = find_if(STK->begin(), STK->end(), ID<TEveElement*>(det));
-                               if(ichmb != STK->end()) (*ichmb)->SetRnrSelf(kTRUE);
-                               else{
-                                 gEve->AddElement(CHMB = new AliEveTRDChamber(det), STK);
-                                       CHMB->SetGeometry(fGeo);
-                                       CHMB->FindListTreeItem(gEve->GetListTree())->SetTipText(Form("SM %2d Stack %1d Layer %1d", ism, istk, ily));
-                               }
-                       }
-               }
-       }
-       gEve->Redraw3D();
+  Int_t ism_start = (sm == -1) ?  0 : sm;
+  Int_t ism_stop  = (sm == -1) ? 18 : sm+1;
+  Int_t istk_start= (stk == -1)?  0 : stk;
+  Int_t istk_stop = (stk == -1)?  5 : stk+1;
+  Int_t ily_start = (ly == -1) ?  0 : ly;
+  Int_t ily_stop  = (ly == -1) ?  6 : ly+1;
+
+  List_i ichmb;
+  ichmb = fChildren.begin();
+  while(ichmb != fChildren.end()){
+    (*ichmb)->SetRnrSelf(kFALSE);
+    ichmb++;
+  }
+
+  AliEveTRDNode *SM=0x0, *STK=0x0;
+  AliEveTRDChamber *CHMB = 0x0;
+  int det;
+  for(int ism=ism_start; ism<ism_stop; ism++){
+    ichmb = find_if(fChildren.begin(), fChildren.end(), ID<TEveElement*>(ism));
+    if(ichmb != fChildren.end()){
+      SM = (AliEveTRDNode*)(*ichmb);
+      SM->SetRnrSelf(kTRUE);
+    }else{
+      gEve->AddElement(SM = new AliEveTRDNode("SM", ism), this);
+      SM->FindListTreeItem(gEve->GetListTree())->SetTipText(Form("Supermodule %2d", ism));
+    }
+    for(int istk=istk_start; istk<istk_stop; istk++){
+      ichmb = find_if(SM->begin(), SM->end(), ID<TEveElement*>(istk));
+      if(ichmb != SM->end()){
+        STK = (AliEveTRDNode*)(*ichmb);
+        STK->SetRnrSelf(kTRUE);
+      }else{
+        gEve->AddElement(STK = new AliEveTRDNode("Stack", istk), SM);
+        STK->FindListTreeItem(gEve->GetListTree())->SetTipText(Form("SM %2d Stack %1d", ism, istk));
+      }
+      for(int ily=ily_start; ily<ily_stop; ily++){
+        det = fGeo->GetDetector(ily, istk, ism);
+        ichmb = find_if(STK->begin(), STK->end(), ID<TEveElement*>(det));
+        if(ichmb != STK->end()) (*ichmb)->SetRnrSelf(kTRUE);
+        else{
+          gEve->AddElement(CHMB = new AliEveTRDChamber(det), STK);
+          CHMB->SetGeometry(fGeo);
+          CHMB->FindListTreeItem(gEve->GetListTree())->SetTipText(Form("SM %2d Stack %1d Layer %1d", ism, istk, ily));
+        }
+      }
+    }
+  }
+  gEve->Redraw3D();
 }
 
-//________________________________________________________
-AliEveTRDChamber*      AliEveTRDLoader::GetChamber(int d)
+//______________________________________________________________________________
+AliEveTRDChamber* AliEveTRDLoader::GetChamber(int d)
 {
-       List_i ism, istack, ichmb;
-
-       ism = find_if(fChildren.begin(), fChildren.end(), ID<TEveElement*>(fGeo->GetSector(d)));
-       if(ism == fChildren.end()) return 0x0;
-       istack = find_if(((AliEveTRDNode*)(*ism))->begin(), ((AliEveTRDNode*)(*ism))->end(), ID<TEveElement*>(fGeo->GetChamber(d)));
-       if(istack == ((AliEveTRDNode*)(*ism))->end()) return 0x0;
-       ichmb = find_if(((AliEveTRDNode*)(*istack))->begin(), ((AliEveTRDNode*)(*istack))->end(), ID<TEveElement*>(d));
-       if(ichmb == ((AliEveTRDNode*)(*istack))->end()) return 0x0;
-       return dynamic_cast<AliEveTRDChamber*>(*ichmb);
+  List_i ism, istack, ichmb;
+
+  ism = find_if(fChildren.begin(), fChildren.end(), ID<TEveElement*>(fGeo->GetSector(d)));
+  if(ism == fChildren.end()) return 0x0;
+  istack = find_if(((AliEveTRDNode*)(*ism))->begin(), ((AliEveTRDNode*)(*ism))->end(), ID<TEveElement*>(fGeo->GetChamber(d)));
+  if(istack == ((AliEveTRDNode*)(*ism))->end()) return 0x0;
+  ichmb = find_if(((AliEveTRDNode*)(*istack))->begin(), ((AliEveTRDNode*)(*istack))->end(), ID<TEveElement*>(d));
+  if(ichmb == ((AliEveTRDNode*)(*istack))->end()) return 0x0;
+  return dynamic_cast<AliEveTRDChamber*>(*ichmb);
 }
 
-//________________________________________________________
-Bool_t AliEveTRDLoader::GoToEvent(int ev)
+//______________________________________________________________________________
+Bool_t AliEveTRDLoader::GoToEvent(int ev)
 {
-       if(!fChildren.size()){
-               AliWarning("Please select first the chamber that you want to monitor from \"Chamber(s) selector\".");
-               return kFALSE;
-       }
-
-       fEvent = ev;
-
-       Unload();
-
-       TTree *t = 0x0;
-       TFile *f = new TFile(Form("%s/%s", fDir.Data(), fFilename.Data()));
-       if(! f->cd(Form("AliEveEventManager%d", ev))){
-               AliError(Form("Couldn't find event %d in file \"%s/%s\".", ev, fDir.Data(), fFilename.Data()));
-               f->Close(); delete f;
-               return kFALSE;
-       }
-
-       if(kLoadDigits){
-               t = (TTree*)gDirectory->Get("TreeD");
-               if(!t) return kFALSE;
-               if(!LoadDigits(t)) return kFALSE;
-       } else if(kLoadClusters){
-               t = (TTree*)gDirectory->Get("TreeR");
-               if(!t) return kFALSE;
-               if(!LoadClusters(t)) return kFALSE;
-       } else if(kLoadTracks){
-               t = (TTree*)gDirectory->Get("TreeT");
-               if(!t) return kFALSE;
-               if(!LoadTracklets(t)) return kFALSE;
-       } else AliWarning("Please select first the type of data that you want to monitor and then hit the \"Load\" button.");
-
-       f->Close(); delete f;
-
-       gEve->Redraw3D();
-
-       return kTRUE;
+  if(!fChildren.size()){
+    AliWarning("Please select first the chamber that you want to monitor from \"Chamber(s) selector\".");
+    return kFALSE;
+  }
+
+  fEvent = ev;
+
+  Unload();
+
+  TTree *t = 0x0;
+  TFile *f = new TFile(Form("%s/%s", fDir.Data(), fFilename.Data()));
+  if(! f->cd(Form("AliEveEventManager%d", ev))){
+    AliError(Form("Couldn't find event %d in file \"%s/%s\".", ev, fDir.Data(), fFilename.Data()));
+    f->Close(); delete f;
+    return kFALSE;
+  }
+
+  if(fLoadDigits){
+    t = (TTree*)gDirectory->Get("TreeD");
+    if(!t) return kFALSE;
+    if(!LoadDigits(t)) return kFALSE;
+  } else if(fLoadClusters){
+    t = (TTree*)gDirectory->Get("TreeR");
+    if(!t) return kFALSE;
+    if(!LoadClusters(t)) return kFALSE;
+  } else if(fLoadTracks){
+    t = (TTree*)gDirectory->Get("TreeT");
+    if(!t) return kFALSE;
+    if(!LoadTracklets(t)) return kFALSE;
+  } else AliWarning("Please select first the type of data that you want to monitor and then hit the \"Load\" button.");
+
+  f->Close(); delete f;
+
+  gEve->Redraw3D();
+
+  return kTRUE;
 }
 
 
-//________________________________________________________
-Bool_t AliEveTRDLoader::LoadClusters(TTree *tC)
+//______________________________________________________________________________
+Bool_t AliEveTRDLoader::LoadClusters(TTree *tC)
 {
-       AliInfo("Loading ...");
-       if(!fChildren.size()) return kTRUE;
-
-       TObjArray *clusters = new TObjArray();
-       tC->SetBranchAddress("TRDcluster", &clusters);
-
-       AliEveTRDChamber *chmb = 0x0;
-       AliTRDcluster *c=0x0;
-       for(int idet=0; idet<540; idet++){
-               tC->GetEntry(idet);
-               if(!clusters->GetEntriesFast()) continue;
-               c = (AliTRDcluster*)clusters->UncheckedAt(0);
-               if(!c) continue;
-               if((chmb = GetChamber(c->GetDetector()))) chmb->LoadClusters(clusters);
-       }
-       return kTRUE;
+  AliInfo("Loading ...");
+  if(!fChildren.size()) return kTRUE;
+
+  TObjArray *clusters = new TObjArray();
+  tC->SetBranchAddress("TRDcluster", &clusters);
+
+  AliEveTRDChamber *chmb = 0x0;
+  AliTRDcluster *c=0x0;
+  for(int idet=0; idet<540; idet++){
+    tC->GetEntry(idet);
+    if(!clusters->GetEntriesFast()) continue;
+    c = (AliTRDcluster*)clusters->UncheckedAt(0);
+    if(!c) continue;
+    if((chmb = GetChamber(c->GetDetector()))) chmb->LoadClusters(clusters);
+  }
+  return kTRUE;
 }
 
 
-//________________________________________________________
-Bool_t AliEveTRDLoader::LoadDigits(TTree *tD)
+//______________________________________________________________________________
+Bool_t AliEveTRDLoader::LoadDigits(TTree *tD)
 {
-       AliInfo("Loading ...");
-
-       if(!fChildren.size()) return kTRUE;
-
-       AliEveTRDChamber *chmb;
-       AliTRDdigitsManager dm;
-       dm.ReadDigits(tD);
-       for(int idet=0; idet<540; idet++){
-               if(!(chmb=GetChamber(idet))) continue;
-//             digits = dm.GetDigits(idet);
-//             if(!digits) continue;
-//             chmb->LoadDigits(digits);
-               chmb->LoadDigits(&dm);
-       }
-       return kTRUE;
+  AliInfo("Loading ...");
+
+  if(!fChildren.size()) return kTRUE;
+
+  AliEveTRDChamber *chmb;
+  AliTRDdigitsManager dm;
+  dm.ReadDigits(tD);
+  for(int idet=0; idet<540; idet++){
+    if(!(chmb=GetChamber(idet))) continue;
+    //  digits = dm.GetDigits(idet);
+    //  if(!digits) continue;
+    //  chmb->LoadDigits(digits);
+    chmb->LoadDigits(&dm);
+  }
+  return kTRUE;
 }
 
 
-//________________________________________________________
-Bool_t AliEveTRDLoader::LoadTracklets(TTree *tT)
+//______________________________________________________________________________
+Bool_t AliEveTRDLoader::LoadTracklets(TTree *tT)
 {
-       AliInfo("Loading ...");
-       if(!fChildren.size()) return kTRUE;
+  AliInfo("Loading ...");
+  if(!fChildren.size()) return kTRUE;
 
-       TObjArray *tracks = new TObjArray();
-       tT->SetBranchAddress("TRDmcmTracklet",&tracks);
+  TObjArray *tracks = new TObjArray();
+  tT->SetBranchAddress("TRDmcmTracklet",&tracks);
 
-       AliEveTRDChamber *chmb = 0x0;
-       AliTRDmcmTracklet *trk=0x0;
-       for(int idet=0; idet<540; idet++){
-               if(!tT->GetEntry(idet)) continue;
-               if(tracks->GetEntriesFast()) trk = (AliTRDmcmTracklet*)tracks->UncheckedAt(0);
-               if((chmb = GetChamber(trk->GetDetector()))) chmb->LoadTracklets(tracks);
-       }
+  AliEveTRDChamber *chmb = 0x0;
+  AliTRDmcmTracklet *trk=0x0;
+  for(int idet=0; idet<540; idet++){
+    if(!tT->GetEntry(idet)) continue;
+    if(tracks->GetEntriesFast()) trk = (AliTRDmcmTracklet*)tracks->UncheckedAt(0);
+    if((chmb = GetChamber(trk->GetDetector()))) chmb->LoadTracklets(tracks);
+  }
 
-       return kTRUE;
+  return kTRUE;
 }
 
 
-//________________________________________________________
-Bool_t AliEveTRDLoader::Open(const char *filename, const char *dir)
+//______________________________________________________________________________
+Bool_t AliEveTRDLoader::Open(const char *filename, const char *dir)
 {
-       fFilename = filename;
-       fDir = dir;
-       Int_t count = 0;
-       count += kLoadDigits ? 1 : 0;
-       count += kLoadClusters ? 1 : 0;
-       count += kLoadTracks ? 1 : 0;
-
-       TObjArray *so = fFilename.Tokenize(".");
-
-       if(((TObjString*)(*so)[0])->GetString().CompareTo("TRD") != 0){
-               if(!count){
-                       AliWarning("Filename didn't fulfill naming conventions. No TRD data will be loaded.");
-                       return kFALSE;
-               } else {
-                       Warning("Open()", "Filename didn't fulfill naming conventions.");
-                       return kTRUE;
-               }
-       }
-       if(((TObjString*)(*so)[1])->GetString().CompareTo("Digits") == 0){
-               if(!kLoadDigits) AliWarning("Data type set to DIGITS according to file name. Previous settings with SetDataType() will be discarded.");
-               kLoadDigits = kTRUE;
-       } else if(((TObjString*)(*so)[1])->GetString().CompareTo("RecPoints") == 0){
-               if(!kLoadClusters) AliWarning("Data type set to CLUSTERS according to file name. Previous settings with SetDataType() will be discarded.");
-               kLoadClusters = kTRUE;
-       } else if(((TObjString*)(*so)[1])->GetString().CompareTo("Tracks") == 0){
-               if(!kLoadTracks) AliWarning("Data type set to TRACKLETS according to file name. Previous settings with SetDataType() will be discarded.");
-               kLoadTracks = kTRUE;
-       } else if(count){
-               AliWarning("Filename didn't fulfill naming conventions.");
-               return kTRUE;
-       } else {
-               AliError("Filename didn't fulfill naming conventions. No data will be loaded.");
-               return kFALSE;
-       }
-
-       return kTRUE;
+  fFilename = filename;
+  fDir = dir;
+  Int_t count = 0;
+  count += fLoadDigits ? 1 : 0;
+  count += fLoadClusters ? 1 : 0;
+  count += fLoadTracks ? 1 : 0;
+
+  TObjArray *so = fFilename.Tokenize(".");
+
+  if(((TObjString*)(*so)[0])->GetString().CompareTo("TRD") != 0){
+    if(!count){
+      AliWarning("Filename didn't fulfill naming conventions. No TRD data will be loaded.");
+      return kFALSE;
+    } else {
+      Warning("Open()", "Filename didn't fulfill naming conventions.");
+      return kTRUE;
+    }
+  }
+  if(((TObjString*)(*so)[1])->GetString().CompareTo("Digits") == 0){
+    if(!fLoadDigits) AliWarning("Data type set to DIGITS according to file name. Previous settings with SetDataType() will be discarded.");
+    fLoadDigits = kTRUE;
+  } else if(((TObjString*)(*so)[1])->GetString().CompareTo("RecPoints") == 0){
+    if(!fLoadClusters) AliWarning("Data type set to CLUSTERS according to file name. Previous settings with SetDataType() will be discarded.");
+    fLoadClusters = kTRUE;
+  } else if(((TObjString*)(*so)[1])->GetString().CompareTo("Tracks") == 0){
+    if(!fLoadTracks) AliWarning("Data type set to TRACKLETS according to file name. Previous settings with SetDataType() will be discarded.");
+    fLoadTracks = kTRUE;
+  } else if(count){
+    AliWarning("Filename didn't fulfill naming conventions.");
+    return kTRUE;
+  } else {
+    AliError("Filename didn't fulfill naming conventions. No data will be loaded.");
+    return kFALSE;
+  }
+
+  return kTRUE;
 }
 
 
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDLoader::Paint(Option_t *option)
 {
-       List_i ichmb = fChildren.begin();
-       while(ichmb != fChildren.end()){
-               (dynamic_cast<AliEveTRDModule*>(*ichmb))->Paint(option);
-               ichmb++;
-       }
+  List_i ichmb = fChildren.begin();
+  while(ichmb != fChildren.end()){
+    (dynamic_cast<AliEveTRDModule*>(*ichmb))->Paint(option);
+    ichmb++;
+  }
 }
 
-//________________________________________________________
-void   AliEveTRDLoader::SetDataType(TRDDataTypes type)
+//______________________________________________________________________________
+void AliEveTRDLoader::SetDataType(TRDDataTypes type)
 {
-       kLoadHits     = kFALSE;
-       kLoadDigits   = kFALSE;
-       kLoadClusters = kFALSE;
-       kLoadTracks   = kFALSE;
-       switch(type){
-       case kHits: kLoadHits = kTRUE; break;
-       case kDigits: kLoadDigits = kTRUE; break;
-       case kClusters: kLoadClusters = kTRUE; break;
-       case kTracks: kLoadTracks = kTRUE; break;
-       case kRawRoot: break;
-       case kRawData: break;
-       }
+  fLoadHits     = kFALSE;
+  fLoadDigits   = kFALSE;
+  fLoadClusters = kFALSE;
+  fLoadTracks   = kFALSE;
+  switch(type){
+    case kHits:     fLoadHits = kTRUE; break;
+    case kDigits:   fLoadDigits = kTRUE; break;
+    case kClusters: fLoadClusters = kTRUE; break;
+    case kTracks:   fLoadTracks = kTRUE; break;
+    case kRawRoot: break;
+    case kRawData: break;
+  }
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDLoader::Unload()
 {
-       List_i ichmb = fChildren.begin();
-       while(ichmb != fChildren.end()){
-               (dynamic_cast<AliEveTRDModule*>(*ichmb))->Reset();
-               ichmb++;
-       }
+  List_i ichmb = fChildren.begin();
+  while(ichmb != fChildren.end()){
+    (dynamic_cast<AliEveTRDModule*>(*ichmb))->Reset();
+    ichmb++;
+  }
 }
 
 ///////////////////////////////////////////////////////////
 /////////////   AliEveTRDLoaderEditor       /////////////////////
 ///////////////////////////////////////////////////////////
 
-//________________________________________________________
-AliEveTRDLoaderEditor::AliEveTRDLoaderEditor(const TGWindow* p, Int_t width, Int_t height, UInt_t options, Pixel_t back) : TGedFrame(p, width, height, options | kVerticalFrame, back)
+//______________________________________________________________________________
+AliEveTRDLoaderEditor::AliEveTRDLoaderEditor(const TGWindow* p, Int_t width, Int_t height,
+                                            UInt_t options, Pixel_t back) :
+  TGedFrame(p, width, height, options | kVerticalFrame, back),
+  fM(0), fFile(0), fEvent(0),
+  fSMNumber(0), fStackNumber(0), fPlaneNumber(0)
 {
-       MakeTitle("AliEveTRDLoader");
+  MakeTitle("AliEveTRDLoader");
 
-  fFile = 0x0;
-       TGTextButton *fOpenFile = 0x0;
-       Int_t labelW = 42;
+  Int_t labelW = 42;
 
-       TGHorizontalFrame* f = new TGHorizontalFrame(this);
-       TGHorizontalFrame* g = new TGHorizontalFrame(f, labelW, 0, kFixedWidth);
-       TGLabel* l = new TGLabel(g, "File: ");
-       g->AddFrame(l, new TGLayoutHints(kLHintsLeft, 0,0,4,0));
-       f->AddFrame(g);
-       fFile = new TGTextEntry(f);
-       fFile->SetToolTipText("Select TRD data file or galice.root");
-       fFile->SetWidth(140);
-       fFile->Connect("DoubleClicked()", "AliEveTRDLoaderEditor", this, "FileOpen()");
-       f->AddFrame(fFile);
+  TGHorizontalFrame* f = new TGHorizontalFrame(this);
+  TGHorizontalFrame* g = new TGHorizontalFrame(f, labelW, 0, kFixedWidth);
+  TGLabel* l = new TGLabel(g, "File: ");
+  g->AddFrame(l, new TGLayoutHints(kLHintsLeft, 0,0,4,0));
+  f->AddFrame(g);
+  fFile = new TGTextEntry(f);
+  fFile->SetToolTipText("Select TRD data file or galice.root");
+  fFile->SetWidth(140);
+  fFile->Connect("DoubleClicked()", "AliEveTRDLoaderEditor", this, "FileOpen()");
+  f->AddFrame(fFile);
 
-       fOpenFile = new TGTextButton(f, "Browse");
-       f->AddFrame(fOpenFile);
-       fOpenFile->Connect("Clicked()", "AliEveTRDLoaderEditor", this, "FileOpen()");
-       AddFrame(f);
+  TGTextButton* openFile = new TGTextButton(f, "Browse");
+  f->AddFrame(openFile);
+  openFile->Connect("Clicked()", "AliEveTRDLoaderEditor", this, "FileOpen()");
+  AddFrame(f);
 
 
   fEvent = new TEveGValuator(this, "AliEveEventManager:", 110, 0);
@@ -378,34 +376,34 @@ AliEveTRDLoaderEditor::AliEveTRDLoaderEditor(const TGWindow* p, Int_t width, Int
   fEvent->Build();
   fEvent->SetLimits(-1, 1000);
   fEvent->SetToolTip("Set event number to be monitored");
-       fEvent->Connect("ValueSet(Double_t)",
-                 "AliEveTRDLoaderEditor", this, "SetEvent(Double_t)");
-       AddFrame(fEvent);
+  fEvent->Connect("ValueSet(Double_t)",
+                  "AliEveTRDLoaderEditor", this, "SetEvent(Double_t)");
+  AddFrame(fEvent);
 
 
-       // "Chamber(s) selector" group frame
-       TGGroupFrame *fGroupFrame1974 = new TGGroupFrame(this,"Chamber(s) selector");
-       TGVerticalFrame *fVerticalFrame1974 = new TGVerticalFrame(fGroupFrame1974, 150, 50,kVerticalFrame);
+  // "Chamber(s) selector" group frame
+  TGGroupFrame *fGroupFrame1974 = new TGGroupFrame(this,"Chamber(s) selector");
+  TGVerticalFrame *fVerticalFrame1974 = new TGVerticalFrame(fGroupFrame1974, 150, 50,kVerticalFrame);
 
-       fSMNumber = new TEveGValuator(fVerticalFrame1974, "SM:", 0, 0);
+  fSMNumber = new TEveGValuator(fVerticalFrame1974, "SM:", 0, 0);
   fSMNumber->SetShowSlider(kFALSE);
   fSMNumber->SetLabelWidth(labelW);
   fSMNumber->SetNELength(6);
   fSMNumber->Build();
   fSMNumber->SetLimits(-1, 17);
   fSMNumber->SetToolTip("Supermodule id [-1 for all]");
-       fVerticalFrame1974->AddFrame(fSMNumber, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterX | kLHintsExpandY,2,2,2,2));
+  fVerticalFrame1974->AddFrame(fSMNumber, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterX | kLHintsExpandY,2,2,2,2));
 
-       fStackNumber = new TEveGValuator(fVerticalFrame1974, "Stack:", 0, 0);
+  fStackNumber = new TEveGValuator(fVerticalFrame1974, "Stack:", 0, 0);
   fStackNumber->SetShowSlider(kFALSE);
   fStackNumber->SetLabelWidth(labelW);
   fStackNumber->SetNELength(6);
   fStackNumber->Build();
   fStackNumber->SetLimits(-1, 4);
   fStackNumber->SetToolTip("Stack id [-1 for all in this SM]");
-       fVerticalFrame1974->AddFrame(fStackNumber, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterX | kLHintsExpandY,2,2,2,2));
+  fVerticalFrame1974->AddFrame(fStackNumber, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterX | kLHintsExpandY,2,2,2,2));
 
-       fPlaneNumber = new TEveGValuator(fVerticalFrame1974, "Plane:", 0, 0);
+  fPlaneNumber = new TEveGValuator(fVerticalFrame1974, "Plane:", 0, 0);
   fPlaneNumber->SetShowSlider(kFALSE);
   fPlaneNumber->SetLabelWidth(labelW);
   fPlaneNumber->SetNELength(6);
@@ -413,75 +411,75 @@ AliEveTRDLoaderEditor::AliEveTRDLoaderEditor(const TGWindow* p, Int_t width, Int
   fPlaneNumber->SetLimits(-1, 5);
   fPlaneNumber->SetToolTip("Plane id [-1 for all in this stack]");
 
-       fVerticalFrame1974->AddFrame(fPlaneNumber, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterX | kLHintsExpandY,2,2,2,2));
+  fVerticalFrame1974->AddFrame(fPlaneNumber, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterX | kLHintsExpandY,2,2,2,2));
 
-       fGroupFrame1974->AddFrame(fVerticalFrame1974, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandY | kLHintsCenterX,2,2,2,2));
+  fGroupFrame1974->AddFrame(fVerticalFrame1974, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandY | kLHintsCenterX,2,2,2,2));
 
-       TGTextButton *fTextButton2037 = new TGTextButton(fGroupFrame1974,"Select");
-       fTextButton2037->SetTextJustify(36);
-       fGroupFrame1974->AddFrame(fTextButton2037, new TGLayoutHints(kLHintsExpandY | kLHintsCenterX,2,2,2,2));
+  TGTextButton *fTextButton2037 = new TGTextButton(fGroupFrame1974,"Select");
+  fTextButton2037->SetTextJustify(36);
+  fGroupFrame1974->AddFrame(fTextButton2037, new TGLayoutHints(kLHintsExpandY | kLHintsCenterX,2,2,2,2));
   fTextButton2037->SetToolTipText("Apply selection", 400);
-       fTextButton2037->Connect("Clicked()",
-                                       "AliEveTRDLoaderEditor", this, "AddChambers()");
+  fTextButton2037->Connect("Clicked()",
+                           "AliEveTRDLoaderEditor", this, "AddChambers()");
 
-       fGroupFrame1974->SetLayoutManager(new TGHorizontalLayout(fGroupFrame1974));
-       AddFrame(fGroupFrame1974, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+  fGroupFrame1974->SetLayoutManager(new TGHorizontalLayout(fGroupFrame1974));
+  AddFrame(fGroupFrame1974, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
 
 
-       TGTextButton *fTextButton2004 = new TGTextButton(this,"Load");
-       fTextButton2004->SetTextJustify(36);
-       fTextButton2004->Resize(164,22);
-       AddFrame(fTextButton2004, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
-       fTextButton2004->SetToolTipText("Load data according to selection", 400);
-       fTextButton2004->Connect("Clicked()", "AliEveTRDLoaderEditor", this, "Load()");
+  TGTextButton *fTextButton2004 = new TGTextButton(this,"Load");
+  fTextButton2004->SetTextJustify(36);
+  fTextButton2004->Resize(164,22);
+  AddFrame(fTextButton2004, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+  fTextButton2004->SetToolTipText("Load data according to selection", 400);
+  fTextButton2004->Connect("Clicked()", "AliEveTRDLoaderEditor", this, "Load()");
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 AliEveTRDLoaderEditor::~AliEveTRDLoaderEditor()
 {}
 
-//_________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDLoaderEditor::SetModel(TObject* obj)
 {
 
-       fM = dynamic_cast<AliEveTRDLoader*>(obj);
+  fM = dynamic_cast<AliEveTRDLoader*>(obj);
 
-       fFile->SetText(gSystem->BaseName(fM->fFilename.Data()));
+  fFile->SetText(gSystem->BaseName(fM->fFilename.Data()));
 
-       Bool_t kFile = kTRUE;
-       if(fM->fFilename.CompareTo("") == 0) kFile = kFALSE;
+  Bool_t kFile = kTRUE;
+  if(fM->fFilename.CompareTo("") == 0) kFile = kFALSE;
 
-       fEvent->SetEnabled(kFile);
-       fEvent->GetEntry()->SetIntNumber(fM->fEvent);
+  fEvent->SetEnabled(kFile);
+  fEvent->GetEntry()->SetIntNumber(fM->fEvent);
 
-       fSMNumber->SetEnabled(kFile);
-       fSMNumber->GetEntry()->SetIntNumber(fM->fSM);
+  fSMNumber->SetEnabled(kFile);
+  fSMNumber->GetEntry()->SetIntNumber(fM->fSM);
 
 
-       fStackNumber->SetEnabled(kFile);
-       fStackNumber->GetEntry()->SetIntNumber(fM->fStack);
+  fStackNumber->SetEnabled(kFile);
+  fStackNumber->GetEntry()->SetIntNumber(fM->fStack);
 
 
-       fPlaneNumber->SetEnabled(kFile);
-       fPlaneNumber->GetEntry()->SetIntNumber(fM->fLy);
+  fPlaneNumber->SetEnabled(kFile);
+  fPlaneNumber->GetEntry()->SetIntNumber(fM->fLy);
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDLoaderEditor::AddChambers()
 {
-       fM->fSM    = (int)fSMNumber->GetEntry()->GetNumber();
-       fM->fStack = (int)fStackNumber->GetEntry()->GetNumber();
-       fM->fLy    = (int)fPlaneNumber->GetEntry()->GetNumber();
-       fM->AddChambers(fM->fSM, fM->fStack, fM->fLy);
+  fM->fSM    = (int)fSMNumber->GetEntry()->GetNumber();
+  fM->fStack = (int)fStackNumber->GetEntry()->GetNumber();
+  fM->fLy    = (int)fPlaneNumber->GetEntry()->GetNumber();
+  fM->AddChambers(fM->fSM, fM->fStack, fM->fLy);
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDLoaderEditor::FileOpen()
 {
   TGFileInfo fi;
   fi.fIniDir    = StrDup(gSystem->DirName (fM->fFilename.Data()));
   fi.fFilename  = StrDup(gSystem->BaseName(fM->fFilename.Data()));
-//  fi.fFileTypes = tpcfiletypes;
+  //  fi.fFileTypes = tpcfiletypes;
 
   new TGFileDialog(fClient->GetRoot(), gEve->GetMainWindow(), kFDOpen, &fi);
   if (!fi.fFilename) return;
@@ -489,12 +487,12 @@ void AliEveTRDLoaderEditor::FileOpen()
   fFile->SetToolTipText(gSystem->DirName (fi.fFilename));
   fFile->SetText       (gSystem->BaseName(fi.fFilename));
 
-       fM->Open(gSystem->BaseName(fi.fFilename), gSystem->DirName (fi.fFilename));
+  fM->Open(gSystem->BaseName(fi.fFilename), gSystem->DirName (fi.fFilename));
 
-       this->SetModel(fM);
+  this->SetModel(fM);
 }
 
 void AliEveTRDLoaderEditor::Load()
 {
-       fM->GoToEvent(fM->fEvent);
+  fM->GoToEvent(fM->fEvent);
 }
index 4fc841c..b62b7fb 100644 (file)
@@ -32,69 +32,82 @@ 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;
+
+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
+  };
+
+public:
+  AliEveTRDLoader(const Text_t* n="AliEveTRDLoader", const Text_t* t=0);
+  ~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       fLoadHits, fLoadDigits, fLoadClusters, fLoadTracks; // flags for data-loading
+  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
+{
+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 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
+};
 
 #endif
index b9e032c..8888915 100644 (file)
@@ -6,11 +6,10 @@
  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
  * full copyright notice.                                                 *
  **************************************************************************/
+
 #include "AliEveTRDLoaderImp.h"
 #include "AliEveTRDModuleImp.h"
 
-//#include "AliTRDv1.h"
-
 #include <TEveManager.h>
 
 #include "TFile.h"
 #include "AliTRDhit.h"
 #include "AliTRDdigitsManager.h"
 
-using namespace std;
-
 ClassImp(AliEveTRDLoaderSim)
 ClassImp(AliEveTRDLoaderRaw)
 ClassImp(AliEveTRDLoaderSimEditor)
 //ClassImp(TRDLoaderRawEditor)
 
 ///////////////////////////////////////////////////////////
-/////////////     AliEveTRDLoaderSim        /////////////////////
+/////////////    AliEveTRDLoaderSim  /////////////////////
 ///////////////////////////////////////////////////////////
 
 
-//________________________________________________________
-AliEveTRDLoaderSim::AliEveTRDLoaderSim(const Text_t* n, const Text_t* t) : AliEveTRDLoader(n, t)
-{
-       fRunLoader     = 0x0;
-}
+//______________________________________________________________________________
+AliEveTRDLoaderSim::AliEveTRDLoaderSim(const Text_t* n, const Text_t* t) :
+  AliEveTRDLoader(n, t),
+  fRunLoader(0)
+{}
 
-//________________________________________________________
+//______________________________________________________________________________
 AliEveTRDLoaderSim::~AliEveTRDLoaderSim()
 {}
 
-//________________________________________________________
+//______________________________________________________________________________
 Bool_t AliEveTRDLoaderSim::GoToEvent(int ev)
 {
-       if(!fChildren.size()){
-               AliWarning("Please select first the chamber that you want to monitor from \"Chamber(s) selector\".");
-               return kFALSE;
-       }
-       if(!kLoadHits && !kLoadDigits && !kLoadClusters && !kLoadTracks){
-               AliWarning("Please select first the type of data that you want to monitor and then hit the \"Load\" button.");
-               return kFALSE;
-       }
-
-       fEvent = ev;
-
-       if(!fRunLoader){
-               AliError("RunLoader not initialized.");
-               return kFALSE;
-       }
-       fRunLoader->UnloadAll("TRD");
-       Unload();
-
-       if(fRunLoader->GetEvent(ev)) return kFALSE;
-       TTree *t = 0x0;
-       if(kLoadHits){
-               fRunLoader->LoadHits("TRD", "READ");
-               t = fRunLoader->GetTreeH("TRD", kFALSE);
-               if(!t) return kFALSE;
-               fTRD->SetTreeAddress();
-               if(!LoadHits(t)) return kFALSE;
-       }
-       if(kLoadDigits){
-               fRunLoader->LoadDigits("TRD", "READ");
-               t = fRunLoader->GetTreeD("TRD", kFALSE);
-               if(!t) return kFALSE;
-               fTRD->SetTreeAddress();
-               if(!LoadDigits(t)) return kFALSE;
-       }
-       if(kLoadClusters){
-               fRunLoader->LoadRecPoints("TRD", "READ");
-               t = fRunLoader->GetTreeR("TRD", kFALSE);
-               if(!t) return kFALSE;
-               if(!LoadClusters(t)) return kFALSE;
-       }
-       if(kLoadTracks){
-               fRunLoader->LoadTracks("TRD", "READ");
-               t = fRunLoader->GetTreeT("TRD", kFALSE);
-               if(!t) return kFALSE;
-               if(!LoadTracklets(t)) return kFALSE;
-       }
-
-       gEve->Redraw3D();
-       return kTRUE;
+  if(!fChildren.size()){
+    AliWarning("Please select first the chamber that you want to monitor from \"Chamber(s) selector\".");
+    return kFALSE;
+  }
+  if(!fLoadHits && !fLoadDigits && !fLoadClusters && !fLoadTracks){
+    AliWarning("Please select first the type of data that you want to monitor and then hit the \"Load\" button.");
+    return kFALSE;
+  }
+
+  fEvent = ev;
+
+  if(!fRunLoader){
+    AliError("RunLoader not initialized.");
+    return kFALSE;
+  }
+  fRunLoader->UnloadAll("TRD");
+  Unload();
+
+  if(fRunLoader->GetEvent(ev)) return kFALSE;
+  TTree *t = 0;
+  if(fLoadHits){
+    fRunLoader->LoadHits("TRD", "READ");
+    t = fRunLoader->GetTreeH("TRD", kFALSE);
+    if(!t) return kFALSE;
+    fTRD->SetTreeAddress();
+    if(!LoadHits(t)) return kFALSE;
+  }
+  if(fLoadDigits){
+    fRunLoader->LoadDigits("TRD", "READ");
+    t = fRunLoader->GetTreeD("TRD", kFALSE);
+    if(!t) return kFALSE;
+    fTRD->SetTreeAddress();
+    if(!LoadDigits(t)) return kFALSE;
+  }
+  if(fLoadClusters){
+    fRunLoader->LoadRecPoints("TRD", "READ");
+    t = fRunLoader->GetTreeR("TRD", kFALSE);
+    if(!t) return kFALSE;
+    if(!LoadClusters(t)) return kFALSE;
+  }
+  if(fLoadTracks){
+    fRunLoader->LoadTracks("TRD", "READ");
+    t = fRunLoader->GetTreeT("TRD", kFALSE);
+    if(!t) return kFALSE;
+    if(!LoadTracklets(t)) return kFALSE;
+  }
+
+  gEve->Redraw3D();
+  return kTRUE;
 }
 
 
-//________________________________________________________
+//______________________________________________________________________________
 Bool_t AliEveTRDLoaderSim::LoadHits(TTree *tH)
 {
-       Info("LoadHits()", "Loading ...");
-       if(!fChildren.size()) return kTRUE;
-
-       AliEveTRDChamber *chmb = 0x0;
-       AliTRDhit *hit = 0x0;
-       Int_t d;
-       for(int iTrack=0; iTrack<tH->GetEntries(); iTrack++){
-               gAlice->ResetHits();
-               if(!tH->GetEvent(iTrack)) continue;
-               hit = (AliTRDhit*)fTRD->FirstHit(-1);
-               if(!hit) continue;
-               d = hit->GetDetector();
-               chmb = GetChamber(d);
-               while(hit){
-                       if(d != hit->GetDetector()){
-                               d = hit->GetDetector();
-                               chmb = GetChamber(d);
-                       }
-                       if(chmb) chmb->AddHit(hit);
-                       hit = (AliTRDhit*)fTRD->NextHit();
-               }
-       }
-       return kTRUE;
+  Info("LoadHits()", "Loading ...");
+  if(!fChildren.size()) return kTRUE;
+
+  AliEveTRDChamber *chmb = 0x0;
+  AliTRDhit *hit = 0x0;
+  Int_t d;
+  for(int iTrack=0; iTrack<tH->GetEntries(); iTrack++){
+    gAlice->ResetHits();
+    if(!tH->GetEvent(iTrack)) continue;
+    hit = (AliTRDhit*)fTRD->FirstHit(-1);
+    if(!hit) continue;
+    d = hit->GetDetector();
+    chmb = GetChamber(d);
+    while(hit){
+      if(d != hit->GetDetector()){
+        d = hit->GetDetector();
+        chmb = GetChamber(d);
+      }
+      if(chmb) chmb->AddHit(hit);
+      hit = (AliTRDhit*)fTRD->NextHit();
+    }
+  }
+  return kTRUE;
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 Bool_t AliEveTRDLoaderSim::Open(const char *filename, const char *dir)
 {
-       //Info("Open()", "");
+  //Info("Open()", "");
 
 
-       fFilename = filename;
-       fDir = dir;
-       fDir += "/";
+  fFilename = filename;
+  fDir = dir;
+  fDir += "/";
 
-       fRunLoader = AliRunLoader::GetRunLoader();
-       if(!fRunLoader) fRunLoader = AliRunLoader::Open(filename,
-                               AliConfig::GetDefaultEventFolderName(),"read");
-       if(!fRunLoader){
-               AliError("Couldn't find run loader");
-               return kFALSE;
-       }
-       fRunLoader->SetDirName(fDir);
+  fRunLoader = AliRunLoader::GetRunLoader();
+  if(!fRunLoader) fRunLoader = AliRunLoader::Open(filename,
+                                                  AliConfig::GetDefaultEventFolderName(),"read");
+  if(!fRunLoader){
+    AliError("Couldn't find run loader");
+    return kFALSE;
+  }
+  fRunLoader->SetDirName(fDir);
 
-       gAlice = fRunLoader->GetAliRun();
+  gAlice = fRunLoader->GetAliRun();
   if(!gAlice) fRunLoader->LoadgAlice();
-       if(!gAlice){
-               AliError("Couldn't find gAlice object");
-               return kFALSE;
-       }
-       fTRD = (AliTRDv1*)gAlice->GetDetector("TRD");
-       if(!fTRD){
-               AliError("Couldn't find TRD");
-               return kFALSE;
-       }
-
-       return kTRUE;
+  if(!gAlice){
+    AliError("Couldn't find gAlice object");
+    return kFALSE;
+  }
+  fTRD = (AliTRDv1*)gAlice->GetDetector("TRD");
+  if(!fTRD){
+    AliError("Couldn't find TRD");
+    return kFALSE;
+  }
+
+  return kTRUE;
 }
 
 
 
 ///////////////////////////////////////////////////////////
-/////////////     AliEveTRDLoaderRaw        /////////////////////
+/////////////   AliEveTRDLoaderRaw    /////////////////////
 ///////////////////////////////////////////////////////////
 
 
-//________________________________________________________
-AliEveTRDLoaderRaw::AliEveTRDLoaderRaw(const Text_t* n, const Text_t* t) : AliEveTRDLoader(n, t)
-{
-       fRawDateReader = 0x0;
-       fRawRootReader = 0x0;
-       fRaw           = 0x0;
-       fDataRoot      = kTRUE;
-       fEventOld      = -1;
-}
+//______________________________________________________________________________
+AliEveTRDLoaderRaw::AliEveTRDLoaderRaw(const Text_t* n, const Text_t* t) :
+  AliEveTRDLoader(n, t),
+  fRawDateReader (0),
+  fRawRootReader (0),
+  fRaw           (0),
+  fDataRoot      (kTRUE),
+  fEventOld      (-1)
+{}
 
-//________________________________________________________
+//______________________________________________________________________________
 AliEveTRDLoaderRaw::~AliEveTRDLoaderRaw()
-{
-
-}
+{}
 
 
-//________________________________________________________
+//______________________________________________________________________________
 Bool_t  AliEveTRDLoaderRaw::Open(const char *filename, const char *dir)
 {
-//     Info("Open()", Form("Open %s/%s", dir, filename));
-       fFilename = filename;
-       fDir = dir;
-       fDir += "/";
+  //   Info("Open()", Form("Open %s/%s", dir, filename));
+  fFilename = filename;
+  fDir = dir;
+  fDir += "/";
 
 
-       if(fRaw) delete fRaw;
-       fRaw = new AliTRDrawData();
+  if(fRaw) delete fRaw;
+  fRaw = new AliTRDrawData();
 
-       if(fDataRoot){
-               if(fRawRootReader) delete fRawRootReader;
-               fRawRootReader = new AliRawReaderRoot(filename);
-       } else {
-               if(fRawDateReader) delete fRawDateReader;
-               fRawDateReader = new AliRawReaderDate(fDir+fFilename);
-       }
+  if(fDataRoot){
+    if(fRawRootReader) delete fRawRootReader;
+    fRawRootReader = new AliRawReaderRoot(filename);
+  } else {
+    if(fRawDateReader) delete fRawDateReader;
+    fRawDateReader = new AliRawReaderDate(fDir+fFilename);
+  }
 
-       return kTRUE;
+  return kTRUE;
 }
 
-//________________________________________________________
-void   AliEveTRDLoaderRaw::SetDataType(TRDDataTypes type)
+//______________________________________________________________________________
+void AliEveTRDLoaderRaw::SetDataType(TRDDataTypes type)
 {
-       fDataRoot = (type == kRawRoot) ? kTRUE : kFALSE;
+  fDataRoot = (type == kRawRoot) ? kTRUE : kFALSE;
 }
 
-//________________________________________________________
-Bool_t AliEveTRDLoaderRaw::GoToEvent(int ev)
+//______________________________________________________________________________
+Bool_t AliEveTRDLoaderRaw::GoToEvent(int ev)
 {
-       if(!fChildren.size()){
-               AliWarning("Please select first the chamber that you want to monitor from \"Chamber(s) selector\".");
-               return kFALSE;
-       }
-
-       static const TEveException eH("AliEveTRDLoader::GotoEvent ");
-       if(fRawRootReader == 0x0) throw(eH + "data file not opened.");
-
-
-       if(ev == fEventOld) return kTRUE;
-       Bool_t checkEnd;
-       if(ev < fEventOld) {
-               fRawRootReader->RewindEvents();
-               fEventOld = -1;
-               checkEnd = kFALSE;
-       } else checkEnd = kTRUE;
-
-       do NextEvent(); while(fEventOld != ev && !(checkEnd == kTRUE && fEventOld == 0));
-       LoadEvent();
-       gEve->Redraw3D();
-       //gEve->EnableRedraw();
-       return kTRUE;
+  if(!fChildren.size()){
+    AliWarning("Please select first the chamber that you want to monitor from \"Chamber(s) selector\".");
+    return kFALSE;
+  }
+
+  static const TEveException eH("AliEveTRDLoader::GotoEvent ");
+  if(fRawRootReader == 0x0) throw(eH + "data file not opened.");
+
+
+  if(ev == fEventOld) return kTRUE;
+  Bool_t checkEnd;
+  if(ev < fEventOld) {
+    fRawRootReader->RewindEvents();
+    fEventOld = -1;
+    checkEnd = kFALSE;
+  } else checkEnd = kTRUE;
+
+  do NextEvent(); while(fEventOld != ev && !(checkEnd == kTRUE && fEventOld == 0));
+  LoadEvent();
+  gEve->Redraw3D();
+  //gEve->EnableRedraw();
+  return kTRUE;
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 Bool_t AliEveTRDLoaderRaw::LoadEvent()
 {
-       Info("LoadEvent()", "Loading ...");
+  Info("LoadEvent()", "Loading ...");
 
-       static const TEveException eH("AliEveTRDLoader::LoadEvent ");
-       if(fRawRootReader == 0x0) throw(eH + "data file not opened.");
+  static const TEveException eH("AliEveTRDLoader::LoadEvent ");
+  if(fRawRootReader == 0x0) throw(eH + "data file not opened.");
 
 
-       fRawRootReader->Reset();
+  fRawRootReader->Reset();
 
-       AliEveTRDChamber *chmb;
-       AliTRDdigitsManager *dm;
-       dm = fRaw->Raw2Digits(fRawRootReader);
+  AliEveTRDChamber *chmb;
+  AliTRDdigitsManager *dm;
+  dm = fRaw->Raw2Digits(fRawRootReader);
 
-       for(int idet=0; idet<540; idet++){
-               if(!(chmb=GetChamber(idet))) continue;
-               chmb->LoadDigits(dm);
-       }
-       return kTRUE;
+  for(int idet=0; idet<540; idet++){
+    if(!(chmb=GetChamber(idet))) continue;
+    chmb->LoadDigits(dm);
+  }
+  return kTRUE;
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDLoaderRaw::NextEvent(Bool_t rewindOnEnd)
 {
-       static const TEveException eH("AliEveTRDLoader::NextEvent ");
-       if(fRawRootReader == 0x0) throw(eH + "data file not opened.");
-
-
-       if(fRawRootReader->NextEvent() == kTRUE) ++fEventOld;
-       else {
-               if(fEventOld == -1) throw(eH + "no events available.");
-               if(rewindOnEnd) {
-                       Warning("NextEvent()", Form("Reached end of stream (event=%d), rewinding to first event.", fEventOld));
-                       fRawRootReader->RewindEvents();
-                       fRawRootReader->NextEvent();
-                       fEventOld = 0;
-               } else throw(eH + "last event reached.");
-       }
+  static const TEveException eH("AliEveTRDLoader::NextEvent ");
+  if(fRawRootReader == 0x0) throw(eH + "data file not opened.");
+
+
+  if(fRawRootReader->NextEvent() == kTRUE) ++fEventOld;
+  else {
+    if(fEventOld == -1) throw(eH + "no events available.");
+    if(rewindOnEnd) {
+      Warning("NextEvent()", Form("Reached end of stream (event=%d), rewinding to first event.", fEventOld));
+      fRawRootReader->RewindEvents();
+      fRawRootReader->NextEvent();
+      fEventOld = 0;
+    } else throw(eH + "last event reached.");
+  }
 }
 
 
 
 ///////////////////////////////////////////////////////////
-/////////////   AliEveTRDLoaderSimEditor    /////////////////////
+//////////// AliEveTRDLoaderSimEditor /////////////////////
 ///////////////////////////////////////////////////////////
 
-//________________________________________________________
-AliEveTRDLoaderSimEditor::AliEveTRDLoaderSimEditor(const TGWindow* p, Int_t width, Int_t height, UInt_t options, Pixel_t back) : TGedFrame(p, width, height, options | kVerticalFrame, back)
+//______________________________________________________________________________
+AliEveTRDLoaderSimEditor::AliEveTRDLoaderSimEditor(const TGWindow* p, Int_t width, Int_t height,
+                                                   UInt_t options, Pixel_t back) :
+  TGedFrame(p, width, height, options | kVerticalFrame, back),
+  fM(0), fLoadHits(0), fLoadDigits(0), fLoadClusters(0), fLoadTracks(0)
 {
-       MakeTitle("AliEveTRDLoaderSim");
+  MakeTitle("AliEveTRDLoaderSim");
 
-       // "Data selector" group frame
-       TGGroupFrame *fGroupFrame = new TGGroupFrame(this,"Data selector");
-       fLoadHits = new TGCheckButton(fGroupFrame,"  Hits");
-       fLoadHits->Connect("Clicked()", "AliEveTRDLoaderSimEditor", this, "Toggle(=0)");
-       fGroupFrame->AddFrame(fLoadHits, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+  // "Data selector" group frame
+  TGGroupFrame *fGroupFrame = new TGGroupFrame(this,"Data selector");
+  fLoadHits = new TGCheckButton(fGroupFrame,"  Hits");
+  fLoadHits->Connect("Clicked()", "AliEveTRDLoaderSimEditor", this, "Toggle(=0)");
+  fGroupFrame->AddFrame(fLoadHits, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
 
-       fLoadDigits = new TGCheckButton(fGroupFrame,"  Digits");
-       fLoadDigits->Connect("Clicked()", "AliEveTRDLoaderSimEditor", this, "Toggle(=1)");
-       fGroupFrame->AddFrame(fLoadDigits, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+  fLoadDigits = new TGCheckButton(fGroupFrame,"  Digits");
+  fLoadDigits->Connect("Clicked()", "AliEveTRDLoaderSimEditor", this, "Toggle(=1)");
+  fGroupFrame->AddFrame(fLoadDigits, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
 
-       fLoadClusters = new TGCheckButton(fGroupFrame,"  Clusters");
-       fLoadClusters->Connect("Clicked()", "AliEveTRDLoaderSimEditor", this, "Toggle(=2)");
-       fGroupFrame->AddFrame(fLoadClusters, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+  fLoadClusters = new TGCheckButton(fGroupFrame,"  Clusters");
+  fLoadClusters->Connect("Clicked()", "AliEveTRDLoaderSimEditor", this, "Toggle(=2)");
+  fGroupFrame->AddFrame(fLoadClusters, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
 
-       fLoadTracks = new TGCheckButton(fGroupFrame,"  Tracklets ");
-       fLoadTracks->Connect("Clicked()", "AliEveTRDLoaderSimEditor", this, "Toggle(=3)");
-       fGroupFrame->AddFrame(fLoadTracks, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+  fLoadTracks = new TGCheckButton(fGroupFrame,"  Tracklets ");
+  fLoadTracks->Connect("Clicked()", "AliEveTRDLoaderSimEditor", this, "Toggle(=3)");
+  fGroupFrame->AddFrame(fLoadTracks, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
 
-       fGroupFrame->SetLayoutManager(new TGVerticalLayout(fGroupFrame));
-//     fGroupFrame->Resize(164,116);
-       AddFrame(fGroupFrame, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+  fGroupFrame->SetLayoutManager(new TGVerticalLayout(fGroupFrame));
+  //   fGroupFrame->Resize(164,116);
+  AddFrame(fGroupFrame, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 AliEveTRDLoaderSimEditor::~AliEveTRDLoaderSimEditor()
 {}
 
-//_________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDLoaderSimEditor::SetModel(TObject* obj)
 {
-       fM = dynamic_cast<AliEveTRDLoaderSim*>(obj);
-
-       Bool_t kFile = kTRUE;
-       if(fM->fFilename.CompareTo("") == 0) kFile = kFALSE;
-
-/*     printf("\thits      %s\n", fM->kLoadHits ? "true" : "false");
-       printf("\tdigits    %s\n", fM->kLoadDigits ? "true" : "false");
-       printf("\tclusters  %s\n", fM->kLoadClusters ? "true" : "false");
-       printf("\ttracklets %s\n", fM->kLoadTracks ? "true" : "false");*/
-       fLoadHits->SetEnabled(kFile);
-       if(kFile) fLoadHits->SetState(fM->kLoadHits ? kButtonDown : kButtonUp);
-       fLoadDigits->SetEnabled(kFile);
-       if(kFile) fLoadDigits->SetState(fM->kLoadDigits ? kButtonDown : kButtonUp);
-       fLoadClusters->SetEnabled(kFile);
-       if(kFile) fLoadClusters->SetState(fM->kLoadClusters ? kButtonDown : kButtonUp);
-       fLoadTracks->SetEnabled(kFile);
-       if(kFile) fLoadTracks->SetState(fM->kLoadTracks ? kButtonDown : kButtonUp);
+  fM = dynamic_cast<AliEveTRDLoaderSim*>(obj);
+
+  Bool_t kFile = kTRUE;
+  if(fM->fFilename.CompareTo("") == 0) kFile = kFALSE;
+
+  /*   printf("\thits      %s\n", fM->fLoadHits ? "true" : "false");
+    printf("\tdigits    %s\n", fM->fLoadDigits ? "true" : "false");
+    printf("\tclusters  %s\n", fM->fLoadClusters ? "true" : "false");
+    printf("\ttracklets %s\n", fM->fLoadTracks ? "true" : "false");*/
+  fLoadHits->SetEnabled(kFile);
+  if(kFile) fLoadHits->SetState(fM->fLoadHits ? kButtonDown : kButtonUp);
+  fLoadDigits->SetEnabled(kFile);
+  if(kFile) fLoadDigits->SetState(fM->fLoadDigits ? kButtonDown : kButtonUp);
+  fLoadClusters->SetEnabled(kFile);
+  if(kFile) fLoadClusters->SetState(fM->fLoadClusters ? kButtonDown : kButtonUp);
+  fLoadTracks->SetEnabled(kFile);
+  if(kFile) fLoadTracks->SetState(fM->fLoadTracks ? kButtonDown : kButtonUp);
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDLoaderSimEditor::Toggle(Int_t id)
 {
-       switch(id){
-       case 0:
-               fM->kLoadHits = fLoadHits->IsDown() ? kTRUE : kFALSE;
-               break;
-       case 1:
-               fM->kLoadDigits = fLoadDigits->IsDown() ? kTRUE : kFALSE;
-               break;
-       case 2:
-               fM->kLoadClusters = fLoadClusters->IsDown() ? kTRUE : kFALSE;
-               break;
-       case 3:
-               fM->kLoadTracks = fLoadTracks->IsDown() ? kTRUE : kFALSE;
-               break;
-       }
+  switch(id){
+    case 0:
+      fM->fLoadHits = fLoadHits->IsDown() ? kTRUE : kFALSE;
+      break;
+    case 1:
+      fM->fLoadDigits = fLoadDigits->IsDown() ? kTRUE : kFALSE;
+      break;
+    case 2:
+      fM->fLoadClusters = fLoadClusters->IsDown() ? kTRUE : kFALSE;
+      break;
+    case 3:
+      fM->fLoadTracks = fLoadTracks->IsDown() ? kTRUE : kFALSE;
+      break;
+  }
 }
 
 ///////////////////////////////////////////////////////////
index 2f3ec44..2cb7f98 100644 (file)
@@ -10,7 +10,7 @@
 #define ALIEVE_TRDLoaderImp_H
 
 ////////////////////////////////////////////////////////////////////////
-//                                                                     // - ALIEVE implementation -
+//                                                                    //
 // Single event loader for the TRD detector
 //    - AliEveTRDLoaderSim - loader for simulations based on gAlice
 //    - AliEveTRDLoaderRaw - loader for raw data
 // by A.Bercuci (A.Bercuci@gsi.de)   Fri Oct 27 2006
 ////////////////////////////////////////////////////////////////////////
 
-#ifndef ALIEVE_TRDLoader_H
 #include "AliEveTRDLoader.h"
-#endif
-
 
 class AliRunLoader;
 class AliTRDrawData;
@@ -30,62 +27,75 @@ class AliRawReaderRoot;
 
 class TGCheckButton;
 
-       class AliEveTRDLoaderSim : public AliEveTRDLoader
-       {
-       friend class AliEveTRDLoaderSimEditor;
-       public:
-               AliEveTRDLoaderSim(const Text_t* n="AliEveTRDLoaderSim", const Text_t* t=0);
-               ~AliEveTRDLoaderSim();
+class AliEveTRDLoaderSim : public AliEveTRDLoader
+{
+  friend class AliEveTRDLoaderSimEditor;
+private:
+  AliEveTRDLoaderSim(const AliEveTRDLoaderSim&);            // Not implemented
+  AliEveTRDLoaderSim& operator=(const AliEveTRDLoaderSim&); // Not implemented
+public:
+  AliEveTRDLoaderSim(const Text_t* n="AliEveTRDLoaderSim", const Text_t* t=0);
+  ~AliEveTRDLoaderSim();
+
+  Bool_t       GoToEvent(int ev);
+  Bool_t       LoadHits(TTree *tH);
+  Bool_t       Open(const char *file, const char *dir=".");
+
+private:
+  AliRunLoader *fRunLoader; // Run Loader
+
+  ClassDef(AliEveTRDLoaderSim, 1); // Alieve loader for the TRD detector (gAlice)
+};
 
-               Bool_t                  GoToEvent(int ev);
-               Bool_t                  LoadHits(TTree *tH);
-               Bool_t                  Open(const char *file, const char *dir=".");
 
-       private:
-               AliRunLoader                    *fRunLoader; // Run Loader
+class AliEveTRDLoaderRaw : public AliEveTRDLoader
+{
+private:
+  AliEveTRDLoaderRaw(const AliEveTRDLoaderRaw&);            // Not implemented
+  AliEveTRDLoaderRaw& operator=(const AliEveTRDLoaderRaw&); // Not implemented
 
-               ClassDef(AliEveTRDLoaderSim, 1) // Alieve loader for the TRD detector (gAlice)
-       };
+public:
+  AliEveTRDLoaderRaw(const Text_t* n="AliEveTRDLoaderRaw", const Text_t* t=0);
+  ~AliEveTRDLoaderRaw();
 
+  Bool_t       GoToEvent(int ev);
+  Bool_t       LoadEvent();
+  Bool_t       Open(const char *file, const char *dir=".");
+  void         SetDataType(TRDDataTypes type);
 
-       class AliEveTRDLoaderRaw : public AliEveTRDLoader
-       {
-       public:
-               AliEveTRDLoaderRaw(const Text_t* n="AliEveTRDLoaderRaw", const Text_t* t=0);
-               ~AliEveTRDLoaderRaw();
+private:
+  void NextEvent(Bool_t rewindOnEnd=kTRUE);
 
-               Bool_t                  GoToEvent(int ev);
-               Bool_t                  LoadEvent();
-               Bool_t                  Open(const char *file, const char *dir=".");
-               void                            SetDataType(TRDDataTypes type);
+private:
+  AliRawReaderDate     *fRawDateReader;
+  AliRawReaderRoot     *fRawRootReader;
+  AliTRDrawData                *fRaw;
+  Bool_t                fDataRoot;
+  Int_t                         fEventOld;
 
+  ClassDef(AliEveTRDLoaderRaw, 1); // Alieve loader for the TRD detector (raw)
+};
 
-       private:
-               void NextEvent(Bool_t rewindOnEnd=kTRUE);
 
-       private:
-               AliRawReaderDate        *fRawDateReader;
-               AliRawReaderRoot        *fRawRootReader;
-               AliTRDrawData                   *fRaw;
-               Bool_t                                          fDataRoot;
-               Int_t                                                   fEventOld;
+class AliEveTRDLoaderSimEditor : public TGedFrame
+{
+private:
+  AliEveTRDLoaderSimEditor(const AliEveTRDLoaderSimEditor&);            // Not implemented
+  AliEveTRDLoaderSimEditor& operator=(const AliEveTRDLoaderSimEditor&); // Not implemented
 
-               ClassDef(AliEveTRDLoaderRaw, 1) // Alieve loader for the TRD detector (raw)
-       };
+public:
+  AliEveTRDLoaderSimEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30,
+                          UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground());
+  ~AliEveTRDLoaderSimEditor();
 
-       class AliEveTRDLoaderSimEditor : public TGedFrame
-       {
-       public:
-               AliEveTRDLoaderSimEditor(const TGWindow* p=0, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
-               ~AliEveTRDLoaderSimEditor();
+  virtual void SetModel(TObject* obj);
+  virtual void Toggle(Int_t id);
 
-               virtual void    SetModel(TObject* obj);
-               virtual void    Toggle(Int_t id);
+protected:
+  AliEveTRDLoaderSim  *fM;
+  TGCheckButton       *fLoadHits, *fLoadDigits, *fLoadClusters, *fLoadTracks;
 
-       protected:
-               AliEveTRDLoaderSim* fM;
-               TGCheckButton *fLoadHits, *fLoadDigits, *fLoadClusters, *fLoadTracks;
+  ClassDef(AliEveTRDLoaderSimEditor,1); // Editor for AliEveTRDLoaderSim
+};
 
-               ClassDef(AliEveTRDLoaderSimEditor,1) // Editor for AliEveTRDLoaderSim
-       };
 #endif
index 62e095a..2a396f0 100644 (file)
@@ -6,6 +6,7 @@
  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
  * full copyright notice.                                                 *
  **************************************************************************/
+
 #include "AliEveTRDLoaderManager.h"
 #include "AliEveTRDLoader.h"
 #include "AliEveTRDLoaderImp.h"
 
 #include "AliLog.h"
 
-using namespace std;
-
-
 ClassImp(AliEveTRDLoaderManager)
 ClassImp(AliEveTRDLoaderManagerEditor)
 
 ///////////////////////////////////////////////////////////
-/////////////         AliEveTRDLoaderManager       //////////////
+/////////        AliEveTRDLoaderManager      //////////////
 ///////////////////////////////////////////////////////////
 
 
-//________________________________________________________
-AliEveTRDLoaderManager::AliEveTRDLoaderManager(const Text_t* n, const Text_t* t) : TEveElementList(n, t)
+//______________________________________________________________________________
+AliEveTRDLoaderManager::AliEveTRDLoaderManager(const Text_t* n, const Text_t* t) :
+  TEveElementList(n, t)
 {
-
+  // Constructor. Noop.
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 AliEveTRDLoaderManager::~AliEveTRDLoaderManager()
 {
-
+  // Destructor. Noop.
 }
 
-//________________________________________________________
-void   AliEveTRDLoaderManager::Add(Int_t type, const Text_t *name, const Text_t *title)
+//______________________________________________________________________________
+void AliEveTRDLoaderManager::Add(Int_t type, const Text_t *name, const Text_t *title)
 {
-       //Info("Add()", Form("type %d, name %s, title %s", type, name, title));
-       AliEveTRDLoader *trdl = 0x0;
-       switch(type){
-       case 0:
-               //fChildren.push_back(new AliEveTRDLoaderSim(name, title));
-               gEve->AddElement(trdl = new AliEveTRDLoaderSim(name, title), this);
-               ((AliEveTRDLoaderSim*)trdl)->FindListTreeItem(gEve->GetListTree())->SetTipText(title);
-               break;
-       case 1:
-       case 2:
-       case 3:
-               //fChildren.push_back(new AliEveTRDLoader(name, title));
-         gEve->AddElement(trdl = new AliEveTRDLoader(name, title), this);
-               trdl->FindListTreeItem(gEve->GetListTree())->SetTipText(title);
-               trdl->SetDataType((TRDDataTypes)type);
-               break;
-       case 4:
-       case 5:
-               //fChildren.push_back(new AliEveTRDLoaderRaw(name, title));
-         gEve->AddElement(trdl = new AliEveTRDLoaderRaw(name, title), this);
-               ((AliEveTRDLoaderRaw*)trdl)->FindListTreeItem(gEve->GetListTree())->SetTipText(title);
-               trdl->SetDataType((TRDDataTypes)type);
-               break;
-       }
-
-       gEve->Redraw3D();
+  //Info("Add()", Form("type %d, name %s, title %s", type, name, title));
+  AliEveTRDLoader *trdl = 0x0;
+  switch(type){
+    case 0:
+      //fChildren.push_back(new AliEveTRDLoaderSim(name, title));
+      gEve->AddElement(trdl = new AliEveTRDLoaderSim(name, title), this);
+      ((AliEveTRDLoaderSim*)trdl)->FindListTreeItem(gEve->GetListTree())->SetTipText(title);
+      break;
+    case 1:
+    case 2:
+    case 3:
+      //fChildren.push_back(new AliEveTRDLoader(name, title));
+      gEve->AddElement(trdl = new AliEveTRDLoader(name, title), this);
+      trdl->FindListTreeItem(gEve->GetListTree())->SetTipText(title);
+      trdl->SetDataType((AliEveTRDLoader::TRDDataTypes)type);
+      break;
+    case 4:
+    case 5:
+      //fChildren.push_back(new AliEveTRDLoaderRaw(name, title));
+      gEve->AddElement(trdl = new AliEveTRDLoaderRaw(name, title), this);
+      ((AliEveTRDLoaderRaw*)trdl)->FindListTreeItem(gEve->GetListTree())->SetTipText(title);
+      trdl->SetDataType((AliEveTRDLoader::TRDDataTypes)type);
+      break;
+  }
+
+  gEve->Redraw3D();
 }
 
 
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDLoaderManager::Paint(Option_t *option)
 {
-       List_i ichmb = fChildren.begin();
-       while(ichmb != fChildren.end()){
-               (dynamic_cast<AliEveTRDLoader*>(*ichmb))->Paint(option);
-               ichmb++;
-       }
+  List_i ichmb = fChildren.begin();
+  while(ichmb != fChildren.end()){
+    (dynamic_cast<AliEveTRDLoader*>(*ichmb))->Paint(option);
+    ichmb++;
+  }
 }
 
-//________________________________________________________
-void   AliEveTRDLoaderManager::Remove(Int_t entry)
+//______________________________________________________________________________
+void AliEveTRDLoaderManager::Remove(Int_t entry)
 {
-       //printf("AliEveTRDLoaderManager::Remove(%d)\n", entry);
-       List_i it = fChildren.begin();
-       for(int i=0; i<entry; i++) it++;
-       gEve->RemoveElement((*it), this);
-       fChildren.erase(it);
+  //printf("AliEveTRDLoaderManager::Remove(%d)\n", entry);
+  List_i it = fChildren.begin();
+  for(int i=0; i<entry; i++) it++;
+  gEve->RemoveElement((*it), this);
+  fChildren.erase(it);
 }
 
 ///////////////////////////////////////////////////////////
-/////////////   AliEveTRDLoaderManagerEditor       //////////////
+//////////   AliEveTRDLoaderManagerEditor       ///////////
 ///////////////////////////////////////////////////////////
 
-//________________________________________________________
-AliEveTRDLoaderManagerEditor::AliEveTRDLoaderManagerEditor(const TGWindow* p, Int_t width, Int_t height, UInt_t options, Pixel_t back) : TGedFrame(p, width, height, options | kVerticalFrame, back)
+//______________________________________________________________________________
+AliEveTRDLoaderManagerEditor::
+AliEveTRDLoaderManagerEditor(const TGWindow* p, Int_t width, Int_t height,
+                            UInt_t options, Pixel_t back) :
+  TGedFrame(p, width, height, options | kVerticalFrame, back),
+  fM(0), fSelector(0), fAdd(0), fRemoveButton(0), fGroupFrame(0), fRemove(0)
 {
-       MakeTitle("AliEveTRDLoaderManager");
-
-//     gClient->GetColorByName("#ffffff", bg);
-//     ChangeBackground(bg);
-
-       // control frame - always there
-       TGHorizontalFrame *fHorizontalFrame539 = new TGHorizontalFrame(this, 300, 26, kHorizontalFrame);//, bg);
-
-       TGLabel *fLabel546 = new TGLabel(fHorizontalFrame539,"Register Loader",TGLabel::GetDefaultGC()(),TGLabel::GetDefaultFontStruct(),kChildFrame);//, bg);
-       fLabel546->SetTextJustify(36);
-       fHorizontalFrame539->AddFrame(fLabel546, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY,2,2,2,2));
-
-       // combo box
-       fSelector = new TGComboBox(fHorizontalFrame539,-1,kHorizontalFrame | kSunkenFrame | kDoubleBorder | kOwnBackground);
-       fSelector->AddEntry("MC (gAlice) ",0);
-       fSelector->AddEntry("Digits ",1);
-       fSelector->AddEntry("Clusters ",2);
-       fSelector->AddEntry("Tracklets ",3);
-       fSelector->AddEntry("Raw (ROOT) ",4);
-       fSelector->AddEntry("Raw (DATE) ",5);
-       fSelector->Resize(136,22);
-       fHorizontalFrame539->AddFrame(fSelector, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY,2,2,2,2));
-
-       fAdd = new TGTextButton(fHorizontalFrame539, "Add");
-       fAdd->SetTextJustify(36);
-       fAdd->Resize(31,22);
-       fAdd->SetToolTipText("Add selected loader to list");
-       fAdd->Connect("Clicked()", "AliEveTRDLoaderManagerEditor", this, "Add()");
-       fHorizontalFrame539->AddFrame(fAdd, new TGLayoutHints(kLHintsLeft | kLHintsCenterX | kLHintsTop | kLHintsCenterY,2,2,2,2));
-       AddFrame(fHorizontalFrame539, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandX,2,2,2,2));
-
-       fGroupFrame = 0x0;
-       fRemove     = 0x0;
+  MakeTitle("AliEveTRDLoaderManager");
+
+  // control frame - always there
+  TGHorizontalFrame *fHorizontalFrame539 = new TGHorizontalFrame(this, 300, 26, kHorizontalFrame);
+
+  TGLabel *fLabel546 = new TGLabel(fHorizontalFrame539,"Register Loader",TGLabel::GetDefaultGC()(),TGLabel::GetDefaultFontStruct(),kChildFrame);
+  fLabel546->SetTextJustify(36);
+  fHorizontalFrame539->AddFrame(fLabel546, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY,2,2,2,2));
+
+  // combo box
+  fSelector = new TGComboBox(fHorizontalFrame539,-1,kHorizontalFrame | kSunkenFrame | kDoubleBorder | kOwnBackground);
+  fSelector->AddEntry("MC (gAlice) ",0);
+  fSelector->AddEntry("Digits ",1);
+  fSelector->AddEntry("Clusters ",2);
+  fSelector->AddEntry("Tracklets ",3);
+  fSelector->AddEntry("Raw (ROOT) ",4);
+  fSelector->AddEntry("Raw (DATE) ",5);
+  fSelector->Resize(136,22);
+  fHorizontalFrame539->AddFrame(fSelector, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY,2,2,2,2));
+
+  fAdd = new TGTextButton(fHorizontalFrame539, "Add");
+  fAdd->SetTextJustify(36);
+  fAdd->Resize(31,22);
+  fAdd->SetToolTipText("Add selected loader to list");
+  fAdd->Connect("Clicked()", "AliEveTRDLoaderManagerEditor", this, "Add()");
+  fHorizontalFrame539->AddFrame(fAdd, new TGLayoutHints(kLHintsLeft | kLHintsCenterX | kLHintsTop | kLHintsCenterY,2,2,2,2));
+  AddFrame(fHorizontalFrame539, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandX,2,2,2,2));
+
+  fGroupFrame = 0;
+  fRemove     = 0;
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 AliEveTRDLoaderManagerEditor::~AliEveTRDLoaderManagerEditor()
 {
 
 }
 
 
-//_________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDLoaderManagerEditor::Add()
 {
-       TGTextLBEntry *entry = (TGTextLBEntry*)fSelector->GetSelectedEntry();
-       if(!entry){
-               AliWarning("Select first the loader type that you want to use from the drop down list.");
-               return;
-       }
-
-       if(!fGroupFrame){
-               // "TRD Loaders" group frame
-               fGroupFrame = new TGGroupFrame(this,"TRD Loaders",kVerticalFrame,TGGroupFrame::GetDefaultGC()(),TGGroupFrame::GetDefaultFontStruct());//, bg);
-               fGroupFrame->SetLayoutManager(new TGVerticalLayout(fGroupFrame));
-               fGroupFrame->Resize(300,128);
-               AddFrame(fGroupFrame, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandX, 2,2,2,2));
-
-               fRemove = new TClonesArray("TGTextButton", 3);
-       }
-
-       char *title[] = {"MC loader", "Single file loader", "Raw data loader"};
-       // char *color[] = {"#ff0000", "#0000ff", "#59d454"};
-       int id = fSelector->GetSelected(), type;
-       switch(id){
-       case 1:
-       case 2:
-       case 3:
-               type = 1;
-               break;
-       case 4:
-       case 5:
-               type = 2;
-               break;
-       default:
-               type = 0;
-               break;
-       }
-
-
-       // horizontal frame
-       TGHorizontalFrame *fHorizontalFrame = new TGHorizontalFrame(fGroupFrame, 264, 26, kHorizontalFrame);//, bg);
-
-//     TGFont *ufont = gClient->GetFont("-*-helvetica-(null)-*-*-0-*-*-*-*-*-*-*");
-//     TGGC   *uGC;           // will reflect user GC changes
-//     // graphics context changes
-//     GCValues_t vall717;
-//     vall717.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures;
-//     gClient->GetColorByName(color[type], vall717.fForeground);
-//     gClient->GetColorByName("#c0c0c0", vall717.fBackground);
-//     vall717.fFillStyle = kFillSolid;
-//     vall717.fFont = ufont->GetFontHandle();
-//     vall717.fGraphicsExposures = kFALSE;
-//     uGC = gClient->GetGC(&vall717, kTRUE);
-
-       TGLabel *fLabel717 = new TGLabel(fHorizontalFrame, entry->GetText()->GetString()/*, uGC->GetGC(), ufont->GetFontStruct(), kChildFrame*/);//, bg);
-       fLabel717->SetTextJustify(36);
-       fHorizontalFrame->AddFrame(fLabel717, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
-
-
-       Int_t nbutton = fM->fChildren.size();
-       fRemoveButton = new((*fRemove)[nbutton]) TGTextButton(fHorizontalFrame, "Remove", nbutton);
-       fRemoveButton->SetTextJustify(36);
-       fRemoveButton->Resize(53,22);
-       fRemoveButton->Connect("Clicked()", "AliEveTRDLoaderManagerEditor", this, Form("Remove(=%d)", nbutton));
-       fRemoveButton->SetToolTipText(Form("Remove %s Loader", entry->GetText()->GetString()));
-       fHorizontalFrame->AddFrame(fRemoveButton, new TGLayoutHints(kLHintsLeft | kLHintsCenterX | kLHintsTop | kLHintsCenterY,2,2,2,2));
-
-       fGroupFrame->AddFrame(fHorizontalFrame, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
-
-
-       MapSubwindows();
-       Resize(GetDefaultSize());
-       MapWindow();
-
-       fM->Add(id, entry->GetText()->GetString(), title[type]);
+  TGTextLBEntry *entry = (TGTextLBEntry*)fSelector->GetSelectedEntry();
+  if(!entry){
+    AliWarning("Select first the loader type that you want to use from the drop down list.");
+    return;
+  }
+
+  if(!fGroupFrame){
+    // "TRD Loaders" group frame
+    fGroupFrame = new TGGroupFrame(this,"TRD Loaders",kVerticalFrame,TGGroupFrame::GetDefaultGC()(),TGGroupFrame::GetDefaultFontStruct());
+    fGroupFrame->SetLayoutManager(new TGVerticalLayout(fGroupFrame));
+    fGroupFrame->Resize(300,128);
+    AddFrame(fGroupFrame, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsExpandX, 2,2,2,2));
+
+    fRemove = new TClonesArray("TGTextButton", 3);
+  }
+
+  char *title[] = {"MC loader", "Single file loader", "Raw data loader"};
+  // char *color[] = {"#ff0000", "#0000ff", "#59d454"};
+  int id = fSelector->GetSelected(), type;
+  switch(id){
+    case 1:
+    case 2:
+    case 3:
+      type = 1;
+      break;
+    case 4:
+    case 5:
+      type = 2;
+      break;
+    default:
+      type = 0;
+      break;
+  }
+
+
+  // horizontal frame
+  TGHorizontalFrame *fHorizontalFrame = new TGHorizontalFrame(fGroupFrame, 264, 26, kHorizontalFrame);
+
+  //   TGFont *ufont = gClient->GetFont("-*-helvetica-(null)-*-*-0-*-*-*-*-*-*-*");
+  //   TGGC   *uGC;           // will reflect user GC changes
+  //   // graphics context changes
+  //   GCValues_t vall717;
+  //   vall717.fMask = kGCForeground | kGCBackground | kGCFillStyle | kGCFont | kGCGraphicsExposures;
+  //   gClient->GetColorByName(color[type], vall717.fForeground);
+  //   gClient->GetColorByName("#c0c0c0", vall717.fBackground);
+  //   vall717.fFillStyle = kFillSolid;
+  //   vall717.fFont = ufont->GetFontHandle();
+  //   vall717.fGraphicsExposures = kFALSE;
+  //   uGC = gClient->GetGC(&vall717, kTRUE);
+
+  TGLabel *fLabel717 = new TGLabel(fHorizontalFrame, entry->GetText()->GetString()/*, uGC->GetGC(), ufont->GetFontStruct(), kChildFrame*/);
+  fLabel717->SetTextJustify(36);
+  fHorizontalFrame->AddFrame(fLabel717, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+
+
+  Int_t nbutton = fM->fChildren.size();
+  fRemoveButton = new((*fRemove)[nbutton]) TGTextButton(fHorizontalFrame, "Remove", nbutton);
+  fRemoveButton->SetTextJustify(36);
+  fRemoveButton->Resize(53,22);
+  fRemoveButton->Connect("Clicked()", "AliEveTRDLoaderManagerEditor", this, Form("Remove(=%d)", nbutton));
+  fRemoveButton->SetToolTipText(Form("Remove %s Loader", entry->GetText()->GetString()));
+  fHorizontalFrame->AddFrame(fRemoveButton, new TGLayoutHints(kLHintsLeft | kLHintsCenterX | kLHintsTop | kLHintsCenterY,2,2,2,2));
+
+  fGroupFrame->AddFrame(fHorizontalFrame, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+
+
+  MapSubwindows();
+  Resize(GetDefaultSize());
+  MapWindow();
+
+  fM->Add(id, entry->GetText()->GetString(), title[type]);
 }
 
 
-//_________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDLoaderManagerEditor::Remove(Int_t entry)
 {
-       TIterator *it = fGroupFrame->GetList()->MakeIterator();
-       int ientry = 0;
-       while(/*TGFrame *f=(TGFrame*)*/it->Next()){
-               //printf("%s\n", f->IsA()->GetName());
-               if(entry == ientry){
-                       //fGroupFrame->RemoveFrame(f);
-                       break;
-               }
-               ientry++;
-       }
-
-
-       MapSubwindows();
-       Resize(GetDefaultSize());
-       MapWindow();
-
-       //fM->Remove(entry);
+  TIterator *it = fGroupFrame->GetList()->MakeIterator();
+  int ientry = 0;
+  while(/*TGFrame *f=(TGFrame*)*/it->Next()){
+    //printf("%s\n", f->IsA()->GetName());
+    if(entry == ientry){
+      //fGroupFrame->RemoveFrame(f);
+      break;
+    }
+    ientry++;
+  }
+
+
+  MapSubwindows();
+  Resize(GetDefaultSize());
+  MapWindow();
+
+  //fM->Remove(entry);
 }
 
-//_________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDLoaderManagerEditor::SetModel(TObject* obj)
 {
-       fM = dynamic_cast<AliEveTRDLoaderManager*>(obj);
+  fM = dynamic_cast<AliEveTRDLoaderManager*>(obj);
 }
 
index 3c078a3..4b74d97 100644 (file)
@@ -6,11 +6,13 @@
  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
  * full copyright notice.                                                 *
  **************************************************************************/
+
 #ifndef ALIEVE_TRDLoaderManager_H
 #define ALIEVE_TRDLoaderManager_H
 
 ////////////////////////////////////////////////////////////////////////
-//                                                                      // - ALIEVE implementation -
+//                                                                      
+// - ALIEVE implementation -
 // Loader manager for the TRD detector
 //    - AliEveTRDLoaderManager - manager of TRD data loaders (simulation + measured)
 //    - AliEveTRDLoaderManagerEditor - UI
 
 #include <TEveElement.h>
 
-#ifndef ROOT_TNamed
 #include <TNamed.h>
-#endif
-
-#ifndef ROOT_TGedFrame
 #include <TGedFrame.h>
-#endif
 
 class TGComboBox;
 class TGTextButton;
 class TClonesArray;
 
 
-       class AliEveTRDLoaderManager : public TEveElementList
-       {
-       friend class AliEveTRDLoaderManagerEditor;
-       public:
-               AliEveTRDLoaderManager(const Text_t* name="AliEveTRDLoader", const Text_t* title=0x0);
-               ~AliEveTRDLoaderManager();
-               void    Paint(Option_t *option);
-
-       protected:
-               void    Add(Int_t type, const Text_t *name, const Text_t *title=0x0);
-               void    Remove(Int_t entry);
-
-               ClassDef(AliEveTRDLoaderManager, 1) // Alieve loaders manager for TRD
-       };
-
-       class AliEveTRDLoaderManagerEditor : public TGedFrame
-       {
-       public:
-               AliEveTRDLoaderManagerEditor(const TGWindow* p=0, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
-               ~AliEveTRDLoaderManagerEditor();
-               virtual void    Add();
-               virtual void    Remove(Int_t entry);
-               virtual void    SetModel(TObject* obj);
-
-       protected:
-               AliEveTRDLoaderManager* fM;
-
-       private:
-               ULong_t bg;        // background color
-               TGComboBox              *fSelector;
-               TGTextButton    *fAdd, *fRemoveButton;
-               TGGroupFrame    *fGroupFrame;
-               TClonesArray    *fRemove;
-
-               ClassDef(AliEveTRDLoaderManagerEditor, 1)// Editor for AliEveTRDLoaderManager
-       };
+class AliEveTRDLoaderManager : public TEveElementList
+{
+  friend class AliEveTRDLoaderManagerEditor;
+private:
+  AliEveTRDLoaderManager(const AliEveTRDLoaderManager&);            // Not implemented
+  AliEveTRDLoaderManager& operator=(const AliEveTRDLoaderManager&); // Not implemented
+public:
+  AliEveTRDLoaderManager(const Text_t* name="AliEveTRDLoader", const Text_t* title=0x0);
+  ~AliEveTRDLoaderManager();
+  void         Paint(Option_t *option);
+
+protected:
+  void Add(Int_t type, const Text_t *name, const Text_t *title=0x0);
+  void Remove(Int_t entry);
+
+  ClassDef(AliEveTRDLoaderManager, 1); // Alieve loaders manager for TRD
+};
+
+
+class AliEveTRDLoaderManagerEditor : public TGedFrame
+{
+private:
+  AliEveTRDLoaderManagerEditor(const AliEveTRDLoaderManagerEditor&);            // Not implemented
+  AliEveTRDLoaderManagerEditor& operator=(const AliEveTRDLoaderManagerEditor&); // Not implemented
+public:
+  AliEveTRDLoaderManagerEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30,
+                              UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground());
+  ~AliEveTRDLoaderManagerEditor();
+
+  virtual void Add();
+  virtual void Remove(Int_t entry);
+  virtual void SetModel(TObject* obj);
+
+protected:
+  AliEveTRDLoaderManager* fM;
+
+private:
+  TGComboBox   *fSelector;
+  TGTextButton *fAdd, *fRemoveButton;
+  TGGroupFrame         *fGroupFrame;
+  TClonesArray *fRemove;              
+
+  ClassDef(AliEveTRDLoaderManagerEditor, 1); // Editor for AliEveTRDLoaderManager
+};
+
 #endif
 
index 1811b4d..c6c0288 100644 (file)
 ClassImp(AliEveTRDModule)
 ClassImp(AliEveTRDModuleEditor)
 
-//________________________________________________________
+//______________________________________________________________________________
 AliEveTRDModule::AliEveTRDModule(const char *typ, Int_t det) :
-  TNamed(Form("%s%03d", typ, det), ""), fDet(det)
-{
-       fLoadHits = kFALSE;
-       fRnrHits = kTRUE;
-
-       fLoadDigits = kFALSE;
-       fRnrDigits = kTRUE;
-       fDigitsLog = kFALSE;
-       fDigitsBox = kFALSE;
+  TNamed(Form("%s%03d", typ, det), ""),
+  fLoadHits (kFALSE),
+  fRnrHits  (kTRUE),
 
-       fLoadRecPoints = kFALSE;
-       fRnrRecPoints = kTRUE;
+  fLoadDigits (kFALSE),
+  fRnrDigits  (kTRUE),
+  fDigitsLog  (kFALSE),
+  fDigitsBox  (kFALSE),
+  fDigitsNeedRecompute (kTRUE),
 
-       fLoadTracklets = kFALSE;
-       fRnrTracklets = kTRUE;
+  fLoadRecPoints (kFALSE),
+  fRnrRecPoints  (kTRUE),
 
-       kDigitsNeedRecompute = kTRUE;
+  fLoadTracklets (kFALSE),
+  fRnrTracklets  (kTRUE),
 
-       fDigitsThreshold = 15;
+  fDet             (det),
+  fDigitsThreshold (15)
+{
+  // Constructor.
 }
 
 
 
 ///////////////////////////////////////////////////////////
-/////////////   AliEveTRDModuleEditor       /////////////////////
+//////////   AliEveTRDModuleEditor       //////////////////
 ///////////////////////////////////////////////////////////
 
-//________________________________________________________
-AliEveTRDModuleEditor::AliEveTRDModuleEditor(const TGWindow* p, Int_t width, Int_t height, UInt_t options, Pixel_t back) : TGedFrame(p, width, height, options | kVerticalFrame, back)
+//______________________________________________________________________________
+AliEveTRDModuleEditor::AliEveTRDModuleEditor(const TGWindow* p, Int_t width, Int_t height,
+                                            UInt_t options, Pixel_t back) :
+  TGedFrame(p, width, height, options | kVerticalFrame, back),
+  fM (0),
+  fDisplayHits(0),
+  fHitsColor(0),
+  fDisplayDigits(0), fToggleLog(0), fToggleBox(0), fThreshold(0),
+  fThresValue(0),
+  fDisplayClusters(0),
+  fClustersColor(0),
+  fDisplayTracks(0)                               
 {
-       MakeTitle("TRD Detector");
-
-       // "Hits" group frame
-       TGGroupFrame *fGroupFrame615 = new TGGroupFrame(this,"Hits");
-       fDisplayHits = new TGCheckButton(fGroupFrame615,"Display");
-       fDisplayHits->SetToolTipText("Display hits attached to chamber");
-       fDisplayHits->SetState(kButtonDown);
-       fGroupFrame615->AddFrame(fDisplayHits, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
-       fDisplayHits->Connect("Clicked()",
-                                       "AliEveTRDModuleEditor", this, "UpdateChamber()");
-
-       // color select widget
-       ULong_t ColPar1;
-       gClient->GetColorByName("#ff00ff", ColPar1);
-       fHitsColor = new TGColorSelect(fGroupFrame615, ColPar1, -1);
-
-       fGroupFrame615->AddFrame(fHitsColor, new TGLayoutHints(kLHintsLeft | kLHintsCenterX | kLHintsTop | kLHintsCenterY,2,2,2,2));
-       fHitsColor->Connect("ColorSelected(Pixel_t)",
-                                       "AliEveTRDModuleEditor", this, "UpdateHits(Pixel_t)");
-
-       fGroupFrame615->SetLayoutManager(new TGVerticalLayout(fGroupFrame615));
-       AddFrame(fGroupFrame615, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
-
-       // "Digits" group frame
-       TGGroupFrame *fGroupFrame636 = new TGGroupFrame(this,"Digits");
-       TGVerticalFrame *fVerticalFrame538 = new TGVerticalFrame(fGroupFrame636,68,63,kVerticalFrame);
-       fDisplayDigits = new TGCheckButton(fVerticalFrame538,"Display");
-       fDisplayDigits->SetState(kButtonDown);
-       fDisplayDigits->SetToolTipText("Toggle display digits attached to chamber");
-       fVerticalFrame538->AddFrame(fDisplayDigits, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
-       fDisplayDigits->Connect("Clicked()",
-                                       "AliEveTRDModuleEditor", this, "UpdateChamber()");
-       fToggleLog = new TGCheckButton(fVerticalFrame538,"Log");
-       fToggleLog->SetState(kButtonUp);
-       fToggleLog->SetToolTipText("Toggle logarithmic representation of digits");
-       fVerticalFrame538->AddFrame(fToggleLog, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
-       fToggleLog->Connect("Clicked()",
-                                       "AliEveTRDModuleEditor", this, "ModifyDigitsView()");
-
-       fToggleBox = new TGCheckButton(fVerticalFrame538,"Box");
-       fToggleBox->SetState(kButtonUp);
-       fToggleBox->SetToolTipText("Toggle display digits as boxes");
-       fVerticalFrame538->AddFrame(fToggleBox, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
-       fToggleBox->Connect("Clicked()",
-                                       "AliEveTRDModuleEditor", this, "ModifyDigitsView()");
-       fGroupFrame636->AddFrame(fVerticalFrame538, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
-
-   TGVertical3DLine *fVertical3DLine773 = new TGVertical3DLine(fGroupFrame636,8,63);
-   fGroupFrame636->AddFrame(fVertical3DLine773, new TGLayoutHints(kLHintsLeft | kLHintsCenterX | kLHintsTop | kLHintsExpandY,2,2,2,2));
-
-        // vertical frame
-       TGVerticalFrame *fVerticalFrame543 = new TGVerticalFrame(fGroupFrame636,81,47,kVerticalFrame);
-       fThreshold = new TGCheckButton(fVerticalFrame543, "Threshold");
-       fThreshold->SetToolTipText("Toggle threshold updating display");
-       fVerticalFrame543->AddFrame(fThreshold, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
-       fThresValue = new TGNumberEntry(fVerticalFrame543, (Int_t)10, 5, -1, TGNumberFormat::kNESInteger, TGNumberFormat::kNEAPositive, TGNumberFormat::kNELLimitMinMax, 0, 1024);
-       fThresValue->Connect("ValueSet(Long_t)",
-                 "AliEveTRDModuleEditor", this, "SetThreshold(Long_t)");
-       fVerticalFrame543->AddFrame(fThresValue, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
-
-       fGroupFrame636->AddFrame(fVerticalFrame543, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
-
-       fGroupFrame636->SetLayoutManager(new TGHorizontalLayout(fGroupFrame636));
-       AddFrame(fGroupFrame636, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
-
-       // "Clusters" group frame
-       TGGroupFrame *fGroupFrame649 = new TGGroupFrame(this,"Clusters");
-       fDisplayClusters = new TGCheckButton(fGroupFrame649,"Display");
-       fDisplayClusters->SetToolTipText("Display clusters attached to chamber");
-       fGroupFrame649->AddFrame(fDisplayClusters, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
-       fDisplayClusters->SetState(kButtonDown);
-       fDisplayClusters->Connect("Clicked()",
-                                       "AliEveTRDModuleEditor", this, "UpdateChamber()");
-
-       // color select widget
-       ULong_t ColPar2;
-       gClient->GetColorByName("#ff00ff", ColPar2);
-       fClustersColor = new TGColorSelect(fGroupFrame649, ColPar2, -1);
-
-       fGroupFrame649->AddFrame(fClustersColor, new TGLayoutHints(kLHintsLeft | kLHintsCenterX | kLHintsTop | kLHintsCenterY,2,2,2,2));
-       fClustersColor->Connect("ColorSelected(Pixel_t)",
-                                       "AliEveTRDModuleEditor", this, "UpdateClusters(Pixel_t)");
-
-       fGroupFrame649->SetLayoutManager(new TGVerticalLayout(fGroupFrame649));
-       AddFrame(fGroupFrame649, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
-
-       // "Tracks" group frame
-       TGGroupFrame *fGroupFrame676 = new TGGroupFrame(this,"Tracklets");
-       fDisplayTracks = new TGCheckButton(fGroupFrame676,"Display");
-       fDisplayTracks->SetToolTipText("Display MCM tracklets attached to chamber");
-       fGroupFrame676->AddFrame(fDisplayTracks, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
-       fDisplayTracks->SetState(kButtonDown);
-       fDisplayTracks->Connect("Clicked()",
-                                       "AliEveTRDModuleEditor", this, "UpdateChamber()");
-
-       fGroupFrame676->SetLayoutManager(new TGVerticalLayout(fGroupFrame676));
-       AddFrame(fGroupFrame676, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+  MakeTitle("TRD Detector");
+
+  // "Hits" group frame
+  TGGroupFrame *fGroupFrame615 = new TGGroupFrame(this,"Hits");
+  fDisplayHits = new TGCheckButton(fGroupFrame615,"Display");
+  fDisplayHits->SetToolTipText("Display hits attached to chamber");
+  fDisplayHits->SetState(kButtonDown);
+  fGroupFrame615->AddFrame(fDisplayHits, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+  fDisplayHits->Connect("Clicked()",
+                       "AliEveTRDModuleEditor", this, "UpdateChamber()");
+
+  // color select widget
+  ULong_t ColPar1;
+  gClient->GetColorByName("#ff00ff", ColPar1);
+  fHitsColor = new TGColorSelect(fGroupFrame615, ColPar1, -1);
+
+  fGroupFrame615->AddFrame(fHitsColor, new TGLayoutHints(kLHintsLeft | kLHintsCenterX | kLHintsTop | kLHintsCenterY,2,2,2,2));
+  fHitsColor->Connect("ColorSelected(Pixel_t)",
+                     "AliEveTRDModuleEditor", this, "UpdateHits(Pixel_t)");
+
+  fGroupFrame615->SetLayoutManager(new TGVerticalLayout(fGroupFrame615));
+  AddFrame(fGroupFrame615, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+
+  // "Digits" group frame
+  TGGroupFrame *fGroupFrame636 = new TGGroupFrame(this,"Digits");
+  TGVerticalFrame *fVerticalFrame538 = new TGVerticalFrame(fGroupFrame636,68,63,kVerticalFrame);
+  fDisplayDigits = new TGCheckButton(fVerticalFrame538,"Display");
+  fDisplayDigits->SetState(kButtonDown);
+  fDisplayDigits->SetToolTipText("Toggle display digits attached to chamber");
+  fVerticalFrame538->AddFrame(fDisplayDigits, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+  fDisplayDigits->Connect("Clicked()",
+                         "AliEveTRDModuleEditor", this, "UpdateChamber()");
+  fToggleLog = new TGCheckButton(fVerticalFrame538,"Log");
+  fToggleLog->SetState(kButtonUp);
+  fToggleLog->SetToolTipText("Toggle logarithmic representation of digits");
+  fVerticalFrame538->AddFrame(fToggleLog, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+  fToggleLog->Connect("Clicked()",
+                     "AliEveTRDModuleEditor", this, "ModifyDigitsView()");
+
+  fToggleBox = new TGCheckButton(fVerticalFrame538,"Box");
+  fToggleBox->SetState(kButtonUp);
+  fToggleBox->SetToolTipText("Toggle display digits as boxes");
+  fVerticalFrame538->AddFrame(fToggleBox, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+  fToggleBox->Connect("Clicked()",
+                     "AliEveTRDModuleEditor", this, "ModifyDigitsView()");
+  fGroupFrame636->AddFrame(fVerticalFrame538, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
+
+  TGVertical3DLine *fVertical3DLine773 = new TGVertical3DLine(fGroupFrame636,8,63);
+  fGroupFrame636->AddFrame(fVertical3DLine773, new TGLayoutHints(kLHintsLeft | kLHintsCenterX | kLHintsTop | kLHintsExpandY,2,2,2,2));
+
+  // vertical frame
+  TGVerticalFrame *fVerticalFrame543 = new TGVerticalFrame(fGroupFrame636,81,47,kVerticalFrame);
+  fThreshold = new TGCheckButton(fVerticalFrame543, "Threshold");
+  fThreshold->SetToolTipText("Toggle threshold updating display");
+  fVerticalFrame543->AddFrame(fThreshold, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+  fThresValue = new TGNumberEntry(fVerticalFrame543, (Int_t)10, 5, -1, TGNumberFormat::kNESInteger, TGNumberFormat::kNEAPositive, TGNumberFormat::kNELLimitMinMax, 0, 1024);
+  fThresValue->Connect("ValueSet(Long_t)",
+                      "AliEveTRDModuleEditor", this, "SetThreshold(Long_t)");
+  fVerticalFrame543->AddFrame(fThresValue, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+
+  fGroupFrame636->AddFrame(fVerticalFrame543, new TGLayoutHints(kLHintsLeft | kLHintsTop,2,2,2,2));
+
+  fGroupFrame636->SetLayoutManager(new TGHorizontalLayout(fGroupFrame636));
+  AddFrame(fGroupFrame636, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+
+  // "Clusters" group frame
+  TGGroupFrame *fGroupFrame649 = new TGGroupFrame(this,"Clusters");
+  fDisplayClusters = new TGCheckButton(fGroupFrame649,"Display");
+  fDisplayClusters->SetToolTipText("Display clusters attached to chamber");
+  fGroupFrame649->AddFrame(fDisplayClusters, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+  fDisplayClusters->SetState(kButtonDown);
+  fDisplayClusters->Connect("Clicked()",
+                           "AliEveTRDModuleEditor", this, "UpdateChamber()");
+
+  // color select widget
+  ULong_t ColPar2;
+  gClient->GetColorByName("#ff00ff", ColPar2);
+  fClustersColor = new TGColorSelect(fGroupFrame649, ColPar2, -1);
+
+  fGroupFrame649->AddFrame(fClustersColor, new TGLayoutHints(kLHintsLeft | kLHintsCenterX | kLHintsTop | kLHintsCenterY,2,2,2,2));
+  fClustersColor->Connect("ColorSelected(Pixel_t)",
+                         "AliEveTRDModuleEditor", this, "UpdateClusters(Pixel_t)");
+
+  fGroupFrame649->SetLayoutManager(new TGVerticalLayout(fGroupFrame649));
+  AddFrame(fGroupFrame649, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+
+  // "Tracks" group frame
+  TGGroupFrame *fGroupFrame676 = new TGGroupFrame(this,"Tracklets");
+  fDisplayTracks = new TGCheckButton(fGroupFrame676,"Display");
+  fDisplayTracks->SetToolTipText("Display MCM tracklets attached to chamber");
+  fGroupFrame676->AddFrame(fDisplayTracks, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
+  fDisplayTracks->SetState(kButtonDown);
+  fDisplayTracks->Connect("Clicked()",
+                         "AliEveTRDModuleEditor", this, "UpdateChamber()");
+
+  fGroupFrame676->SetLayoutManager(new TGVerticalLayout(fGroupFrame676));
+  AddFrame(fGroupFrame676, new TGLayoutHints(kLHintsLeft | kLHintsTop | kLHintsCenterY | kLHintsExpandX,2,2,2,2));
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 AliEveTRDModuleEditor::~AliEveTRDModuleEditor()
 {}
 
-//_________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDModuleEditor::SetModel(TObject* obj)
 {
-// Takes care to update UI state according to model state
-
-       fM = dynamic_cast<AliEveTRDModule*>(obj);
-       if(AliEveTRDNode *node = dynamic_cast<AliEveTRDNode*>(fM)) node->UpdateNode();
-
-       fDisplayHits->SetEnabled(fM->fLoadHits);
-       if(fM->fLoadHits) fDisplayHits->SetState( fM->fRnrHits ? kButtonDown : kButtonUp);
-
-       fDisplayDigits->SetEnabled(fM->fLoadDigits);
-       fToggleLog->SetEnabled(fM->fLoadDigits);
-       fToggleBox->SetEnabled(fM->fLoadDigits);
-       fThreshold->SetEnabled(fM->fLoadDigits);
-       fThresValue->GetNumberEntry()->SetEnabled(fM->fLoadDigits);
-       fThresValue->GetButtonDown()->SetEnabled(fM->fLoadDigits);
-       fThresValue->GetButtonUp()->SetEnabled(fM->fLoadDigits);
-       fThresValue->SetIntNumber(fM->fDigitsThreshold);
-       if(fM->fLoadDigits){
-               fDisplayDigits->SetState(fM->fRnrDigits ? kButtonDown : kButtonUp);
-               fToggleLog->SetState(fM->fDigitsLog ? kButtonDown : kButtonUp);
-               fToggleBox->SetState(fM->fDigitsBox ? kButtonDown : kButtonUp);
-               fThreshold->SetState(fM->kDigitsNeedRecompute ? kButtonDown : kButtonUp);
-       }
-
-       if(fM->fLoadRecPoints) fDisplayClusters->SetState(fM->fRnrRecPoints ? kButtonDown : kButtonUp);
-       else fDisplayClusters->SetEnabled(kFALSE);
-
-       if(fM->fLoadTracklets) fDisplayTracks->SetState(fM->fRnrTracklets ? kButtonDown : kButtonUp);
-       else fDisplayTracks->SetEnabled(kFALSE);
+  // Takes care to update UI state according to model state
+
+  fM = dynamic_cast<AliEveTRDModule*>(obj);
+  if(AliEveTRDNode *node = dynamic_cast<AliEveTRDNode*>(fM)) node->UpdateNode();
+
+  fDisplayHits->SetEnabled(fM->fLoadHits);
+  if(fM->fLoadHits) fDisplayHits->SetState( fM->fRnrHits ? kButtonDown : kButtonUp);
+
+  fDisplayDigits->SetEnabled(fM->fLoadDigits);
+  fToggleLog->SetEnabled(fM->fLoadDigits);
+  fToggleBox->SetEnabled(fM->fLoadDigits);
+  fThreshold->SetEnabled(fM->fLoadDigits);
+  fThresValue->GetNumberEntry()->SetEnabled(fM->fLoadDigits);
+  fThresValue->GetButtonDown()->SetEnabled(fM->fLoadDigits);
+  fThresValue->GetButtonUp()->SetEnabled(fM->fLoadDigits);
+  fThresValue->SetIntNumber(fM->fDigitsThreshold);
+  if(fM->fLoadDigits){
+    fDisplayDigits->SetState(fM->fRnrDigits ? kButtonDown : kButtonUp);
+    fToggleLog->SetState(fM->fDigitsLog ? kButtonDown : kButtonUp);
+    fToggleBox->SetState(fM->fDigitsBox ? kButtonDown : kButtonUp);
+    fThreshold->SetState(fM->fDigitsNeedRecompute ? kButtonDown : kButtonUp);
+  }
+
+  if(fM->fLoadRecPoints) fDisplayClusters->SetState(fM->fRnrRecPoints ? kButtonDown : kButtonUp);
+  else fDisplayClusters->SetEnabled(kFALSE);
+
+  if(fM->fLoadTracklets) fDisplayTracks->SetState(fM->fRnrTracklets ? kButtonDown : kButtonUp);
+  else fDisplayTracks->SetEnabled(kFALSE);
 }
 
-//_________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDModuleEditor::ModifyDigitsView()
 {
-       fM->kDigitsNeedRecompute = kTRUE;
-       UpdateChamber();
+  fM->fDigitsNeedRecompute = kTRUE;
+  UpdateChamber();
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDModuleEditor::SetThreshold(Long_t tres)
 {
-       if(!fM->fLoadDigits) return;
+  if(!fM->fLoadDigits) return;
 
-       fM->fDigitsThreshold = (tres == 0) ? (int)fThresValue->GetNumber():tres;
-       fM->kDigitsNeedRecompute = fThreshold->IsDown();
-       UpdateChamber();
+  fM->fDigitsThreshold = (tres == 0) ? (int)fThresValue->GetNumber():tres;
+  fM->fDigitsNeedRecompute = fThreshold->IsDown();
+  UpdateChamber();
 }
 
 
-//_________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDModuleEditor::UpdateChamber()
 {
-//     Info("UpdateChamber()", "");
+  //   Info("UpdateChamber()", "");
 
-       fM->fRnrHits = kFALSE;
-       if(fDisplayHits->IsDown()) fM->fRnrHits = kTRUE;
+  fM->fRnrHits = kFALSE;
+  if(fDisplayHits->IsDown()) fM->fRnrHits = kTRUE;
 
-       fM->fRnrDigits = kFALSE;
-       if(fDisplayDigits->IsDown()){
-               fM->fRnrDigits = kTRUE;
-               if(fToggleLog->IsDown()) fM->fDigitsLog = kTRUE;
-               else  fM->fDigitsLog = kFALSE;
-               if(fToggleBox->IsDown()) fM->fDigitsBox = kTRUE;
-               else  fM->fDigitsBox = kFALSE;
-       }
+  fM->fRnrDigits = kFALSE;
+  if(fDisplayDigits->IsDown()){
+    fM->fRnrDigits = kTRUE;
+    if(fToggleLog->IsDown()) fM->fDigitsLog = kTRUE;
+    else  fM->fDigitsLog = kFALSE;
+    if(fToggleBox->IsDown()) fM->fDigitsBox = kTRUE;
+    else  fM->fDigitsBox = kFALSE;
+  }
 
-       fM->fRnrRecPoints = kFALSE;
-       if(fDisplayClusters->IsDown()) fM->fRnrRecPoints = kTRUE;
+  fM->fRnrRecPoints = kFALSE;
+  if(fDisplayClusters->IsDown()) fM->fRnrRecPoints = kTRUE;
 
-       fM->fRnrTracklets = kFALSE;
-       if(fDisplayTracks->IsDown()) fM->fRnrTracklets = kTRUE;
+  fM->fRnrTracklets = kFALSE;
+  if(fDisplayTracks->IsDown()) fM->fRnrTracklets = kTRUE;
 
-       if(dynamic_cast<AliEveTRDNode*>(fM)) (dynamic_cast<AliEveTRDNode*>(fM))->UpdateLeaves();
+  if(dynamic_cast<AliEveTRDNode*>(fM)) (dynamic_cast<AliEveTRDNode*>(fM))->UpdateLeaves();
 
-       gEve->Redraw3D();
+  gEve->Redraw3D();
 }
 
-//_________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDModuleEditor::UpdateClusters(Pixel_t /*col*/)
 {
-//     Info("UpdateClusters()","");
-/*
-       if(fM->fRecPoints){
-               fM->fRecPoints->SetMarkerColor(col ? fHitsColor->GetColor() : col);
-               gEve->Redraw3D();
-       }
-*/
+  //   Info("UpdateClusters()","");
+  /*
+    if(fM->fRecPoints){
+    fM->fRecPoints->SetMarkerColor(col ? fHitsColor->GetColor() : col);
+    gEve->Redraw3D();
+    }
+  */
 }
 
-//_________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDModuleEditor::UpdateHits(Pixel_t /*col*/)
 {
-//     Info("UpdateHits()","");
-/*
-       if(fM->fHits){
-               fM->fHits->SetMarkerColor(col ? fClustersColor->GetColor() : col);
-               gEve->Redraw3D();
-       }
-*/
+  //   Info("UpdateHits()","");
+  /*
+    if(fM->fHits){
+    fM->fHits->SetMarkerColor(col ? fClustersColor->GetColor() : col);
+    gEve->Redraw3D();
+    }
+  */
 }
index 25881db..c1dc3f1 100644 (file)
@@ -6,6 +6,7 @@
  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
  * full copyright notice.                                                 *
  **************************************************************************/
+
 #ifndef ALIEVE_TRDModule_H
 #define ALIEVE_TRDModule_H
 
@@ -34,63 +35,75 @@ class TGNumberEntry;
 class TGColorSelect;
 
 
-       class AliEveTRDModule : public TNamed
-       {
-       friend class AliEveTRDModuleEditor;
-       friend class AliEveTRDNode;
-       friend class AliEveTRDChamber;
-       public:
-               AliEveTRDModule(const char *typ="XXX", Int_t id=0);
-               virtual ~AliEveTRDModule() {}
-
-               virtual Bool_t GetDigitsBox(){return fDigitsBox;}
-               virtual Bool_t GetDigitsLog(){return fDigitsLog;}
-               virtual UShort_t GetDigitsThreshold(){return fDigitsThreshold;}
-               virtual Int_t   GetID(){return fDet;}
-               virtual void    Paint(Option_t* option="")=0;
-               virtual void    Reset()=0;
-
-       protected:
-               // UI section
-               Bool_t  fLoadHits, fRnrHits;
-               Bool_t  fLoadDigits, fRnrDigits, fDigitsLog, fDigitsBox;
-               Bool_t  kDigitsNeedRecompute;
-
-               Bool_t  fLoadRecPoints, fRnrRecPoints;
-               Bool_t  fLoadTracklets, fRnrTracklets;
-
-               Int_t fDet; // detector number
-               UShort_t        fDigitsThreshold; // digits threshold
-       ClassDef(AliEveTRDModule,1) // Structure holder for TRD chamber
-       };
-
-
-       class AliEveTRDModuleEditor : public TGedFrame
-       {
-       public:
-               AliEveTRDModuleEditor(const TGWindow* p=0, Int_t width = 170, Int_t height = 30, UInt_t options = kChildFrame, Pixel_t back = GetDefaultFrameBackground());
-               ~AliEveTRDModuleEditor();
-
-               virtual void SetModel(TObject* obj);
-
-               void    ModifyDigitsView();
-               void    SetThreshold(Long_t thres);
-               void    UpdateChamber();
-               void    UpdateClusters(Pixel_t);
-               void    UpdateHits(Pixel_t);
-
-       protected:
-               AliEveTRDModule* fM;
-
-       private:
-               TGCheckButton *fDisplayHits;
-               TGColorSelect *fHitsColor;
-               TGCheckButton *fDisplayDigits, *fToggleLog, *fToggleBox, *fThreshold;
-               TGNumberEntry   *fThresValue;
-               TGCheckButton *fDisplayClusters;
-               TGColorSelect *fClustersColor;
-               TGCheckButton *fDisplayTracks;
-
-       ClassDef(AliEveTRDModuleEditor,1) // Editor for AliEveTRDModule
-       };
+class AliEveTRDModule : public TNamed
+{
+  friend class AliEveTRDModuleEditor;
+  friend class AliEveTRDNode;
+  friend class AliEveTRDChamber;
+
+private:
+  AliEveTRDModule(const AliEveTRDModule&);            // Not implemented
+  AliEveTRDModule& operator=(const AliEveTRDModule&); // Not implemented
+
+public:
+  AliEveTRDModule(const char *typ="XXX", Int_t id=0);
+  virtual ~AliEveTRDModule() {}
+
+  virtual Bool_t GetDigitsBox(){return fDigitsBox;}
+  virtual Bool_t GetDigitsLog(){return fDigitsLog;}
+  virtual UShort_t GetDigitsThreshold(){return fDigitsThreshold;}
+  virtual Int_t        GetID(){return fDet;}
+  virtual void Paint(Option_t* option="")=0;
+  virtual void Reset()=0;
+
+protected:
+  // UI section
+  Bool_t       fLoadHits, fRnrHits;
+  Bool_t       fLoadDigits, fRnrDigits, fDigitsLog, fDigitsBox;
+  Bool_t       fDigitsNeedRecompute;
+
+  Bool_t       fLoadRecPoints, fRnrRecPoints;
+  Bool_t       fLoadTracklets, fRnrTracklets;
+
+  Int_t         fDet;             // detector number
+  UShort_t     fDigitsThreshold; // digits threshold
+
+  ClassDef(AliEveTRDModule,1); // Structure holder for TRD chamber
+};
+
+
+class AliEveTRDModuleEditor : public TGedFrame
+{
+private:
+  AliEveTRDModuleEditor(const AliEveTRDModuleEditor&);            // Not implemented
+  AliEveTRDModuleEditor& operator=(const AliEveTRDModuleEditor&); // Not implemented
+
+public:
+  AliEveTRDModuleEditor(const TGWindow* p=0, Int_t width=170, Int_t height=30,
+                       UInt_t options=kChildFrame, Pixel_t back=GetDefaultFrameBackground());
+  ~AliEveTRDModuleEditor();
+
+  virtual void SetModel(TObject* obj);
+
+  void ModifyDigitsView();
+  void SetThreshold(Long_t thres);
+  void UpdateChamber();
+  void UpdateClusters(Pixel_t);
+  void UpdateHits(Pixel_t);
+
+protected:
+  AliEveTRDModule* fM;
+
+private:
+  TGCheckButton *fDisplayHits;
+  TGColorSelect *fHitsColor;
+  TGCheckButton *fDisplayDigits, *fToggleLog, *fToggleBox, *fThreshold;
+  TGNumberEntry        *fThresValue;
+  TGCheckButton *fDisplayClusters;
+  TGColorSelect *fClustersColor;
+  TGCheckButton *fDisplayTracks;
+
+  ClassDef(AliEveTRDModuleEditor,1); // Editor for AliEveTRDModule
+};
+
 #endif
index df97c5b..fcd45d5 100644 (file)
@@ -6,6 +6,7 @@
  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
  * full copyright notice.                                                 *
  **************************************************************************/
+
 #include "AliEveTRDModuleImp.h"
 #include "AliEveTRDData.h"
 
 #include "AliTRDdataArrayI.h"
 #include "AliTRDmcmTracklet.h"
 
-using namespace std;
-
 ClassImp(AliEveTRDChamber)
 ClassImp(AliEveTRDNode)
 
-//________________________________________________________
+//______________________________________________________________________________
 AliEveTRDNode::AliEveTRDNode(const char *typ, Int_t det) :
   TEveElement(), AliEveTRDModule(typ, det)
 {
 }
 
-//________________________________________________________
-void   AliEveTRDNode::Paint(Option_t* option)
+//______________________________________________________________________________
+void AliEveTRDNode::Paint(Option_t* option)
 {
-       List_i iter = fChildren.begin();
-       while(iter != fChildren.end()){
-               (dynamic_cast<AliEveTRDModule*>(*iter))->Paint(option);
-               iter++;
-       }
+  List_i iter = fChildren.begin();
+  while(iter != fChildren.end()){
+    (dynamic_cast<AliEveTRDModule*>(*iter))->Paint(option);
+    iter++;
+  }
 }
 
-//________________________________________________________
-void   AliEveTRDNode::Reset()
+//______________________________________________________________________________
+void AliEveTRDNode::Reset()
 {
-       List_i iter = fChildren.begin();
-       while(iter != fChildren.end()){
-               (dynamic_cast<AliEveTRDModule*>(*iter))->Reset();
-               iter++;
-       }
+  List_i iter = fChildren.begin();
+  while(iter != fChildren.end()){
+    (dynamic_cast<AliEveTRDModule*>(*iter))->Reset();
+    iter++;
+  }
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDNode::Collapse()
 {
-       TGListTree *list = gEve->GetListTree();
-       AliEveTRDNode *node = 0x0;
-       List_i iter = fChildren.begin();
-       while(iter != fChildren.end()){
-               if((node = dynamic_cast<AliEveTRDNode*>(*iter))) node->Collapse();
-               list->CloseItem(FindListTreeItem(list));
-               iter++;
-       }
+  TGListTree *list = gEve->GetListTree();
+  AliEveTRDNode *node = 0x0;
+  List_i iter = fChildren.begin();
+  while(iter != fChildren.end()){
+    if((node = dynamic_cast<AliEveTRDNode*>(*iter))) node->Collapse();
+    list->CloseItem(FindListTreeItem(list));
+    iter++;
+  }
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDNode::Expand()
 {
-       TGListTree *list = gEve->GetListTree();
-       AliEveTRDNode *node = 0x0;
-       List_i iter = fChildren.begin();
-       while(iter != fChildren.end()){
-               if((node = dynamic_cast<AliEveTRDNode*>(*iter))) node->Expand();
-               list->OpenItem(FindListTreeItem(list));
-               iter++;
-       }
+  TGListTree *list = gEve->GetListTree();
+  AliEveTRDNode *node = 0x0;
+  List_i iter = fChildren.begin();
+  while(iter != fChildren.end()){
+    if((node = dynamic_cast<AliEveTRDNode*>(*iter))) node->Expand();
+    list->OpenItem(FindListTreeItem(list));
+    iter++;
+  }
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDNode::EnableListElements()
 {
-       SetRnrSelf(kTRUE);
-       AliEveTRDNode *node = 0x0;
-       AliEveTRDChamber *chmb = 0x0;
-       List_i iter = fChildren.begin();
-       while(iter != fChildren.end()){
-               if((node = dynamic_cast<AliEveTRDNode*>(*iter))){
-                       node->SetRnrSelf(kTRUE);
-                       node->EnableListElements();
-               }
-               if((chmb = dynamic_cast<AliEveTRDChamber*>(*iter))) chmb->SetRnrSelf(kTRUE);
-               iter++;
-       }
-       gEve->Redraw3D();
+  SetRnrSelf(kTRUE);
+  AliEveTRDNode *node = 0x0;
+  AliEveTRDChamber *chmb = 0x0;
+  List_i iter = fChildren.begin();
+  while(iter != fChildren.end()){
+    if((node = dynamic_cast<AliEveTRDNode*>(*iter))){
+      node->SetRnrSelf(kTRUE);
+      node->EnableListElements();
+    }
+    if((chmb = dynamic_cast<AliEveTRDChamber*>(*iter))) chmb->SetRnrSelf(kTRUE);
+    iter++;
+  }
+  gEve->Redraw3D();
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDNode::DisableListElements()
 {
-       SetRnrSelf(kFALSE);
-       AliEveTRDNode *node = 0x0;
-       AliEveTRDChamber *chmb = 0x0;
-       List_i iter = fChildren.begin();
-       while(iter != fChildren.end()){
-               if((node = dynamic_cast<AliEveTRDNode*>(*iter))){
-                       node->SetRnrSelf(kFALSE);
-                       node->DisableListElements();
-               }
-               if((chmb = dynamic_cast<AliEveTRDChamber*>(*iter))) chmb->SetRnrSelf(kFALSE);
-               iter++;
-       }
-       gEve->Redraw3D();
+  SetRnrSelf(kFALSE);
+  AliEveTRDNode *node = 0x0;
+  AliEveTRDChamber *chmb = 0x0;
+  List_i iter = fChildren.begin();
+  while(iter != fChildren.end()){
+    if((node = dynamic_cast<AliEveTRDNode*>(*iter))){
+      node->SetRnrSelf(kFALSE);
+      node->DisableListElements();
+    }
+    if((chmb = dynamic_cast<AliEveTRDChamber*>(*iter))) chmb->SetRnrSelf(kFALSE);
+    iter++;
+  }
+  gEve->Redraw3D();
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDNode::UpdateLeaves()
 {
-       AliEveTRDModule *module;
-       List_i iter = fChildren.begin();
-       while(iter != fChildren.end()){
-               module = dynamic_cast<AliEveTRDModule*>(*iter);
-               if(!module) continue;
-
-               module->fRnrHits = fRnrHits;
-               module->fRnrDigits = fRnrDigits;
-               module->fDigitsLog = fDigitsLog;
-               module->fDigitsBox = fDigitsBox;
-               module->fDigitsThreshold = fDigitsThreshold;
-               module->kDigitsNeedRecompute = kDigitsNeedRecompute;
-               module->fRnrRecPoints = fRnrRecPoints;
-               module->fRnrTracklets = fRnrTracklets;
-               iter++;
-       }
-
-       AliEveTRDNode *node = 0x0;
-       iter = fChildren.begin();
-       while(iter != fChildren.end()){
-               if((node = dynamic_cast<AliEveTRDNode*>(*iter))) node->UpdateLeaves();
-               iter++;
-       }
+  AliEveTRDModule *module;
+  List_i iter = fChildren.begin();
+  while(iter != fChildren.end()){
+    module = dynamic_cast<AliEveTRDModule*>(*iter);
+    if(!module) continue;
+
+    module->fRnrHits = fRnrHits;
+    module->fRnrDigits = fRnrDigits;
+    module->fDigitsLog = fDigitsLog;
+    module->fDigitsBox = fDigitsBox;
+    module->fDigitsThreshold = fDigitsThreshold;
+    module->fDigitsNeedRecompute = fDigitsNeedRecompute;
+    module->fRnrRecPoints = fRnrRecPoints;
+    module->fRnrTracklets = fRnrTracklets;
+    iter++;
+  }
+
+  AliEveTRDNode *node = 0x0;
+  iter = fChildren.begin();
+  while(iter != fChildren.end()){
+    if((node = dynamic_cast<AliEveTRDNode*>(*iter))) node->UpdateLeaves();
+    iter++;
+  }
 }
 
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDNode::UpdateNode()
 {
-//     Info("UpdateNode()", Form("%s", GetName()));
-       AliEveTRDNode *node = 0x0;
-       List_i iter = fChildren.begin();
-       while(iter != fChildren.end()){
-               if((node = dynamic_cast<AliEveTRDNode*>(*iter))) node->UpdateNode();
-               iter++;
-       }
-
-       Int_t score[11];
-       for(int i=0; i<11; i++) score[i] = 0;
-       AliEveTRDModule *module;
-       iter = fChildren.begin();
-       while(iter != fChildren.end()){
-               module = dynamic_cast<AliEveTRDModule*>(*iter);
-               if(!module) continue;
-               score[0] += (module->fLoadHits) ? 1 : 0;
-               score[1] += (module->fRnrHits) ? 1 : 0;
-
-               score[2] += (module->fLoadDigits) ? 1 : 0;
-               score[3] += (module->fRnrDigits) ? 1 : 0;
-               score[4] += (module->fDigitsLog) ? 1 : 0;
-               score[5] += (module->fDigitsBox) ? 1 : 0;
-               score[6] += (module->kDigitsNeedRecompute) ? 1 : 0;
-
-               score[7] += (module->fLoadRecPoints) ? 1 : 0;
-               score[8] += (module->fRnrRecPoints) ? 1 : 0;
-
-               score[9] += (module->fLoadTracklets) ? 1 : 0;
-               score[10] += (module->fRnrTracklets) ? 1 : 0;
-               iter++;
-       }
-
-       Int_t size = fChildren.size();
-       fLoadHits      = (score[0] > 0) ? kTRUE : kFALSE;
-       fRnrHits       = (score[1] == size) ? kTRUE : kFALSE;
-
-       fLoadDigits    = (score[2] > 0) ? kTRUE : kFALSE;
-       fRnrDigits     = (score[3] == size) ? kTRUE : kFALSE;
-       fDigitsLog     = (score[4] == size) ? kTRUE : kFALSE;
-       fDigitsBox     = (score[5] == size) ? kTRUE : kFALSE;
-       kDigitsNeedRecompute = (score[6] == size) ? kTRUE : kFALSE;
-
-       fLoadRecPoints = (score[7] > 0) ? kTRUE : kFALSE;
-       fRnrRecPoints  = (score[8] == size) ? kTRUE : kFALSE;
-
-       fLoadTracklets = (score[9] > 0) ? kTRUE : kFALSE;
-       fRnrTracklets  = (score[10] == size) ? kTRUE : kFALSE;
-}
-
+  // Info("UpdateNode()", Form("%s", GetName()));
+  AliEveTRDNode *node = 0x0;
+  List_i iter = fChildren.begin();
+  while(iter != fChildren.end()){
+    if((node = dynamic_cast<AliEveTRDNode*>(*iter))) node->UpdateNode();
+    iter++;
+  }
 
-///////////////////////////////////////////////////////////
-/////////////        AliEveTRDChamber       /////////////////////
-///////////////////////////////////////////////////////////
+  Int_t score[11];
+  for(int i=0; i<11; i++) score[i] = 0;
+  AliEveTRDModule *module;
+  iter = fChildren.begin();
+  while(iter != fChildren.end()){
+    module = dynamic_cast<AliEveTRDModule*>(*iter);
+    if(!module) continue;
+    score[0] += (module->fLoadHits) ? 1 : 0;
+    score[1] += (module->fRnrHits) ? 1 : 0;
+
+    score[2] += (module->fLoadDigits) ? 1 : 0;
+    score[3] += (module->fRnrDigits) ? 1 : 0;
+    score[4] += (module->fDigitsLog) ? 1 : 0;
+    score[5] += (module->fDigitsBox) ? 1 : 0;
+    score[6] += (module->fDigitsNeedRecompute) ? 1 : 0;
+
+    score[7] += (module->fLoadRecPoints) ? 1 : 0;
+    score[8] += (module->fRnrRecPoints) ? 1 : 0;
+
+    score[9] += (module->fLoadTracklets) ? 1 : 0;
+    score[10] += (module->fRnrTracklets) ? 1 : 0;
+    iter++;
+  }
 
-//________________________________________________________
-AliEveTRDChamber::AliEveTRDChamber(Int_t det) :
-  TEveElement(), AliEveTRDModule("Chmb", det), rowMax(-1), colMax(-1), timeMax(22), fX0(0.), fPla(-1)
-{
-  //
-  // Constructor
-  //
+  Int_t size = fChildren.size();
+  fLoadHits      = (score[0] > 0) ? kTRUE : kFALSE;
+  fRnrHits       = (score[1] == size) ? kTRUE : kFALSE;
 
-       fDigits    = 0x0;
-       fHits      = 0x0;
-       fRecPoints = 0x0;
-       fTracklets = 0x0;
+  fLoadDigits    = (score[2] > 0) ? kTRUE : kFALSE;
+  fRnrDigits     = (score[3] == size) ? kTRUE : kFALSE;
+  fDigitsLog     = (score[4] == size) ? kTRUE : kFALSE;
+  fDigitsBox     = (score[5] == size) ? kTRUE : kFALSE;
+  fDigitsNeedRecompute = (score[6] == size) ? kTRUE : kFALSE;
 
-       AliTRDCommonParam* parCom = AliTRDCommonParam::Instance();
-       samplingFrequency = parCom->GetSamplingFrequency();
+  fLoadRecPoints = (score[7] > 0) ? kTRUE : kFALSE;
+  fRnrRecPoints  = (score[8] == size) ? kTRUE : kFALSE;
 
-       fGeo      = 0x0;
-       fPadPlane = 0x0;
+  fLoadTracklets = (score[9] > 0) ? kTRUE : kFALSE;
+  fRnrTracklets  = (score[10] == size) ? kTRUE : kFALSE;
 }
 
-//________________________________________________________
-AliEveTRDChamber::AliEveTRDChamber(const AliEveTRDChamber &mod):
-  TEveElement(), AliEveTRDModule("Chmb", mod.fDet)
-{
-  //
-  // Copy constructor
-  //
-       SetMainColor(mod.GetMainColor());
 
-       if(mod.fDigits) {}
-       if(mod.fHits) {}
-       if(mod.fRecPoints){}
-}
+///////////////////////////////////////////////////////////
+////////////      AliEveTRDChamber     ////////////////////
+///////////////////////////////////////////////////////////
 
-//________________________________________________________
-AliEveTRDChamber& AliEveTRDChamber::operator=(const AliEveTRDChamber &mod)
+//______________________________________________________________________________
+AliEveTRDChamber::AliEveTRDChamber(Int_t det) :
+  TEveElement(), AliEveTRDModule("Chmb", det),
+  fDigits(0), fHits(0), fRecPoints(0), fTracklets(0),
+  fRowMax(-1), fColMax(-1), fTimeMax(22), fSamplingFrequency(0),
+  fX0(0.), fPla(-1),
+  fPadPlane (0),
+  fGeo      (0)
 {
   //
-  // Assignment operator
+  // Constructor
   //
 
-  if (this != &mod) {
-    fDet    = mod.fDet;
-               if(mod.fDigits) {}
-               if(mod.fHits) {}
-               if(mod.fRecPoints){}
-  }
-  return *this;
+  AliTRDCommonParam* parCom = AliTRDCommonParam::Instance();
+  fSamplingFrequency = parCom->GetSamplingFrequency();
 }
 
-//________________________________________________________
-Int_t  AliEveTRDChamber::GetSM() const
+//______________________________________________________________________________
+Int_t AliEveTRDChamber::GetSM() const
 {
-       if(!fGeo){
-               AliWarning("Fail. No TRD geometry defined.");
-               return -1;
-       }
-       return fGeo->GetSector(fDet);
+  if(!fGeo){
+    AliWarning("Fail. No TRD geometry defined.");
+    return -1;
+  }
+  return fGeo->GetSector(fDet);
 }
 
-//________________________________________________________
-Int_t  AliEveTRDChamber::GetSTK() const
+//______________________________________________________________________________
+Int_t AliEveTRDChamber::GetSTK() const
 {
-       if(!fGeo){
-               AliWarning("Fail. No TRD geometry defined.");
-               return -1;
-       }
-       return fGeo->GetChamber(fDet);
+  if(!fGeo){
+    AliWarning("Fail. No TRD geometry defined.");
+    return -1;
+  }
+  return fGeo->GetChamber(fDet);
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDChamber::LoadClusters(TObjArray *clusters)
 {
   //
   // Draw clusters
   //
 
-       if(!fGeo){
-               AliError(Form("Geometry not set for chamber %d. Please call first AliEveTRDChamber::SetGeometry().", fDet));
-               return;
-       }
-
-       if(!fRecPoints){
-               fRecPoints = new AliEveTRDClusters(this);
-               fRecPoints->SetMarkerSize(1.);
-               fRecPoints->SetMarkerStyle(24);
-               fRecPoints->SetMarkerColor(6);
-               fRecPoints->SetOwnIds(kTRUE);
-       } else fRecPoints->Reset();
-
-       Float_t q;
-        Double_t cloc[3], cglo[3];
-
-       AliTRDcluster *c=0x0;
-       for(int iclus=0; iclus<clusters->GetEntriesFast(); iclus++){
-               c = (AliTRDcluster*)clusters->UncheckedAt(iclus);
-               cloc[0] = c->GetX();
-               cloc[1] = c->GetY();
-               cloc[2] = c->GetZ();
-               q = c->GetQ();
-               fGeo->RotateBack(fDet,cloc,cglo);
-               fRecPoints->SetNextPoint(cglo[0], cglo[1], cglo[2]);
-               fRecPoints->SetPointId(c);
-       }
-       fLoadRecPoints = kTRUE;
+  if(!fGeo){
+    AliError(Form("Geometry not set for chamber %d. Please call first AliEveTRDChamber::SetGeometry().", fDet));
+    return;
+  }
+
+  if(!fRecPoints){
+    fRecPoints = new AliEveTRDClusters(this);
+    fRecPoints->SetMarkerSize(1.);
+    fRecPoints->SetMarkerStyle(24);
+    fRecPoints->SetMarkerColor(6);
+    fRecPoints->SetOwnIds(kTRUE);
+  } else fRecPoints->Reset();
+
+  Float_t q;
+  Double_t cloc[3], cglo[3];
+
+  AliTRDcluster *c=0x0;
+  for(int iclus=0; iclus<clusters->GetEntriesFast(); iclus++){
+    c = (AliTRDcluster*)clusters->UncheckedAt(iclus);
+    cloc[0] = c->GetX();
+    cloc[1] = c->GetY();
+    cloc[2] = c->GetZ();
+    q = c->GetQ();
+    fGeo->RotateBack(fDet,cloc,cglo);
+    fRecPoints->SetNextPoint(cglo[0], cglo[1], cglo[2]);
+    fRecPoints->SetPointId(c);
+  }
+  fLoadRecPoints = kTRUE;
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDChamber::LoadDigits(AliTRDdigitsManager *digits)
 {
   //
   // Draw digits
   //
-       if(!fGeo){
-               AliError(Form("Geometry not set for chamber %d. Please call first AliEveTRDChamber::SetGeometry().", fDet));
-               return;
-       }
-//     Info("LoadDigits()", Form("digits =0x%x", digits));
+  if(!fGeo){
+    AliError(Form("Geometry not set for chamber %d. Please call first AliEveTRDChamber::SetGeometry().", fDet));
+    return;
+  }
+  // Info("LoadDigits()", Form("digits =0x%x", digits));
 
-       if(!fDigits) fDigits = new AliEveTRDDigits(this);
-       else fDigits->Reset();
+  if(!fDigits) fDigits = new AliEveTRDDigits(this);
+  else fDigits->Reset();
 
-       fDigits->SetData(digits);
-       fLoadDigits = kTRUE;
+  fDigits->SetData(digits);
+  fLoadDigits = kTRUE;
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDChamber::AddHit(AliTRDhit *hit)
 {
   //
   // Draw hits
   //
-//     Info("AddHit()", Form("%s", GetName()));
-
-       if(!fHits){
-               fHits = new AliEveTRDHits(this);
-               fHits->SetMarkerSize(.1);
-               fHits->SetMarkerColor(2);
-               fHits->SetOwnIds(kTRUE);
-       }
-
-       fHits->SetNextPoint(hit->X(), hit->Y(), hit->Z());
-       fHits->SetPointId(hit);
-       fLoadHits = kTRUE;
+  // Info("AddHit()", Form("%s", GetName()));
+
+  if(!fHits){
+    fHits = new AliEveTRDHits(this);
+    fHits->SetMarkerSize(.1);
+    fHits->SetMarkerColor(2);
+    fHits->SetOwnIds(kTRUE);
+  }
+
+  fHits->SetNextPoint(hit->X(), hit->Y(), hit->Z());
+  fHits->SetPointId(hit);
+  fLoadHits = kTRUE;
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDChamber::LoadTracklets(TObjArray *tracks)
 {
   //
   // Draw tracks
   //
-       if(!fGeo){
-               Error("LoadTracklets()", Form("Geometry not set for chamber %d. Please call first AliEveTRDChamber::SetGeometry().", fDet));
-               return;
-       }
-//     Info("LoadTracklets()", Form("tracks = 0x%x", tracks));
-
-       if(!fTracklets){
-               fTracklets = new std::vector<TEveTrack*>;
-       } else fTracklets->clear();
-
-
-       AliTRDmcmTracklet *trk = 0x0;
-       Double_t cloc[3], cglo[3];
-       for(int itrk=0; itrk<tracks->GetEntries();itrk++){
-               trk = (AliTRDmcmTracklet*)tracks->At(itrk);
-               trk->MakeTrackletGraph(fGeo,.5);
-               fTracklets->push_back(new TEveTrack());
-               fTracklets->back()->SetLineColor(4);
-
-               cloc[0] = trk->GetTime0(); // x0
-               cloc[1] = trk->GetOffset(); // y0
-               cloc[2] = trk->GetRowz(); // z
-         fGeo->RotateBack(fDet,cloc,cglo);
-               fTracklets->back()->SetNextPoint(cglo[0], cglo[1], cglo[2]);
-
-               cloc[0] += 3.7; // x1
-               cloc[1] += TMath::Tan(trk->GetSlope()*TMath::Pi()/180.) * 3.7; // y1
-         fGeo->RotateBack(fDet,cloc,cglo);
-               fTracklets->back()->SetNextPoint(cglo[0], cglo[1], cglo[2]);
-       }
-       fLoadTracklets = kTRUE;
+  if(!fGeo){
+    Error("LoadTracklets()", Form("Geometry not set for chamber %d. Please call first AliEveTRDChamber::SetGeometry().", fDet));
+    return;
+  }
+  // Info("LoadTracklets()", Form("tracks = 0x%x", tracks));
+
+  if(!fTracklets){
+    fTracklets = new std::vector<TEveTrack*>;
+  } else fTracklets->clear();
+
+
+  AliTRDmcmTracklet *trk = 0x0;
+  Double_t cloc[3], cglo[3];
+  for(int itrk=0; itrk<tracks->GetEntries();itrk++){
+    trk = (AliTRDmcmTracklet*)tracks->At(itrk);
+    trk->MakeTrackletGraph(fGeo,.5);
+    fTracklets->push_back(new TEveTrack());
+    fTracklets->back()->SetLineColor(4);
+
+    cloc[0] = trk->GetTime0(); // x0
+    cloc[1] = trk->GetOffset(); // y0
+    cloc[2] = trk->GetRowz(); // z
+    fGeo->RotateBack(fDet,cloc,cglo);
+    fTracklets->back()->SetNextPoint(cglo[0], cglo[1], cglo[2]);
+
+    cloc[0] += 3.7; // x1
+    cloc[1] += TMath::Tan(trk->GetSlope()*TMath::Pi()/180.) * 3.7; // y1
+    fGeo->RotateBack(fDet,cloc,cglo);
+    fTracklets->back()->SetNextPoint(cglo[0], cglo[1], cglo[2]);
+  }
+  fLoadTracklets = kTRUE;
 }
 
 //____________________________________________________
-void   AliEveTRDChamber::Paint(Option_t* option)
+void AliEveTRDChamber::Paint(Option_t* option)
 {
-/*     Info("Paint()", Form("%s", GetName()));*/
-       if(!fRnrSelf) return;
-       if(fDigits && fRnrDigits){
-               if(kDigitsNeedRecompute){
-                       fDigits->ComputeRepresentation();
-                       kDigitsNeedRecompute = kFALSE;
-               }
-               fDigits->Paint(option);
-       }
-       if(fRecPoints && fRnrRecPoints) fRecPoints->GetObject()->Paint(option);
-       if(fHits && fRnrHits) fHits->GetObject()->Paint(option);
-       if(fTracklets && fRnrTracklets){
-               for(vector<TEveTrack*>::iterator i=fTracklets->begin(); i != fTracklets->end(); ++i) (*i)->Paint(option);
-       }
+  /* Info("Paint()", Form("%s", GetName()));*/
+  if(!fRnrSelf) return;
+  if(fDigits && fRnrDigits){
+    if(fDigitsNeedRecompute){
+      fDigits->ComputeRepresentation();
+      fDigitsNeedRecompute = kFALSE;
+    }
+    fDigits->Paint(option);
+  }
+  if(fRecPoints && fRnrRecPoints) fRecPoints->GetObject()->Paint(option);
+  if(fHits && fRnrHits) fHits->GetObject()->Paint(option);
+  if(fTracklets && fRnrTracklets){
+    for(std::vector<TEveTrack*>::iterator i=fTracklets->begin(); i != fTracklets->end(); ++i) (*i)->Paint(option);
+  }
 }
 
-//________________________________________________________
-void   AliEveTRDChamber::Reset()
+//______________________________________________________________________________
+void AliEveTRDChamber::Reset()
 {
-       if(fHits){
-               fHits->Reset();
-               fLoadHits = kFALSE;
-       }
-       if(fDigits){
-               fDigits->Reset();
-               fLoadDigits = kFALSE;
-       }
-       if(fRecPoints){
-               fRecPoints->Reset();
-               fLoadRecPoints = kFALSE;
-       }
-       if(fTracklets){
-               fTracklets->clear();
-               fLoadTracklets = kFALSE;
-       }
+  if(fHits){
+    fHits->Reset();
+    fLoadHits = kFALSE;
+  }
+  if(fDigits){
+    fDigits->Reset();
+    fLoadDigits = kFALSE;
+  }
+  if(fRecPoints){
+    fRecPoints->Reset();
+    fLoadRecPoints = kFALSE;
+  }
+  if(fTracklets){
+    fTracklets->clear();
+    fLoadTracklets = kFALSE;
+  }
 }
 
-//________________________________________________________
+//______________________________________________________________________________
 void AliEveTRDChamber::SetGeometry(AliTRDgeometry *geo)
 {
-       fGeo = geo;
+  fGeo = geo;
 
-       fPla = fGeo->GetPlane(fDet);
-       fX0 = fGeo->GetTime0(fPla);
+  fPla = fGeo->GetPlane(fDet);
+  fX0 = fGeo->GetTime0(fPla);
 
-       fPadPlane = fGeo->GetPadPlane(fPla,fGeo->GetChamber(fDet));
-       rowMax = fPadPlane->GetNrows();
-       colMax = fPadPlane->GetNcols();
+  fPadPlane = fGeo->GetPadPlane(fPla,fGeo->GetChamber(fDet));
+  fRowMax   = fPadPlane->GetNrows();
+  fColMax   = fPadPlane->GetNcols();
 }
 
index 1717482..cd7b716 100644 (file)
@@ -6,6 +6,7 @@
  * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
  * full copyright notice.                                                 *
  **************************************************************************/
+
 #ifndef ALIEVE_TRDModuleImp_H
 #define ALIEVE_TRDModuleImp_H
 
@@ -22,9 +23,7 @@
 
 #include <TEveElement.h>
 
-#ifndef ALIEVE_TRDModule_H
 #include "AliEveTRDModule.h"
-#endif
 
 class AliTRDpadPlane;
 class AliTRDgeometry;
@@ -35,71 +34,76 @@ class TObjArray;
 
 class TEveTrack;
 
-       class AliEveTRDHits;
-       class AliEveTRDDigits;
-
-       class AliEveTRDChamber : public TEveElement, public AliEveTRDModule
-       {
-       friend class AliEveTRDDigits;
-       public:
-
-               AliEveTRDChamber(Int_t det=0);
-               virtual ~AliEveTRDChamber() {}
-
-               AliEveTRDChamber(const AliEveTRDChamber&);
-               AliEveTRDChamber& operator=(const AliEveTRDChamber&);
-
-               void    AddHit(AliTRDhit *hit);
-               Int_t   GetRowMax() const {return rowMax;}
-               Int_t   GetColMax() const {return colMax;}
-               Int_t   GetTimeMax() const {return timeMax;}
-               Int_t   GetSM() const;
-               Int_t   GetSTK() const;
-               Int_t   GetPlane() const {return fPla;}
-               void    LoadClusters(TObjArray *cs);
-               void    LoadDigits(AliTRDdigitsManager *digits);
-               void    LoadTracklets(TObjArray *ts);
-               void    Paint(Option_t* option="");
-               void    Reset();
-               void    SetGeometry(AliTRDgeometry *geo);
-
-       protected:
-               AliEveTRDDigits *fDigits;   // digits representation
-               AliEveTRDHits           *fHits;     // hits representation
-               AliEveTRDHits           *fRecPoints;// cluster representation
-               std::vector<TEveTrack*> *fTracklets; // mcm tracklets
-
-               // data representation section
-               Int_t           rowMax; // number of rows for this pad plane
-       Int_t           colMax; // number of columns for this pad plane
-       Int_t           timeMax; // number of timebins
-               Float_t samplingFrequency; // sampling frequency
-               Float_t fX0; // radial distance from vertex to the chamber
-               Int_t           fPla; // detector plane
-               AliTRDpadPlane *fPadPlane; // pad plane object
-               AliTRDgeometry *fGeo; // TRD geometry
-
-       ClassDef(AliEveTRDChamber,1) // Holder for TRD chamber data
-       };
-
-
-       class AliEveTRDNode : public TEveElement, public AliEveTRDModule
-       {
-       public:
-               AliEveTRDNode(const char *typ, Int_t det=0);
-               void    Paint(Option_t* option="");
-               void    Reset();
-
-               void    Collapse(); // *MENU*
-               void    Expand(); // *MENU*
-               void    EnableListElements(); // *MENU*
-               void    DisableListElements(); // *MENU*
-               void    UpdateLeaves();
-               void    UpdateNode();
-
-               List_i begin(){return fChildren.begin();}
-               List_i end(){return fChildren.end();}
-
-       ClassDef(AliEveTRDNode, 1)
-       };
+class AliEveTRDHits;
+class AliEveTRDDigits;
+
+class AliEveTRDChamber : public TEveElement, public AliEveTRDModule
+{
+  friend class AliEveTRDDigits;
+
+private:
+  AliEveTRDChamber(const AliEveTRDChamber&);            // Not implemented.
+  AliEveTRDChamber& operator=(const AliEveTRDChamber&); // Not implemented.
+
+public:
+
+  AliEveTRDChamber(Int_t det=0);
+  virtual ~AliEveTRDChamber() {}
+
+  void  AddHit(AliTRDhit *hit);
+  Int_t GetRowMax()  const {return fRowMax;}
+  Int_t GetColMax()  const {return fColMax;}
+  Int_t GetTimeMax() const {return fTimeMax;}
+  Int_t GetSM() const;
+  Int_t GetSTK() const;
+  Int_t GetPlane() const {return fPla;}
+
+  void  LoadClusters(TObjArray *cs);
+  void  LoadDigits(AliTRDdigitsManager *digits);
+  void  LoadTracklets(TObjArray *ts);
+  void  Paint(Option_t* option="");
+  void  Reset();
+  void  SetGeometry(AliTRDgeometry *geo);
+
+protected:
+  AliEveTRDDigits         *fDigits;    // digits representation
+  AliEveTRDHits           *fHits;      // hits representation
+  AliEveTRDHits           *fRecPoints; // cluster representation
+  std::vector<TEveTrack*> *fTracklets; // mcm tracklets
+
+  // data representation section
+  Int_t           fRowMax;   // number of rows for this pad plane
+  Int_t           fColMax;   // number of columns for this pad plane
+  Int_t           fTimeMax;  // number of timebins
+  Float_t         fSamplingFrequency; // sampling frequency
+  Float_t         fX0;       // radial distance from vertex to the chamber
+  Int_t           fPla;      // detector plane
+  AliTRDpadPlane *fPadPlane; // pad plane object
+  AliTRDgeometry *fGeo;      // TRD geometry
+
+  ClassDef(AliEveTRDChamber,1); // Holder for TRD chamber data
+};
+
+
+class AliEveTRDNode : public TEveElement, public AliEveTRDModule
+{
+public:
+  AliEveTRDNode(const char *typ, Int_t det=0);
+
+  void Paint(Option_t* option="");
+  void Reset();
+
+  void Collapse();            // *MENU*
+  void Expand();              // *MENU*
+  void EnableListElements();  // *MENU*
+  void DisableListElements(); // *MENU*
+  void UpdateLeaves();
+  void UpdateNode();
+
+  List_i begin(){return fChildren.begin();}
+  List_i end(){return fChildren.end();}
+
+  ClassDef(AliEveTRDNode, 1);
+};
+
 #endif
index f773b6b..0d5f030 100644 (file)
@@ -1,25 +1,7 @@
 // $Id$
 // Main authors: Matevz Tadel & Alja Mrak-Tadel: 2006, 2007
-
-/**************************************************************************
- * Copyright(c) 1998-2008, ALICE Experiment at CERN, all rights reserved. *
- * See http://aliceinfo.cern.ch/Offline/AliRoot/License.html for          *
- * full copyright notice.                                                 *
- **************************************************************************/
-/**************************************************************************
- * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
- *                                                                        *
- * Authors: Jochen Thaeder <thaeder@kip.uni-heidelberg.de>                *
- *          for The ALICE HLT Project.                                    *
- *                                                                        *
- * Permission to use, copy, modify and distribute this software and its   *
- * documentation strictly for non-commercial purposes is hereby granted   *
- * without fee, provided that the above copyright notice appears in all   *
- * copies and that both the copyright notice and this permission notice   *
- * appear in the supporting documentation. The authors make no claims     *
- * about the suitability of this software for any purpose. It is          *
- * provided "as is" without express or implied warranty.                  *
- **************************************************************************/
+// Author: Jochen Thaeder <thaeder@kip.uni-heidelberg.de>                *
+//         for The ALICE HLT Project.                                    *
 
 /** @file   AliEveHOMERManager.cxx
     @author Jochen Thaeder
@@ -102,23 +84,6 @@ AliEveHOMERManager::AliEveHOMERManager( TString xmlFile ) :
 }
 
 //##################################################################################
-AliEveHOMERManager::AliEveHOMERManager( const AliEveHOMERManager& m) :
-  TEveElementList(m.GetName(), m.GetTitle())
-{
-  // see header file for class documentation
-
-  AliError( Form( "copy constructor to be tested." ) );
-}
-
-//##################################################################################
-AliEveHOMERManager& AliEveHOMERManager::operator=( const AliEveHOMERManager& ) {
-  // see header file for class documentation
-
-  AliError( Form( "assignment constructor to be tested." ) );
-  return *this;
-}
-
-//##################################################################################
 AliEveHOMERManager::~AliEveHOMERManager() {
   // see header file for class documentation
 
index 23e4c50..54827fb 100644 (file)
@@ -46,6 +46,10 @@ class AliHLTHOMERLibManager;
 
 class AliEveHOMERManager : public TEveElementList
 {
+private:
+  AliEveHOMERManager(const AliEveHOMERManager&);            // Not implemented.
+  AliEveHOMERManager& operator=(const AliEveHOMERManager&); // Not implemented.
+
 public:
 
   /*
@@ -59,10 +63,6 @@ public:
    * @param argv    Array of command line arguments.
    */
   AliEveHOMERManager(TString xmlFile="" );
-  /** not a valid copy constructor, defined according to effective C++ style */
-  AliEveHOMERManager( const AliEveHOMERManager& );
-  /** not a valid assignment op, but defined according to effective C++ style */
-  AliEveHOMERManager& operator=( const AliEveHOMERManager& );
   /** destructor */
   virtual ~AliEveHOMERManager();