1 //**************************************************************************
2 //* This file is property of and copyright by the ALICE HLT Project *
3 //* ALICE Experiment at CERN, All rights reserved. *
5 //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
6 //* for The ALICE HLT Project. *
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 //**************************************************************************
17 /** @file AliHLTTRDAgent.cxx
18 @author Matthias Richter
20 @brief Agent of the libAliHLTTRD library
23 #include "AliHLTTRDAgent.h"
24 #include "AliHLTTRDDefinitions.h"
26 // #include "AliHLTOUT.h"
27 // #include "AliHLTOUTHandlerChain.h"
28 // #include "AliRunLoader.h"
30 /** global instance for agent registration */
31 AliHLTTRDAgent gAliHLTTRDAgent;
34 #include "AliHLTTRDClusterizerComponent.h"
35 #include "AliHLTTRDTrackerV1Component.h"
36 #include "AliHLTTRDCalibrationComponent.h"
37 #include "AliHLTTRDCalibFitComponent.h"
38 #include "AliHLTTRDCalibHistoComponent.h"
39 #include "AliHLTTRDEsdWriterComponent.h"
40 #include "AliHLTTRDClusterHistoComponent.h"
41 #include "AliHLTTRDTrackHistoComponent.h"
42 #include "AliHLTTRDHistoMergerComponent.h"
43 #include "AliHLTTRDOfflineClusterizerComponent.h"
44 #include "AliHLTTRDOfflineTrackerV1Component.h"
46 /** ROOT macro for the implementation of ROOT specific class methods */
47 ClassImp(AliHLTTRDAgent)
49 AliHLTTRDAgent::AliHLTTRDAgent()
51 AliHLTModuleAgent("TRD"),
54 // see header file for class documentation
56 // refer to README to build package
58 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
61 AliHLTTRDAgent::~AliHLTTRDAgent()
63 // see header file for class documentation
66 int AliHLTTRDAgent::CreateConfigurations(AliHLTConfigurationHandler* /*handler*/,
67 AliRawReader* /*rawReader*/,
68 AliRunLoader* /*runloader*/) const
70 // see header file for class documentation
75 const char* AliHLTTRDAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
76 AliRunLoader* /*runloader*/) const
78 // see header file for class documentation
83 const char* AliHLTTRDAgent::GetRequiredComponentLibraries() const
88 int AliHLTTRDAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
90 // see header file for class documentation
91 if (!pHandler) return -EINVAL;
92 pHandler->AddComponent(new AliHLTTRDClusterizerComponent);
93 pHandler->AddComponent(new AliHLTTRDTrackerV1Component);
94 pHandler->AddComponent(new AliHLTTRDCalibrationComponent);
95 pHandler->AddComponent(new AliHLTTRDCalibFitComponent);
96 pHandler->AddComponent(new AliHLTTRDCalibHistoComponent);
97 pHandler->AddComponent(new AliHLTTRDEsdWriterComponent);
98 pHandler->AddComponent(new AliHLTTRDClusterHistoComponent);
99 pHandler->AddComponent(new AliHLTTRDTrackHistoComponent);
100 pHandler->AddComponent(new AliHLTTRDHistoMergerComponent);
101 pHandler->AddComponent(new AliHLTTRDOfflineClusterizerComponent);
102 pHandler->AddComponent(new AliHLTTRDOfflineTrackerV1Component);
107 int AliHLTTRDAgent::GetHandlerDescription(AliHLTComponentDataType dt,
109 AliHLTOUTHandlerDesc& desc) const
111 // see header file for class documentation
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);
123 AliHLTOUTHandler* AliHLTTRDAgent::GetOutputHandler(AliHLTComponentDataType dt,
124 AliHLTUInt32_t /*spec*/)
126 // see header file for class documentation
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;
134 return fRawDataHandler;
139 int AliHLTTRDAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance)
141 // see header file for class documentation
142 if (pInstance==NULL) return -EINVAL;
144 if (pInstance==fRawDataHandler) {
145 delete fRawDataHandler;
146 fRawDataHandler=NULL;