X-Git-Url: http://git.uio.no/git/?a=blobdiff_plain;f=HLT%2FBASE%2FAliHLTModuleAgent.h;h=57359349d50bb325a68cbf04e93f60b484b09d65;hb=6d798f33f49b483ab6ac43956b590b67516706da;hp=1d89054e0ff8832e9e6ef6551467d0b4b610f4e2;hpb=c512382464cdd8bfcef9d34c7134cd9d9376f9f5;p=u%2Fmrichter%2FAliRoot.git diff --git a/HLT/BASE/AliHLTModuleAgent.h b/HLT/BASE/AliHLTModuleAgent.h index 1d89054e0ff..57359349d50 100644 --- a/HLT/BASE/AliHLTModuleAgent.h +++ b/HLT/BASE/AliHLTModuleAgent.h @@ -20,6 +20,7 @@ // or // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt +#include #include #include #include @@ -46,8 +47,8 @@ class AliHLTModulePreprocessor; * @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 AliSimulation, if the raw reader is present on - * raw data as part of AliReconstruction. The configurations + * data as part of AliSimulation, if only the raw reader is present, + * on raw data as part of AliReconstruction. The configurations * can adapt to the two cases. * * All HLT component libraries are loaded on demand through the HLT steering @@ -70,8 +71,8 @@ class AliHLTModulePreprocessor; * Create HLT configuration forming an HLT analysis chain.
* 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. + * reconstruction is performed on simulated data, on raw data if Run + * loader is NULL and only the raw reader present. * * - @ref GetReconstructionChains
* Configurations run during event reconstruction.
@@ -141,6 +142,11 @@ class AliHLTModuleAgent : public TObject, public AliHLTLogging { */ static AliHLTModuleAgent* GetNextAgent(); + /** + * Get string of blank separated Module Ids + */ + static string GetAgentIds(); + /** * Activate a component handler for this agent. * The @ref RegisterComponents method will be called in order to allow @@ -149,7 +155,7 @@ class AliHLTModuleAgent : public TObject, public AliHLTLogging { * invocation. In the current stage of development, only one handler * can be activated per agent. This is sufficient for the current * operation, but can be extended. - * @param pHandler [in] the component handler instance + * @param [in] pHandler the component handler instance */ int ActivateComponentHandler(AliHLTComponentHandler* pHandler); @@ -158,14 +164,16 @@ class AliHLTModuleAgent : public TObject, public AliHLTLogging { * AliHLTConfigurationHandler. The agent can adapt the configurations * to be registered to the current AliRoot setup by checking the * runloader and the raw reader.
- * 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 + * The presence of Run loader and raw reader determines the mode of the + * HLT reconstruction. If a run loader is available, reconstruction is + * performed on simulated data, a raw reader might be available in that + * case also. When running embedded into AliReconstruction, the Run loader + * is always NULL and the raw gives access to 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 + * @param [in] handler the configuration handler + * @param [in] rawReader AliRoot RawReader instance + * @param [in] runloader AliRoot runloader * @return neg. error code if failed */ virtual int CreateConfigurations(AliHLTConfigurationHandler* handler, @@ -178,8 +186,8 @@ class AliHLTModuleAgent : public TObject, public AliHLTLogging { * 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 run loader and the raw reader. - * @param rawReader [in] AliRoot RawReader instance - * @param runloader [in] AliRoot runloader + * @param [in] rawReader AliRoot RawReader instance + * @param [in] runloader AliRoot runloader * @return string containing the top configurations separated by blanks */ virtual const char* GetReconstructionChains(AliRawReader* rawReader=NULL, @@ -203,10 +211,16 @@ class AliHLTModuleAgent : public TObject, public AliHLTLogging { * - @ref AliHLTComponentHandler::AddComponent
* Same functionality but handler deletes the object at the end. * - * @param pHandler [in] instance of the component handler + * @param [in] pHandler instance of the component handler */ virtual int RegisterComponents(AliHLTComponentHandler* pHandler) const; + /** + * Define QA plugins + * @return blank separated list of class names + */ + virtual const char* GetQAPlugins() const; + /** * IDs for output handlers. * The agent can provide output handlers in order to treat the output @@ -235,7 +249,7 @@ class AliHLTModuleAgent : public TObject, public AliHLTLogging { kRawStream, /** agent provides a chain - * The data bock is fed into an analysis chain, the treatment + * The data block is fed into an analysis chain, the treatment * depends on the components in the chain. */ kChain, @@ -263,7 +277,8 @@ class AliHLTModuleAgent : public TObject, public AliHLTLogging { AliHLTOUTHandlerDesc(const AliHLTOUTHandlerDesc& src) : fHType(src.fHType), fDt(src.fDt), fModule(src.fModule) {} - const AliHLTOUTHandlerDesc& operator=(const AliHLTOUTHandlerDesc& src) { + AliHLTOUTHandlerDesc& operator=(const AliHLTOUTHandlerDesc& src) { + if (this==&src) return *this; fHType=src.fHType; fDt=src.fDt; fModule=src.fModule; return *this; } @@ -272,6 +287,13 @@ class AliHLTModuleAgent : public TObject, public AliHLTLogging { bool operator==(const AliHLTOUTHandlerType handlerType) const { return fHType==handlerType; } + /** + * Two descriptors are equal if all members match. + */ + bool operator==(const AliHLTOUTHandlerDesc& desc) const { + return fDt==desc.fDt && fHType==desc.fHType && fModule==desc.fModule; + } + operator AliHLTOUTHandlerType() {return fHType;} operator AliHLTComponentDataType() {return fDt;} @@ -288,9 +310,15 @@ class AliHLTModuleAgent : public TObject, public AliHLTLogging { /** * Get handler description for a data block. - * @param dt [in] data type of the block - * @param spec [in] specification of the block - * @param desc [out] handler description + * Depending on the data type and data specification the handler must + * provide information + * - if it can handle the data block, and + * - details how it will handle it, mainly the type of the handler + * @ref AliHLTOUTHandlerType + * + * @param [in] dt data type of the block + * @param [in] spec specification of the block + * @param [out] desc handler description * @return 1 if the agent can provide a handler, 0 if not */ virtual int GetHandlerDescription(AliHLTComponentDataType dt, @@ -306,8 +334,8 @@ class AliHLTModuleAgent : public TObject, public AliHLTLogging { * The framework first collects the handlers for all data blocks, and * calls the @ref AliHLTOUTHandler::ProcessData method afterwords for * each handler. - * @param dt [in] data type of the block - * @param spec [in] specification of the block + * @param [in] dt data type of the block + * @param [in] spec specification of the block * @return pointer to handler */ virtual AliHLTOUTHandler* GetOutputHandler(AliHLTComponentDataType dt, @@ -315,19 +343,19 @@ class AliHLTModuleAgent : public TObject, public AliHLTLogging { /** * Delete an HLTOUT handler. - * Even if the agent returned the handler several times, this is the - * final cleanup. The framwork makes sure that the handler is not - * used any further outside the agent. The default implementation just - * deltetes the object. + * This is the final cleanup. The framwork makes sure that the handler is + * not used any further outside the agent. Even if the agent returned the + * same handler several times, cleanup is invoked only once. The default + * implementation just deletes the object. * @param pInstance pointer to handler */ virtual int DeleteOutputHandler(AliHLTOUTHandler* pInstance); /** * Get raw stream for a data block. - * @param dt [in] data type of the block - * @param spec [in] specification of the block - * @param pData [in] data control object + * @param [in] dt data type of the block + * @param [in] spec specification of the block + * @param [in] pData data control object * @return Rawstream object, NULL if no Rawstream available for data type/spec */ // this method is likely to be moved to a specific implementation