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"
28 // #include "AliHLTOUT.h"
29 // #include "AliHLTOUTHandlerChain.h"
30 // #include "AliRunLoader.h"
32 /** global instance for agent registration */
33 AliHLTTRDAgent gAliHLTTRDAgent;
36 #include "AliHLTTRDClusterizerComponent.h"
37 #include "AliHLTTRDTrackerV1Component.h"
38 #include "AliHLTTRDCalibrationComponent.h"
39 #include "AliHLTTRDCalibFitComponent.h"
40 #include "AliHLTTRDCalibHistoComponent.h"
41 #include "AliHLTTRDEsdWriterComponent.h"
42 #include "AliHLTTRDClusterHistoComponent.h"
43 #include "AliHLTTRDTrackHistoComponent.h"
44 #include "AliHLTTRDHistoMergerComponent.h"
45 #include "AliHLTTRDOfflineClusterizerComponent.h"
46 #include "AliHLTTRDOfflineTrackerV1Component.h"
47 #include "AliHLTTRDPreprocessorComponent.h"
48 #include "AliHLTTRDMonitorComponent.h"
50 /** ROOT macro for the implementation of ROOT specific class methods */
51 ClassImp(AliHLTTRDAgent)
53 AliHLTTRDAgent::AliHLTTRDAgent()
55 AliHLTModuleAgent("TRD"),
58 // see header file for class documentation
60 // refer to README to build package
62 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
65 AliHLTTRDAgent::~AliHLTTRDAgent()
67 // see header file for class documentation
70 UInt_t AliHLTTRDAgent::GetDetectorMask() const
75 int AliHLTTRDAgent::CreateConfigurations(AliHLTConfigurationHandler* /*handler*/,
76 AliRawReader* /*rawReader*/,
77 AliRunLoader* /*runloader*/) const
79 // see header file for class documentation
84 const char* AliHLTTRDAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
85 AliRunLoader* /*runloader*/) const
87 // see header file for class documentation
92 const char* AliHLTTRDAgent::GetRequiredComponentLibraries() const
97 int AliHLTTRDAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
99 // see header file for class documentation
100 if (!pHandler) return -EINVAL;
101 pHandler->AddComponent(new AliHLTTRDClusterizerComponent);
102 pHandler->AddComponent(new AliHLTTRDTrackerV1Component);
103 pHandler->AddComponent(new AliHLTTRDCalibrationComponent);
104 pHandler->AddComponent(new AliHLTTRDCalibFitComponent);
105 pHandler->AddComponent(new AliHLTTRDCalibHistoComponent);
106 pHandler->AddComponent(new AliHLTTRDEsdWriterComponent);
107 pHandler->AddComponent(new AliHLTTRDClusterHistoComponent);
108 pHandler->AddComponent(new AliHLTTRDTrackHistoComponent);
109 pHandler->AddComponent(new AliHLTTRDHistoMergerComponent);
110 pHandler->AddComponent(new AliHLTTRDOfflineClusterizerComponent);
111 pHandler->AddComponent(new AliHLTTRDOfflineTrackerV1Component);
112 pHandler->AddComponent(new AliHLTTRDPreprocessorComponent);
113 pHandler->AddComponent(new AliHLTTRDMonitorComponent);
117 int AliHLTTRDAgent::GetHandlerDescription(AliHLTComponentDataType dt,
119 AliHLTOUTHandlerDesc& desc) const
121 // see header file for class documentation
123 // raw data blocks to be fed into offline reconstruction
124 if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginTRD)) {
125 desc=AliHLTOUTHandlerDesc(kRawReader, dt, GetModuleId());
126 HLTInfo("module %s handles data block type %s specification %d (0x%x)",
127 GetModuleId(), AliHLTComponent::DataType2Text(dt).c_str(), spec, spec);
133 AliHLTOUTHandler* AliHLTTRDAgent::GetOutputHandler(AliHLTComponentDataType dt,
134 AliHLTUInt32_t /*spec*/)
136 // see header file for class documentation
138 // raw data blocks to be fed into offline reconstruction
139 if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginTRD)) {
140 // use the default handler
141 if (!fRawDataHandler) {
142 fRawDataHandler=new AliHLTOUTHandlerEquId;
144 return fRawDataHandler;
149 int AliHLTTRDAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance)
151 // see header file for class documentation
152 if (pInstance==NULL) return -EINVAL;
154 if (pInstance==fRawDataHandler) {
155 delete fRawDataHandler;
156 fRawDataHandler=NULL;