Changes concerning the StreamLevel and new Init function in AliTRDReconstruction
authorcblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 Aug 2008 16:51:07 +0000 (16:51 +0000)
committercblume <cblume@f7af4fe6-9843-0410-8265-dc069ae4e863>
Tue, 5 Aug 2008 16:51:07 +0000 (16:51 +0000)
TRD/AliTRDReconstructor.cxx
TRD/AliTRDReconstructor.h
TRD/AliTRDtrackerV1.cxx
TRD/AliTRDtrackerV1.h

index a3de7cd..7fefc72 100644 (file)
@@ -71,6 +71,13 @@ AliTRDReconstructor::AliTRDReconstructor(const AliTRDReconstructor &r)
   memcpy(fTCParams, r.fTCParams, 8*sizeof(Double_t));
 }
 
+//_____________________________________________________________________________
+void AliTRDReconstructor::Init(){
+       //
+       // Init Options
+       //
+       SetOption(GetOption());
+}
 
 //_____________________________________________________________________________
 void AliTRDReconstructor::ConvertDigits(AliRawReader *rawReader
@@ -193,7 +200,37 @@ void AliTRDReconstructor::SetOption(Option_t *opt)
     } else if(sopt.Contains("ar")){
       fSteerParam |= kDriftGas;
       continue;        
-    }
+    } else if(sopt.Contains("sl")){
+       TObjArray *stl = sopt.Tokenize("_");
+       if(stl->GetEntriesFast() < 3) continue;
+                       TString taskstr(((TObjString*)(*stl)[1])->String());
+                       TString levelstring(((TObjString*)(*stl)[2])->String());
+       // Set the stream Level
+       Int_t level = levelstring.Atoi();
+       AliTRDReconstructorTask task = kTracker;
+       if(taskstr.CompareTo("cl") == 0) task = kClusterizer;   
+       else if(taskstr.CompareTo("tr") == 0) task = kTracker;
+       else if(taskstr.CompareTo("pi") == 0) task = kPID;
+       SetStreamLevel(level, task);
+       continue;
+               }
   }
 }
 
+//_____________________________________________________________________________
+void AliTRDReconstructor::SetStreamLevel(Int_t level, AliTRDReconstructorTask task){
+       //
+       // Set the Stream Level for one of the tasks Clusterizer, Tracker or PID
+       //
+       TString taskname;
+       switch(task){
+               case kClusterizer: taskname = "Clusterizer";
+                                                                                        break;
+               case kTracker: taskname = "Tracker";
+                                                                        break;
+               case kPID: taskname = "PID";
+                                                        break;
+       }
+       AliInfo(Form("Setting Stream Level for Task %s to %d", taskname.Data(),level));
+       fStreamLevel[(Int_t)task] = level;
+}
index 5888ca2..befeae8 100644 (file)
@@ -44,6 +44,8 @@ public:
   AliTRDReconstructor(const AliTRDReconstructor &r);
   virtual ~AliTRDReconstructor() {;}
   AliTRDReconstructor& operator = (const AliTRDReconstructor&)          { return *this;}
+       
+       virtual void        Init();
 
   virtual void        ConvertDigits(AliRawReader *rawReader, TTree *digitsTree) const;
   virtual AliTracker* CreateTracker() const;
@@ -66,7 +68,7 @@ public:
 
   void               SetOption(Option_t *opt);
   inline void         SetTCParams(Double_t *par);
-  void                SetStreamLevel(Int_t level, AliTRDReconstructorTask task= kTracker) {fStreamLevel[(Int_t)task] = level;}
+  void                SetStreamLevel(Int_t level, AliTRDReconstructorTask task= kTracker);
 
 private:
   enum{
index d76bf1c..3106e4d 100644 (file)
@@ -2994,6 +2994,14 @@ Int_t AliTRDtrackerV1::Freq(Int_t n, const Int_t *inlist
 
 }
 
+void AliTRDtrackerV1::SetReconstructor(const AliTRDReconstructor *rec){
+       fReconstructor = rec;
+       if(fReconstructor->GetStreamLevel(AliTRDReconstructor::kTracker) > 1){
+               if(!fgDebugStreamer)
+                       fgDebugStreamer = new TTreeSRedirector("TRD.TrackerDebug.root");
+       }       
+}
+
 //_____________________________________________________________________________
 Float_t AliTRDtrackerV1::GetChi2Y(AliTRDseedV1 *tracklets) const
 {
index 7672dfd..d4c2656 100644 (file)
@@ -96,7 +96,7 @@ public:
   Int_t           ReadClusters(TClonesArray* &array, TTree *in) const;
   Int_t           RefitInward(AliESDEvent *event);
   static void     SetNTimeBins(Int_t nTimeBins){fgNTimeBins = nTimeBins; }
-  void            SetReconstructor(const AliTRDReconstructor *rec) {fReconstructor = rec;}
+  void            SetReconstructor(const AliTRDReconstructor *rec); 
   void            UnloadClusters();
   
   static Int_t    Freq(Int_t n, const Int_t *inlist, Int_t *outlist, Bool_t down); // to be removed