break;
}
fHeader=const_cast<AliRawDataHeader*>(fpParentReader->GetDataHeader());
+ fDataSize=fpParentReader->GetDataSize();
+ fPosition=0;
+ fpData=NULL;
// filter out all equipment ids which should be taken from the HLT stream
int id=fpParentReader->GetEquipmentId();
}
Bool_t AliRawReaderHLT::ReadNextData(UChar_t*& data)
+{
+ // see header file for class documentation
+ return ReadNextData(data, kTRUE);
+}
+
+Bool_t AliRawReaderHLT::ReadNextData(UChar_t*& data, Bool_t readHeader)
{
// see header file for class documentation
Bool_t result=kTRUE;
// read new header if data already read
- if (fPosition<fDataSize || (result=ReadHeader())) {
+ if (fPosition<fDataSize || (result=(readHeader && ReadHeader()))) {
if (fbHaveHLTData && fpHLTOUT!=NULL) {
// all internal data variables set
result=kTRUE;
data=const_cast<AliHLTUInt8_t*>(fpData+sizeof(AliRawDataHeader));
+ // fpData includes the CDH, set offset behind CDH
+ fOffset=sizeof(AliRawDataHeader);
} else {
// no data in the HLT stream, read real data
//AliInfo(Form("read from parent reader: min=%d max=%d", fSelectMinEquipmentId, fSelectMaxEquipmentId));
if (result) {
fpData=data;
fDataSize=fpParentReader->GetDataSize();
+ // fpData is without CDH
+ fOffset=0;
} else {
fpData=NULL;
fDataSize=0;
fEquipmentId=-1;
}
- fOffset=sizeof(AliRawDataHeader);
fPosition=fDataSize;
}
return result;
fOffset+=iCopy;
return kTRUE;
}
- } while (ReadNextData(dummy));
+ } while (ReadNextData(dummy, kTRUE));
return kFALSE;
}
fOffset+=iCopy;
return kTRUE;
}
- } while (ReadNextData(dummy));
+ } while (ReadNextData(dummy, kTRUE));
return kFALSE;
}
fOffset+=iCopy;
return kTRUE;
}
- } while (ReadNextData(dummy));
+ } while (ReadNextData(dummy, kTRUE));
return kFALSE;
}
fOffset+=iCopy;
return kTRUE;
}
- } while (ReadNextData(dummy));
+ // By convention, the ReadNextData function stays in the
+ // current block and does not switch to the next one
+ // automatically -> kFALSE
+ } while (ReadNextData(dummy, kFALSE));
return kFALSE;
}
fpParentReader->SkipInvalid(skip);
}
+/*
void AliRawReaderHLT::SelectEvents(Int_t type)
{
// see header file for class documentation
AliRawReader::SelectEvents(type);
fpParentReader->SelectEvents(type);
}
+*/
int AliRawReaderHLT::ScanOptions(const char* options)
{
TString optString(options);
TString argument;
TString parameter;
+ TString detectors;
TObjArray* pTokens=optString.Tokenize(" ");
if (pTokens) {
int iEntries=pTokens->GetEntries();
int detId=AliDAQ::DetectorID(argument.Data());
if (detId>=0) {
fDetectors.push_back(detId);
+ if (!detectors.IsNull()) detectors+=" ";
+ detectors+=argument;
} else {
if (!fSystemOptions.IsNull()) fSystemOptions+=" ";
fSystemOptions+=argument;
delete pTokens;
}
+ if (iResult>=0 && !detectors.IsNull()) {
+ AliInfo(Form("running reconstruction from HLT data: %s", detectors.Data()));
+ }
return iResult;
}
AliHLTOUTHandler* pHandler=fpHLTOUT->GetHandler();
if (pHandler) {
if (dynamic_cast<AliHLTOUTHandlerEquId*>(pHandler)!=NULL) {
- AliHLTOUT::AliHLTOUTLockGuard g(fpHLTOUT);
+ AliHLTOUT::AliHLTOUTSelectionGuard g(fpHLTOUT);
fEquipmentId=pHandler->ProcessData(fpHLTOUT);
fpData=NULL;
fDataSize=pHandler->GetProcessedData(fpData);