do not remove AliESDZDC object from the list of ESD objects and impementing handling...
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Oct 2010 09:20:37 +0000 (09:20 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Mon, 18 Oct 2010 09:20:37 +0000 (09:20 +0000)
HLT/global/AliHLTGlobalEsdConverterComponent.cxx

index 833e2f6..1dbda65 100644 (file)
@@ -179,7 +179,7 @@ int AliHLTGlobalEsdConverterComponent::DoInit(int argc, const char** argv)
   TString skipObjects=
     // "AliESDRun,"
     // "AliESDHeader,"
-    "AliESDZDC,"
+    // "AliESDZDC,"
     "AliESDFMD,"
     // "AliESDVZERO,"
     // "AliESDTZERO,"
@@ -706,6 +706,23 @@ int AliHLTGlobalEsdConverterComponent::ProcessBlocks(TTree* pTree, AliESDEvent*
     }
   }
 
+  // FIXME: the size of all input blocks can be added in one loop
+  for (const AliHLTComponentBlockData* pBlock=GetFirstInputBlock(kAliHLTDataTypeESDContent|kAliHLTDataOriginZDC);
+       pBlock!=NULL; pBlock=GetNextInputBlock()) {
+    fBenchmark.AddInput(pBlock->fSize);
+  }
+  for ( const TObject *pObject = GetFirstInputObject(kAliHLTDataTypeESDContent|kAliHLTDataOriginZDC); 
+       pObject != NULL; pObject = GetNextInputObject() ) {
+    AliESDZDC *esdZDC = dynamic_cast<AliESDZDC*>(const_cast<TObject*>( pObject ) );
+    if (esdZDC) {
+      pESD->SetZDCData( esdZDC );
+      break;
+    } else {
+      ALIHLTERRORGUARD(1, "input object of data type %s is not of class AliESDZDC",
+                      DataType2Text(kAliHLTDataTypeESDContent|kAliHLTDataOriginZDC).c_str());
+    }
+  }
+
   // Add tracks from MUON.
   for( const AliHLTComponentBlockData *i= GetFirstInputBlock(kAliHLTAnyDataType | kAliHLTDataOriginMUON); i!=NULL; i=GetNextInputBlock() ){
     fBenchmark.AddInput(i->fSize);