]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/global/AliHLTGlobalAgent.cxx
vertex finder moved from GlobalESDConverter to a separate component GlobalVertexer
[u/mrichter/AliRoot.git] / HLT / global / AliHLTGlobalAgent.cxx
CommitLineData
ec6160d5 1// $Id$
2
3//**************************************************************************
4//* This file is property of and copyright by the ALICE HLT Project *
5//* ALICE Experiment at CERN, All rights reserved. *
6//* *
7//* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
8//* for The ALICE HLT Project. *
9//* *
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//**************************************************************************
18
19/** @file AliHLTGlobalAgent.cxx
20 @author Matthias Richter
21 @date
22 @brief Agent of the libAliHLTGlobal library
23*/
24
25#include <cassert>
26#include "AliHLTGlobalAgent.h"
6595fdc6 27#include "AliHLTConfigurationHandler.h"
28#include "TObjString.h"
29#include "TObjArray.h"
ec6160d5 30
31// header files of library components
18ada816 32#include "AliHLTGlobalTrackMergerComponent.h"
6595fdc6 33#include "AliHLTGlobalEsdConverterComponent.h"
4d5ee3db 34#include "AliHLTGlobalVertexerComponent.h"
8125805f 35#include "AliHLTV0HistoComponent.h"
ec6160d5 36
37/** global instance for agent registration */
38AliHLTGlobalAgent gAliHLTGlobalAgent;
39
40/** ROOT macro for the implementation of ROOT specific class methods */
41ClassImp(AliHLTGlobalAgent)
42
43AliHLTGlobalAgent::AliHLTGlobalAgent()
44 :
45 AliHLTModuleAgent("Global")
46{
47 // see header file for class documentation
48 // or
49 // refer to README to build package
50 // or
51 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
52}
53
54AliHLTGlobalAgent::~AliHLTGlobalAgent()
55{
56 // see header file for class documentation
57}
58
59int AliHLTGlobalAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
60{
61 // see header file for class documentation
62 assert(pHandler);
63 if (!pHandler) return -EINVAL;
18ada816 64 pHandler->AddComponent(new AliHLTGlobalTrackMergerComponent);
6595fdc6 65 pHandler->AddComponent(new AliHLTGlobalEsdConverterComponent);
4d5ee3db 66 pHandler->AddComponent(new AliHLTGlobalVertexerComponent);
8125805f 67 pHandler->AddComponent(new AliHLTV0HistoComponent );
ec6160d5 68 return 0;
69}
70
6595fdc6 71int AliHLTGlobalAgent::CreateConfigurations(AliHLTConfigurationHandler* pHandler,
72 AliRawReader* /*rawReader*/,
73 AliRunLoader* /*runloader*/) const
ec6160d5 74{
75 // see header file for class documentation
6595fdc6 76 if (!pHandler) return -EINVAL;
77
78 /////////////////////////////////////////////////////////////////////////////////////
79 //
80 // assembly of the global ESD
81
82 // define the inputs to the global ESD
83 TString esdInputs="TPC-globalmerger TPC-mcTrackMarker";
84
85 // check for the availibility
86 TObjArray* pTokens=esdInputs.Tokenize(" ");
87 esdInputs="";
88 if (pTokens) {
89 for (int n=0; n<pTokens->GetEntriesFast(); n++) {
90 TString module=((TObjString*)pTokens->At(n))->GetString();
91 if (pHandler->FindConfiguration(module.Data())) {
92 esdInputs+=module;
93 esdInputs+=" ";
94 }
95 }
96 delete pTokens;
97 }
ec6160d5 98
6595fdc6 99 if (esdInputs.Length()>0) {
100 HLTInfo("Configuring inputs to global HLT ESD: %s", esdInputs.Data());
101 } else {
102 HLTWarning("No inputs to global HLT ESD found");
ec6160d5 103 }
104
6595fdc6 105 pHandler->CreateConfiguration("GLOBAL-esd-converter", "GlobalEsdConverter", esdInputs.Data(), "");
106
ec6160d5 107 return 0;
108}
109
6595fdc6 110const char* AliHLTGlobalAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
111 AliRunLoader* runloader) const
ec6160d5 112{
113 // see header file for class documentation
6595fdc6 114 if (runloader) {
115 // reconstruction chains for AliRoot simulation
116 // Note: run loader is only available while running embedded into
117 // AliRoot simulation
118 return "GLOBAL-esd-converter";
ec6160d5 119 }
6595fdc6 120 return NULL;
121}
122
123const char* AliHLTGlobalAgent::GetRequiredComponentLibraries() const
124{
125 // see header file for class documentation
126
127 return "libAliHLTUtil.so libAliHLTRCU.so libAliHLTTPC.so libAliHLTITS.so";
128}
129
130int AliHLTGlobalAgent::GetHandlerDescription(AliHLTComponentDataType /*dt*/,
131 AliHLTUInt32_t /*spec*/,
132 AliHLTOUTHandlerDesc& /*desc*/) const
133{
134 // see header file for class documentation
135
136 return 0;
137}
138
139AliHLTOUTHandler* AliHLTGlobalAgent::GetOutputHandler(AliHLTComponentDataType /*dt*/,
140 AliHLTUInt32_t /*spec*/)
141{
142 // see header file for class documentation
ec6160d5 143
144 return NULL;
145}
146
147int AliHLTGlobalAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance)
148{
149 // see header file for class documentation
150 if (pInstance==NULL) return -EINVAL;
151
152 return 0;
153}