]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/PHOS/AliHLTPHOSAgent.h
ALIROOT-5600 - skip non-participating detector modules
[u/mrichter/AliRoot.git] / HLT / PHOS / AliHLTPHOSAgent.h
CommitLineData
ac745f08 1//-*- Mode: C++ -*-
2// $Id$
87434909 3#ifndef ALIHLTPHOSAGENT_H
4#define ALIHLTPHOSAGENT_H
5/* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
6 * See cxx source for full Copyright notice */
7
8/** @file AliHLTPHOSAgent.h
9 @author Oystein Djuvsland
10 @date
11 @brief Agent of the libAliHLTPHOS library
12*/
13
14#include "AliHLTModuleAgent.h"
15#include "AliHLTOUTHandlerEquId.h"
16
17class AliHLTOUTHandlerChain;
18
19/**
20 * @class AliHLTPHOSAgent
21 * This is the agent for the AliHLTPHOS library.
22 *
23 * @ingroup alihlt_system
24 */
25class AliHLTPHOSAgent : public AliHLTModuleAgent {
26 public:
27 /**
28 * standard constructor. The agent is automatically registered in the
29 * global agent manager
30 */
31 AliHLTPHOSAgent();
32 /** destructor */
33 virtual ~AliHLTPHOSAgent();
34
b0692a71 35 UInt_t GetDetectorMask() const;
36
87434909 37 /**
38 * Register all configurations belonging to this module with the
39 * AliHLTConfigurationHandler. The agent can adapt the configurations
40 * to be registered to the current AliRoot setup by checking the
41 * runloader.
42 * @param handler the configuration handler
43 * @param rawReader AliRawReader instance
44 * @param runloader AliRoot runloader
45 * @return neg. error code if failed
46 */
47 int CreateConfigurations(AliHLTConfigurationHandler* handler,
48 AliRawReader* rawReader=NULL,
49 AliRunLoader* runloader=NULL) const;
50
51 /**
52 * Get the top configurations belonging to this module.
53 * A top configuration describes a processing chain. It can simply be
54 * described by the last configuration(s) in the chain.
55 * The agent can adapt the configurations to be registered to the current
56 * AliRoot setup by checking the runloader.
57 * @param rawReader AliRawReader instance
58 * @param runloader AliRoot runloader
59 * @return number of configurations, neg. error code if failed
60 */
61 const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
62 AliRunLoader* runloader=NULL) const;
63
64 /**
65 * Component libraries which the configurations of this agent depend on.
66 * @return list of component libraries as a blank-separated string.
67 */
68 const char* GetRequiredComponentLibraries() const;
69
70 /**
71 * Register components for the AliHLTPHOS library.
e9d6b31e 72 * @param [in] pHandler instance of the component handler
87434909 73 */
74 int RegisterComponents(AliHLTComponentHandler* pHandler) const;
75
76 /**
77 * Get handler decription for PHOS data in the HLTOUT data stream.
e9d6b31e 78 * @param [in] dt data type of the block
79 * @param [in] spec specification of the block
80 * @param [out] desc handler description
87434909 81 * @return 1 if the agent can provide a handler, 0 if not
82 */
83 int GetHandlerDescription(AliHLTComponentDataType dt,
84 AliHLTUInt32_t spec,
85 AliHLTOUTHandlerDesc& desc) const;
86
87 /**
88 * Get specific handler for PHOS data in the HLTOUT data stream.
e9d6b31e 89 * @param [in] dt data type of the block
90 * @param [in] spec specification of the block
87434909 91 * @return pointer to handler
92 */
93 AliHLTOUTHandler* GetOutputHandler(AliHLTComponentDataType dt,
94 AliHLTUInt32_t spec);
95
96 /**
97 * Delete an HLTOUT handler.
98 * @param pInstance pointer to handler
99 */
100 int DeleteOutputHandler(AliHLTOUTHandler* pInstance);
101
102 /**
103 * The handler for PHOS RAW data in the HLTOUT stream.
104 */
105 class AliHLTPHOSRawDataHandler : public AliHLTOUTHandlerEquId {
106 public:
107 /** constructor */
108 AliHLTPHOSRawDataHandler();
109 /** destructor */
110 ~AliHLTPHOSRawDataHandler();
111
112 /**
113 * Process a data block.
114 * Decode specification and return equipment id of the data block.
115 * The data itsself i untouched.
116 * @return equipment id the block should be used for.
117 */
118 int ProcessData(AliHLTOUT* pData);
119
120 private:
121
122 };
123
124 protected:
125
126 private:
127 /** copy constructor prohibited */
128 AliHLTPHOSAgent(const AliHLTPHOSAgent&);
129 /** assignment operator prohibited */
130 AliHLTPHOSAgent& operator=(const AliHLTPHOSAgent&);
131
132 /** handler for PHOS raw data in the HLTOUT stream */
133 AliHLTPHOSRawDataHandler* fRawDataHandler; //!transient
134
135 ClassDef(AliHLTPHOSAgent, 1);
136};
137
138#endif