#include "AliHLTOUTHandler.h"
#include "AliHLTOUTHandlerEquId.h"
#include "AliHLTSystem.h"
+#include "AliHLTPluginBase.h"
#include "AliLog.h"
#include "AliDAQ.h" // RAW, for detector names and equipment ids
#include "TObjString.h"
AliRawReaderHLT::AliRawReaderHLT(AliRawReader* pRawreader, const char* options)
:
AliRawReader(),
- AliHLTReconstructorBase(),
fpParentReader(pRawreader),
fOptions(),
fSystemOptions(),
fDetectors(),
fpHLTOUT(NULL),
fbReadFirst(true),
- fpDataHandler(NULL)
+ fpDataHandler(NULL),
+ fpPluginBase(new AliHLTPluginBase)
{
// see header file for class documentation
// or
{
// see header file for class documentation
ReleaseHLTData();
+ if (fpPluginBase) delete fpPluginBase;
+ fpPluginBase=NULL;
}
UInt_t AliRawReaderHLT::GetType() const
// see header file for class documentation
Bool_t result=kFALSE;
Bool_t firstParentCycle=fbHaveHLTData;
- while (fbHaveHLTData=(fbHaveHLTData && ReadNextHLTData())) {
+ while ((fbHaveHLTData=(fbHaveHLTData && ReadNextHLTData()))) {
// all internal data variables set
assert(fpData!=NULL);
fHeader=reinterpret_cast<AliRawDataHeader*>(const_cast<AliHLTUInt8_t*>(fpData));
fOffset=sizeof(AliRawDataHeader);
fPosition=fOffset;
- if (result=IsSelected()) break;
+ if ((result=IsSelected())) break;
}
firstParentCycle&=!fbHaveHLTData; // true if it just changed from true to false
while (!result) {
// filter out all equipment ids which should be taken from the HLT stream
int id=fpParentReader->GetEquipmentId();
- if (result=!IsHLTInput(id)) break;
+ if ((result=!IsHLTInput(id))) break;
}
return result;
}
if (fbReadFirst || !fpHLTOUT) {
if (!fpHLTOUT) {
fpHLTOUT=new AliHLTOUTRawReader(fpParentReader);
- if (result=(fpHLTOUT!=NULL)) {
- AliHLTSystem* pSystem=GetInstance();
+ if ((result=(fpHLTOUT!=NULL))) {
+ if (!fpPluginBase) {
+ AliFatal("internal data error: can not get AliHLTSystem instance from plugin");
+ return false;
+ }
+ AliHLTSystem* pSystem=fpPluginBase->GetInstance();
if (pSystem) {
pSystem->ScanOptions(fSystemOptions.Data());
}
- if (result=(fpHLTOUT->Init()>=0)) {
+ if ((result=(fpHLTOUT->Init())>=0)) {
}
}
}
{
// see header file for class documentation
Bool_t bHaveHLTData=kFALSE;
- if (bHaveHLTData=(fDetectors.size()>0)) {
+ if ((bHaveHLTData=(fDetectors.size())>0)) {
vector<int>::iterator detector=fDetectors.begin();
for (; detector!=fDetectors.end(); detector++) {
int ddlOffset=AliDAQ::DdlIDOffset(*detector);