]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/ITS/AliHLTITSAgent.h
adjusting interface to the offline ITS CF in accordance to recent changes in the...
[u/mrichter/AliRoot.git] / HLT / ITS / AliHLTITSAgent.h
CommitLineData
513cc3dd 1//-*- Mode: C++ -*-
dafa46c6 2// $Id$
3
4#ifndef ALIHLTITSAGENT_H
5#define ALIHLTITSAGENT_H
6//* This file is property of and copyright by the ALICE HLT Project *
7//* ALICE Experiment at CERN, All rights reserved. *
8//* See cxx source for full Copyright notice *
9
513cc3dd 10// @file AliHLTITSAgent.h
11// @author Matthias Richter
12// @date 25.08.2008
13// @brief Agent of the libAliHLTITS library
14// @note
dafa46c6 15
16#include "AliHLTModuleAgent.h"
17
6b87e199 18// raw data handler of HLTOUT data
19#include "AliHLTOUTHandlerEquId.h"
dafa46c6 20
21/**
22 * @class AliHLTITSAgent
23 * This is the agent for the AliHLTSample library.<br>
24 *
6b87e199 25 * The agent implements the HLTOUT handling of raw data blocks from the
26 * ITS SDD.
27 * This assumes that the data blocks are sent with data type
28 * {DDL_RAW :ISDD} and the bit set in the specification corresponding.
29 * to detector DDL id.
30 * An HLTOUT handler is implemented to extract the equipment id from
31 * the specification.
dafa46c6 32 *
33 * @ingroup alihlt_its
34 */
35class AliHLTITSAgent : public AliHLTModuleAgent {
36 public:
37 /**
38 * standard constructor. The agent is automatically registered in the
39 * global agent manager
40 */
41 AliHLTITSAgent();
42 /** destructor */
43 virtual ~AliHLTITSAgent();
44
45 /**
68315dc4 46 * Inherited from AliHLTModuleAgent
47 * Register all configurations belonging to this module with the
dafa46c6 48 * AliHLTConfigurationHandler. The agent can adapt the configurations
49 * to be registered to the current AliRoot setup by checking the
50 * runloader.
68315dc4 51 * @param handler the configuration handler
52 * @param rawReader AliRawReader instance
53 * @param runloader AliRoot runloader
dafa46c6 54 * @return neg. error code if failed
55 */
56 int CreateConfigurations(AliHLTConfigurationHandler* handler,
57 AliRawReader* rawReader=NULL,
58 AliRunLoader* runloader=NULL) const;
59
60 /**
68315dc4 61 * Inherited from AliHLTModuleAgent
62 * Get the top configurations belonging to this module.
dafa46c6 63 * A top configuration describes a processing chain. It can simply be
64 * described by the last configuration(s) in the chain.
65 * The agent can adapt the configurations to be registered to the current
66 * AliRoot setup by checking the runloader.
68315dc4 67 * @param rawReader AliRawReader instance
68 * @param runloader AliRoot runloader
69 * @return number of configurations, neg. error code if failed
dafa46c6 70 */
71 const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
72 AliRunLoader* runloader=NULL) const;
73
74 /**
68315dc4 75 * Inherited from AliHLTModuleAgent
dafa46c6 76 * Component libraries which the configurations of this agent depend on.
77 * @return list of component libraries as a blank-separated string.
78 */
79 const char* GetRequiredComponentLibraries() const;
80
81 /**
68315dc4 82 * Inherited from AliHLTModuleAgent
dafa46c6 83 * Register components for the AliHLTSample library.
84 * @param pHandler [in] instance of the component handler
85 */
86 int RegisterComponents(AliHLTComponentHandler* pHandler) const;
87
68315dc4 88 /**
89 * Inherited from AliHLTModuleAgent
90 * Return HLTOUT handler description for a certain data block in the
91 * HLTOUT payload.
92 * @return 1 if module provides a handler
93 */
dafa46c6 94 int GetHandlerDescription(AliHLTComponentDataType dt,
95 AliHLTUInt32_t spec,
96 AliHLTOUTHandlerDesc& desc) const;
68315dc4 97
98 /**
99 * Inherited from AliHLTModuleAgent
100 * Create HLTOUT handler for a certain data block in the
101 * HLTOUT payload. The same handler can be returned multiple
102 * times, even for different data types. The framework will
103 * handle this.
104 * @return pointer to handler
105 */
dafa46c6 106 AliHLTOUTHandler* GetOutputHandler(AliHLTComponentDataType dt,
107 AliHLTUInt32_t spec);
68315dc4 108
109 /**
110 * Inherited from AliHLTModuleAgent
111 * Delete the instance of the handler. This is only called once
112 * even if the same handler has been issued multiple times
113 */
dafa46c6 114 int DeleteOutputHandler(AliHLTOUTHandler* pInstance);
115
116 AliHLTModulePreprocessor* GetPreprocessor();
6b87e199 117
118 class AliHLTOUTSDDRawDataHandler: public AliHLTOUTHandlerEquId {
119 public:
120 AliHLTOUTSDDRawDataHandler() {}
121 ~AliHLTOUTSDDRawDataHandler() {}
122 int ProcessData(AliHLTOUT* pData);
123 private:
124 };
125
68315dc4 126 /**
127 * Create configurations for all CFs for the ITS subdetectors
128 * Get the necessary information from AliDAQ using the detector id.
129 * @param pHandler Instance of the configuration handler
130 * @param detectorId Id of the detector as specified in AliDAQ
131 * @param output Target string to receive the configurations
132 * @return neg. error code f failed
133 */
134 int CreateCFConfigurations(AliHLTConfigurationHandler* pHandler, int detectorId, TString& output) const;
135
dafa46c6 136 protected:
137
138 private:
68315dc4 139
dafa46c6 140 /** copy constructor prohibited */
141 AliHLTITSAgent(const AliHLTITSAgent&);
142 /** assignment operator prohibited */
143 AliHLTITSAgent& operator=(const AliHLTITSAgent&);
144
145 /** handler for ITS raw data in the HLTOUT stream */
146 AliHLTOUTHandlerEquId* fRawDataHandler; //!transient
147
148 /** ROOT specific member definition */
149 ClassDef(AliHLTITSAgent, 0);
150};
151
152#endif