--- /dev/null
+// $Id$
+
+//**************************************************************************
+//* This file is property of and copyright by the ALICE HLT Project *
+//* ALICE Experiment at CERN, All rights reserved. *
+//* *
+//* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
+//* for The ALICE HLT Project. *
+//* *
+//* Permission to use, copy, modify and distribute this software and its *
+//* documentation strictly for non-commercial purposes is hereby granted *
+//* without fee, provided that the above copyright notice appears in all *
+//* copies and that both the copyright notice and this permission notice *
+//* appear in the supporting documentation. The authors make no claims *
+//* about the suitability of this software for any purpose. It is *
+//* provided "as is" without express or implied warranty. *
+//**************************************************************************
+
+/** @file AliHLTPluginBase.cxx
+ @author Matthias Richter
+ @date
+ @brief Base class for AliRoot HLT plugins.
+*/
+
+#include "AliHLTPluginBase.h"
+#include "AliHLTSystem.h"
+
+/** ROOT macro for the implementation of ROOT specific class methods */
+ClassImp(AliHLTPluginBase)
+
+AliHLTPluginBase::AliHLTPluginBase()
+{
+ // see header file for class documentation
+ // or
+ // refer to README to build package
+ // or
+ // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+ fNofInstances++;
+}
+
+AliHLTPluginBase::~AliHLTPluginBase()
+{
+ // see header file for class documentation
+ if (--fNofInstances<=0) delete fpSystem;
+ fpSystem=NULL;
+}
+
+void AliHLTPluginBase::InitInstance()
+{
+ // see header file for class documentation
+ if (!fpSystem) fpSystem=new AliHLTSystem;
+}
+
+AliHLTSystem* AliHLTPluginBase::GetInstance()
+{
+ // see header file for class documentation
+ if (!fpSystem) InitInstance();
+ return fpSystem;
+}
+
+
+AliHLTSystem* AliHLTPluginBase::fpSystem=NULL;
+
+int AliHLTPluginBase::fNofInstances=0;
--- /dev/null
+// $Id$
+
+#ifndef ALIHLTPLUGINBASE_H
+#define ALIHLTPLUGINBASE_H
+//* This file is property of and copyright by the ALICE HLT Project *
+//* ALICE Experiment at CERN, All rights reserved. *
+//* See cxx source for full Copyright notice *
+
+/** @file AliHLTPluginBase.h
+ @author Matthias Richter
+ @date
+ @brief Base class for AliRoot HLT plugins.
+*/
+
+// see below for class documentation
+// or
+// refer to README to build package
+// or
+// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
+
+#include "TObject.h"
+
+class AliHLTSystem;
+
+/**
+ * @class AliHLTPluginBase
+ * Base class for AliRoot HLT plugins.
+ *
+ * In order to allow definitions of HLT chains in the same macro as
+ * the simulation/reconstruction, a global instance of AliHLTSystem
+ * is required to make the registration of configurations work.
+ *
+ * AliHLTPlugin, AliRawReaderHLT and AliHLTSimulation all use
+ * the global AliHLTSystem instance hosted by this base class.
+ */
+class AliHLTPluginBase {
+ public:
+ AliHLTPluginBase();
+ /** destructor */
+ virtual ~AliHLTPluginBase();
+
+ /**
+ * Init the global AliHLTSystem instance.
+ */
+ static void InitInstance();
+
+ /**
+ * Get the global AliHLTSystem instance.
+ */
+ static AliHLTSystem* GetInstance();
+
+ protected:
+
+ private:
+ /** copy constructor prohibited */
+ AliHLTPluginBase(const AliHLTPluginBase& src);
+ /** assignment operator prohibited */
+ AliHLTPluginBase& operator=(const AliHLTPluginBase& src);
+
+ static AliHLTSystem* fpSystem; //! HLT steering object
+
+ static int fNofInstances;
+
+ ClassDef(AliHLTPluginBase, 0) // base class for the HLT reconstruction
+};
+
+#endif
/** @file AliHLTReconstructorBase.cxx
@author Matthias Richter
@date
- @brief Base class for HLT reconstruction classes.
+ @brief AliHLTPluginBase child for backward compatibility.
*/
#include "AliHLTReconstructorBase.h"
-#include "AliHLTSystem.h"
/** ROOT macro for the implementation of ROOT specific class methods */
ClassImp(AliHLTReconstructorBase)
// refer to README to build package
// or
// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
- fNofInstances++;
}
AliHLTReconstructorBase::~AliHLTReconstructorBase()
{
// see header file for class documentation
- if (--fNofInstances<=0) delete fpSystem;
- fpSystem=NULL;
}
-
-void AliHLTReconstructorBase::InitInstance()
-{
- // see header file for class documentation
- if (!fpSystem) fpSystem=new AliHLTSystem;
-}
-
-AliHLTSystem* AliHLTReconstructorBase::GetInstance()
-{
- // see header file for class documentation
- if (!fpSystem) InitInstance();
- return fpSystem;
-}
-
-
-AliHLTSystem* AliHLTReconstructorBase::fpSystem=NULL;
-
-int AliHLTReconstructorBase::fNofInstances=0;
/** @file AliHLTReconstructorBase.h
@author Matthias Richter
@date
- @brief Base class for HLT reconstruction classes.
+ @brief AliHLTPluginBase child for backward compatibility.
*/
// see below for class documentation
// or
// visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
-#include "TObject.h"
-
-class AliHLTSystem;
+#include "AliHLTPluginBase.h"
/**
* @class AliHLTReconstructorBase
- * Base class for HLT reconstruction classes. AliHLTReconstructor and
- * AliRawReaderHLT both use the global AliHLTSystem instance. This
- * base class hosts the global instance.
+ * This class was the former name of the base class for HLT
+ * reconstruction instances. It has evolved to a more general
+ * 'plugin' base class and the name has been changed to
+ * AliHLTPluginBase
*/
-class AliHLTReconstructorBase {
+class AliHLTReconstructorBase : public AliHLTPluginBase {
public:
AliHLTReconstructorBase();
- /** destructor */
- virtual ~AliHLTReconstructorBase();
-
- /**
- * Init the global AliHLTSystem instance.
- */
- static void InitInstance();
-
- /**
- * Get the global AliHLTSystem instance.
- */
- static AliHLTSystem* GetInstance();
+ ~AliHLTReconstructorBase();
protected:
private:
- /** copy constructor prohibited */
- AliHLTReconstructorBase(const AliHLTReconstructorBase& src);
- /** assignment operator prohibited */
- AliHLTReconstructorBase& operator=(const AliHLTReconstructorBase& src);
-
- static AliHLTSystem* fpSystem; //! HLT steering object
-
- static int fNofInstances;
-
- ClassDef(AliHLTReconstructorBase, 0) // base class for the HLT reconstruction
+ ClassDef(AliHLTReconstructorBase, 0) // AliHLTPluginBase child for backward compatibility
};
#endif
BASE/AliHLTComponentHandler.cxx
BASE/AliHLTSystem.cxx
BASE/AliHLTReconstructorBase.cxx
+BASE/AliHLTPluginBase.cxx
BASE/AliHLTProcessor.cxx
BASE/AliHLTCalibrationProcessor.cxx
BASE/AliHLTConfiguration.cxx
/////////////////////////////////////////////////////////////////////////
//
// setup of the HLT system
- gSystem->Load("libHLTrec");
- AliHLTSystem* pHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance();
if (!pHLT) {
cerr << "fatal error: can not get HLT instance" << endl;
}
//
// init the HLT system in order to define the analysis chain below
//
- gSystem->Load("libHLTrec.so");
- AliHLTSystem* gHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
///////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// init the HLT system in order to define the analysis chain below
//
- gSystem->Load("libHLTrec.so");
- AliHLTSystem* gHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
///////////////////////////////////////////////////////////////////////////////////////////////////
//
// $Id: $
#if !defined(__CINT__) || defined(__MAKECINT__)
-#include "AliHLTReconstructorBase.h"
+#include "AliHLTPluginBase.h"
#include "AliHLTConfiguration.h"
#include "AliReconstruction.h"
#include <iostream>
{
// setup of the HLT system
gSystem->Load("libHLTrec.so");
- AliHLTSystem* sys = AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* sys = AliHLTPluginBase::GetInstance();
if (sys == NULL)
{
cerr << "FATAL ERROR: Cannot get HLT system instance." << endl;
//
// init the HLT system in order to define the analysis chain below
//
- gSystem->Load("libHLTrec.so");
- AliHLTSystem* gHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
// AliCDBManager* pManager=AliCDBManager::Instance(NULL, 0);
// pManager->SetRun(0);
//
// init the HLT system in order to define the analysis chain below
//
- gSystem->Load("libHLTrec.so");
- AliHLTSystem* gHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
//gHLT.SwitchAliLog(0);
+++ /dev/null
-// $Id$
-/*
- * Configuration macro defining a chain running the HLT Conformal mapping
- * tracker embedded into AliRoot simulation.
- * The reconstruction is done from the TPC digits.
- *
- * Several output options are possible:
- * - sink-writeall FileWriter writing all blocks
- * - sink-esd-file write ESD using the TPCEsdWriter
- * - sink-esd write ESD using the TPCEsdConverter and EsdCollector
- * - sink-clusters relay cluster blocks to HLTOUT
- *
- * @author Matthias.Richter@ift.uib.no
- * @ingroup alihlt_tpc
- */
-{
- // load TPCParam from OCDB
- const char* cdbEntry="TPC/Calib/Parameters";
- AliCDBManager* pMan=AliCDBManager::Instance();
- AliTPCParam* pTPCParam=NULL;
- if (pMan) {
- AliCDBEntry *pEntry = pMan->Get(cdbEntry);
- if (pEntry &&
- pEntry->GetObject() &&
- (pTPCParam=dynamic_cast<AliTPCParam*>(pEntry->GetObject()))) {
- } else {
- HLTWarning("can not load AliTPCParam from CDB entry %s", cdbEntry);
- }
- }
-
- int iMinSlice=0;
- int iMaxSlice=35;
- int iMinPart=0;
- int iMaxPart=5;
- TString mergerInput;
- TString writerInput;
- TString sinkClusterInput;
- for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
- TString trackerInput;
- for (int part=iMinPart; part<=iMaxPart; part++) {
- TString arg, publisher, cf;
-
- // digit publisher components
- arg.Form("-slice %d -partition %d", slice, part);
- publisher.Form("DP_%02d_%d", slice, part);
- AliHLTConfiguration pubconf(publisher.Data(), "TPCDigitPublisher", NULL , arg.Data());
-
- // cluster finder components
- arg="-timebins ";
- if (pTPCParam) arg+=pTPCParam->GetMaxTBin()+1;
- else arg+=446; // old simulated data
- arg+=" -sorted ";
- cf.Form("CF_%02d_%d", slice, part);
- AliHLTConfiguration cfconf(cf.Data(), "TPCClusterFinderUnpacked", publisher.Data(), arg.Data());
- if (trackerInput.Length()>0) trackerInput+=" ";
- trackerInput+=cf;
- if (sinkClusterInput.Length()>0) sinkClusterInput+=" ";
- sinkClusterInput+=cf;
- }
- TString tracker;
- // tracker finder components
- tracker.Form("TR_%02d", slice);
- AliHLTConfiguration trackerconf(tracker.Data(), "TPCSliceTracker", trackerInput.Data(), "-pp-run -solenoidBz 0.5");
- //AliHLTConfiguration trackerconf(tracker.Data(), "TPCCATracker", trackerInput.Data(), "-solenoidBz 0.5");
-
- //add all trackers to writer input. Include if you would like all slice tracks written.
- //if (writerInput.Length()>0) writerInput+=" ";
- //writerInput+=tracker;
-
- // add all clusterfinders to the writer input
- if (writerInput.Length()>0) writerInput+=" ";
- writerInput+=trackerInput;
-
- if (mergerInput.Length()>0) mergerInput+=" ";
- mergerInput+=tracker;
-
- }
-
- // GlobalMerger component
- AliHLTConfiguration mergerconf("globalmerger","TPCGlobalMerger",mergerInput.Data(),"");
-
- if (writerInput.Length()>0) writerInput+=" ";
- writerInput+="globalmerger";
-
- //////////////////////////////////////////////////////////////////////////////////////////
- //
- // output section
- //
-
- //////////////////////////////////////////////////////////////////////////////////////////
- // sink1: id=sink-writeall write all blocks
- AliHLTConfiguration sink1("sink-writeall", "FileWriter" , writerInput.Data(), "-specfmt -subdir=event_%d -blcknofmt=_0x%x -idfmt=_0x%08x");
-
-
- //////////////////////////////////////////////////////////////////////////////////////////
- // sink2: id=sink-esd-file write ESD using the TPCEsdWriter
- AliHLTConfiguration sink2("sink-esd-file", "TPCEsdWriter" , "globalmerger", "-datafile AliHLTESDs.root");
-
-
- //////////////////////////////////////////////////////////////////////////////////////////
- // sink3: id=sink-esd add ESD to HLTOUT using the TPCEsdConverter
-
- // the esd converter configuration
- //AliHLTConfiguration sink3("sink-esd", "TPCEsdConverter" , "globalmerger", "");
- AliHLTConfiguration sink3("sink-esd", "TPCEsdConverter" , mergerInput.Data(), "");
-
-
- //////////////////////////////////////////////////////////////////////////////////////////
- // sink4: id=sink-clusters add cluster data blocks to HLTOUT
- AliHLTConfiguration sink4("sink-clusters", "BlockFilter" , sinkClusterInput.Data(), "-datatype 'CLUSTERS' 'TPC '");
-}
//
// init the HLT system in order to define the analysis chain below
//
- gSystem->Load("libHLTrec.so");
- AliHLTSystem* gHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
///////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// init the HLT system in order to define the analysis chain below
//
- gSystem->Load("libHLTrec.so");
- AliHLTSystem* gHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
///////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// init the HLT system in order to define the analysis chain below
//
- gSystem->Load("libHLTrec.so");
- AliHLTSystem* gHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
///////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// init the HLT system in order to define the analysis chain below
//
- gSystem->Load("libHLTrec.so");
- AliHLTSystem* gHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
//gHLT.SwitchAliLog(0);
//
// init the HLT system in order to define the analysis chain below
//
- gSystem->Load("libHLTrec.so");
- AliHLTSystem* gHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
///////////////////////////////////////////////////////////////////////////////////////////////////
//
//
// init the HLT system in order to define the analysis chain below
//
- gSystem->Load("libHLTrec.so");
- AliHLTSystem* gHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
///////////////////////////////////////////////////////////////////////////////////////////////////
//
AliHLTLogging log;
//log.SwitchAliLog(0);
- AliSimulation sim;
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+ //
+ // init the HLT system in order to define the analysis chain below
+ //
+ AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
+
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+ //
+ // define the analysis chain
+ //
+
+ // load TPCParam from OCDB
+ const char* cdbEntry="TPC/Calib/Parameters";
+ AliCDBManager* pMan=AliCDBManager::Instance();
+ AliTPCParam* pTPCParam=NULL;
+ if (pMan) {
+ if (!pMan->IsDefaultStorageSet()) {
+ pMan->SetDefaultStorage("local://$ALICE_ROOT/OCDB");
+ pMan->SetRun(0);
+ }
+ AliCDBEntry *pEntry = pMan->Get(cdbEntry);
+ if (pEntry &&
+ pEntry->GetObject() &&
+ (pTPCParam=dynamic_cast<AliTPCParam*>(pEntry->GetObject()))) {
+ } else {
+ HLTWarning("can not load AliTPCParam from CDB entry %s", cdbEntry);
+ }
+ }
+
+ int iMinSlice=0;
+ int iMaxSlice=35;
+ int iMinPart=0;
+ int iMaxPart=5;
+ TString mergerInput;
+ TString writerInput;
+ TString sinkClusterInput;
+ for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
+ TString trackerInput;
+ for (int part=iMinPart; part<=iMaxPart; part++) {
+ TString arg, publisher, cf;
+
+ // digit publisher components
+ arg.Form("-slice %d -partition %d", slice, part);
+ publisher.Form("DP_%02d_%d", slice, part);
+ AliHLTConfiguration pubconf(publisher.Data(), "TPCDigitPublisher", NULL , arg.Data());
+
+ // cluster finder components
+ arg="-timebins ";
+ if (pTPCParam) arg+=pTPCParam->GetMaxTBin()+1;
+ else arg+=446; // old simulated data
+ arg+=" -sorted ";
+ cf.Form("CF_%02d_%d", slice, part);
+ AliHLTConfiguration cfconf(cf.Data(), "TPCClusterFinderUnpacked", publisher.Data(), arg.Data());
+ if (trackerInput.Length()>0) trackerInput+=" ";
+ trackerInput+=cf;
+ if (sinkClusterInput.Length()>0) sinkClusterInput+=" ";
+ sinkClusterInput+=cf;
+ }
+ TString tracker;
+ // tracker finder components
+ tracker.Form("TR_%02d", slice);
+ AliHLTConfiguration trackerconf(tracker.Data(), "TPCSliceTracker", trackerInput.Data(), "-pp-run");
+
+ //add all trackers to writer input. Include if you would like all slice tracks written.
+ //if (writerInput.Length()>0) writerInput+=" ";
+ //writerInput+=tracker;
+
+ // add all clusterfinders to the writer input
+ if (writerInput.Length()>0) writerInput+=" ";
+ writerInput+=trackerInput;
+
+ if (mergerInput.Length()>0) mergerInput+=" ";
+ mergerInput+=tracker;
+
+ }
+
+ // GlobalMerger component
+ AliHLTConfiguration mergerconf("globalmerger","TPCGlobalMerger",mergerInput.Data(),"");
+ if (writerInput.Length()>0) writerInput+=" ";
+ writerInput+="globalmerger";
+
+ //////////////////////////////////////////////////////////////////////////////////////////
+ //
+ // output section
+ //
+
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // sink1: id=sink-writeall write all blocks
+ AliHLTConfiguration sink1("sink-writeall", "FileWriter" , writerInput.Data(), "-specfmt -subdir=event_%d -blcknofmt=_0x%x -idfmt=_0x%08x");
+
+
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // sink2: id=sink-esd-file write ESD using the TPCEsdWriter
+ AliHLTConfiguration sink2("sink-esd-file", "TPCEsdWriter" , "globalmerger", "-datafile AliHLTESDs.root");
+
+
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // sink3: id=sink-esd add ESD to HLTOUT using the TPCEsdConverter
+
+ // the esd converter configuration
+ //AliHLTConfiguration sink3("sink-esd", "TPCEsdConverter" , "globalmerger", "");
+ AliHLTConfiguration sink3("sink-esd", "TPCEsdConverter" , mergerInput.Data(), "");
+
+
+ //////////////////////////////////////////////////////////////////////////////////////////
+ // sink4: id=sink-clusters add cluster data blocks to HLTOUT
+ AliHLTConfiguration sink4("sink-clusters", "BlockFilter" , sinkClusterInput.Data(), "-datatype 'CLUSTERS' 'TPC '");
+
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+ ///////////////////////////////////////////////////////////////////////////////////////////////////
+ //
+ // Init and run the HLT simulation
+ // All but HLT simulation is switched off
+ //
+ AliSimulation sim;
+
// switch of simulation and data generation
// comment all that stuff to also simulate the events and data
sim.SetRunGeneration(kFALSE);
sim.SetMakeSDigits("");
sim.SetMakeDigitsFromHits("");
sim.SetMakeTrigger("");
+ sim.SetRunQA(":");
+ //sim.SetWriteRawData("HLT TPC", "raw.root", kTRUE);
// set the options for the HLT simulation
sim.SetRunHLT("libAliHLTUtil.so libAliHLTTPC.so loglevel=0x7c "
- "config=$ALICE_ROOT/HLT/TPCLib/macros/conf-tpc-esd.C chains=sink-esd,sink-clusters");
+ "chains=sink-esd,sink-clusters");
sim.Run();
}
/////////////////////////////////////////////////////////////////////////
//
// setup of the HLT system
- gSystem->Load("libHLTrec");
- AliHLTSystem* pHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance();
if (!pHLT) {
cerr << "fatal error: can not get HLT instance" << endl;
}
//
// init the HLT system in order to define the analysis chain below
//
- gSystem->Load("libHLTrec.so");
- AliHLTSystem* gHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
gHLT->SetGlobalLoggingLevel(0x7c);
///////////////////////////////////////////////////////////////////////////////////////////////////
/////////////////////////////////////////////////////////////////////////
//
// setup of the HLT system
- gSystem->Load("libHLTrec");
- AliHLTSystem* pHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance();
if (!pHLT) {
cerr << "fatal error: can not get HLT instance" << endl;
}
/////////////////////////////////////////////////////////////////////////
//
// setup of the HLT system
- gSystem->Load("libHLTrec");
- AliHLTSystem* pHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance();
if (!pHLT) {
cerr << "fatal error: can not get HLT instance" << endl;
}
/////////////////////////////////////////////////////////////////////////
//
// setup of the HLT system
- gSystem->Load("libHLTrec");
- AliHLTSystem* pHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* pHLT=AliHLTPluginBase!::GetInstance();
if (!pHLT) {
cerr << "fatal error: can not get HLT instance" << endl;
}
/////////////////////////////////////////////////////////////////////////
//
// setup of the HLT system
- gSystem->Load("libHLTrec");
- AliHLTSystem* pHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance();
if (!pHLT) {
cerr << "fatal error: can not get HLT instance" << endl;
}
/////////////////////////////////////////////////////////////////////////
//
// setup of the HLT system
- gSystem->Load("libHLTrec");
- AliHLTSystem* pHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance();
if (!pHLT) {
cerr << "fatal error: can not get HLT instance" << endl;
}
/////////////////////////////////////////////////////////////////////////
//
// setup of the HLT system
- gSystem->Load("libHLTrec");
- AliHLTSystem* pHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* pHLT=AliHLTPluginBase::GetInstance();
if (!pHLT) {
cerr << "fatal error: can not get HLT instance" << endl;
}
//
// init the HLT system in order to define the analysis chain below
//
- gSystem->Load("libHLTrec.so");
- AliHLTSystem* gHLT=AliHLTReconstructorBase::GetInstance();
+ AliHLTSystem* gHLT=AliHLTPluginBase::GetInstance();
gHLT->SetGlobalLoggingLevel(0x4);
/* enum AliHLTComponentLogSeverity {
kHLTLogNone = 0,
AliHLTComponentHandler.h \
AliHLTSystem.h \
AliHLTReconstructorBase.h \
+ AliHLTPluginBase.h \
AliHLTProcessor.h \
AliHLTCalibrationProcessor.h \
AliHLTConfiguration.h \
AliHLTReconstructor::AliHLTReconstructor()
:
AliReconstructor(),
- AliHLTReconstructorBase(),
+ AliHLTPluginBase(),
fFctProcessHLTOUT(NULL),
fpEsdManager(NULL)
{
AliHLTReconstructor::AliHLTReconstructor(const char* options)
:
AliReconstructor(),
- AliHLTReconstructorBase(),
+ AliHLTPluginBase(),
fFctProcessHLTOUT(NULL),
fpEsdManager(NULL)
{
*/
#include "AliReconstructor.h"
-#include "AliHLTReconstructorBase.h"
+#include "AliHLTPluginBase.h"
class AliHLTSystem;
class AliRawReader;
* @ingroup alihlt_aliroot_reconstruction
* @section sec_alihltreconstructor_members Class members
*/
-class AliHLTReconstructor: public AliReconstructor, public AliHLTReconstructorBase {
+class AliHLTReconstructor: public AliReconstructor, public AliHLTPluginBase {
public:
/** standard constructor */
AliHLTReconstructor();
AliRawReaderHLT::AliRawReaderHLT(AliRawReader* pRawreader, const char* options)
:
AliRawReader(),
- AliHLTReconstructorBase(),
+ AliHLTPluginBase(),
fpParentReader(pRawreader),
fOptions(),
fSystemOptions(),
#include "AliHLTDataTypes.h"
#include "AliRawReader.h" // RAW, base class
-#include "AliHLTReconstructorBase.h"
+#include "AliHLTPluginBase.h"
#include "TString.h"
#include <vector>
*
* @ingroup alihlt_aliroot_reconstruction
*/
-class AliRawReaderHLT : public AliRawReader, public AliHLTReconstructorBase {
+class AliRawReaderHLT : public AliRawReader, public AliHLTPluginBase {
public:
/** constructor */
AliRawReaderHLT(AliRawReader* pParentReader, const char* options=NULL);
#include "AliCDBId.h"
#include "AliCDBMetaData.h"
#include "AliHLTSystem.h"
+#include "AliHLTPluginBase.h"
#include "AliRawReaderFile.h"
#include "AliRawReaderDate.h"
#include "AliRawReaderRoot.h"
AliHLTSimulation::AliHLTSimulation()
:
fOptions(),
- fpSystem(NULL),
+ fpPluginBase(new AliHLTPluginBase),
fpRawReader(NULL)
{
// see header file for class documentation
AliHLTSimulation::~AliHLTSimulation()
{
// see header file for function documentation
- if (fpSystem) {
- delete fpSystem;
- }
- fpSystem=NULL;
+ if (fpPluginBase) delete fpPluginBase;
+ fpPluginBase=NULL;
+
if (fpRawReader) {
delete fpRawReader;
}
fOptions=options;
TString sysOp;
- if (!fpSystem) fpSystem=new AliHLTSystem;
- if (!fpSystem) {
- AliError("can not create AliHLTSystem object");
+ if(!fpPluginBase) {
+ AliError("internal initialization failed");
+ return -EINVAL;
+ }
+
+ AliHLTSystem* pSystem=fpPluginBase->GetInstance();
+ if (!pSystem) {
+ AliError("can not get AliHLTSystem instance");
return -ENOMEM;
}
- if (fpSystem->CheckStatus(AliHLTSystem::kError)) {
+ if (pSystem->CheckStatus(AliHLTSystem::kError)) {
AliError("HLT system in error state");
return -EFAULT;
}
}
// scan options
- if (fpSystem->ScanOptions(sysOp.Data())<0) {
+ if (pSystem->ScanOptions(sysOp.Data())<0) {
AliError("error setting options for HLT system");
return -EINVAL;
}
- if (!fpSystem->CheckStatus(AliHLTSystem::kReady)) {
- if ((fpSystem->Configure(fpRawReader, pRunLoader))<0) {
+ if (!pSystem->CheckStatus(AliHLTSystem::kReady)) {
+ if ((pSystem->Configure(fpRawReader, pRunLoader))<0) {
AliError("error during HLT system configuration");
return -EFAULT;
}
int AliHLTSimulation::Run(AliRunLoader* pRunLoader)
{
// HLT reconstruction for simulated data
+ if(!fpPluginBase) {
+ AliError("internal initialization failed");
+ return -EINVAL;
+ }
+
if(!pRunLoader) {
AliError("Missing RunLoader! 0x0");
return -EINVAL;
int nEvents = pRunLoader->GetNumberOfEvents();
int iResult=0;
- if (fpSystem->CheckStatus(AliHLTSystem::kError)) {
+ AliHLTSystem* pSystem=fpPluginBase->GetInstance();
+ if (!pSystem) {
+ AliError("can not get AliHLTSystem instance");
+ return -ENOMEM;
+ }
+
+ if (pSystem->CheckStatus(AliHLTSystem::kError)) {
AliError("HLT system in error state");
return -EFAULT;
}
// Note: the rawreader is already placed at the first event
- if ((iResult=fpSystem->Reconstruct(1, pRunLoader, fpRawReader))>=0) {
- fpSystem->FillESD(0, pRunLoader, NULL);
+ if ((iResult=pSystem->Reconstruct(1, pRunLoader, fpRawReader))>=0) {
+ pSystem->FillESD(0, pRunLoader, NULL);
for (int i=1; i<nEvents; i++) {
if (fpRawReader && !fpRawReader->NextEvent()) {
AliError("mismatch in event count, rawreader corrupted");
break;
}
- fpSystem->Reconstruct(1, pRunLoader, fpRawReader);
- fpSystem->FillESD(i, pRunLoader, NULL);
+ pSystem->Reconstruct(1, pRunLoader, fpRawReader);
+ pSystem->FillESD(i, pRunLoader, NULL);
}
// send specific 'event' to execute the stop sequence
- fpSystem->Reconstruct(0, NULL, NULL);
+ pSystem->Reconstruct(0, NULL, NULL);
}
return iResult;
}
#include "TObject.h"
#include "TString.h"
class AliRunLoader;
-class AliHLTSystem;
+class AliHLTPluginBase;
class AliRawReader;
/**
/* current options */
TString fOptions; //!transient
- /* HLT steering object */
- AliHLTSystem* fpSystem; //!transient
+ /** base class for AliRoot HLT plugins */
+ AliHLTPluginBase* fpPluginBase; //!transient
- /* RAW reader instance for chains which need RAW data as input */
- AliRawReader* fpRawReader; //!transient
+ /** RAW reader instance for chains which need RAW data as input */
+ AliRawReader* fpRawReader; //!transient
- ClassDef(AliHLTSimulation, 1)
+ ClassDef(AliHLTSimulation, 2)
};
#define ALIHLTSIMULATION_LIBRARY "libHLTsim.so"