]> git.uio.no Git - u/mrichter/AliRoot.git/blame - HLT/global/AliHLTGlobalAgent.cxx
add SPD to plots
[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"
e09e5bba 35#include "AliHLTGlobalOfflineVertexerComponent.h"
8125805f 36#include "AliHLTV0HistoComponent.h"
50fec912 37#include "AliHLTdNdPtAnalysisComponent.h"
b5642787 38#include "AliHLTdNdPtAnalysisMergerComponent.h"
de0257eb 39#include "AliHLTGlobalVertexerHistoComponent.h"
a4c1f5dd 40#include "AliHLTGlobalHistoComponent.h"
e419c1ae 41#include "AliHLTGlobalHistoCollector.h"
dd15c69b 42#include "AliHLTGlobalDCSPublisherComponent.h"
06f2306d 43#include "AliHLTMultiplicityCorrelationsComponent.h"
ec6160d5 44
45/** global instance for agent registration */
46AliHLTGlobalAgent gAliHLTGlobalAgent;
47
48/** ROOT macro for the implementation of ROOT specific class methods */
49ClassImp(AliHLTGlobalAgent)
50
51AliHLTGlobalAgent::AliHLTGlobalAgent()
52 :
53 AliHLTModuleAgent("Global")
54{
55 // see header file for class documentation
56 // or
57 // refer to README to build package
58 // or
59 // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
60}
61
62AliHLTGlobalAgent::~AliHLTGlobalAgent()
63{
64 // see header file for class documentation
65}
66
67int AliHLTGlobalAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
68{
69 // see header file for class documentation
70 assert(pHandler);
71 if (!pHandler) return -EINVAL;
18ada816 72 pHandler->AddComponent(new AliHLTGlobalTrackMergerComponent);
6595fdc6 73 pHandler->AddComponent(new AliHLTGlobalEsdConverterComponent);
4d5ee3db 74 pHandler->AddComponent(new AliHLTGlobalVertexerComponent);
e09e5bba 75 pHandler->AddComponent(new AliHLTGlobalOfflineVertexerComponent);
de0257eb 76 pHandler->AddComponent(new AliHLTGlobalVertexerHistoComponent);
a4c1f5dd 77 pHandler->AddComponent(new AliHLTGlobalHistoComponent);
8125805f 78 pHandler->AddComponent(new AliHLTV0HistoComponent );
b5642787 79 //pHandler->AddComponent(new AliHLTdNdPtAnalysisComponent );
80 //pHandler->AddComponent(new AliHLTdNdPtAnalysisMergerComponent );
06f2306d 81 pHandler->AddComponent(new AliHLTMultiplicityCorrelationsComponent );
e419c1ae 82 pHandler->AddComponent(new AliHLTGlobalHistoCollector );
dd15c69b 83 pHandler->AddComponent(new AliHLTGlobalDCSPublisherComponent );
ec6160d5 84 return 0;
85}
86
6595fdc6 87int AliHLTGlobalAgent::CreateConfigurations(AliHLTConfigurationHandler* pHandler,
88 AliRawReader* /*rawReader*/,
89 AliRunLoader* /*runloader*/) const
ec6160d5 90{
91 // see header file for class documentation
6595fdc6 92 if (!pHandler) return -EINVAL;
ff242c62 93 TObjArray* pTokens=NULL;
94
95 ///////////////////////////////////////////////////////////////////////////////////////////////////
96 //
97 // global vertexer component
98 //
99 // define the inputs
100 TString vertexerInputs="TPC-globalmerger ITS-tracker";
101
102 // check for the availibility
103 pTokens=vertexerInputs.Tokenize(" ");
104 vertexerInputs="";
105 if (pTokens) {
106 for (int n=0; n<pTokens->GetEntriesFast(); n++) {
107 TString module=((TObjString*)pTokens->At(n))->GetString();
108 if (pHandler->FindConfiguration(module.Data())) {
109 vertexerInputs+=module;
110 vertexerInputs+=" ";
111 }
112 }
113 delete pTokens;
114 pTokens=NULL;
115 }
116 if (!vertexerInputs.IsNull()) {
117 HLTInfo("Configuring inputs to global HLT Vertexer: %s", vertexerInputs.Data());
118 pHandler->CreateConfiguration("GLOBAL-vertexer","GlobalVertexer",vertexerInputs,"");
119 } else {
120 HLTWarning("No inputs to global HLT Vertexer found");
121 }
6595fdc6 122
123 /////////////////////////////////////////////////////////////////////////////////////
124 //
125 // assembly of the global ESD
126
127 // define the inputs to the global ESD
8ebbc115 128 TString esdInputs="TPC-globalmerger TPC-mcTrackMarker ITS-tracker GLOBAL-vertexer TPC-dEdx VZERO-RECO";
6595fdc6 129
130 // check for the availibility
ff242c62 131 pTokens=esdInputs.Tokenize(" ");
6595fdc6 132 esdInputs="";
133 if (pTokens) {
134 for (int n=0; n<pTokens->GetEntriesFast(); n++) {
135 TString module=((TObjString*)pTokens->At(n))->GetString();
136 if (pHandler->FindConfiguration(module.Data())) {
137 esdInputs+=module;
138 esdInputs+=" ";
139 }
140 }
141 delete pTokens;
ff242c62 142 pTokens=NULL;
6595fdc6 143 }
ec6160d5 144
6595fdc6 145 if (esdInputs.Length()>0) {
146 HLTInfo("Configuring inputs to global HLT ESD: %s", esdInputs.Data());
147 } else {
148 HLTWarning("No inputs to global HLT ESD found");
ec6160d5 149 }
150
6595fdc6 151 pHandler->CreateConfiguration("GLOBAL-esd-converter", "GlobalEsdConverter", esdInputs.Data(), "");
96bad4f8 152
96bad4f8 153 ///////////////////////////////////////////////////////////////////////////////////////////////////
154 //
155 // global histograms
156 //
ff242c62 157 TString vertexhistoInput="GLOBAL-vertexer ITS-SPD-vertexer";
158
159 // check for the availibility
160 pTokens=vertexhistoInput.Tokenize(" ");
161 vertexhistoInput="";
162 if (pTokens) {
163 for (int n=0; n<pTokens->GetEntriesFast(); n++) {
164 TString module=((TObjString*)pTokens->At(n))->GetString();
165 if (pHandler->FindConfiguration(module.Data())) {
166 vertexhistoInput+=module;
167 vertexhistoInput+=" ";
168 }
169 }
170 delete pTokens;
171 pTokens=NULL;
172 }
173
174 if (!vertexhistoInput.IsNull()) {
175 HLTInfo("Configuring inputs to global HLT Vertex histogram component: %s", vertexhistoInput.Data());
176 pHandler->CreateConfiguration("GLOBAL-vertexhisto","GlobalVertexerHisto", vertexhistoInput.Data(),"");
177 } else {
178 HLTWarning("No inputs to global HLT Vertex histogram component found");
96bad4f8 179 }
6595fdc6 180
b5642787 181 //pHandler->CreateConfiguration("GLOBAL-dNdPtAnalysis", "dNdPtAnalysis", "GLOBAL-esd-converter", "");
182
06f2306d 183 pHandler->CreateConfiguration("GLOBAL-MultCorr", "MultiplicityCorrelations", "GLOBAL-esd-converter", "");
184
ec6160d5 185 return 0;
186}
187
6595fdc6 188const char* AliHLTGlobalAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
189 AliRunLoader* runloader) const
ec6160d5 190{
191 // see header file for class documentation
6595fdc6 192 if (runloader) {
193 // reconstruction chains for AliRoot simulation
194 // Note: run loader is only available while running embedded into
195 // AliRoot simulation
50fec912 196 return "GLOBAL-esd-converter";
ec6160d5 197 }
6595fdc6 198 return NULL;
199}
200
201const char* AliHLTGlobalAgent::GetRequiredComponentLibraries() const
202{
203 // see header file for class documentation
204
b5642787 205 return "";
6595fdc6 206}
207
208int AliHLTGlobalAgent::GetHandlerDescription(AliHLTComponentDataType /*dt*/,
209 AliHLTUInt32_t /*spec*/,
210 AliHLTOUTHandlerDesc& /*desc*/) const
211{
212 // see header file for class documentation
213
214 return 0;
215}
216
217AliHLTOUTHandler* AliHLTGlobalAgent::GetOutputHandler(AliHLTComponentDataType /*dt*/,
218 AliHLTUInt32_t /*spec*/)
219{
220 // see header file for class documentation
ec6160d5 221
222 return NULL;
223}
224
225int AliHLTGlobalAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance)
226{
227 // see header file for class documentation
228 if (pInstance==NULL) return -EINVAL;
229
230 return 0;
231}