1 #ifndef ALIHLTMUONAGENT_H
2 #define ALIHLTMUONAGENT_H
3 /* Copyright(c) 1998-2007, ALICE Experiment at CERN, All rights reserved. *
4 * See cxx source for full Copyright notice */
9 /// @file AliHLTMUONAgent.h
10 /// @author Artur Szostak <artursz@iafrica.com>
12 /// @brief The HLT module agent for libAliHLTMUON.so which interfaces HLT components with offline.
15 #include "AliHLTModuleAgent.h"
17 class AliHLTOUTHandlerChain;
18 class AliHLTOUTHandlerIgnore;
21 * This module agent handles dimuon HLT module registration and configurations
22 * within the AliRoot framework.
24 class AliHLTMUONAgent : public AliHLTModuleAgent
29 virtual ~AliHLTMUONAgent();
31 // The following methods are all inherited from AliHLTModuleAgent:
34 * Register all processing configurations belonging to the dimuon HLT
35 * library with the AliHLTConfigurationHandler.
36 * @param handler the configuration handler
37 * @param runloader AliRoot runloader
38 * @return Zero on success and error code if failed.
40 virtual int CreateConfigurations(
41 AliHLTConfigurationHandler* handler,
42 AliRawReader* rawReader=NULL,
43 AliRunLoader* runloader = NULL
47 * Returns the top processing chain configurations for local event
49 * @param runloader [in] AliRoot runloader
50 * @return string containing the top configurations separated by blanks.
52 virtual const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
53 AliRunLoader* runloader = NULL) const;
56 * Component libraries which the configurations of this agent depend on.
57 * @return list of component libraries as a blank-separated string.
59 virtual const char* GetRequiredComponentLibraries() const;
62 * Registers all available components of this module.
63 * @param pHandler [in] instance of the component handler.
65 virtual int RegisterComponents(AliHLTComponentHandler* pHandler) const;
68 * Get handler decription for dHLT data in the HLTOUT data stream.
69 * @param dt [in] data type of the block
70 * @param spec [in] specification of the block
71 * @param desc [out] handler description
72 * @return 1 if the agent can provide a handler, 0 if not.
74 virtual int GetHandlerDescription(
75 AliHLTComponentDataType dt,
77 AliHLTOUTHandlerDesc& desc
81 * Get specific handler for dHLT data in the HLTOUT data stream.
82 * @param dt [in] data type of the block
83 * @param spec [in] specification of the block
84 * @return pointer to handler
86 virtual AliHLTOUTHandler* GetOutputHandler(
87 AliHLTComponentDataType dt, AliHLTUInt32_t spec
91 * Delete an HLTOUT handler.
92 * @param pInstance pointer to handler
94 virtual int DeleteOutputHandler(AliHLTOUTHandler* pInstance);
97 * \returns true if a MUON module was added to gAlice.
99 static bool IsMuonModuleLoaded();
102 * \returns the flag indicating if the dHLT-rootify-and-dump chain should
103 * be run as a HLTOUT handler during reconstruction. The default is not
104 * to run this chain. The chain is used to convert HLT raw data blocks
105 * into ROOT objects, typically useful for testing and debugging.
107 static bool RunRootifyChain() { return fgRunRootifyChain; }
110 * Sets the flag indicating if the dHLT-rootify-and-dump chain should be
111 * run during reconstruction.
113 static void RunRootifyChain(bool value) { fgRunRootifyChain = value; }
116 // The following instance is used for automatic agent and component registration.
117 static AliHLTMUONAgent fgkInstance; ///< The single global instance of the dimuon HLT agent.
119 static AliHLTOUTHandlerChain fgkESDMakerChain; ///< Chain handler for converting dHLT raw data to ESD format.
120 static AliHLTOUTHandlerChain fgkRootifyDumpChain; ///< Chain handler for converting dHLT raw data to ROOT objects and dumping to file.
121 static AliHLTOUTHandlerIgnore fgkDataIgnoreHandler; ///< HLTOUT handler for ignoring data blocks.
123 static Int_t fgMuonModuleLoaded; ///< Cached flag for indicating if the MUON module was loaded for a simulation.
124 static bool fgRunRootifyChain; // Indicates if the dHLT-rootify-and-dump chain should be run.
126 ClassDef(AliHLTMUONAgent, 0); // Dimuon HLT module agent which handles processing configurations.
129 #endif // ALIHLTMUONAGENT_H