]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/TRD/AliHLTTRDAgent.cxx
unify system of the input multiplier for clusterizer and tracker and
[u/mrichter/AliRoot.git] / HLT / TRD / AliHLTTRDAgent.cxx
CommitLineData
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"
24#include "AliHLTConfiguration.h"
25#include "AliHLTTRDDefinitions.h"
26
27// #include "AliHLTOUT.h"
28// #include "AliHLTOUTHandlerChain.h"
29// #include "AliRunLoader.h"
30
31/** global instance for agent registration */
32AliHLTTRDAgent gAliHLTTRDAgent;
33
34// component headers
35#include "AliHLTTRDClusterizerComponent.h"
d679dd6c 36#include "AliHLTTRDTrackerV1Component.h"
37#include "AliHLTTRDCalibrationComponent.h"
38#include "AliHLTTRDEsdWriterComponent.h"
ef29c6da 39#include "AliHLTTRDClusterHistoComponent.h"
ae24e8b7 40#include "AliHLTTRDTrackHistoComponent.h"
4de61263 41#include "AliHLTTRDOfflineClusterizerComponent.h"
42#include "AliHLTTRDOfflineTrackerV1Component.h"
d679dd6c 43
44/** ROOT macro for the implementation of ROOT specific class methods */
45ClassImp(AliHLTTRDAgent)
46
47 AliHLTTRDAgent::AliHLTTRDAgent()
48 :
49 AliHLTModuleAgent("TRD"),
50 fRawDataHandler(NULL)
51{
52 // see header file for class documentation
53 // or
54 // refer to README to build package
55 // or
56 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
57}
58
59AliHLTTRDAgent::~AliHLTTRDAgent()
60{
61 // see header file for class documentation
62}
63
64int AliHLTTRDAgent::CreateConfigurations(AliHLTConfigurationHandler* /*handler*/,
65 AliRawReader* /*rawReader*/,
66 AliRunLoader* /*runloader*/) const
67{
68 // see header file for class documentation
69
70 return 0;
71}
72
73const char* AliHLTTRDAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
74 AliRunLoader* /*runloader*/) const
75{
76 // see header file for class documentation
77
78 return "";
79}
80
81const char* AliHLTTRDAgent::GetRequiredComponentLibraries() const
82{
83 return "";
84}
85
86int AliHLTTRDAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
87{
88 // see header file for class documentation
89 if (!pHandler) return -EINVAL;
90 pHandler->AddComponent(new AliHLTTRDClusterizerComponent);
d679dd6c 91 pHandler->AddComponent(new AliHLTTRDTrackerV1Component);
92 pHandler->AddComponent(new AliHLTTRDCalibrationComponent);
93 pHandler->AddComponent(new AliHLTTRDEsdWriterComponent);
9772d58a 94 pHandler->AddComponent(new AliHLTTRDClusterHistoComponent);
ae24e8b7 95 pHandler->AddComponent(new AliHLTTRDTrackHistoComponent);
4de61263 96 pHandler->AddComponent(new AliHLTTRDOfflineClusterizerComponent);
97 pHandler->AddComponent(new AliHLTTRDOfflineTrackerV1Component);
d679dd6c 98
99 return 0;
100}
101
102int AliHLTTRDAgent::GetHandlerDescription(AliHLTComponentDataType dt,
103 AliHLTUInt32_t spec,
104 AliHLTOUTHandlerDesc& desc) const
105{
106 // see header file for class documentation
107
108 // raw data blocks to be fed into offline reconstruction
109 if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginTRD)) {
110 desc=AliHLTOUTHandlerDesc(kRawReader, dt, GetModuleId());
111 HLTInfo("module %s handles data block type %s specification %d (0x%x)",
112 GetModuleId(), AliHLTComponent::DataType2Text(dt).c_str(), spec, spec);
113 return 1;
114 }
115 return 0;
116}
117
118AliHLTOUTHandler* AliHLTTRDAgent::GetOutputHandler(AliHLTComponentDataType dt,
119 AliHLTUInt32_t /*spec*/)
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 // use the default handler
126 if (!fRawDataHandler) {
127 fRawDataHandler=new AliHLTOUTHandlerEquId;
128 }
129 return fRawDataHandler;
130 }
131 return NULL;
132}
133
134int AliHLTTRDAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance)
135{
136 // see header file for class documentation
137 if (pInstance==NULL) return -EINVAL;
138
139 if (pInstance==fRawDataHandler) {
140 delete fRawDataHandler;
141 fRawDataHandler=NULL;
142 return 0;
143 }
144
145 delete pInstance;
146 return 0;
147}
148