]>
Commit | Line | Data |
---|---|---|
ce6fd1b1 | 1 | // $Id$ |
d679dd6c | 2 | //************************************************************************** |
3 | //* This file is property of and copyright by the ALICE HLT Project * | |
4 | //* ALICE Experiment at CERN, All rights reserved. * | |
5 | //* * | |
6 | //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> * | |
7 | //* for The ALICE HLT Project. * | |
8 | //* * | |
9 | //* Permission to use, copy, modify and distribute this software and its * | |
10 | //* documentation strictly for non-commercial purposes is hereby granted * | |
11 | //* without fee, provided that the above copyright notice appears in all * | |
12 | //* copies and that both the copyright notice and this permission notice * | |
13 | //* appear in the supporting documentation. The authors make no claims * | |
14 | //* about the suitability of this software for any purpose. It is * | |
15 | //* provided "as is" without express or implied warranty. * | |
16 | //************************************************************************** | |
17 | ||
ce6fd1b1 | 18 | /// @file AliHLTTRDAgent.cxx |
19 | /// @author Matthias Richter | |
20 | /// @date | |
21 | /// @brief Agent of the libAliHLTTRD library | |
22 | /// | |
d679dd6c | 23 | |
24 | #include "AliHLTTRDAgent.h" | |
d679dd6c | 25 | #include "AliHLTTRDDefinitions.h" |
b0692a71 | 26 | #include "AliDAQ.h" |
d679dd6c | 27 | |
28 | // #include "AliHLTOUT.h" | |
29 | // #include "AliHLTOUTHandlerChain.h" | |
30 | // #include "AliRunLoader.h" | |
31 | ||
32 | /** global instance for agent registration */ | |
33 | AliHLTTRDAgent gAliHLTTRDAgent; | |
34 | ||
35 | // component headers | |
36 | #include "AliHLTTRDClusterizerComponent.h" | |
d679dd6c | 37 | #include "AliHLTTRDTrackerV1Component.h" |
38 | #include "AliHLTTRDCalibrationComponent.h" | |
cad0c17d | 39 | #include "AliHLTTRDCalibFitComponent.h" |
40 | #include "AliHLTTRDCalibHistoComponent.h" | |
d679dd6c | 41 | #include "AliHLTTRDEsdWriterComponent.h" |
ef29c6da | 42 | #include "AliHLTTRDClusterHistoComponent.h" |
ae24e8b7 | 43 | #include "AliHLTTRDTrackHistoComponent.h" |
b21edf6e | 44 | #include "AliHLTTRDHistoMergerComponent.h" |
4de61263 | 45 | #include "AliHLTTRDOfflineClusterizerComponent.h" |
46 | #include "AliHLTTRDOfflineTrackerV1Component.h" | |
c7b7f445 | 47 | #include "AliHLTTRDPreprocessorComponent.h" |
ce6fd1b1 | 48 | #include "AliHLTTRDMonitorComponent.h" |
d679dd6c | 49 | |
50 | /** ROOT macro for the implementation of ROOT specific class methods */ | |
51 | ClassImp(AliHLTTRDAgent) | |
52 | ||
53 | AliHLTTRDAgent::AliHLTTRDAgent() | |
54 | : | |
55 | AliHLTModuleAgent("TRD"), | |
56 | fRawDataHandler(NULL) | |
57 | { | |
58 | // see header file for class documentation | |
59 | // or | |
60 | // refer to README to build package | |
61 | // or | |
62 | // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt | |
63 | } | |
64 | ||
65 | AliHLTTRDAgent::~AliHLTTRDAgent() | |
66 | { | |
67 | // see header file for class documentation | |
68 | } | |
69 | ||
b0692a71 | 70 | UInt_t AliHLTTRDAgent::GetDetectorMask() const |
71 | { | |
72 | return AliDAQ::kTRD; | |
73 | } | |
74 | ||
d679dd6c | 75 | int AliHLTTRDAgent::CreateConfigurations(AliHLTConfigurationHandler* /*handler*/, |
76 | AliRawReader* /*rawReader*/, | |
77 | AliRunLoader* /*runloader*/) const | |
78 | { | |
79 | // see header file for class documentation | |
80 | ||
81 | return 0; | |
82 | } | |
83 | ||
84 | const char* AliHLTTRDAgent::GetReconstructionChains(AliRawReader* /*rawReader*/, | |
85 | AliRunLoader* /*runloader*/) const | |
86 | { | |
87 | // see header file for class documentation | |
88 | ||
89 | return ""; | |
90 | } | |
91 | ||
92 | const char* AliHLTTRDAgent::GetRequiredComponentLibraries() const | |
93 | { | |
94 | return ""; | |
95 | } | |
96 | ||
97 | int AliHLTTRDAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const | |
98 | { | |
99 | // see header file for class documentation | |
100 | if (!pHandler) return -EINVAL; | |
101 | pHandler->AddComponent(new AliHLTTRDClusterizerComponent); | |
d679dd6c | 102 | pHandler->AddComponent(new AliHLTTRDTrackerV1Component); |
103 | pHandler->AddComponent(new AliHLTTRDCalibrationComponent); | |
cad0c17d | 104 | pHandler->AddComponent(new AliHLTTRDCalibFitComponent); |
105 | pHandler->AddComponent(new AliHLTTRDCalibHistoComponent); | |
d679dd6c | 106 | pHandler->AddComponent(new AliHLTTRDEsdWriterComponent); |
9772d58a | 107 | pHandler->AddComponent(new AliHLTTRDClusterHistoComponent); |
ae24e8b7 | 108 | pHandler->AddComponent(new AliHLTTRDTrackHistoComponent); |
b21edf6e | 109 | pHandler->AddComponent(new AliHLTTRDHistoMergerComponent); |
4de61263 | 110 | pHandler->AddComponent(new AliHLTTRDOfflineClusterizerComponent); |
111 | pHandler->AddComponent(new AliHLTTRDOfflineTrackerV1Component); | |
c7b7f445 | 112 | pHandler->AddComponent(new AliHLTTRDPreprocessorComponent); |
ce6fd1b1 | 113 | pHandler->AddComponent(new AliHLTTRDMonitorComponent); |
d679dd6c | 114 | return 0; |
115 | } | |
116 | ||
117 | int AliHLTTRDAgent::GetHandlerDescription(AliHLTComponentDataType dt, | |
118 | AliHLTUInt32_t spec, | |
119 | AliHLTOUTHandlerDesc& desc) const | |
120 | { | |
121 | // see header file for class documentation | |
122 | ||
123 | // raw data blocks to be fed into offline reconstruction | |
124 | if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginTRD)) { | |
125 | desc=AliHLTOUTHandlerDesc(kRawReader, dt, GetModuleId()); | |
126 | HLTInfo("module %s handles data block type %s specification %d (0x%x)", | |
127 | GetModuleId(), AliHLTComponent::DataType2Text(dt).c_str(), spec, spec); | |
128 | return 1; | |
129 | } | |
130 | return 0; | |
131 | } | |
132 | ||
133 | AliHLTOUTHandler* AliHLTTRDAgent::GetOutputHandler(AliHLTComponentDataType dt, | |
134 | AliHLTUInt32_t /*spec*/) | |
135 | { | |
136 | // see header file for class documentation | |
137 | ||
138 | // raw data blocks to be fed into offline reconstruction | |
139 | if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginTRD)) { | |
140 | // use the default handler | |
141 | if (!fRawDataHandler) { | |
142 | fRawDataHandler=new AliHLTOUTHandlerEquId; | |
143 | } | |
144 | return fRawDataHandler; | |
145 | } | |
146 | return NULL; | |
147 | } | |
148 | ||
149 | int AliHLTTRDAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance) | |
150 | { | |
151 | // see header file for class documentation | |
152 | if (pInstance==NULL) return -EINVAL; | |
153 | ||
154 | if (pInstance==fRawDataHandler) { | |
155 | delete fRawDataHandler; | |
156 | fRawDataHandler=NULL; | |
157 | return 0; | |
158 | } | |
159 | ||
160 | delete pInstance; | |
161 | return 0; | |
162 | } | |
163 |