#include "AliHLTOUTRawReader.h"
#include "AliHLTOUTDigitReader.h"
#include "AliHLTEsdManager.h"
+#include "AliHLTPluginBase.h"
ClassImp(AliHLTReconstructor)
AliHLTReconstructor::AliHLTReconstructor()
:
AliReconstructor(),
- AliHLTReconstructorBase(),
fFctProcessHLTOUT(NULL),
- fpEsdManager(NULL)
+ fpEsdManager(NULL),
+ fpPluginBase(new AliHLTPluginBase)
{
//constructor
}
AliHLTReconstructor::AliHLTReconstructor(const char* options)
:
AliReconstructor(),
- AliHLTReconstructorBase(),
fFctProcessHLTOUT(NULL),
- fpEsdManager(NULL)
+ fpEsdManager(NULL),
+ fpPluginBase(new AliHLTPluginBase)
{
//constructor
if (options) Init(options);
{
//destructor
- AliHLTSystem* pSystem=GetInstance();
+ if (fpPluginBase) {
+ AliHLTSystem* pSystem=fpPluginBase->GetInstance();
if (pSystem) {
- AliDebug(0, Form("delete HLT system: status %#x", pSystem->GetStatusFlags()));
+ AliDebug(0, Form("terminate HLT system: status %#x", pSystem->GetStatusFlags()));
if (pSystem->CheckStatus(AliHLTSystem::kStarted)) {
// send specific 'event' to execute the stop sequence
pSystem->Reconstruct(0, NULL, NULL);
}
}
+ delete fpPluginBase;
+ }
+ fpPluginBase=NULL;
if (fpEsdManager) AliHLTEsdManager::Delete(fpEsdManager);
fpEsdManager=NULL;
void AliHLTReconstructor::Init()
{
// init the reconstructor
- AliHLTSystem* pSystem=GetInstance();
+ if (!fpPluginBase) {
+ AliError("internal memory error: can not get AliHLTSystem instance from plugin");
+ return;
+ }
+
+ AliHLTSystem* pSystem=fpPluginBase->GetInstance();
if (!pSystem) {
AliError("can not create AliHLTSystem object");
return;
return;
}
+ TString esdManagerOptions;
+
// the options scan has been moved to AliHLTSystem, the old code
// here is kept to be able to run an older version of the HLT code
// with newer AliRoot versions.
}
} else if (token.Contains("alilog=off")) {
pSystem->SwitchAliLog(0);
+ } else if (token.Contains("esdmanager=")) {
+ token.ReplaceAll("esdmanager=", "");
+ token.ReplaceAll(","," ");
+ token.ReplaceAll("'","");
+ esdManagerOptions=token;
} else if (token.BeginsWith("lib") && token.EndsWith(".so")) {
libs+=token;
libs+=" ";
fFctProcessHLTOUT=(void (*)())gSystem->DynFindSymbol("libHLTinterface.so", "AliHLTSystemProcessHLTOUT");
fpEsdManager=AliHLTEsdManager::New();
+ fpEsdManager->SetOption(esdManagerOptions.Data());
}
void AliHLTReconstructor::Reconstruct(AliRawReader* rawReader, TTree* /*clustersTree*/) const
// For each event, HLT reconstruction chains can be executed and
// added to the existing HLTOUT data
// The HLTOUT data is finally processed in FillESD
+ if (!fpPluginBase) {
+ AliError("internal memory error: can not get AliHLTSystem instance from plugin");
+ return;
+ }
+
int iResult=0;
- AliHLTSystem* pSystem=GetInstance();
+ AliHLTSystem* pSystem=fpPluginBase->GetInstance();
if (pSystem) {
if (pSystem->CheckStatus(AliHLTSystem::kError)) {
return;
}
- AliHLTSystem* pSystem=GetInstance();
+ if (!fpPluginBase) {
+ AliError("internal memory error: can not get AliHLTSystem instance from plugin");
+ return;
+ }
+
+ AliHLTSystem* pSystem=fpPluginBase->GetInstance();
if (pSystem) {
if (pSystem->CheckStatus(AliHLTSystem::kError)) {
" sim.Run();\n"
" /*********************************************************/", option.Data()));
}
- AliHLTSystem* pSystem=GetInstance();
+ if (!fpPluginBase) {
+ AliError("internal memory error: can not get AliHLTSystem instance from plugin");
+ return;
+ }
+
+ AliHLTSystem* pSystem=fpPluginBase->GetInstance();
if (pSystem) {
if (pSystem->CheckStatus(AliHLTSystem::kError)) {
AliError("HLT system in error state");
{
// treatment of simulated or real HLTOUT data
if (!pHLTOUT) return;
- AliHLTSystem* pSystem=GetInstance();
+ if (!fpPluginBase) {
+ AliError("internal memory error: can not get AliHLTSystem instance from plugin");
+ return;
+ }
+
+ AliHLTSystem* pSystem=fpPluginBase->GetInstance();
if (!pSystem) {
AliError("error getting HLT system instance");
return;