]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/ITS/AliHLTITSAgent.h
Merge branch 'master' of https://git.cern.ch/reps/AliRoot
[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
b0692a71 45 UInt_t GetDetectorMask() const;
46
dafa46c6 47 /**
68315dc4 48 * Inherited from AliHLTModuleAgent
49 * Register all configurations belonging to this module with the
dafa46c6 50 * AliHLTConfigurationHandler. The agent can adapt the configurations
51 * to be registered to the current AliRoot setup by checking the
52 * runloader.
68315dc4 53 * @param handler the configuration handler
54 * @param rawReader AliRawReader instance
55 * @param runloader AliRoot runloader
dafa46c6 56 * @return neg. error code if failed
57 */
58 int CreateConfigurations(AliHLTConfigurationHandler* handler,
59 AliRawReader* rawReader=NULL,
60 AliRunLoader* runloader=NULL) const;
61
62 /**
68315dc4 63 * Inherited from AliHLTModuleAgent
64 * Get the top configurations belonging to this module.
dafa46c6 65 * A top configuration describes a processing chain. It can simply be
66 * described by the last configuration(s) in the chain.
67 * The agent can adapt the configurations to be registered to the current
68 * AliRoot setup by checking the runloader.
68315dc4 69 * @param rawReader AliRawReader instance
70 * @param runloader AliRoot runloader
71 * @return number of configurations, neg. error code if failed
dafa46c6 72 */
73 const char* GetReconstructionChains(AliRawReader* rawReader=NULL,
74 AliRunLoader* runloader=NULL) const;
75
76 /**
68315dc4 77 * Inherited from AliHLTModuleAgent
dafa46c6 78 * Component libraries which the configurations of this agent depend on.
79 * @return list of component libraries as a blank-separated string.
80 */
81 const char* GetRequiredComponentLibraries() const;
82
83 /**
68315dc4 84 * Inherited from AliHLTModuleAgent
dafa46c6 85 * Register components for the AliHLTSample library.
86 * @param pHandler [in] instance of the component handler
87 */
88 int RegisterComponents(AliHLTComponentHandler* pHandler) const;
89
68315dc4 90 /**
91 * Inherited from AliHLTModuleAgent
92 * Return HLTOUT handler description for a certain data block in the
93 * HLTOUT payload.
94 * @return 1 if module provides a handler
95 */
dafa46c6 96 int GetHandlerDescription(AliHLTComponentDataType dt,
97 AliHLTUInt32_t spec,
98 AliHLTOUTHandlerDesc& desc) const;
68315dc4 99
100 /**
101 * Inherited from AliHLTModuleAgent
102 * Create HLTOUT handler for a certain data block in the
103 * HLTOUT payload. The same handler can be returned multiple
104 * times, even for different data types. The framework will
105 * handle this.
106 * @return pointer to handler
107 */
dafa46c6 108 AliHLTOUTHandler* GetOutputHandler(AliHLTComponentDataType dt,
109 AliHLTUInt32_t spec);
68315dc4 110
111 /**
112 * Inherited from AliHLTModuleAgent
113 * Delete the instance of the handler. This is only called once
114 * even if the same handler has been issued multiple times
115 */
dafa46c6 116 int DeleteOutputHandler(AliHLTOUTHandler* pInstance);
117
118 AliHLTModulePreprocessor* GetPreprocessor();
6b87e199 119
120 class AliHLTOUTSDDRawDataHandler: public AliHLTOUTHandlerEquId {
121 public:
122 AliHLTOUTSDDRawDataHandler() {}
123 ~AliHLTOUTSDDRawDataHandler() {}
124 int ProcessData(AliHLTOUT* pData);
125 private:
126 };
127
68315dc4 128 /**
129 * Create configurations for all CFs for the ITS subdetectors
130 * Get the necessary information from AliDAQ using the detector id.
131 * @param pHandler Instance of the configuration handler
132 * @param detectorId Id of the detector as specified in AliDAQ
133 * @param output Target string to receive the configurations
134 * @return neg. error code f failed
135 */
136 int CreateCFConfigurations(AliHLTConfigurationHandler* pHandler, int detectorId, TString& output) const;
137
dafa46c6 138 protected:
139
140 private:
68315dc4 141
dafa46c6 142 /** copy constructor prohibited */
143 AliHLTITSAgent(const AliHLTITSAgent&);
144 /** assignment operator prohibited */
145 AliHLTITSAgent& operator=(const AliHLTITSAgent&);
146
147 /** handler for ITS raw data in the HLTOUT stream */
148 AliHLTOUTHandlerEquId* fRawDataHandler; //!transient
149
150 /** ROOT specific member definition */
151 ClassDef(AliHLTITSAgent, 0);
152};
153
154#endif