]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Filling the raw-data error log into the ESD
authorcvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Mar 2007 13:32:38 +0000 (13:32 +0000)
committercvetan <cvetan@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 5 Mar 2007 13:32:38 +0000 (13:32 +0000)
STEER/AliReconstruction.cxx
STEER/AliReconstruction.h

index a552c84978a3f540f32b29d57648c468a8716c20..c333306405efaa19d69982a22df5327f71356263 100644 (file)
@@ -711,6 +711,9 @@ Bool_t AliReconstruction::Run(const char* input)
     esd->SetMagneticField(AliTracker::GetBz());
     hltesd->SetMagneticField(AliTracker::GetBz());
 
+    // Fill raw-data error log into the ESD
+    if (fRawReader) FillRawDataErrorLog(iEvent,esd);
+
     // vertex finder
     if (fRunVertexFinder) {
       if (!ReadESD(esd, "vertex")) {
@@ -2086,3 +2089,25 @@ void AliReconstruction::WriteAlignmentData(AliESD* esd)
     fLoader[3]->UnloadRecPoints();
   }
 }
+
+//_____________________________________________________________________________
+void AliReconstruction::FillRawDataErrorLog(Int_t iEvent, AliESD* esd)
+{
+  // The method reads the raw-data error log
+  // accumulated within the rawReader.
+  // It extracts the raw-data errors related to
+  // the current event and stores them into
+  // a TClonesArray inside the esd object.
+
+  if (!fRawReader) return;
+
+  for(Int_t i = 0; i < fRawReader->GetNumberOfErrorLogs(); i++) {
+
+    AliRawDataErrorLog *log = fRawReader->GetErrorLog(i);
+    if (!log) continue;
+    if (iEvent != log->GetEventNumber()) continue;
+
+    esd->AddRawDataErrorLog(log);
+  }
+
+}
index c3b24639e26a8128ffdda7bbd76b0e5c59a2b04f..43f551b61c1c9455450c57c64df1eb6021f3838d 100644 (file)
@@ -130,6 +130,7 @@ private:
 
   void           WriteAlignmentData(AliESD* esd);
 
+  void           FillRawDataErrorLog(Int_t iEvent, AliESD* esd);
 
   //*** Global reconstruction flags *******************
   Bool_t         fUniformField;       // uniform field tracking flag