]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/global/AliHLTGlobalAgent.cxx
Make SetChi2 method public
[u/mrichter/AliRoot.git] / HLT / global / AliHLTGlobalAgent.cxx
index 30b26c3e508c88da684aabef7bce81952d0b438a..1c8c32b7c97e5357b52c7c8a12b9d373ca4b2524 100644 (file)
 #include "AliHLTConfigurationHandler.h"
 #include "TObjString.h"
 #include "TObjArray.h"
+#include "AliHLTGlobalFlatEsdTestComponent.h"
 
 // header files of library components
 #include "AliHLTGlobalTrackMergerComponent.h"
+#include "AliHLTGlobalEsdToFlatConverterComponent.h"
+#include "AliHLTGlobalFlatEsdConverterComponent.h"
 #include "AliHLTGlobalEsdConverterComponent.h"
+#include "AliHLTGlobalVertexerComponent.h"
+#include "AliHLTGlobalOfflineVertexerComponent.h"
 #include "AliHLTV0HistoComponent.h"
+#include "AliHLTdNdPtAnalysisComponent.h"
+#include "AliHLTdNdPtAnalysisMergerComponent.h"
+#include "AliHLTGlobalVertexerHistoComponent.h"
+#include "AliHLTGlobalHistoComponent.h"
+#include "AliHLTGlobalHistoCollector.h"
+#include "AliHLTGlobalDCSPublisherComponent.h"
+#include "AliHLTMultiplicityCorrelationsComponent.h"
+#include "AliHLTPrimaryVertexFinderComponent.h"
+#include "AliHLTV0FinderComponent.h"
+#include "AliHLTAnaManagerComponent.h"
+#include "AliHLTFlatAnaManagerComponent.h"
+
+// header file for preprocessor plugin
+#include "AliHLTGlobalPreprocessor.h"
 
 /** global instance for agent registration */
 AliHLTGlobalAgent gAliHLTGlobalAgent;
@@ -60,9 +79,25 @@ int AliHLTGlobalAgent::RegisterComponents(AliHLTComponentHandler* pHandler) cons
   // see header file for class documentation
   assert(pHandler);
   if (!pHandler) return -EINVAL;
+  pHandler->AddComponent(new AliHLTGlobalEsdToFlatConverterComponent);
+  pHandler->AddComponent(new AliHLTGlobalFlatEsdTestComponent);
   pHandler->AddComponent(new AliHLTGlobalTrackMergerComponent);
+  pHandler->AddComponent(new AliHLTGlobalFlatEsdConverterComponent);
   pHandler->AddComponent(new AliHLTGlobalEsdConverterComponent);
+  pHandler->AddComponent(new AliHLTGlobalVertexerComponent);
+  pHandler->AddComponent(new AliHLTGlobalOfflineVertexerComponent);
+  pHandler->AddComponent(new AliHLTGlobalVertexerHistoComponent);
+  pHandler->AddComponent(new AliHLTGlobalHistoComponent);
   pHandler->AddComponent(new AliHLTV0HistoComponent );
+  //pHandler->AddComponent(new AliHLTdNdPtAnalysisComponent );
+  //pHandler->AddComponent(new AliHLTdNdPtAnalysisMergerComponent );
+  pHandler->AddComponent(new AliHLTMultiplicityCorrelationsComponent );
+  pHandler->AddComponent(new AliHLTPrimaryVertexFinderComponent);
+  pHandler->AddComponent(new AliHLTV0FinderComponent);
+  pHandler->AddComponent(new AliHLTGlobalHistoCollector );
+  pHandler->AddComponent(new AliHLTGlobalDCSPublisherComponent );
+  pHandler->AddComponent(new AliHLTAnaManagerComponent);
+  pHandler->AddComponent(new AliHLTFlatAnaManagerComponent);
   return 0;
 }
 
@@ -72,16 +107,46 @@ int AliHLTGlobalAgent::CreateConfigurations(AliHLTConfigurationHandler* pHandler
 {
   // see header file for class documentation
   if (!pHandler) return -EINVAL;
+  TObjArray* pTokens=NULL;
+
+  ///////////////////////////////////////////////////////////////////////////////////////////////////
+  //
+  // global vertexer component
+  //
+  // define the inputs 
+  TString vertexerInputs="TPC-globalmerger ITS-tracker";
+
+  // check for the availibility
+  pTokens=vertexerInputs.Tokenize(" ");
+  vertexerInputs="";
+  if (pTokens) {
+    for (int n=0; n<pTokens->GetEntriesFast(); n++) {
+      TString module=((TObjString*)pTokens->At(n))->GetString();
+      if (pHandler->FindConfiguration(module.Data())) {
+       vertexerInputs+=module;
+       vertexerInputs+=" ";
+      }
+    }
+    delete pTokens;
+    pTokens=NULL;
+  }
+  cout<<endl<<"\n\nConfiguring inputs to global HLT Vertexer: %s\n\n"<<vertexerInputs.Data()<<endl<<endl;
+  if (!vertexerInputs.IsNull()) {
+    HLTInfo("\n\nConfiguring inputs to global HLT Vertexer: %s\n\n", vertexerInputs.Data());
+    pHandler->CreateConfiguration("GLOBAL-vertexer","GlobalVertexer",vertexerInputs,"");
+  } else {
+    HLTWarning("\n\nNo inputs to global HLT Vertexer found\n\n");
+  }
 
   /////////////////////////////////////////////////////////////////////////////////////
   //
   // assembly of the global ESD
 
   // define the inputs to the global ESD
-  TString esdInputs="TPC-globalmerger TPC-mcTrackMarker";
+  TString esdInputs="TPC-globalmerger TPC-mcTrackMarker ITS-tracker TPC-ClusterTransformation GLOBAL-vertexer ITS-SPD-vertexer TPC-dEdx VZERO-RECO";
 
   // check for the availibility
-  TObjArray* pTokens=esdInputs.Tokenize(" ");
+  pTokens=esdInputs.Tokenize(" ");
   esdInputs="";
   if (pTokens) {
     for (int n=0; n<pTokens->GetEntriesFast(); n++) {
@@ -92,16 +157,53 @@ int AliHLTGlobalAgent::CreateConfigurations(AliHLTConfigurationHandler* pHandler
       }
     }
     delete pTokens;
+    pTokens=NULL;
   }
 
   if (esdInputs.Length()>0) {
+    esdInputs+=" TPC-ClusterTransformation";
     HLTInfo("Configuring inputs to global HLT ESD: %s", esdInputs.Data());
   } else {
     HLTWarning("No inputs to global HLT ESD found");
   }
-
+  
+  pHandler->CreateConfiguration("GLOBAL-flat-esd-converter", "GlobalFlatEsdConverter", esdInputs.Data(), "");
   pHandler->CreateConfiguration("GLOBAL-esd-converter", "GlobalEsdConverter", esdInputs.Data(), "");
+  pHandler->CreateConfiguration("GLOBAL-flat-esd-test", "GlobalFlatEsdTest", "GLOBAL-esd-converter GLOBAL-flat-esd-converter", "");
+  pHandler->CreateConfiguration("esd-to-flat-conversion", "GlobalEsdToFlatConverter", "GLOBAL-esd-converter", "");
+
+  ///////////////////////////////////////////////////////////////////////////////////////////////////
+  //
+  // global histograms
+  //
+  TString vertexhistoInput="GLOBAL-vertexer ITS-SPD-vertexer";
+
+  // check for the availibility
+  pTokens=vertexhistoInput.Tokenize(" ");
+  vertexhistoInput="";
+  if (pTokens) {
+    for (int n=0; n<pTokens->GetEntriesFast(); n++) {
+      TString module=((TObjString*)pTokens->At(n))->GetString();
+      if (pHandler->FindConfiguration(module.Data())) {
+       vertexhistoInput+=module;
+       vertexhistoInput+=" ";
+      }
+    }
+    delete pTokens;
+    pTokens=NULL;
+  }
+
+  if (!vertexhistoInput.IsNull()) {
+    HLTInfo("Configuring inputs to global HLT Vertex histogram component: %s", vertexhistoInput.Data());
+    pHandler->CreateConfiguration("GLOBAL-vertexhisto","GlobalVertexerHisto", vertexhistoInput.Data(),"");
+  } else {
+    HLTWarning("No inputs to global HLT Vertex histogram component found");
+  }
   
+  //pHandler->CreateConfiguration("GLOBAL-dNdPtAnalysis", "dNdPtAnalysis", "GLOBAL-esd-converter", "");
+  pHandler->CreateConfiguration("GLOBAL-MultCorr", "MultiplicityCorrelations", "GLOBAL-esd-converter", "");
+
   return 0;
 }
 
@@ -113,7 +215,7 @@ const char* AliHLTGlobalAgent::GetReconstructionChains(AliRawReader* /*rawReader
     // reconstruction chains for AliRoot simulation
     // Note: run loader is only available while running embedded into
     // AliRoot simulation
-    return "GLOBAL-esd-converter";
+    return "GLOBAL-esd-converter";    
   }
   return NULL;
 }
@@ -122,7 +224,7 @@ const char* AliHLTGlobalAgent::GetRequiredComponentLibraries() const
 {
   // see header file for class documentation
 
-  return "libAliHLTUtil.so libAliHLTRCU.so libAliHLTTPC.so libAliHLTITS.so";
+  return "";
 }
 
 int AliHLTGlobalAgent::GetHandlerDescription(AliHLTComponentDataType /*dt*/,
@@ -149,3 +251,9 @@ int AliHLTGlobalAgent::DeleteOutputHandler(AliHLTOUTHandler* pInstance)
 
   return 0;
 }
+
+AliHLTModulePreprocessor* AliHLTGlobalAgent::GetPreprocessor()
+{
+  // create the preprocessor plugin
+  return new AliHLTGlobalPreprocessor;
+}