]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
handling of steering events
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 7 Aug 2008 13:07:08 +0000 (13:07 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 7 Aug 2008 13:07:08 +0000 (13:07 +0000)
- protection added in GetEvent to process data events only
- AliHLTCompStatCollector: publishing of data set only if component statistics
  block is available

HLT/BASE/util/AliHLTCompStatCollector.cxx
HLT/BASE/util/AliHLTEsdCollectorComponent.cxx
HLT/BASE/util/AliHLTFilePublisher.cxx
HLT/BASE/util/AliHLTLoaderPublisherComponent.cxx
HLT/BASE/util/AliHLTOUTPublisherComponent.cxx
HLT/BASE/util/AliHLTRawReaderPublisherComponent.cxx

index 226cda1d41d6056990bf08c4c2bc6737b60a2da7..45c988a0004c79dbec23950d5cd6d462f2868ffc 100644 (file)
@@ -184,21 +184,24 @@ int AliHLTCompStatCollector::DoEvent( const AliHLTComponentEventData& /*evtData*
       fpSpecArray[current]=pBlock->fSpecification;
       fpBlockNoArray[current]=blockNo;
     }
+    // indicate availability of component statistic block
+    iResult=1;
   }
 
-  if (iResult>=0) {
+  if (iResult>0) {
     fNofSets=fPosition;
     fpStatTree->Fill();
     iResult=PushBack(fpStatTree, kAliHLTDataTypeTTree);
-  }
 
-  // init the timer for the next cycle
-  if (!fpTimer)  fpTimer=new TStopwatch;
-  if (fpTimer) {
-    fpTimer->Reset();
-    fpTimer->Start();
+    // init the timer for the next cycle
+    if (!fpTimer)  fpTimer=new TStopwatch;
+    if (fpTimer) {
+      fpTimer->Reset();
+      fpTimer->Start();
+    }
   }
 
+  if (iResult>0) iResult=-1;
   return iResult;
 }
 
index c7ba03042cf38247084e470a0f36aef710aaca45..c9875d73235dcf1a7afa73c3626ff4a9466cb346 100644 (file)
@@ -92,7 +92,7 @@ int AliHLTEsdCollectorComponent::DumpEvent( const AliHLTComponentEventData& /*ev
        pBlock=GetNextInputBlock()) {
     if (pBlock->fDataType!=kAliHLTDataTypeESDObject &&
        pBlock->fDataType!=kAliHLTDataTypeESDTree) continue;
-    HLTInfo("writing ESD, data type %s", (DataType2Text(pBlock->fDataType).c_str()));
+    HLTInfo("writing ESD, data type %s event %d", (DataType2Text(pBlock->fDataType).c_str()), GetEventCount());
     iResult=fpManager->WriteESD(reinterpret_cast<const AliHLTUInt8_t*>(pBlock->fPtr),
                                pBlock->fSize, pBlock->fDataType, NULL, GetEventCount());
   }
index 0862266ccc2dad3d4de54087eb7f6115c9bed705..caaeb91fde781aba4a4d1b7efb1697d7b3d02489 100644 (file)
@@ -328,6 +328,10 @@ int AliHLTFilePublisher::GetEvent( const AliHLTComponentEventData& /*evtData*/,
                                   AliHLTComponentBlockDataList& outputBlocks )
 {
   // see header file for class documentation
+
+  // process data events only
+  if (!IsDataEvent()) return 0;
+
   int iResult=0;
   TObjLink *lnk=fpCurrent;
   if (lnk==NULL) lnk=fEvents.FirstLink();
index a61a66fd4c2c250305bc36ed3d2269c987db88c9..ea8905704a1b37e4a0abbae705af2dcad540804e 100644 (file)
@@ -200,6 +200,10 @@ int AliHLTLoaderPublisherComponent::GetEvent(const AliHLTComponentEventData& /*e
                                             AliHLTComponentTriggerData& /*trigData*/)
 {
   // see header file for class documentation
+
+  // process data events only
+  if (!IsDataEvent()) return 0;
+
   int iResult=0;
   // fetch runLoader instance from interface
   AliRunLoader* pRunLoader=GetRunLoader();
index 449ad080350158ccf098a0aa7dedaf7a4f14f4fc..502aeaddda78ec51b4750b9313bb2ab27f94acff 100644 (file)
@@ -195,6 +195,10 @@ int AliHLTOUTPublisherComponent::GetEvent( const AliHLTComponentEventData& /*evt
 {
   // see header file for class documentation
   int iResult=0;
+
+  // process data events only
+  if (!IsDataEvent()) return 0;
+
   unsigned int offset=0;
   AliHLTOUT* pHLTOUT=NULL;
   AliRawReader* pRawReader=GetRawReader();
index 863f1934f8083ffc1ecc7fb9640ca17ff74c2c5e..16fe5de12baa2bff6ce569524214444e276c5a44 100644 (file)
@@ -222,6 +222,10 @@ int AliHLTRawReaderPublisherComponent::GetEvent(const AliHLTComponentEventData&
 {
   // see header file for class documentation
   int iResult=0;
+
+  // process data events only
+  if (!IsDataEvent()) return 0;
+
   unsigned int offset=0;
   assert(outputPtr!=NULL || size==0);
   AliRawReader* pRawReader=GetRawReader();