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