- AliHLTModuleAgent interface functions adapted to the final simulation/reconstruction scheme
Register(this);
}
-AliHLTModuleAgent::AliHLTModuleAgent(const AliHLTModuleAgent&)
- :
- TObject(),
- AliHLTLogging(),
- fpNext(NULL)
-{
- // see header file for function documentation
-}
-
-AliHLTModuleAgent& AliHLTModuleAgent::operator=(const AliHLTModuleAgent&)
-{
- // see header file for function documentation
- return *this;
-}
-
AliHLTModuleAgent::~AliHLTModuleAgent()
{
// see header file for function documentation
}
int AliHLTModuleAgent::CreateConfigurations(AliHLTConfigurationHandler* /*handler*/,
+ AliRawReader* /*rawReader*/,
AliRunLoader* /*runloader*/) const
{
// default method, nothing to be done, child classes can overload
return 0;
}
-const char* AliHLTModuleAgent::GetLocalRecConfigurations(AliRunLoader* /*runloader*/) const
-{
- // default method, nothing to be done, child classes can overload
- return NULL;
-}
-
-const char* AliHLTModuleAgent::GetEventRecConfigurations(AliRunLoader* /*runloader*/) const
+const char* AliHLTModuleAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
+ AliRunLoader* /*runloader*/) const
{
// default method, nothing to be done, child classes can overload
return NULL;
return NULL;
}
-int AliHLTModuleAgent::RegisterComponents(AliRunLoader* /*runloader*/) const
+int AliHLTModuleAgent::RegisterComponents(AliRawReader* /*rawReader*/,
+ AliRunLoader* /*runloader*/) const
{
// default method, nothing to be done, child classes can overload
return 0;
#include "AliHLTConfigurationHandler.h"
class AliRunLoader;
+class AliRawReader;
/**
* @class AliHLTModuleAgent
* it depends on.
* @note There must not be more than one agent per module/library.
*
+ * If a run loader is available, reconstruction is performed on simulated
+ * data as part of <tt>AliSimulation</tt>, if the raw reader is present on
+ * raw data as part of <tt>AliReconstruction</tt>. The configurations
+ * can adapt to the two cases.
+ *
* All HLT component libraries are loaded on demand through the HLT steering
* instance (@ref AliHLTSystem). A library can implement an agent derived
* from this base class, and has to define one global object of this agent
* can be queried when required.
*
* This is usually done during running the AliRoot reconstruction (see AliRoot
- * documentation on <tt> AliReconstruction</tt>). The HLT implemets the @ref
- * AliHLTReconstructor which holds the HLT steering object. Several flags can
- * be specified as options via the <tt>SetOption</tt> method of
+ * documentation on <tt> AliSimulation </tt> and <tt> AliReconstruction <tt>).
+ * The HLT implemets the @ref AliHLTSimulation and @ref
+ * AliHLTReconstructor which hold the HLT steering object. Several flags can
+ * be specified as options via the <tt>SetRunHLT</tt> method of
+ * <tt>AliSimulation</tt> and the <tt>SetOption</tt> method of
* <tt>AliReconstruction</tt>, including the component libraries to be loaded.
*
* @section alihltmoduleagent_interface Agent interface
* The child can implement the following functions:
* - @ref CreateConfigurations <br>
- * create HLT configuration forming an HLT analysis chain.
+ * Create HLT configuration forming an HLT analysis chain. <br>
+ * Reconstruction of raw data or simulated data from digits needs
+ * usually different configurations. If a run loader is available,
+ * reconstruction is performed on simulated data, on raw data if the
+ * raw reader is present.
*
- * - @ref GetLocalRecConfigurations <br>
- * configurations run during local event reconstruction.
- * @note Local event reconstruction is the first step of the
- * reconstruction chain. All events are processed at once.
- * <br>
- * - @ref GetEventRecConfigurations <br>
- * configurations run during event reconstruction.
- * @note This is the reconstruction on event by event basis.
+ * - @ref GetReconstructionChains <br>
+ * Configurations run during event reconstruction. <br>
+ * Define chains to be run during the recunstruction step,
+ * Depending on the availability of AliRoot run loader or raw reader
* <br>
+ *
* - @ref GetRequiredComponentLibraries <br>
* can indicate further libraries which are required for running the
* chains (e.g. if components of another library are used).
* global agent manager
*/
AliHLTModuleAgent();
- /** not a valid copy constructor, defined according to effective C++ style */
- AliHLTModuleAgent(const AliHLTModuleAgent&);
- /** not a valid assignment op, but defined according to effective C++ style */
- AliHLTModuleAgent& operator=(const AliHLTModuleAgent&);
/** destructor */
virtual ~AliHLTModuleAgent();
* Register all configurations belonging to this module with the
* AliHLTConfigurationHandler. The agent can adapt the configurations
* to be registered to the current AliRoot setup by checking the
- * runloader.
+ * runloader and the raw reader. <br>
+ * Run loader and raw reader are usually not present at the same time.
+ * If a run loader is available, reconstruction is performed on simulated
+ * data, if the raw reader is present on raw data. The configurations
+ * can adapt to the two cases.
+ *
* @param handler [in] the configuration handler
+ * @param rawReader [in] AliRoot RawReader instance
* @param runloader [in] AliRoot runloader
* @return neg. error code if failed
*/
virtual int CreateConfigurations(AliHLTConfigurationHandler* handler,
+ AliRawReader* rawReader=NULL,
AliRunLoader* runloader=NULL) const;
/**
- * Get the top configurations for local event reconstruction.
+ * Get the top configurations for event reconstruction.
* A top configuration describes a processing chain. It can simply be
* described by the last configuration(s) in the chain.
* The agent can adapt the configurations to be registered to the current
- * AliRoot setup by checking the runloader.
- * @param runloader [in] AliRoot runloader
- * @return string containing the top configurations separated by blanks
- */
- virtual const char* GetLocalRecConfigurations(AliRunLoader* runloader=NULL) const;
-
- /**
- * Get the top configurations for event reconstruction.
- * The same as for @ref GetLocalRecConfigurations, but for the reconstruction on
- * event by event basis.
- * @param runloader [in] AliRoot runloader
+ * AliRoot setup by checking the run loader and the raw reader.
+ * @param rawReader [in] AliRoot RawReader instance
+ * @param runloader [in] AliRoot runloader
* @return string containing the top configurations separated by blanks
*/
- virtual const char* GetEventRecConfigurations(AliRunLoader* runloader=NULL) const;
+ virtual const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
+ AliRunLoader* runloader=NULL) const;
/**
- * Component libraries which the configurations of this agent depend on.
+ * Component libraries which the configurations of this agent depend on. <br>
+ * @note This is not the right place to specify libraries which this component
+ * library depends. Dependencies must be linked or loaded before.
* @return list of component libraries as a blank-separated string.
*/
virtual const char* GetRequiredComponentLibraries() const;
* \em Note: The sample object is owned by the agent, make sure to delete
* it.
*/
- virtual int RegisterComponents(AliRunLoader* runloader=NULL) const;
+ virtual int RegisterComponents(AliRawReader* rawReader=NULL,
+ AliRunLoader* runloader=NULL) const;
/**
* Old method kept for backward compatibility, redirected to @ref
- * GetLocalRecConfigurations.
+ * GetReconstructionChains.
*/
const char* GetTopConfigurations(AliRunLoader* runloader=NULL) const {
- return GetLocalRecConfigurations(runloader);
+ return GetReconstructionChains(NULL,runloader);
}
protected:
private:
+ /** copy constructor prohibited */
+ AliHLTModuleAgent(const AliHLTModuleAgent&);
+ /** assignment operator prohibited */
+ AliHLTModuleAgent& operator=(const AliHLTModuleAgent&);
+
/**
* Register agent in the global list.
* @return neg. error code if failed
fpConfigurationHandler(new AliHLTConfigurationHandler()),
fTaskList(),
fState(0),
- fLocalRec()
+ fChains(),
+ fStopwatches(new TObjArray),
+ fEventCount(-1),
+ fGoodEvents(-1)
{
// see header file for class documentation
// or
}
}
-int AliHLTSystem::Run(Int_t iNofEvents)
+int AliHLTSystem::Run(Int_t iNofEvents, int bStop)
{
// see header file for class documentation
int iResult=0;
int iCount=0;
SetStatusFlags(kRunning);
- TStopwatch StopwatchBase; StopwatchBase.Reset();
- TStopwatch StopwatchDA; StopwatchDA.Reset();
- TStopwatch StopwatchInput; StopwatchInput.Reset();
- TStopwatch StopwatchOutput; StopwatchOutput.Reset();
- TObjArray Stopwatches;
- Stopwatches.AddAt(&StopwatchBase, (int)AliHLTComponent::kSWBase);
- Stopwatches.AddAt(&StopwatchDA, (int)AliHLTComponent::kSWDA);
- Stopwatches.AddAt(&StopwatchInput, (int)AliHLTComponent::kSWInput);
- Stopwatches.AddAt(&StopwatchOutput, (int)AliHLTComponent::kSWOutput);
- if ((iResult=InitTasks())>=0 && (iResult=InitBenchmarking(&Stopwatches))>=0) {
- if ((iResult=StartTasks())>=0) {
- for (int i=0; i<iNofEvents && iResult>=0; i++) {
- iResult=ProcessTasks(i);
- if (iResult>=0) {
- HLTInfo("Event %d successfully finished (%d)", i, iResult);
- iResult=0;
+ if (fEventCount>=0 || (iResult=InitTasks())>=0) {
+ if (fEventCount>=0 || (iResult=StartTasks())>=0) {
+ if (fEventCount==0) {
+ InitBenchmarking(fStopwatches);
+ } else {
+ //ResumeBenchmarking(fStopwatches);
+ }
+ for (int i=fEventCount; i<fEventCount+iNofEvents && iResult>=0; i++) {
+ if ((iResult=ProcessTasks(i))>=0) {
+ fGoodEvents++;
iCount++;
} else {
- HLTError("Processing of event %d failed (%d)", i, iResult);
// TODO: define different running modes to either ignore errors in
// event processing or not
// currently ignored
- //iResult=0;
+ iResult=0;
}
}
- StopTasks();
- } else {
- HLTError("can not start task list");
+ fEventCount+=iNofEvents;
+ if (bStop) StopTasks();
+ //else PauseBenchmarking(fStopwatches);
}
- DeinitTasks();
- } else if (iResult!=-ENOENT) {
- HLTError("can not initialize task list");
+ if (bStop) DeinitTasks();
}
if (iResult>=0) {
iResult=iCount;
- HLTInfo("HLT statistics:\n"
- " base: R:%.3fs C:%.3fs\n"
- " input: R:%.3fs C:%.3fs\n"
- " output: R:%.3fs C:%.3fs\n"
- " event processing : R:%.3fs C:%.3fs"
- , StopwatchBase.RealTime(),StopwatchBase.CpuTime()
- , StopwatchInput.RealTime(),StopwatchInput.CpuTime()
- , StopwatchOutput.RealTime(),StopwatchOutput.CpuTime()
- , StopwatchDA.RealTime(),StopwatchDA.CpuTime());
} else if (iResult==-ENOENT) {
iResult=0; // do not propagate the error
}
// see header file for class documentation
int iResult=0;
TObjLink *lnk=fTaskList.FirstLink();
+
if (lnk==NULL) {
HLTWarning("Task list is empty, aborting ...");
return -ENOENT;
lnk = lnk->Next();
}
if (iResult<0) {
+ HLTError("can not initialize task list, error %d", iResult);
}
+
return iResult;
}
int AliHLTSystem::InitBenchmarking(TObjArray* pStopwatches)
{
// see header file for class documentation
- if (pStopwatches==NULL) return -EINVAL;
-
int iResult=0;
+ if (pStopwatches==NULL) return 0;
+
+ for (int i=0; i<(int)AliHLTComponent::kSWTypeCount; i++) {
+ TStopwatch* pStopwatch= new TStopwatch;
+ if (pStopwatch) {
+ pStopwatch->Reset();
+ pStopwatches->AddAt(pStopwatch, i);
+ } else {
+ iResult=-ENOMEM;
+ break;
+ }
+ }
+
TObjLink *lnk=fTaskList.FirstLink();
while (lnk && iResult>=0) {
TObject* obj=lnk->GetObject();
return iResult;
}
+int AliHLTSystem::PrintBenchmarking(TObjArray* pStopwatches, int bClean)
+{
+ // see header file for class documentation
+ int iInitialized=1;
+ if (pStopwatches==NULL) return 0;
+
+ for (int i=0; i<(int)AliHLTComponent::kSWTypeCount; i++) {
+ if (!dynamic_cast<TStopwatch*>(pStopwatches->At(i))) {
+ iInitialized=0;
+ break;
+ }
+ }
+
+ if (iInitialized!=0) {
+ HLTInfo("HLT statistics:\n"
+ " base: R:%.3fs C:%.3fs\n"
+ " input: R:%.3fs C:%.3fs\n"
+ " output: R:%.3fs C:%.3fs\n"
+ " event processing : R:%.3fs C:%.3fs"
+ , dynamic_cast<TStopwatch*>(pStopwatches->At(AliHLTComponent::kSWBase))->RealTime()
+ , dynamic_cast<TStopwatch*>(pStopwatches->At(AliHLTComponent::kSWBase))->CpuTime()
+ , dynamic_cast<TStopwatch*>(pStopwatches->At(AliHLTComponent::kSWInput))->RealTime()
+ , dynamic_cast<TStopwatch*>(pStopwatches->At(AliHLTComponent::kSWInput))->CpuTime()
+ , dynamic_cast<TStopwatch*>(pStopwatches->At(AliHLTComponent::kSWOutput))->RealTime()
+ , dynamic_cast<TStopwatch*>(pStopwatches->At(AliHLTComponent::kSWOutput))->CpuTime()
+ , dynamic_cast<TStopwatch*>(pStopwatches->At(AliHLTComponent::kSWDA))->RealTime()
+ , dynamic_cast<TStopwatch*>(pStopwatches->At(AliHLTComponent::kSWDA))->CpuTime()
+ );
+ }
+
+ if (bClean) {
+ for (int i=0; i<(int)AliHLTComponent::kSWTypeCount; i++) {
+ TObject* pObj=pStopwatches->RemoveAt(i);
+ if (pObj) delete pObj;
+ }
+ }
+ return 0;
+}
+
int AliHLTSystem::StartTasks()
{
// see header file for class documentation
lnk = lnk->Next();
}
if (iResult<0) {
+ HLTError("can not start task list, error %d", iResult);
+ } else {
+ fEventCount=0;
+ fGoodEvents=0;
}
return iResult;
}
}
lnk = lnk->Next();
}
+
+ if (iResult>=0) {
+ HLTInfo("Event %d successfully finished (%d)", eventNo, iResult);
+ iResult=0;
+ } else {
+ HLTError("Processing of event %d failed (%d)", eventNo, iResult);
+ }
+
return iResult;
}
}
lnk = lnk->Next();
}
+ PrintBenchmarking(fStopwatches, 1 /*clean*/);
return iResult;
}
}
lnk = lnk->Next();
}
+ fEventCount=-1;
+ fGoodEvents=-1;
+
return iResult;
}
{
// see header file for class documentation
int iResult=0;
- if (runLoader || rawReader) {
- HLTInfo("Run Loader %p, Raw Reader %p , %d events", runLoader, rawReader, nofEvents);
+ if (runLoader || rawReader || nofEvents==0) {
+ if (nofEvents>0) {HLTInfo("Run Loader %p, Raw Reader %p , %d event(s)", runLoader, rawReader, nofEvents);}
if (CheckStatus(kReady)) {
+ if (nofEvents==0) {
+ // special case to close the reconstruction
+ StopTasks();
+ DeinitTasks();
+ } else {
if ((iResult=AliHLTOfflineInterface::SetParamsToComponents(runLoader, rawReader))>=0) {
- iResult=Run(nofEvents);
+ // the system always remains started after event processing, a specific
+ // call with nofEvents==0 is neede to execute the stop sequence
+ iResult=Run(nofEvents, 0);
+ }
}
} else {
HLTError("wrong state %#x, required flags %#x", GetStatusFlags(), kReady);
{
// see header file for class documentation
int iResult=0;
- if (runLoader) {
+ if (runLoader || esd) {
HLTInfo("Event %d: Run Loader %p, ESD %p", eventNo, runLoader, esd);
iResult=AliHLTOfflineInterface::FillComponentESDs(eventNo, runLoader, esd);
} else {
}
int AliHLTSystem::Configure(AliRunLoader* runloader)
+{
+ // see header file for class documentation
+ Configure(NULL, runloader);
+}
+
+int AliHLTSystem::Configure(AliRawReader* rawReader, AliRunLoader* runloader)
{
// see header file for class documentation
int iResult=0;
if (CheckFilter(kHLTLogDebug))
AliHLTModuleAgent::PrintStatus();
if (CheckStatus(kConfigurationLoaded)==0) {
- iResult=LoadConfigurations(runloader);
+ iResult=LoadConfigurations(rawReader, runloader);
} else {
- if (fLocalRec.Length()==0) {
+ if (fChains.Length()==0) {
HLTError("custom configuration(s) specified, but no configuration to run in local reconstruction, use \'localrec=<conf>\' option");
iResult=-ENOENT;
}
SetStatusFlags(kConfigurationLoaded);
if (CheckFilter(kHLTLogDebug))
fpConfigurationHandler->PrintConfigurations();
- iResult=BuildTaskListsFromTopConfigurations(runloader);
+ iResult=BuildTaskListsFromTopConfigurations(rawReader, runloader);
if (iResult>=0) {
SetStatusFlags(kTaskListCreated);
}
iResult=-EBADF;
}
} else if (token.Contains("localrec=")) {
- TString param=token.ReplaceAll("localrec=", "");
- fLocalRec=param.ReplaceAll(",", " ");
+ TString param=token.ReplaceAll("chains=", "");
+ fChains=param.ReplaceAll(",", " ");
} else if (token.BeginsWith("lib") && token.EndsWith(".so")) {
libs+=token;
libs+=" ";
return iResult;
}
-int AliHLTSystem::LoadConfigurations(AliRunLoader* runloader)
+int AliHLTSystem::LoadConfigurations(AliRawReader* rawReader, AliRunLoader* runloader)
{
// see header file for class documentation
if (CheckStatus(kRunning)) {
}
if (iResult>=0) {
HLTDebug("load configurations for agent %s (%p)", pAgent->GetName(), pAgent);
- pAgent->CreateConfigurations(fpConfigurationHandler, runloader);
+ pAgent->CreateConfigurations(fpConfigurationHandler, rawReader, runloader);
pAgent=AliHLTModuleAgent::GetNextAgent();
}
}
return iResult;
}
-int AliHLTSystem::BuildTaskListsFromTopConfigurations(AliRunLoader* runloader)
+int AliHLTSystem::BuildTaskListsFromTopConfigurations(AliRawReader* rawReader, AliRunLoader* runloader)
{
// see header file for class documentation
if (CheckStatus(kRunning)) {
int iResult=0;
AliHLTModuleAgent* pAgent=AliHLTModuleAgent::GetFirstAgent();
- while ((pAgent || fLocalRec.Length()>0) && iResult>=0) {
+ while ((pAgent || fChains.Length()>0) && iResult>=0) {
TString tops;
- if (fLocalRec.Length()>0) {
- tops=fLocalRec;
+ if (fChains.Length()>0) {
+ tops=fChains;
HLTInfo("custom local reconstruction configurations: %s", tops.Data());
} else {
- tops=pAgent->GetLocalRecConfigurations(runloader);
+ tops=pAgent->GetReconstructionChains(rawReader, runloader);
HLTInfo("local reconstruction configurations for agent %s (%p): %s", pAgent->GetName(), pAgent, tops.Data());
}
TObjArray* pTokens=tops.Tokenize(" ");
delete pTokens;
}
- if (fLocalRec.Length()>0) {
+ if (fChains.Length()>0) {
break; // ignore the agents
}
pAgent=AliHLTModuleAgent::GetNextAgent();
* Run the task list.
* The method checks whether the task list has already been build. If not,
* or the configuration list has been changed, the @ref BuildTaskList
- * method is scalled
+ * method is called. <br>
* All tasks of the list will be subsequently processed for each event.
+ * The system can remain started if the \em bStop parameter is 0. In that
+ * case the system just waits for the next event. A specific call with
+ * nofEvents==0 is needed to execute the stop sequence.
* @param iNofEvents number of events
+ * @param bStop stop the chain after processing
* @return number of reconstructed events, neg error code if failed
*/
- int Run(Int_t iNofEvents=1);
+ int Run(Int_t iNofEvents=1, int bStop=1);
/**
* Init all tasks from the list.
*/
int InitBenchmarking(TObjArray* pStopwatches);
+ /**
+ * Print benchmarking summary.
+ * Optionak: clean up stop watches.
+ * @param pStopwatches object array of stopwatches
+ * @param bClean delete stop watches if 1
+ * @return neg error code if failed
+ */
+ int PrintBenchmarking(TObjArray* pStopwatches, int bClean=0);
+
/**
* Start task list.
* The @ref AliHLTTask::StartRun method is called for each task, the
static void* AllocMemory( void* param, unsigned long size );
/**
- * Reconstruction inside AliRoot.
- * To be called by the AliHLTReconstructor plugin during the
- * LocalReconstruction step of the AliRoot reconstruction. The latter means
- * that all events are reconstructed at once, the event loop is internally
- * implemented. In contrast to that, the FillESD method is called event by
- * event. This requires an 'ESD' recorder at the end of the HLT chain, in
- * order to have the reconstructed events available for the FillESD loop.
+ * AliRoot embedded reconstruction.
+ * Main entry point to execute the HLT reconstruction from AliRoot. Called
+ * either by the AliHLTReconstructor plugin during AliRoot reconstruction
+ * of raw data, or AliHLTSimulation during simulation of data.
+ *
+ * The two cases are distinguished by the availablility of the run loader
+ * and raw reader.
+ * - AliRoot simulation: run loader is available and is propagated to the
+ * module agents (AliHLTModuleAgent) to generate the corresponding
+ * configurations and chains, and to the AliHLTOfflineSource components.
+ * - AliRoot reconstruction: raw reader is available and is propagated to
+ * the agents and AliHLTOfflineSource components.
+ *
+ * The system remains started after the processing and just waits for the
+ * next event. A specific call with nofEvents==0 is needed to execute the
+ * stop sequence.
+ *
* The 'runLoader' and 'rawReader' parameters are set to all active
* AliHLTOfflineDataSource's and the HLT chain is processed for the given
* number of events. If the rawReader is NULL, reconstruction is done on
* - module agents are requested to register configurations
* - task lists are built from the top configurations of the modules
*
+ * @param rawReader instance of the raw reader or NULL
* @param runloader optional instance of the run loader
* @return neg. error code if failed <br>
* -EBUSY system is in kRunning state <br>
*/
- int Configure(AliRunLoader* runloader=NULL);
+ int Configure(AliRawReader* rawReader, AliRunLoader* runloader=NULL);
+ /**
+ * Old method kept for backward compatibilty.
+ *
+ * @param runloader optional instance of the run loader
+ * @return neg. error code if failed <br>
+ * -EBUSY system is in kRunning state <br>
+ */
+ int Configure(AliRunLoader* runloader=NULL);
/**
* Scan options.
* disable redirection of log messages to AliLog class
* \li config=<i>macro</i>
* configuration macro
- * \li localrec=<i>configuration</i>
+ * \li chains=<i>configuration</i>
* comma separated list of configurations to be run during local
* reconstruction
*/
* Load the configurations specified by the module agents.
* The runLoader is passed to the agent and allows configuration
* selection.
+ * @param rawReader instance of the raw reader or NULL
+ * @param runloader optional instance of the run loader
* @return neg. error code if failed
*/
- int LoadConfigurations(AliRunLoader* runloader=NULL);
+ int LoadConfigurations(AliRawReader* rawReader, AliRunLoader* runloader=NULL);
/**
* Get the top configurations of all agents and build the task lists.
+ * @param rawReader instance of the raw reader or NULL
+ * @param runloader optional instance of the run loader
* @return neg. error code if failed
*/
- int BuildTaskListsFromTopConfigurations(AliRunLoader* runloader=NULL);
+ int BuildTaskListsFromTopConfigurations(AliRawReader* rawReader,
+ AliRunLoader* runloader=NULL);
enum AliHLTSystemState_t {
kUninitialized = 0x0,
kConfigurationLoaded = 0x2,
kTaskListCreated = 0x4,
kReady = 0x7,
- kRunning = 0x8,
+ kStarted = 0x8,
+ kRunning = 0x10,
kError = 0x1000
};
/** state of the object */
int fState; // see above
- /** configurations to be run during local reconstruction */
- TString fLocalRec; //!transient
+ /** chains to be run during reconstruction */
+ TString fChains; //!transient
+
+ /* array of stopwatches */
+ TObjArray* fStopwatches; //!transient
+
+ /* number of events processed in total */
+ int fEventCount; //!transient
+
+ /* number of events processed successfully */
+ int fGoodEvents; //!transient
private:
- ClassDef(AliHLTSystem, 3);
+ ClassDef(AliHLTSystem, 4);
};
#endif
// see header file for class documentation
}
-int AliHLTAgentUtil::CreateConfigurations(AliHLTConfigurationHandler* handler,
+int AliHLTAgentUtil::CreateConfigurations(AliHLTConfigurationHandler* /*handler*/,
+ AliRawReader* /*rawReader*/,
AliRunLoader* /*runloader*/) const
{
// see header file for class documentation
- if (handler) {
- }
return 0;
}
-const char* AliHLTAgentUtil::GetLocalRecConfigurations(AliRunLoader* /*runloader*/) const
+const char* AliHLTAgentUtil::GetReconstructionChains(AliRawReader* /*rawReader*/,
+ AliRunLoader* /*runloader*/) const
{
// see header file for class documentation
return NULL;
const char* AliHLTAgentUtil::GetRequiredComponentLibraries() const
{
// see header file for class documentation
- return "libAliHLTUtil.so";
+ return NULL;
}
* AliHLTConfigurationHandler. The agent can adapt the configurations
* to be registered to the current AliRoot setup by checking the
* runloader.
- * @param handler the configuration handler
- * @param runloader AliRoot runloader
+ * @param handler [in] the configuration handler
+ * @param rawReader [in] AliRoot RawReader instance
+ * @param runloader [in] AliRoot runloader
* @return neg. error code if failed
*/
int CreateConfigurations(AliHLTConfigurationHandler* handler,
+ AliRawReader* rawReader=NULL,
AliRunLoader* runloader=NULL) const;
/**
* described by the last configuration(s) in the chain.
* The agent can adapt the configurations to be registered to the current
* AliRoot setup by checking the runloader.
- * @param runloader AliRoot runloader
- * @return number of configurations, neg. error code if failed
+ * @param rawReader [in] AliRoot RawReader instance
+ * @param runloader [in] AliRoot runloader
+ * @return string containing the top configurations separated by blanks
*/
- const char* GetLocalRecConfigurations(AliRunLoader* runloader=NULL) const;
-
+ const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
+ AliRunLoader* runloader=NULL) const;
/**
* Component libraries which the configurations of this agent depend on.
* @return list of component libraries as a blank-separated string.
{
}
-const char* AliHLTMUONAgent::GetLocalRecConfigurations(
- AliRunLoader* runloader
+const char* AliHLTMUONAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
+ AliRunLoader* /*runloader*/
) const
{
return "dhlt-simhits";
int AliHLTMUONAgent::CreateConfigurations(
AliHLTConfigurationHandler* handler,
- AliRunLoader* runloader
+ AliRawReader* /*rawReader*/,
+ AliRunLoader* /*runloader*/
) const
{
if (handler == NULL) return 0;
*/
int CreateConfigurations(
AliHLTConfigurationHandler* handler,
+ AliRawReader* rawReader=NULL,
AliRunLoader* runloader = NULL
) const;
* @param runloader [in] AliRoot runloader
* @return string containing the top configurations separated by blanks.
*/
- const char* GetLocalRecConfigurations(AliRunLoader* runloader = NULL) const;
+ const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
+ AliRunLoader* runloader = NULL) const;
/**
* Component libraries which the configurations of this agent depend on.
}
int AliHLTAgentSample::CreateConfigurations(AliHLTConfigurationHandler* handler,
+ AliRawReader* rawReader,
AliRunLoader* runloader) const
{
// see header file for class documentation
return 0;
}
-const char* AliHLTAgentSample::GetLocalRecConfigurations(AliRunLoader* runloader) const
+const char* AliHLTAgentSample::GetReconstructionChains(AliRawReader* rawReader,
+ AliRunLoader* runloader) const
{
// see header file for class documentation
return "sample-sink1 sample-offsnk";
* ...
* handler->CreateConfiguration("my-analysis-chain" , "FileWriter", "my-processor" , "my arguments");
* </pre>
- * - @ref GetLocalRecConfigurations <br>
+ * - @ref GetReconstructionChains <br>
* returns a string of blank separated configurations to be run during
* local event reconstruction.
* <pre>
* </pre>
* - @ref GetRequiredComponentLibraries <br>
* returns a string of blank separated libraries which have to be loaded
- * in addition
+ * in addition in order to load all required components. <br>
+ * @note Not the right place for library dependencies.
* <pre>
* return "libAliHLTUtil.so";
* </pre>
* AliHLTConfigurationHandler. The agent can adapt the configurations
* to be registered to the current AliRoot setup by checking the
* runloader.
- * @param handler the configuration handler
- * @param runloader AliRoot runloader
+ * @param handler [in] the configuration handler
+ * @param rawReader [in] AliRoot RawReader instance
+ * @param runloader [in] AliRoot runloader
* @return neg. error code if failed
*/
int CreateConfigurations(AliHLTConfigurationHandler* handler,
+ AliRawReader* rawReader=NULL,
AliRunLoader* runloader=NULL) const;
/**
* described by the last configuration(s) in the chain.
* The agent can adapt the configurations to be registered to the current
* AliRoot setup by checking the runloader.
- * @param runloader [in] AliRoot runloader
+ * @param rawReader [in] AliRoot RawReader instance
+ * @param runloader [in] AliRoot runloader
* @return string containing the top configurations separated by blanks
*/
- const char* GetLocalRecConfigurations(AliRunLoader* runloader=NULL) const;
+ const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
+ AliRunLoader* runloader=NULL) const;
/**
* Component libraries which the configurations of this agent depend on.
}
int AliHLTTPCAgent::CreateConfigurations(AliHLTConfigurationHandler* handler,
+ AliRawReader* /*rawReader*/,
AliRunLoader* /*runloader*/) const
{
// see header file for class documentation
return 0;
}
-const char* AliHLTTPCAgent::GetLocalRecConfigurations(AliRunLoader* /*runloader*/) const
+const char* AliHLTTPCAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
+ AliRunLoader* /*runloader*/) const
{
// see header file for class documentation
return NULL;
* @return neg. error code if failed
*/
int CreateConfigurations(AliHLTConfigurationHandler* handler,
+ AliRawReader* rawReader=NULL,
AliRunLoader* runloader=NULL) const;
/**
* @param runloader AliRoot runloader
* @return number of configurations, neg. error code if failed
*/
- const char* GetLocalRecConfigurations(AliRunLoader* runloader=NULL) const;
+ const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
+ AliRunLoader* runloader=NULL) const;
/**
* Component libraries which the configurations of this agent depend on.
AliHLTReconstructor::~AliHLTReconstructor()
{
//destructor
+
if (fpSystem) {
+ AliDebug(0, Form("delete HLT system: status %#x", fpSystem->GetStatusFlags()));
+ if (fpSystem->CheckStatus(AliHLTSystem::kReady)) {
+ // send specific 'event' to execute the stop sequence
+ fpSystem->Reconstruct(0, NULL, NULL);
+ }
delete fpSystem;
}
fpSystem=NULL;
return -EFAULT;
}
if ((iResult=fpSystem->Reconstruct(nEvents, pRunLoader, NULL))>=0) {
+ // send specific 'event' to execute the stop sequence
+ fpSystem->Reconstruct(0, NULL, NULL);
}
return iResult;
}