]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliDetector.cxx
New steering class ro run QA stand alone
[u/mrichter/AliRoot.git] / STEER / AliDetector.cxx
index 3d9e210f13f3731d79885bcd81a40ba6390c82fc..861207382106681165faf0760db228afd29cc7ff 100644 (file)
@@ -34,6 +34,7 @@
 ///////////////////////////////////////////////////////////////////////////////
 
 #include <TBrowser.h>
+#include <TClonesArray.h>
 #include <TTree.h>
 
 #include "AliLog.h"
@@ -56,6 +57,8 @@ AliDetector::AliDetector():
   fNhits(0),
   fNdigits(0),
   fBufferSize(1600),
+  fMaxIterHit(0),
+  fCurIterHit(0),
   fHits(0),
   fDigits(0),
   fPoints(0),
@@ -66,22 +69,6 @@ AliDetector::AliDetector():
   //
 }
  
-//_______________________________________________________________________
-AliDetector::AliDetector(const AliDetector &det):
-  AliModule(det),
-  fTimeGate(200.e-9),
-  fIshunt(0),
-  fNhits(0),
-  fNdigits(0),
-  fBufferSize(1600),
-  fHits(0),
-  fDigits(0),
-  fPoints(0),
-  fLoader(0x0)
-{
-  det.Copy(*this);
-}
-
 //_____________________________________________________________________________
 AliDetector::AliDetector(const char* name,const char *title):
   AliModule(name,title),
@@ -90,6 +77,8 @@ AliDetector::AliDetector(const char* name,const char *title):
   fNhits(0),
   fNdigits(0),
   fBufferSize(1600),
+  fMaxIterHit(0),
+  fCurIterHit(0),
   fHits(0),
   fDigits(0),
   fPoints(0),
@@ -142,6 +131,13 @@ void AliDetector::Publish(const char */*dir*/, void */*address*/, const char */*
   MayNotUse("Publish");
 }
 
+//_______________________________________________________________________
+void AliDetector::AddAlignableVolumes() const
+{
+  // 
+  AliWarning(Form("%s still has to implement the AddAlignableVolumes method!",GetName()));
+}
+
 //_______________________________________________________________________
 TBranch* AliDetector::MakeBranchInTree(TTree *tree, const char* name, 
                                        void* address, Int_t size,
@@ -161,7 +157,7 @@ TBranch* AliDetector::MakeBranchInTree(TTree *tree, const char* name,
 // 
 //
 //
-// if (GetDebug()>1)
+    
  AliDebug(2,Form("Making Branch %s",name));
  if (tree == 0x0) 
   {
@@ -181,7 +177,7 @@ TBranch* AliDetector::MakeBranchInTree(TTree *tree, const char* name,
   } 
  else 
   {
-    branch = tree->Branch(name,address,size);
+    branch = tree->Bronch(name, "TClonesArray", address, size, splitlevel);
   }
  AliDebug(2,Form("Branch %s returning branch %#x",name,branch));
  return branch;
@@ -206,15 +202,6 @@ void AliDetector::Browse(TBrowser *b)
   }
 }
 
-//_______________________________________________________________________
-void AliDetector::Copy(TObject &) const
-{
-  //
-  // Copy *this onto det -- not implemented
-  //
-  AliFatal("Not implemented");
-}
-
 //_______________________________________________________________________
 void AliDetector::FinishRun()
 {
@@ -301,7 +288,10 @@ void AliDetector::LoadPoints(Int_t)
   for (Int_t hit=0;hit<nhits;hit++) {
     ahit = dynamic_cast<AliHit*>(fHits->UncheckedAt(hit));
     trk=ahit->GetTrack();
-    if(trk>tracks) AliFatal(Form("Found track number %d, max track %d",trk, tracks));
+    if(trk>tracks) {
+      AliError(Form("Found track number %d, max track %d",trk, tracks));
+      continue;
+    }
     if(ntrk[trk]==limi[trk])
      {
       //
@@ -328,11 +318,11 @@ void AliDetector::LoadPoints(Int_t)
   for(trk=0; trk<tracks; ++trk) {
     if(ntrk[trk]) {
       points = new AliPoints();
-      points->SetMarkerColor(GetMarkerColor());
-      points->SetMarkerSize(GetMarkerSize());
+      points->SetMarkerColor(3); //PH color=3 was set in AliModule
+      points->SetMarkerSize(1);  //PH size-1 is the default value
       points->SetDetector(this);
       points->SetParticle(trk);
-      points->SetPolyMarker(ntrk[trk],coor[trk],GetMarkerStyle());
+      points->SetPolyMarker(ntrk[trk],coor[trk],1);//PH style=1 is the default value
       fPoints->AddAt(points,trk);
       delete [] coor[trk];
       coor[trk]=0;
@@ -423,8 +413,6 @@ void AliDetector::SetTreeAddress()
     branch = treeD->GetBranch(GetName());
     if (branch) branch->SetAddress(&fDigits);
   }
-  
-  AliModule::SetTreeAddress();
 }
 
 //_______________________________________________________________________