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"
35 /** global instance for agent registration */
36 AliHLTGlobalAgent gAliHLTGlobalAgent;
38 /** ROOT macro for the implementation of ROOT specific class methods */
39 ClassImp(AliHLTGlobalAgent)
41 AliHLTGlobalAgent::AliHLTGlobalAgent()
43 AliHLTModuleAgent("Global")
45 // see header file for class documentation
47 // refer to README to build package
49 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
52 AliHLTGlobalAgent::~AliHLTGlobalAgent()
54 // see header file for class documentation
57 int AliHLTGlobalAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
59 // see header file for class documentation
61 if (!pHandler) return -EINVAL;
62 pHandler->AddComponent(new AliHLTGlobalTrackMergerComponent);
63 pHandler->AddComponent(new AliHLTGlobalEsdConverterComponent);
67 int AliHLTGlobalAgent::CreateConfigurations(AliHLTConfigurationHandler* pHandler,
68 AliRawReader* /*rawReader*/,
69 AliRunLoader* /*runloader*/) const
71 // see header file for class documentation
72 if (!pHandler) return -EINVAL;
74 /////////////////////////////////////////////////////////////////////////////////////
76 // assembly of the global ESD
78 // define the inputs to the global ESD
79 TString esdInputs="TPC-globalmerger TPC-mcTrackMarker";
81 // check for the availibility
82 TObjArray* pTokens=esdInputs.Tokenize(" ");
85 for (int n=0; n<pTokens->GetEntriesFast(); n++) {
86 TString module=((TObjString*)pTokens->At(n))->GetString();
87 if (pHandler->FindConfiguration(module.Data())) {
95 if (esdInputs.Length()>0) {
96 HLTInfo("Configuring inputs to global HLT ESD: %s", esdInputs.Data());
98 HLTWarning("No inputs to global HLT ESD found");
101 pHandler->CreateConfiguration("GLOBAL-esd-converter", "GlobalEsdConverter", esdInputs.Data(), "");
106 const char* AliHLTGlobalAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
107 AliRunLoader* runloader) const
109 // see header file for class documentation
111 // reconstruction chains for AliRoot simulation
112 // Note: run loader is only available while running embedded into
113 // AliRoot simulation
114 return "GLOBAL-esd-converter";
119 const char* AliHLTGlobalAgent::GetRequiredComponentLibraries() const
121 // see header file for class documentation
123 return "libAliHLTUtil.so libAliHLTRCU.so libAliHLTTPC.so libAliHLTITS.so";
126 int AliHLTGlobalAgent::GetHandlerDescription(AliHLTComponentDataType /*dt*/,
127 AliHLTUInt32_t /*spec*/,
128 AliHLTOUTHandlerDesc& /*desc*/) const
130 // see header file for class documentation
135 AliHLTOUTHandler* AliHLTGlobalAgent::GetOutputHandler(AliHLTComponentDataType /*dt*/,
136 AliHLTUInt32_t /*spec*/)
138 // see header file for class documentation
143 int AliHLTGlobalAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance)
145 // see header file for class documentation
146 if (pInstance==NULL) return -EINVAL;