3 //**************************************************************************
4 //* This file is property of and copyright by the ALICE HLT Project *
5 //* ALICE Experiment at CERN, All rights reserved. *
7 //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
8 //* for The ALICE HLT Project. *
10 //* Permission to use, copy, modify and distribute this software and its *
11 //* documentation strictly for non-commercial purposes is hereby granted *
12 //* without fee, provided that the above copyright notice appears in all *
13 //* copies and that both the copyright notice and this permission notice *
14 //* appear in the supporting documentation. The authors make no claims *
15 //* about the suitability of this software for any purpose. It is *
16 //* provided "as is" without express or implied warranty. *
17 //**************************************************************************
19 /** @file AliHLTITSAgent.cxx
20 @author Matthias Richter
22 @brief Agent of the libAliHLTITS library
26 #include "AliHLTITSAgent.h"
27 #include "AliHLTConfiguration.h"
29 // header files of library components
31 // header file of the module preprocessor
32 #include "AliHLTITSCompressRawDataSDDComponent.h"
34 // raw data handler of HLTOUT data
35 #include "AliHLTOUTHandlerEquId.h"
37 /** global instance for agent registration */
38 AliHLTITSAgent gAliHLTITSAgent;
40 /** ROOT macro for the implementation of ROOT specific class methods */
41 ClassImp(AliHLTITSAgent)
43 AliHLTITSAgent::AliHLTITSAgent()
45 AliHLTModuleAgent("ITS"),
48 // see header file for class documentation
50 // refer to README to build package
52 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
55 AliHLTITSAgent::~AliHLTITSAgent()
57 // see header file for class documentation
60 int AliHLTITSAgent::CreateConfigurations(AliHLTConfigurationHandler* /*handler*/,
61 AliRawReader* /*rawReader*/,
62 AliRunLoader* /*runloader*/) const
64 // see header file for class documentation
68 const char* AliHLTITSAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
69 AliRunLoader* /*runloader*/) const
71 // see header file for class documentation
76 const char* AliHLTITSAgent::GetRequiredComponentLibraries() const
78 // see header file for class documentation
82 int AliHLTITSAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
84 // see header file for class documentation
86 if (!pHandler) return -EINVAL;
87 pHandler->AddComponent(new AliHLTITSCompressRawDataSDDComponent);
92 AliHLTModulePreprocessor* AliHLTITSAgent::GetPreprocessor()
94 // see header file for class documentation
98 int AliHLTITSAgent::GetHandlerDescription(AliHLTComponentDataType dt,
100 AliHLTOUTHandlerDesc& desc) const
102 // see header file for class documentation
104 // Handlers for ITS raw data. Even though there are 3 detectors
105 // everything is handled in one module library and one HLTOUT handler.
106 // This assumes that the data blocks are sent with data type
107 // {DDL_RAW :ITS } and the equipment id as specification
108 // The default behavior of AliHLTOUTHandlerEquId is used.
109 if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginITS)) {
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);
118 AliHLTOUTHandler* AliHLTITSAgent::GetOutputHandler(AliHLTComponentDataType dt,
119 AliHLTUInt32_t /*spec*/)
121 // see header file for class documentation
122 if (dt==(kAliHLTDataTypeDDLRaw|kAliHLTDataOriginITS)) {
123 // use the default handler
124 if (!fRawDataHandler) {
125 fRawDataHandler=new AliHLTOUTHandlerEquId;
127 return fRawDataHandler;
132 int AliHLTITSAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance)
134 // see header file for class documentation
135 if (pInstance==NULL) return -EINVAL;
137 if (pInstance==fRawDataHandler) {
138 delete fRawDataHandler;
139 fRawDataHandler=NULL;