2 //**************************************************************************
3 //* This file is property of and copyright by the ALICE HLT Project *
4 //* ALICE Experiment at CERN, All rights reserved. *
6 //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
7 //* for The ALICE HLT Project. *
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 //**************************************************************************
18 /// @file AliHLTTRDAgent.cxx
19 /// @author Matthias Richter
21 /// @brief Agent of the libAliHLTTRD library
24 #include "AliHLTTRDAgent.h"
25 #include "AliHLTTRDDefinitions.h"
27 // #include "AliHLTOUT.h"
28 // #include "AliHLTOUTHandlerChain.h"
29 // #include "AliRunLoader.h"
31 /** global instance for agent registration */
32 AliHLTTRDAgent gAliHLTTRDAgent;
35 #include "AliHLTTRDClusterizerComponent.h"
36 #include "AliHLTTRDTrackerV1Component.h"
37 #include "AliHLTTRDCalibrationComponent.h"
38 #include "AliHLTTRDCalibFitComponent.h"
39 #include "AliHLTTRDCalibHistoComponent.h"
40 #include "AliHLTTRDEsdWriterComponent.h"
41 #include "AliHLTTRDClusterHistoComponent.h"
42 #include "AliHLTTRDTrackHistoComponent.h"
43 #include "AliHLTTRDHistoMergerComponent.h"
44 #include "AliHLTTRDOfflineClusterizerComponent.h"
45 #include "AliHLTTRDOfflineTrackerV1Component.h"
46 #include "AliHLTTRDPreprocessorComponent.h"
47 #include "AliHLTTRDMonitorComponent.h"
49 /** ROOT macro for the implementation of ROOT specific class methods */
50 ClassImp(AliHLTTRDAgent)
52 AliHLTTRDAgent::AliHLTTRDAgent()
54 AliHLTModuleAgent("TRD"),
57 // see header file for class documentation
59 // refer to README to build package
61 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
64 AliHLTTRDAgent::~AliHLTTRDAgent()
66 // see header file for class documentation
69 int AliHLTTRDAgent::CreateConfigurations(AliHLTConfigurationHandler* /*handler*/,
70 AliRawReader* /*rawReader*/,
71 AliRunLoader* /*runloader*/) const
73 // see header file for class documentation
78 const char* AliHLTTRDAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
79 AliRunLoader* /*runloader*/) const
81 // see header file for class documentation
86 const char* AliHLTTRDAgent::GetRequiredComponentLibraries() const
91 int AliHLTTRDAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
93 // see header file for class documentation
94 if (!pHandler) return -EINVAL;
95 pHandler->AddComponent(new AliHLTTRDClusterizerComponent);
96 pHandler->AddComponent(new AliHLTTRDTrackerV1Component);
97 pHandler->AddComponent(new AliHLTTRDCalibrationComponent);
98 pHandler->AddComponent(new AliHLTTRDCalibFitComponent);
99 pHandler->AddComponent(new AliHLTTRDCalibHistoComponent);
100 pHandler->AddComponent(new AliHLTTRDEsdWriterComponent);
101 pHandler->AddComponent(new AliHLTTRDClusterHistoComponent);
102 pHandler->AddComponent(new AliHLTTRDTrackHistoComponent);
103 pHandler->AddComponent(new AliHLTTRDHistoMergerComponent);
104 pHandler->AddComponent(new AliHLTTRDOfflineClusterizerComponent);
105 pHandler->AddComponent(new AliHLTTRDOfflineTrackerV1Component);
106 pHandler->AddComponent(new AliHLTTRDPreprocessorComponent);
107 pHandler->AddComponent(new AliHLTTRDMonitorComponent);
111 int AliHLTTRDAgent::GetHandlerDescription(AliHLTComponentDataType dt,
113 AliHLTOUTHandlerDesc& desc) const
115 // see header file for class documentation
117 // raw data blocks to be fed into offline reconstruction
118 if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginTRD)) {
119 desc=AliHLTOUTHandlerDesc(kRawReader, dt, GetModuleId());
120 HLTInfo("module %s handles data block type %s specification %d (0x%x)",
121 GetModuleId(), AliHLTComponent::DataType2Text(dt).c_str(), spec, spec);
127 AliHLTOUTHandler* AliHLTTRDAgent::GetOutputHandler(AliHLTComponentDataType dt,
128 AliHLTUInt32_t /*spec*/)
130 // see header file for class documentation
132 // raw data blocks to be fed into offline reconstruction
133 if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginTRD)) {
134 // use the default handler
135 if (!fRawDataHandler) {
136 fRawDataHandler=new AliHLTOUTHandlerEquId;
138 return fRawDataHandler;
143 int AliHLTTRDAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance)
145 // see header file for class documentation
146 if (pInstance==NULL) return -EINVAL;
148 if (pInstance==fRawDataHandler) {
149 delete fRawDataHandler;
150 fRawDataHandler=NULL;