AliHLTSimulation::AliHLTSimulation()
:
fOptions(),
+ fpSystem(NULL),
fpRawReader(NULL)
{
// see header file for class documentation
AliHLTSimulation::~AliHLTSimulation()
{
// see header file for function documentation
+ if (fpSystem) {
+ delete fpSystem;
+ }
+ fpSystem=NULL;
if (fpRawReader) {
delete fpRawReader;
}
fOptions=options;
TString sysOp;
- AliHLTSystem* pSystem=GetInstance();
- if (!pSystem) {
- AliError("can not get AliHLTSystem instance");
+ if (!fpSystem) fpSystem=new AliHLTSystem;
+ if (!fpSystem) {
+ AliError("can not create AliHLTSystem object");
return -ENOMEM;
}
- if (pSystem->CheckStatus(AliHLTSystem::kError)) {
+ if (fpSystem->CheckStatus(AliHLTSystem::kError)) {
AliError("HLT system in error state");
return -EFAULT;
}
}
// scan options
- if (pSystem->ScanOptions(sysOp.Data())<0) {
+ if (fpSystem->ScanOptions(sysOp.Data())<0) {
AliError("error setting options for HLT system");
return -EINVAL;
}
- if (!pSystem->CheckStatus(AliHLTSystem::kReady)) {
- if ((pSystem->Configure(pRunLoader))<0) {
+ if (!fpSystem->CheckStatus(AliHLTSystem::kReady)) {
+ if ((fpSystem->Configure(pRunLoader))<0) {
AliError("error during HLT system configuration");
return -EFAULT;
}
int nEvents = pRunLoader->GetNumberOfEvents();
int iResult=0;
- AliHLTSystem* pSystem=GetInstance();
- if (!pSystem) {
- AliError("can not get AliHLTSystem instance");
- return -ENOMEM;
- }
- if (pSystem->CheckStatus(AliHLTSystem::kError)) {
+ if (fpSystem->CheckStatus(AliHLTSystem::kError)) {
AliError("HLT system in error state");
return -EFAULT;
}
// Note: the rawreader is already placed at the first event
- if ((iResult=pSystem->Reconstruct(1, pRunLoader, fpRawReader))>=0) {
- pSystem->FillESD(0, pRunLoader, NULL);
+ if ((iResult=fpSystem->Reconstruct(1, pRunLoader, fpRawReader))>=0) {
+ fpSystem->FillESD(0, pRunLoader, NULL);
for (int i=1; i<nEvents; i++) {
if (fpRawReader && !fpRawReader->NextEvent()) {
AliError("missmatch in event count, rawreader corrupted");
break;
}
- pSystem->Reconstruct(1, pRunLoader, fpRawReader);
- pSystem->FillESD(i, pRunLoader, NULL);
+ fpSystem->Reconstruct(1, pRunLoader, fpRawReader);
+ fpSystem->FillESD(i, pRunLoader, NULL);
}
// send specific 'event' to execute the stop sequence
- pSystem->Reconstruct(0, NULL, NULL);
+ fpSystem->Reconstruct(0, NULL, NULL);
}
return iResult;
}
#include "TObject.h"
#include "TString.h"
-#include "AliHLTReconstructorBase.h"
class AliRunLoader;
class AliHLTSystem;
class AliRawReader;
* @class AliHLTSimulation
* Base class of HLT data processing simulations.
*/
-class AliHLTSimulation : public TObject, public AliHLTReconstructorBase {
+class AliHLTSimulation : public TObject {
public:
/** create an instance of the class */
static AliHLTSimulation* CreateInstance();
/* current options */
TString fOptions; //!transient
+ /* HLT steering object */
+ AliHLTSystem* fpSystem; //!transient
+
/* RAW reader instance for chains which need RAW data as input */
AliRawReader* fpRawReader; //!transient
- ClassDef(AliHLTSimulation, 2)
+ ClassDef(AliHLTSimulation, 1)
};
#define ALIHLTSIMULATION_LIBRARY "libHLTsim.so"