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