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 AliHLTGlobalAgent.cxx
20 @author Matthias Richter
22 @brief Agent of the libAliHLTGlobal library
26 #include "AliHLTGlobalAgent.h"
27 #include "AliHLTConfigurationHandler.h"
28 #include "TObjString.h"
29 #include "TObjArray.h"
31 // header files of library components
32 #include "AliHLTGlobalTrackMergerComponent.h"
33 #include "AliHLTGlobalEsdConverterComponent.h"
34 #include "AliHLTGlobalVertexerComponent.h"
35 #include "AliHLTV0HistoComponent.h"
36 #include "AliHLTGlobalVertexerHistoComponent.h"
38 /** global instance for agent registration */
39 AliHLTGlobalAgent gAliHLTGlobalAgent;
41 /** ROOT macro for the implementation of ROOT specific class methods */
42 ClassImp(AliHLTGlobalAgent)
44 AliHLTGlobalAgent::AliHLTGlobalAgent()
46 AliHLTModuleAgent("Global")
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 AliHLTGlobalAgent::~AliHLTGlobalAgent()
57 // see header file for class documentation
60 int AliHLTGlobalAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
62 // see header file for class documentation
64 if (!pHandler) return -EINVAL;
65 pHandler->AddComponent(new AliHLTGlobalTrackMergerComponent);
66 pHandler->AddComponent(new AliHLTGlobalEsdConverterComponent);
67 pHandler->AddComponent(new AliHLTGlobalVertexerComponent);
68 pHandler->AddComponent(new AliHLTGlobalVertexerHistoComponent);
69 pHandler->AddComponent(new AliHLTV0HistoComponent );
73 int AliHLTGlobalAgent::CreateConfigurations(AliHLTConfigurationHandler* pHandler,
74 AliRawReader* /*rawReader*/,
75 AliRunLoader* /*runloader*/) const
77 // see header file for class documentation
78 if (!pHandler) return -EINVAL;
80 /////////////////////////////////////////////////////////////////////////////////////
82 // assembly of the global ESD
84 // define the inputs to the global ESD
85 TString esdInputs="TPC-globalmerger TPC-mcTrackMarker";
87 // check for the availibility
88 TObjArray* pTokens=esdInputs.Tokenize(" ");
91 for (int n=0; n<pTokens->GetEntriesFast(); n++) {
92 TString module=((TObjString*)pTokens->At(n))->GetString();
93 if (pHandler->FindConfiguration(module.Data())) {
101 if (esdInputs.Length()>0) {
102 HLTInfo("Configuring inputs to global HLT ESD: %s", esdInputs.Data());
104 HLTWarning("No inputs to global HLT ESD found");
107 pHandler->CreateConfiguration("GLOBAL-esd-converter", "GlobalEsdConverter", esdInputs.Data(), "");
109 ///////////////////////////////////////////////////////////////////////////////////////////////////
111 // global vertexer component
113 pHandler->CreateConfiguration("GLOBAL-vertexer","GlobalVertexer","GLOBAL-esd-converter","");
115 ///////////////////////////////////////////////////////////////////////////////////////////////////
119 TString vertexhistoInput="GLOBAL-vertexer";
120 if (pHandler->FindConfiguration("ITS-SPD-vertexer")) {
121 vertexhistoInput+=" ITS-SPD-vertexer";
123 pHandler->CreateConfiguration("GLOBAL-vertexhisto","GlobalVertexerHisto", vertexhistoInput.Data(),"");
128 const char* AliHLTGlobalAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
129 AliRunLoader* runloader) const
131 // see header file for class documentation
133 // reconstruction chains for AliRoot simulation
134 // Note: run loader is only available while running embedded into
135 // AliRoot simulation
136 return "GLOBAL-esd-converter";
141 const char* AliHLTGlobalAgent::GetRequiredComponentLibraries() const
143 // see header file for class documentation
145 return "libAliHLTUtil.so libAliHLTRCU.so libAliHLTTPC.so libAliHLTITS.so";
148 int AliHLTGlobalAgent::GetHandlerDescription(AliHLTComponentDataType /*dt*/,
149 AliHLTUInt32_t /*spec*/,
150 AliHLTOUTHandlerDesc& /*desc*/) const
152 // see header file for class documentation
157 AliHLTOUTHandler* AliHLTGlobalAgent::GetOutputHandler(AliHLTComponentDataType /*dt*/,
158 AliHLTUInt32_t /*spec*/)
160 // see header file for class documentation
165 int AliHLTGlobalAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance)
167 // see header file for class documentation
168 if (pInstance==NULL) return -EINVAL;