Bug fix: AliHLTRawReaderPublisherComponent
authortbreitne <timo.gunther.breitner@cern.ch>
Tue, 27 May 2014 09:59:54 +0000 (11:59 +0200)
committertbreitne <timo.gunther.breitner@cern.ch>
Tue, 27 May 2014 10:04:21 +0000 (12:04 +0200)
fixes segmentation violation on empty events
(temporary header structs went out of scope).

HLT/BASE/util/AliHLTRawReaderPublisherComponent.cxx

index 32ab1e5..f4664e4 100644 (file)
@@ -302,8 +302,9 @@ int AliHLTRawReaderPublisherComponent::GetEvent(const AliHLTComponentEventData&
     if (!fSkipEmpty && processedIds.size()!=size_t(fMaxEquId-fMinEquId+1)) {
       // add further empty data blocks
       AliHLTCDHWrapper header;
+      AliRawDataHeader headerV2;
+      AliRawDataHeaderV3 headerV3;
       if(pRawReader->GetVersion()==2){
-       AliRawDataHeader headerV2;
        headerV2.fSize=sizeof(AliRawDataHeader);
        const UInt_t* triggermask=pRawReader->GetTriggerPattern();
        if (triggermask) {
@@ -312,7 +313,6 @@ int AliHLTRawReaderPublisherComponent::GetEvent(const AliHLTComponentEventData&
        }
        header=&headerV2;
       } else if (pRawReader->GetVersion()==3){
-       AliRawDataHeaderV3 headerV3;
         headerV3.fSize=sizeof(AliRawDataHeaderV3);
         const UInt_t* triggermask=pRawReader->GetTriggerPattern();
         if (triggermask) {