Skip to content

Commit

Permalink
default to chd v3 on empty blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
tbreitne committed May 27, 2014
1 parent 6b49d20 commit a6a53af
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions HLT/BASE/util/AliHLTRawReaderPublisherComponent.cxx
Original file line number Diff line number Diff line change
Expand Up @@ -245,6 +245,7 @@ int AliHLTRawReaderPublisherComponent::GetEvent(const AliHLTComponentEventData&
AliDebug(0, Form("get event from RawReader %p equipment id range [%d,%d]", pRawReader, fMinEquId, fMaxEquId));
}
list<int> processedIds;
UChar_t headerVersion=0;
while (pRawReader->ReadHeader() && (iResult>=0 || iResult==-ENOSPC)) {
const AliRawDataHeader* pHeaderV2=pRawReader->GetDataHeader();
const AliRawDataHeaderV3* pHeaderV3=pRawReader->GetDataHeaderV3();
Expand All @@ -257,6 +258,9 @@ int AliHLTRawReaderPublisherComponent::GetEvent(const AliHLTComponentEventData&
HLTError("can not get data header from RawReader, skipping data block ...");
continue;
}
// store header version for empty blocks later on
// any found header will suffice
headerVersion=pHeader.GetVersion();
unsigned int headerSize=pHeader.GetHeaderSize();
unsigned int readSize=pRawReader->GetDataSize()+headerSize;
int id=pRawReader->GetEquipmentId();
Expand Down Expand Up @@ -304,15 +308,15 @@ int AliHLTRawReaderPublisherComponent::GetEvent(const AliHLTComponentEventData&
AliHLTCDHWrapper header;
AliRawDataHeader headerV2;
AliRawDataHeaderV3 headerV3;
if(pRawReader->GetVersion()==2){
if(headerVersion==2){
headerV2.fSize=sizeof(AliRawDataHeader);
const UInt_t* triggermask=pRawReader->GetTriggerPattern();
if (triggermask) {
headerV2.fTriggerClassLow=triggermask[0];
headerV2.fROILowTriggerClassHigh=triggermask[1];
}
header=&headerV2;
} else if (pRawReader->GetVersion()==3){
} else { //assuming V3 even if no header at all was found above
headerV3.fSize=sizeof(AliRawDataHeaderV3);
const UInt_t* triggermask=pRawReader->GetTriggerPattern();
if (triggermask) {
Expand Down

0 comments on commit a6a53af

Please sign in to comment.