]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/MUON/OfflineInterface/AliHLTMUONAgent.h
Disabling default rootification of MUON HLT raw data.
[u/mrichter/AliRoot.git] / HLT / MUON / OfflineInterface / AliHLTMUONAgent.h
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                               */
5
6 // $Id$
7
8 ///
9 /// @file   AliHLTMUONAgent.h
10 /// @author Artur Szostak <artursz@iafrica.com>
11 /// @date   28 May 2007
12 /// @brief  The HLT module agent for libAliHLTMUON.so which interfaces HLT components with offline.
13 ///
14
15 #include "AliHLTModuleAgent.h"
16 class AliRunLoader;
17 class AliHLTOUTHandlerChain;
18
19 /**
20  * This module agent handles dimuon HLT module registration and configurations
21  * within the AliRoot framework.
22  */
23 class AliHLTMUONAgent : public AliHLTModuleAgent
24 {
25 public:
26         AliHLTMUONAgent();
27         
28         virtual ~AliHLTMUONAgent();
29
30         // The following methods are all inherited from AliHLTModuleAgent:
31         
32         /**
33          * Register all processing configurations belonging to the dimuon HLT
34          * library with the AliHLTConfigurationHandler.
35          * @param handler      the configuration handler
36          * @param runloader    AliRoot runloader
37          * @return Zero on success and error code if failed.
38          */
39         virtual int CreateConfigurations(
40                         AliHLTConfigurationHandler* handler,
41                         AliRawReader* rawReader=NULL,
42                         AliRunLoader* runloader = NULL
43                 ) const;
44
45         /**
46          * Returns the top processing chain configurations for local event
47          * reconstruction.
48          * @param runloader  [in] AliRoot runloader
49          * @return string containing the top configurations separated by blanks.
50          */
51         virtual const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
52                                             AliRunLoader* runloader = NULL) const;
53
54         /**
55          * Component libraries which the configurations of this agent depend on.
56          * @return list of component libraries as a blank-separated string.
57          */
58         virtual const char* GetRequiredComponentLibraries() const;
59         
60         /**
61          * Registers all available components of this module.
62          * @param pHandler  [in] instance of the component handler.
63          */
64         virtual int RegisterComponents(AliHLTComponentHandler* pHandler) const;
65         
66         /**
67          * Get handler decription for dHLT data in the HLTOUT data stream.
68          * @param dt        [in] data type of the block
69          * @param spec      [in] specification of the block
70          * @param desc      [out] handler description
71          * @return 1 if the agent can provide a handler, 0 if not.
72          */
73         virtual int GetHandlerDescription(
74                         AliHLTComponentDataType dt,
75                         AliHLTUInt32_t spec,
76                         AliHLTOUTHandlerDesc& desc
77                 ) const;
78         
79         /**
80          * Get specific handler for dHLT data in the HLTOUT data stream.
81          * @param dt        [in] data type of the block
82          * @param spec      [in] specification of the block
83          * @return pointer to handler
84          */
85         virtual AliHLTOUTHandler* GetOutputHandler(
86                         AliHLTComponentDataType dt, AliHLTUInt32_t spec
87                 );
88         
89         /**
90          * Delete an HLTOUT handler.
91          * @param pInstance      pointer to handler
92          */
93         virtual int DeleteOutputHandler(AliHLTOUTHandler* pInstance);
94
95         /**
96          * \returns true if a MUON module was added to gAlice.
97          */
98         static bool IsMuonModuleLoaded();
99         
100         /**
101          * \returns the flag indicating if the dHLT-rootify-and-dump chain should
102          *    be run as a HLTOUT handler during reconstruction. The default is not
103          *    to run this chain. The chain is used to convert HLT raw data blocks
104          *    into ROOT objects, typically useful for testing and debugging.
105          */
106         static bool RunRootifyChain() { return fgRunRootifyChain; }
107         
108         /**
109          * Sets the flag indicating if the dHLT-rootify-and-dump chain should be
110          * run during reconstruction.
111          */
112         static void RunRootifyChain(bool value) { fgRunRootifyChain = value; }
113         
114 private:
115         // The following instance is used for automatic agent and component registration.
116         static AliHLTMUONAgent fgkInstance;  ///< The single global instance of the dimuon HLT agent.
117         
118         static AliHLTOUTHandlerChain  fgkESDMakerChain;  ///< Chain handler for converting dHLT raw data to ESD format.
119         static AliHLTOUTHandlerChain  fgkRootifyDumpChain;  ///< Chain handler for converting dHLT raw data to ROOT objects and dumping to file.
120
121         static Int_t fgMuonModuleLoaded; ///< Cached flag for indicating if the MUON module was loaded for a simulation.
122         static bool fgRunRootifyChain; // Indicates if the dHLT-rootify-and-dump chain should be run.
123
124         ClassDef(AliHLTMUONAgent, 0); // Dimuon HLT module agent which handles processing configurations.
125 };
126
127 #endif // ALIHLTMUONAGENT_H