]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - STEER/AliReconstruction.cxx
New locations of some Root object files
[u/mrichter/AliRoot.git] / STEER / AliReconstruction.cxx
index 54cc7df981870660036090840bda84b7d6182def..536ca6e3957ee2e9f528c5ea9c1c8a648f6586cb 100644 (file)
@@ -244,7 +244,7 @@ AliReconstruction::AliReconstruction(const char* gAliceFilename,
   fDiamondProfileTPC(NULL),
   fMeanVertexConstraint(kTRUE),
 
-  fGRPList(NULL),
+  fGRPData(NULL),
 
   fAlignObjArray(NULL),
   fCDBUri(),
@@ -332,7 +332,7 @@ AliReconstruction::AliReconstruction(const AliReconstruction& rec) :
   fDiamondProfileTPC(NULL),
   fMeanVertexConstraint(rec.fMeanVertexConstraint),
 
-  fGRPList(NULL),
+  fGRPData(NULL),
 
   fAlignObjArray(rec.fAlignObjArray),
   fCDBUri(rec.fCDBUri),
@@ -719,7 +719,6 @@ Bool_t AliReconstruction::InitRun(const char* input)
   //QA
   AliQADataMakerSteer qas ; 
   if (fRunQA && fRawReader) { 
-       qas.SetEventRange(fFirstEvent, fLastEvent) ; 
     qas.Run(fRunLocalReconstruction, fRawReader) ; 
        fSameQACycle = kTRUE ; 
   }
@@ -799,15 +798,14 @@ Bool_t AliReconstruction::InitRun(const char* input)
     fesd->AddObject(fesdf);
   }
 
-  
   // Get the GRP CDB entry
   AliCDBEntry* entryGRP = AliCDBManager::Instance()->Get("GRP/GRP/Data");
        
-  if(entryGRP) {
-       fGRPList = dynamic_cast<TList*> (entryGRP->GetObject());  
-  } else {
+  if (entryGRP) 
+       fGRPData = dynamic_cast<TMap*> (entryGRP->GetObject());  
+  
+  if (!fGRPData)
        AliError("No GRP entry found in OCDB!");
-  }
 
   // Get the diamond profile from OCDB
   AliCDBEntry* entry = AliCDBManager::Instance()
@@ -903,7 +901,7 @@ Bool_t AliReconstruction::RunEvent(Int_t iEvent)
       ftree->Fill();
     }
     if (fhlttreeOld) {
-      fesd->ReadFromTree(fhlttreeOld);
+      fhltesd->ReadFromTree(fhlttreeOld);
       fhlttreeOld->GetEntry(iEvent);
       fhlttree->Fill();
     }
@@ -941,12 +939,13 @@ Bool_t AliReconstruction::RunEvent(Int_t iEvent)
            fRunLoader->GetHeader()->GetEventNrInRun());
     if (!gSystem->AccessPathName(aFileName)) return kTRUE;
 
-    // local signle event reconstruction
+    // local single event reconstruction
     if (!fRunLocalReconstruction.IsNull()) {
-      TString detectors="HLT";
+      TString detectors=fRunLocalReconstruction;
       // run HLT event reconstruction first
-      if (IsSelected(detectors, fRunLocalReconstruction) &&
-         !RunLocalEventReconstruction(detectors)) {
+      // ;-( IsSelected changes the string
+      if (IsSelected("HLT", detectors) &&
+         !RunLocalEventReconstruction("HLT")) {
        if (fStopOnError) {CleanUp(ffile, ffileOld); return kFALSE;}
       }
       detectors=fRunLocalReconstruction;
@@ -980,16 +979,6 @@ Bool_t AliReconstruction::RunEvent(Int_t iEvent)
       }
     }
 
-    // HLT tracking
-    if (!fRunTracking.IsNull()) {
-      if (fRunHLTTracking) {
-       fhltesd->SetPrimaryVertexSPD(fesd->GetVertex());
-       if (!RunHLTTracking(fhltesd)) {
-         if (fStopOnError) {CleanUp(ffile, ffileOld); return kFALSE;}
-       }
-      }
-    }
-
     // Muon tracking
     if (!fRunTracking.IsNull()) {
       if (fRunMuonTracking) {
@@ -1011,7 +1000,16 @@ Bool_t AliReconstruction::RunEvent(Int_t iEvent)
 
     // fill ESD
     if (!fFillESD.IsNull()) {
-      if (!FillESD(fesd, fFillESD)) {
+      TString detectors=fFillESD;
+      // run HLT first and on hltesd
+      // ;-( IsSelected changes the string
+      if (IsSelected("HLT", detectors) &&
+         !FillESD(fhltesd, "HLT")) {
+       if (fStopOnError) {CleanUp(ffile, ffileOld); return kFALSE;}
+      }
+      detectors=fFillESD;
+      detectors.ReplaceAll("HLT", "");
+      if (!FillESD(fesd, detectors)) {
        if (fStopOnError) {CleanUp(ffile, ffileOld); return kFALSE;}
       }
     }
@@ -1280,7 +1278,7 @@ Bool_t AliReconstruction::FinishRun()
   // Create tags for the events in the ESD tree (the ESD tree is always present)
   // In case of empty events the tags will contain dummy values
   AliESDTagCreator *esdtagCreator = new AliESDTagCreator();
-  esdtagCreator->CreateESDTags(fFirstEvent,fLastEvent,fGRPList);
+  esdtagCreator->CreateESDTags(fFirstEvent,fLastEvent,fGRPData);
   if (fWriteAOD) {
     AliWarning("AOD tag creation not supported anymore during reconstruction.");
   }
@@ -1289,7 +1287,6 @@ Bool_t AliReconstruction::FinishRun()
   if (!fInLoopQA) {
          if (fRunQA) {
                  AliQADataMakerSteer qas;
-                 qas.SetEventRange(fFirstEvent, fLastEvent) ; 
                  qas.Run(fRunLocalReconstruction.Data(), AliQA::kRECPOINTS, fSameQACycle);
                  //qas.Reset() ;
                  qas.Run(fRunTracking.Data(), AliQA::kESDS, fSameQACycle);
@@ -1381,6 +1378,17 @@ Bool_t AliReconstruction::RunLocalEventReconstruction(const TString& detectors)
     AliReconstructor* reconstructor = GetReconstructor(iDet);
     if (!reconstructor) continue;
     AliLoader* loader = fLoader[iDet];
+    // Matthias April 2008: temporary fix to run HLT reconstruction
+    // although the HLT loader is missing
+    if (strcmp(fgkDetectorName[iDet], "HLT")==0) {
+      if (fRawReader) {
+       reconstructor->Reconstruct(fRawReader, NULL);
+      } else {
+       TTree* dummy=NULL;
+       reconstructor->Reconstruct(dummy, NULL);
+      }
+      continue;
+    }
     if (!loader) {
       AliWarning(Form("No loader is defined for %s!",fgkDetectorName[iDet]));
       continue;
@@ -2191,8 +2199,8 @@ void AliReconstruction::CleanUp(TFile* file, TFile* fileOld)
        fDiamondProfile = NULL;
        delete fDiamondProfileTPC;
        fDiamondProfileTPC = NULL;
-       delete fGRPList;
-       fGRPList = NULL;
+       delete fGRPData;
+       fGRPData = NULL;
   }