]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - HLT/TPCLib/AliHLTTPCAgent.cxx
Coding violations
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCAgent.cxx
index aa968a2b164c3100597b86de9e280915a97cd81a..3acd70a723d585e20e11b886d39e6b71a57796fe 100644 (file)
@@ -43,10 +43,14 @@ AliHLTTPCAgent gAliHLTTPCAgent;
 #include "AliHLTTPCCompModelDeconverterComponent.h"
 #include "AliHLTTPCCompModelConverterComponent.h"
 #include "AliHLTTPCCompDumpComponent.h"
-#include "AliHLTTPCCalibCEComponent.h"
-#include "AliHLTTPCCalibPulserComponent.h"
-#include "AliHLTTPCCalibPedestalComponent.h"
-//#include "AliHLTTPCCATrackerComponent.h"
+//#include "AliHLTTPCCalibCEComponent.h"
+//#include "AliHLTTPCCalibPulserComponent.h"
+//#include "AliHLTTPCCalibPedestalComponent.h"
+#include "AliHLTTPCCAInputDataCompressorComponent.h"
+#include "AliHLTTPCCATrackerComponent.h"
+#include "AliHLTTPCTrackMCMarkerComponent.h"
+#include "AliHLTTPCCAGlobalMergerComponent.h"
+#include "AliHLTTPCdEdxComponent.h"
 #include "AliHLTTPCGlobalMergerComponent.h"
 #include "AliHLTTPCSliceTrackerComponent.h"
 #include "AliHLTTPCVertexFinderComponent.h"
@@ -60,15 +64,19 @@ AliHLTTPCAgent gAliHLTTPCAgent;
 #include "AliHLTTPCOfflineClustererComponent.h"
 #include "AliHLTTPCOfflineTrackerComponent.h"
 #include "AliHLTTPCOfflineTrackerCalibComponent.h"
-#include "AliHLTTPCOfflineCalibrationComponent.h"
+#include "AliHLTTPCOfflineCalibrationComponent.h" // to be added to the calibration library agent
 #include "AliHLTTPCClusterHistoComponent.h"
 #include "AliHLTTPCNoiseMapComponent.h"
 #include "AliHLTTPCHistogramHandlerComponent.h"
-#include "AliHLTTPCCalibTracksComponent.h"
+//#include "AliHLTTPCCalibTracksComponent.h"
 #include "AliHLTTPCTrackHistoComponent.h"
 #include "AliHLTTPCTrackDumpComponent.h"
 #include "AliHLTTPCHWCFDataReverterComponent.h"
 #include "AliHLTTPCHWClusterTransformComponent.h"
+// #include "AliHLTTPCCalibSeedMakerComponent.h"
+// #include "AliHLTTPCCalibTimeComponent.h"
+// #include "AliHLTTPCCalibTimeGainComponent.h"
+// #include "AliHLTTPCCalibrationComponent.h"
 
 /** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCAgent)
@@ -93,22 +101,10 @@ AliHLTTPCAgent::~AliHLTTPCAgent()
 
 int AliHLTTPCAgent::CreateConfigurations(AliHLTConfigurationHandler* handler,
                                         AliRawReader* rawReader,
-                                        AliRunLoader* /*runloader*/) const
+                                        AliRunLoader* runloader) const
 {
   // see header file for class documentation
   if (handler) {
-    const char* cdbEntry="TPC/Calib/Parameters";
-    AliCDBManager* pMan=AliCDBManager::Instance();
-    AliTPCParam* pTPCParam=NULL;
-    if (pMan) {
-      AliCDBEntry *pEntry = pMan->Get(cdbEntry);
-      if (pEntry && 
-         pEntry->GetObject() &&
-         (pTPCParam=dynamic_cast<AliTPCParam*>(pEntry->GetObject()))) {
-      } else {
-       HLTWarning("can not load AliTPCParam from CDB entry %s", cdbEntry);
-      }
-    }
 
     // This the tracking configuration for the full TPC
     // - 216 clusterfinders (1 per partition)
@@ -129,28 +125,33 @@ int AliHLTTPCAgent::CreateConfigurations(AliHLTConfigurationHandler* handler,
 
        // digit publisher components
        publisher.Form("TPC-DP_%02d_%d", slice, part);
-       if (!rawReader) {
-         arg.Form("-slice %d -partition %d", slice, part);
-         handler->CreateConfiguration(publisher.Data(), "TPCDigitPublisher", NULL , arg.Data());
-       } else {
+       if (rawReader || !runloader) {
+         // AliSimulation: use the AliRawReaderPublisher if the raw reader is available
+         // Alireconstruction: indicated by runloader==NULL, run always on raw data
          int ddlno=768;
          if (part>1) ddlno+=72+4*slice+(part-2);
          else ddlno+=2*slice+part;
          arg.Form("-minid %d -datatype 'DDL_RAW ' 'TPC '  -dataspec 0x%02x%02x%02x%02x -silent", ddlno, slice, slice, part, part);
          handler->CreateConfiguration(publisher.Data(), "AliRawReaderPublisher", NULL , arg.Data());
+       } else {
+         arg.Form("-slice %d -partition %d", slice, part);
+         handler->CreateConfiguration(publisher.Data(), "TPCDigitPublisher", NULL , arg.Data());
        }
 
        // cluster finder components
        cf.Form("TPC-CF_%02d_%d", slice, part);
-       arg="";
-       if (pTPCParam) {
-         arg+=" -timebins "; arg+=pTPCParam->GetMaxTBin()+1;
-       }
-       if (!rawReader) {
-         arg+=" -sorted";
+       arg="-release-memory";
+       if (!rawReader && runloader) {
+         arg+=" -do-mc";
          handler->CreateConfiguration(cf.Data(), "TPCClusterFinderUnpacked", publisher.Data(), arg.Data());
        } else {
+#ifndef HAVE_NOT_ALTRORAWSTREAMV3
+         handler->CreateConfiguration(cf.Data(), "TPCClusterFinder32Bit", publisher.Data(),arg.Data());
+#else
+         // using the AltroDecoder if the official V3 decoder is not
+         // available in the offline code
          handler->CreateConfiguration(cf.Data(), "TPCClusterFinderDecoder", publisher.Data(), arg.Data());
+#endif 
        }
        if (trackerInput.Length()>0) trackerInput+=" ";
        trackerInput+=cf;
@@ -160,7 +161,7 @@ int AliHLTTPCAgent::CreateConfigurations(AliHLTConfigurationHandler* handler,
       TString tracker;
       // tracker finder components
       tracker.Form("TPC-TR_%02d", slice);
-      handler->CreateConfiguration(tracker.Data(), "TPCSliceTracker", trackerInput.Data(), "-pp-run");
+      handler->CreateConfiguration(tracker.Data(), "TPCCATracker", trackerInput.Data(), "");
 
       if (mergerInput.Length()>0) mergerInput+=" ";
       mergerInput+=tracker;
@@ -168,10 +169,18 @@ int AliHLTTPCAgent::CreateConfigurations(AliHLTConfigurationHandler* handler,
     }
 
     // GlobalMerger component
-    handler->CreateConfiguration("TPC-globalmerger","TPCGlobalMerger",mergerInput.Data(),"");
+    handler->CreateConfiguration("TPC-globalmerger","TPCCAGlobalMerger",mergerInput.Data(),"");
 
     // the esd converter configuration
-    handler->CreateConfiguration("TPC-esd-converter", "TPCEsdConverter"   , "TPC-globalmerger", "");
+    TString converterInput="TPC-globalmerger";
+    if (!rawReader && runloader) {
+      // propagate cluster info to the esd converter in order to fill the MC information
+      handler->CreateConfiguration("TPC-clustermc-info", "BlockFilter"   , sinkClusterInput.Data(), "-datatype 'CLMCINFO' 'TPC '");  
+      handler->CreateConfiguration("TPC-mcTrackMarker","TPCTrackMCMarker","TPC-globalmerger TPC-clustermc-info","" );
+      converterInput+=" ";
+      converterInput+="TPC-mcTrackMarker";
+    }
+    handler->CreateConfiguration("TPC-esd-converter", "TPCEsdConverter"   , converterInput.Data(), "");
 
     // cluster dump collection
     handler->CreateConfiguration("TPC-clusters", "BlockFilter"   , sinkClusterInput.Data(), "-datatype 'CLUSTERS' 'TPC '");
@@ -212,8 +221,9 @@ const char* AliHLTTPCAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
     // reconstruction chains for AliRoot simulation
     // Note: run loader is only available while running embedded into
     // AliRoot simulation
-    if (runloader->GetLoader("TPCLoader") != NULL)
-      return "TPC-esd-converter TPC-clusters";
+    //if (runloader->GetLoader("TPCLoader") != NULL)
+      //return "TPC-esd-converter TPC-clusters";
+      return "TPC-clusters";
   }
   return NULL;
 }
@@ -225,7 +235,7 @@ const char* AliHLTTPCAgent::GetRequiredComponentLibraries() const
   // actually, the TPC library has dependencies to Util and RCU
   // so the two has to be loaded anyhow before we get here
   //return "libAliHLTUtil.so libAliHLTRCU.so";
-  return NULL;
+  return "libAliHLTUtil.so";
 }
 
 int AliHLTTPCAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
@@ -235,21 +245,26 @@ int AliHLTTPCAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
 
   pHandler->AddComponent(new AliHLTTPCRunStatisticsProducerComponent);
   pHandler->AddComponent(new AliHLTTPCEventStatisticsProducerComponent);
-  pHandler->AddComponent(new AliHLTTPCCalibCEComponent);
-  pHandler->AddComponent(new AliHLTTPCCalibPulserComponent);
-  pHandler->AddComponent(new AliHLTTPCCalibPedestalComponent);
+//   pHandler->AddComponent(new AliHLTTPCCalibCEComponent);
+//   pHandler->AddComponent(new AliHLTTPCCalibPulserComponent);
+//   pHandler->AddComponent(new AliHLTTPCCalibPedestalComponent);
   pHandler->AddComponent(new AliHLTTPCCompModelInflaterComponent);
   pHandler->AddComponent(new AliHLTTPCCompModelDeflaterComponent);
   pHandler->AddComponent(new AliHLTTPCCompModelDeconverterComponent);
   pHandler->AddComponent(new AliHLTTPCCompModelConverterComponent);
   pHandler->AddComponent(new AliHLTTPCCompDumpComponent);
-  //  pHandler->AddComponent(new AliHLTTPCCATrackerComponent);
+  pHandler->AddComponent(new AliHLTTPCCAInputDataCompressorComponent);
+  pHandler->AddComponent(new AliHLTTPCCATrackerComponent);
+  pHandler->AddComponent(new AliHLTTPCCAGlobalMergerComponent);
+  pHandler->AddComponent(new AliHLTTPCTrackMCMarkerComponent);
   pHandler->AddComponent(new AliHLTTPCGlobalMergerComponent);
+  pHandler->AddComponent(new AliHLTTPCdEdxComponent);
   pHandler->AddComponent(new AliHLTTPCSliceTrackerComponent);
   pHandler->AddComponent(new AliHLTTPCVertexFinderComponent);
   pHandler->AddComponent(new AliHLTTPCClusterFinderComponent(AliHLTTPCClusterFinderComponent::kClusterFinderPacked));
   pHandler->AddComponent(new AliHLTTPCClusterFinderComponent(AliHLTTPCClusterFinderComponent::kClusterFinderUnpacked));
   pHandler->AddComponent(new AliHLTTPCClusterFinderComponent(AliHLTTPCClusterFinderComponent::kClusterFinderDecoder));
+  pHandler->AddComponent(new AliHLTTPCClusterFinderComponent(AliHLTTPCClusterFinderComponent::kClusterFinder32Bit));
   pHandler->AddComponent(new AliHLTTPCRawDataUnpackerComponent);
   pHandler->AddComponent(new AliHLTTPCDigitPublisherComponent);
   pHandler->AddComponent(new AliHLTTPCZeroSuppressionComponent);
@@ -264,11 +279,15 @@ int AliHLTTPCAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
   pHandler->AddComponent(new AliHLTTPCClusterHistoComponent);
   pHandler->AddComponent(new AliHLTTPCNoiseMapComponent);
   pHandler->AddComponent(new AliHLTTPCHistogramHandlerComponent);
-  pHandler->AddComponent(new AliHLTTPCCalibTracksComponent);
+  //pHandler->AddComponent(new AliHLTTPCCalibTracksComponent);
   pHandler->AddComponent(new AliHLTTPCTrackHistoComponent);
   pHandler->AddComponent(new AliHLTTPCTrackDumpComponent);
   pHandler->AddComponent(new AliHLTTPCHWCFDataReverterComponent);
   pHandler->AddComponent(new AliHLTTPCHWClusterTransformComponent);
+//   pHandler->AddComponent(new AliHLTTPCCalibSeedMakerComponent);
+//   pHandler->AddComponent(new AliHLTTPCCalibTimeComponent);
+//   pHandler->AddComponent(new AliHLTTPCCalibTimeGainComponent);
+//   pHandler->AddComponent(new AliHLTTPCCalibrationComponent);
 
   return 0;
 }