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 "AliHLTConfiguration.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 "AliHLTTRDTrackerComponent.h"
37 #include "AliHLTTRDTrackerV1Component.h"
38 #include "AliHLTTRDCalibrationComponent.h"
39 #include "AliHLTTRDEsdWriterComponent.h"
42 /** ROOT macro for the implementation of ROOT specific class methods */
43 ClassImp(AliHLTTRDAgent)
45 AliHLTTRDAgent::AliHLTTRDAgent()
47 AliHLTModuleAgent("TRD"),
50 // see header file for class documentation
52 // refer to README to build package
54 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
57 AliHLTTRDAgent::~AliHLTTRDAgent()
59 // see header file for class documentation
62 int AliHLTTRDAgent::CreateConfigurations(AliHLTConfigurationHandler* /*handler*/,
63 AliRawReader* /*rawReader*/,
64 AliRunLoader* /*runloader*/) const
66 // see header file for class documentation
71 const char* AliHLTTRDAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
72 AliRunLoader* /*runloader*/) const
74 // see header file for class documentation
79 const char* AliHLTTRDAgent::GetRequiredComponentLibraries() const
84 int AliHLTTRDAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
86 // see header file for class documentation
87 if (!pHandler) return -EINVAL;
88 pHandler->AddComponent(new AliHLTTRDClusterizerComponent);
89 pHandler->AddComponent(new AliHLTTRDTrackerComponent);
90 pHandler->AddComponent(new AliHLTTRDTrackerV1Component);
91 pHandler->AddComponent(new AliHLTTRDCalibrationComponent);
92 pHandler->AddComponent(new AliHLTTRDEsdWriterComponent);
97 int AliHLTTRDAgent::GetHandlerDescription(AliHLTComponentDataType dt,
99 AliHLTOUTHandlerDesc& desc) const
101 // see header file for class documentation
103 // raw data blocks to be fed into offline reconstruction
104 if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginTRD)) {
105 desc=AliHLTOUTHandlerDesc(kRawReader, dt, GetModuleId());
106 HLTInfo("module %s handles data block type %s specification %d (0x%x)",
107 GetModuleId(), AliHLTComponent::DataType2Text(dt).c_str(), spec, spec);
113 AliHLTOUTHandler* AliHLTTRDAgent::GetOutputHandler(AliHLTComponentDataType dt,
114 AliHLTUInt32_t /*spec*/)
116 // see header file for class documentation
118 // raw data blocks to be fed into offline reconstruction
119 if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginTRD)) {
120 // use the default handler
121 if (!fRawDataHandler) {
122 fRawDataHandler=new AliHLTOUTHandlerEquId;
124 return fRawDataHandler;
129 int AliHLTTRDAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance)
131 // see header file for class documentation
132 if (pInstance==NULL) return -EINVAL;
134 if (pInstance==fRawDataHandler) {
135 delete fRawDataHandler;
136 fRawDataHandler=NULL;