]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TRD/AliHLTTRDTrackerV1Component.cxx
fix mem leak and compiler warning
[u/mrichter/AliRoot.git] / HLT / TRD / AliHLTTRDTrackerV1Component.cxx
index 3f270119a4d87b1facf9070ec51c0e2d4f31bceb..33472f654d081091d219b151cde222942df34fd8 100644 (file)
@@ -59,6 +59,7 @@ AliHLTTRDTrackerV1Component::AliHLTTRDTrackerV1Component()
   , fGeometryFileName("")
   , fGeometryFile(NULL)
   , fGeoManager(NULL)
+  , fReconstructor(NULL)
   , fTracker(NULL)
   , fRecoParam(NULL)
 {
@@ -306,8 +307,19 @@ int AliHLTTRDTrackerV1Component::DoInit( int argc, const char** argv )
       return -1;
     }
 
-  AliTRDReconstructor::SetRecoParam(fRecoParam);
-    
+  // this is important in case we want to ::PropagateBack - see the TrackerV1.cxx
+  //fRecoParam->SetSeeding(kTRUE);
+  // no debug stream -> no debug files! on HLT
+  //fRecoParam->SetStreamLevel(0);
+  
+  //AliTRDReconstructor reconstructor; reconstructor.SetRecoParam(fRecoParam);
+  // AB 10.Jul.08
+  // temporary until recoParam in the OCDB
+  fReconstructor = new AliTRDReconstructor();
+  fReconstructor->SetRecoParam(fRecoParam);
+  fReconstructor->SetStreamLevel(0); // default value
+  fReconstructor->SetOption("sa,!cw");
+
   // geometry:
   // for some unknown at this point reason (30th of April 2008)
   // the TrackerV1 initializes new TRDgeometry in the constructor
@@ -328,6 +340,7 @@ int AliHLTTRDTrackerV1Component::DoInit( int argc, const char** argv )
   
   // create the tracker
   fTracker = new AliTRDtrackerV1();
+  fTracker->SetReconstructor(fReconstructor);
   HLTDebug("TRDTracker at 0x%x", fTracker);
 
   if (fTracker == 0)
@@ -338,12 +351,6 @@ int AliHLTTRDTrackerV1Component::DoInit( int argc, const char** argv )
       return -1;
     }
 
-  // this is important in case we want to ::PropagateBack - see the TrackerV1.cxx
-  AliTRDReconstructor::SetSeedingOn(kTRUE);
-
-  // no debug stream -> no debug files! on HLT
-  AliTRDReconstructor::SetStreamLevel(0);
-  
   return 0;
 }
 
@@ -357,6 +364,10 @@ int AliHLTTRDTrackerV1Component::DoDeinit()
   delete fTracker;
   fTracker = 0;
   
+  // AB 10.Jul.08
+  delete fReconstructor;
+  fReconstructor = 0x0;
+
   if (fGeometryFile)
     {
       fGeometryFile->Close();