]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
converting to component registration by library agent - getting rid of global objects
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 19 Mar 2008 22:27:27 +0000 (22:27 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 19 Mar 2008 22:27:27 +0000 (22:27 +0000)
21 files changed:
HLT/TPCLib/AliHLTTPCAgent.cxx
HLT/TPCLib/AliHLTTPCCalibCEComponent.cxx
HLT/TPCLib/AliHLTTPCCalibPedestalComponent.cxx
HLT/TPCLib/AliHLTTPCCalibPulserComponent.cxx
HLT/TPCLib/AliHLTTPCClusterFinderComponent.cxx
HLT/TPCLib/AliHLTTPCEventStatisticsProducerComponent.cxx
HLT/TPCLib/AliHLTTPCGlobalMergerComponent.cxx
HLT/TPCLib/AliHLTTPCRawDataUnpackerComponent.cxx
HLT/TPCLib/AliHLTTPCRunStatisticsProducerComponent.cxx
HLT/TPCLib/AliHLTTPCSliceTrackerComponent.cxx
HLT/TPCLib/AliHLTTPCVertexFinderComponent.cxx
HLT/TPCLib/AliHLTTPCZeroSuppressionComponent.cxx
HLT/TPCLib/comp/AliHLTTPCCompDumpComponent.cxx
HLT/TPCLib/comp/AliHLTTPCCompModelConverterComponent.cxx
HLT/TPCLib/comp/AliHLTTPCCompModelDeconverterComponent.cxx
HLT/TPCLib/comp/AliHLTTPCCompModelDeflaterComponent.cxx
HLT/TPCLib/comp/AliHLTTPCCompModelInflaterComponent.cxx
HLT/TPCLib/macros/conf-tpc-esd.C
HLT/TPCLib/offline/AliHLTTPCDigitPublisherComponent.cxx
HLT/TPCLib/tracking-ca/AliHLTTPCCATrackerComponent.cxx
HLT/libAliHLTTPC.pkg

index c72c0f8fe6368d156b701f5fecc75a46f4f37a23..e15791bea41fbd9e1004861b40ad7ed829e08193 100644 (file)
 AliHLTTPCAgent gAliHLTTPCAgent;
 
 // component headers
+#include "AliHLTTPCRunStatisticsProducerComponent.h"
+#include "AliHLTTPCEventStatisticsProducerComponent.h"
+#include "AliHLTTPCCompModelInflaterComponent.h"
+#include "AliHLTTPCCompModelDeflaterComponent.h"
+#include "AliHLTTPCCompModelDeconverterComponent.h"
+#include "AliHLTTPCCompModelConverterComponent.h"
+#include "AliHLTTPCCompDumpComponent.h"
+#include "AliHLTTPCCalibCEComponent.h"
+#include "AliHLTTPCCalibPulserComponent.h"
+#include "AliHLTTPCCalibPedestalComponent.h"
+#include "AliHLTTPCCATrackerComponent.h"
+#include "AliHLTTPCGlobalMergerComponent.h"
+#include "AliHLTTPCSliceTrackerComponent.h"
+#include "AliHLTTPCVertexFinderComponent.h"
+#include "AliHLTTPCClusterFinderComponent.h"
+#include "AliHLTTPCRawDataUnpackerComponent.h"
+#include "AliHLTTPCDigitPublisherComponent.h"
+#include "AliHLTTPCZeroSuppressionComponent.h"
 #include "AliHLTTPCDigitDumpComponent.h"
 #include "AliHLTTPCEsdWriterComponent.h"
 
@@ -61,12 +79,18 @@ int AliHLTTPCAgent::CreateConfigurations(AliHLTConfigurationHandler* handler,
 {
   // see header file for class documentation
   if (handler) {
+
+    // This the tracking configuration for the full TPC
+    // - 216 clusterfinders (1 per partition)
+    // - 36 slice trackers
+    // - one global merger
+    // - the esd converter
+    // The ESD is shipped embedded into a TTree
     int iMinSlice=0; 
-    int iMaxSlice=1;
+    int iMaxSlice=35;
     int iMinPart=0;
-    int iMaxPart=1;
-    TString fileWriterInput;
-    TString esdWriterInput;
+    int iMaxPart=5;
+    TString mergerInput;
     for (int slice=iMinSlice; slice<=iMaxSlice; slice++) {
       TString trackerInput;
       for (int part=iMinPart; part<=iMaxPart; part++) {
@@ -86,21 +110,18 @@ int AliHLTTPCAgent::CreateConfigurations(AliHLTConfigurationHandler* handler,
       TString tracker;
       // tracker finder components
       tracker.Form("TR_%02d", slice);
-      handler->CreateConfiguration(tracker.Data(), "TPCSliceTracker", trackerInput.Data(), "pp-run bfield 0.5");
+      handler->CreateConfiguration(tracker.Data(), "TPCSliceTracker", trackerInput.Data(), "-pp-run -bfield 0.5");
 
-      // input for the global file writer
-      if (fileWriterInput.Length()>0) fileWriterInput+=" ";
-      fileWriterInput+=trackerInput;
+      if (mergerInput.Length()>0) mergerInput+=" ";
+      mergerInput+=tracker;
 
-      // input for the esd writer
-      if (esdWriterInput.Length()>0) esdWriterInput+=" ";
-      esdWriterInput+=tracker;
     }
 
-    // the writer configuration
-    handler->CreateConfiguration("sink1", "FileWriter"   , fileWriterInput.Data(), "-specfmt -subdir=test_%d -blcknofmt=_0x%x -idfmt=_0x%08x");
-    // the esd writer configuration
-    handler->CreateConfiguration("esd-writer", "TPCEsdWriter"   , esdWriterInput.Data(), "-datafile AliESDs.root");
+    // GlobalMerger component
+    handler->CreateConfiguration("globalmerger","TPCGlobalMerger",mergerInput.Data(),"");
+
+    // the esd converter configuration
+    handler->CreateConfiguration("esd-converter", "TPCEsdConverter"   , "globalmerger", "-tree");
   }
   return 0;
 }
@@ -110,8 +131,7 @@ const char* AliHLTTPCAgent::GetReconstructionChains(AliRawReader* /*rawReader*/,
 {
   // see header file for class documentation
   return NULL;
-  //return "sink1";
-  //return "esd-writer";
+  //return "esd-converter";
 }
 
 const char* AliHLTTPCAgent::GetRequiredComponentLibraries() const
@@ -128,6 +148,27 @@ int AliHLTTPCAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
 {
   // see header file for class documentation
   if (!pHandler) return -EINVAL;
+
+  pHandler->AddComponent(new AliHLTTPCRunStatisticsProducerComponent);
+  pHandler->AddComponent(new AliHLTTPCEventStatisticsProducerComponent);
+  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 AliHLTTPCGlobalMergerComponent);
+  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 AliHLTTPCRawDataUnpackerComponent);
+  pHandler->AddComponent(new AliHLTTPCDigitPublisherComponent);
+  pHandler->AddComponent(new AliHLTTPCZeroSuppressionComponent);
   pHandler->AddComponent(new AliHLTTPCDigitDumpComponent);
   pHandler->AddComponent(new AliHLTTPCEsdWriterComponent::AliWriter);
   pHandler->AddComponent(new AliHLTTPCEsdWriterComponent::AliConverter);
index a7684b02b8af19310633507b85b76377982628ae..7646f8a6f7a38273dfa91f317df579ef27bd3b2a 100644 (file)
@@ -47,9 +47,7 @@ using namespace std;
 #include <cerrno>
 #include "TString.h"
 
-// this is a global object used for automatic component registration, do not use this
-AliHLTTPCCalibCEComponent gAliHLTTPCCalibCEComponent;
-
+/** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCCalibCEComponent)
 
 AliHLTTPCCalibCEComponent::AliHLTTPCCalibCEComponent()
index 1fb82d220bd9eb14da268be7e2d646e18e06c190..807158aeffe851e1de7383b254e104bf0c7090f3 100755 (executable)
@@ -45,9 +45,7 @@ using namespace std;
 #include <errno.h>
 #include "TString.h"
 
-// this is a global object used for automatic component registration, do not use this
-AliHLTTPCCalibPedestalComponent gAliHLTTPCCalibPedestalComponent;
-
+/** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCCalibPedestalComponent)
 
 AliHLTTPCCalibPedestalComponent::AliHLTTPCCalibPedestalComponent()
index 4d03c4594dcbdfff57c03d08b397fe593f653ec6..6d7eb18aa4c8fa2a472d60c3ec88b9a5f32ac9eb 100644 (file)
@@ -47,9 +47,7 @@ using namespace std;
 #include <errno.h>
 #include "TString.h"
 
-// this is a global object used for automatic component registration, do not use this
-AliHLTTPCCalibPulserComponent gAliHLTTPCCalibPulserComponent;
-
+/** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCCalibPulserComponent)
 
 AliHLTTPCCalibPulserComponent::AliHLTTPCCalibPulserComponent()
index 400b122c1b173bc1204dbd0f674c72c79e6643e3..cc433948d90ea8473557994c2cde7ab523e71863 100644 (file)
@@ -53,13 +53,6 @@ using namespace std;
 #include "TObjString.h"
 #include <sys/time.h>
 
-// this is a global object used for automatic component registration, do not use this
-// use fPackedSwitch = true for packed inputtype "gkDDLPackedRawDataType"
-// use fPackedSwitch = false for unpacked inputtype "gkUnpackedRawDataType"
-AliHLTTPCClusterFinderComponent gAliHLTTPCClusterFinderComponentPacked(AliHLTTPCClusterFinderComponent::kClusterFinderPacked);
-AliHLTTPCClusterFinderComponent gAliHLTTPCClusterFinderComponentUnpacked(AliHLTTPCClusterFinderComponent::kClusterFinderUnpacked);
-AliHLTTPCClusterFinderComponent gAliHLTTPCClusterFinderComponentDecoder(AliHLTTPCClusterFinderComponent::kClusterFinderDecoder);
-
 /** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCClusterFinderComponent)
 
index 484768e416032043f8ad7b0eb8c15be9aa690b7f..368a7a22fbcb08be649e332b8dad53cbcec94a21 100644 (file)
@@ -44,9 +44,7 @@ using namespace std;
 
 #include <cerrno>
 
-// ** This is a global object used for automatic component registration, do not use this
-AliHLTTPCEventStatisticsProducerComponent gAliHLTTPCEventStatisticsProducerComponent;
-
+/** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCEventStatisticsProducerComponent)
     
 // ------------------------------------------------------------------------------------------
index addeeaa17d326cd3a87ea3e05faac0b965140306..7c066985c5ab21f52589f975bd78e877459a425c 100644 (file)
@@ -47,9 +47,7 @@ using namespace std;
 #include <cstdlib>
 #include <cerrno>
 
-// this is a global object used for automatic component registration, do not use this
-AliHLTTPCGlobalMergerComponent gAliHLTTPCGlobalMergerComponent;
-
+/** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCGlobalMergerComponent);
 
 AliHLTTPCGlobalMergerComponent::AliHLTTPCGlobalMergerComponent()
index 2f29e314567dd163376d0a6596b9d76865b239c4..7b914580892256033be6eca2fc94e0d39cdc2ab2 100644 (file)
@@ -43,9 +43,7 @@ using namespace std;
 #include <cstdlib>
 #include <cerrno>
 
-// this is a global object used for automatic component registration, do not use this
-AliHLTTPCRawDataUnpackerComponent gAliHLTTPCRawDataUnpackerComponent;
-
+/** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCRawDataUnpackerComponent);
 
 AliHLTTPCRawDataUnpackerComponent::AliHLTTPCRawDataUnpackerComponent()
index 7265df51a777dbbd48bc76495ca213eabb7875a6..d2f17018dd790a59f4cfde9004e369c26188bb43 100644 (file)
@@ -38,9 +38,7 @@ using namespace std;
 
 #include <cerrno>
 
-// ** This is a global object used for automatic component registration, do not use this
-AliHLTTPCRunStatisticsProducerComponent gAliHLTTPCRunStatisticsProducerComponent;
-
+/** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCRunStatisticsProducerComponent)
     
 // ------------------------------------------------------------------------------------------
index 2003c2d838bba57f08cba59d2e3bd045049dc564..9df9b8f07d45756b49160951b2097d299b96161a 100644 (file)
@@ -55,9 +55,6 @@ using namespace std;
 //#include <stdlib.h>
 //#include <cerrno>
 
-// this is a global object used for automatic component registration, do not use this
-AliHLTTPCSliceTrackerComponent gAliHLTTPCSliceTrackerComponent;
-
 /** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCSliceTrackerComponent)
 
index 377090e039c99af2dda4e3c59303a0655afaf1b6..6878c6f90b139eb22f77b095bf042e28cc0e8d10 100644 (file)
@@ -49,9 +49,7 @@ using namespace std;
 #include <cstdlib>
 #include <cerrno>
 
-// this is a global object used for automatic component registration, do not use this
-AliHLTTPCVertexFinderComponent gAliHLTTPCVertexFinderComponent;
-
+/** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCVertexFinderComponent);
 
 AliHLTTPCVertexFinderComponent::AliHLTTPCVertexFinderComponent()
index 5ed8487dc003108ddffcaa81e173b8a88b67ef13..929c10a327c6d8f0633fcb95b6998121967ea548 100755 (executable)
@@ -40,8 +40,6 @@ using namespace std;
 #include <sys/time.h>
 
 
-AliHLTTPCZeroSuppressionComponent gAliHLTTPCZeroSuppressionComponent;
-
 /** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCZeroSuppressionComponent)
 
index 5a97671d3d1848afce0ea1d127c763a1121365eb..0b3bd2a959737ce9bcbb27fb43c1b9810537f5b9 100644 (file)
@@ -38,9 +38,7 @@ using namespace std;
 #include <stdlib.h>
 #include <errno.h>
 
-// this is a global object used for automatic component registration, do not use this
-AliHLTTPCCompDumpComponent gAliHLTTPCCompClusterDumpComponent;
-
+/** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCCompDumpComponent)
     
 AliHLTTPCCompDumpComponent::AliHLTTPCCompDumpComponent()
index 88d0677400daefa40a0214b96eaba7ada2c8f6dc..01d61be890ae888ed1c5c5997ac5054e4a483b88 100644 (file)
@@ -37,9 +37,7 @@ using namespace std;
  * applied to these tracks and clusters
  */
 
-// this is a global object used for automatic component registration, do not use this
-AliHLTTPCCompModelConverterComponent gAliHLTTPCCompClusterModelConverterComponent;
-
+/** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCCompModelConverterComponent)
     
   AliHLTTPCCompModelConverterComponent::AliHLTTPCCompModelConverterComponent() :
index cd75951b33ea585238f2b79158edae3e29041d04..417a397bc63cc965abf30052755e3f5f76316bf7 100644 (file)
@@ -38,9 +38,7 @@ using namespace std;
  * due to the Vestbo-compression 
  */
 
-// this is a global object used for automatic component registration, do not use this
-AliHLTTPCCompModelDeconverterComponent gAliHLTTPCCompClusterModelDeconverterComponent;
-
+/** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCCompModelDeconverterComponent)
     
 AliHLTTPCCompModelDeconverterComponent::AliHLTTPCCompModelDeconverterComponent():
index edbde98f35481778b058bc3a602870803e10d819..1141c560ff0f86079e908c900ff99da2b6e4465d 100644 (file)
@@ -30,9 +30,7 @@ using namespace std;
 #include <stdlib.h>
 #include <errno.h>
 
-// this is a global object used for automatic component registration, do not use this
-AliHLTTPCCompModelDeflaterComponent gAliHLTTPCCompClusterModelDeflaterComponent;
-
+/** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCCompModelDeflaterComponent);
     
 AliHLTTPCCompModelDeflaterComponent::AliHLTTPCCompModelDeflaterComponent():
index a6e0846a80823918d7287c8f0b9be102d069e036..133f1f877278ce443ebcedd3c50e0e85ecc78b1b 100644 (file)
@@ -30,9 +30,7 @@ using namespace std;
 #include <stdlib.h>
 #include <errno.h>
 
-// this is a global object used for automatic component registration, do not use this
-AliHLTTPCCompModelInflaterComponent gAliHLTTPCCompClusterModelInflaterComponent;
-
+/** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCCompModelInflaterComponent);
     
 AliHLTTPCCompModelInflaterComponent::AliHLTTPCCompModelInflaterComponent()
index 4cfc603e78d2616f66417f76ac39cefc66a78ac5..ff43323cb578405556a109c74312cee7e066806d 100644 (file)
     // the esd writer configuration
     AliHLTConfiguration sink("sink1", "TPCEsdWriter"   , "globalmerger", "-datafile AliHLTESDs.root");
   } else {
-    // the esd writer configuration
+    // the esd converter configuration
     AliHLTConfiguration esdcconf("esd-converter", "TPCEsdConverter"   , "globalmerger", "-tree");
     
-    // the esd writer configuration
+    // the root file writer configuration
     AliHLTConfiguration sink("sink1", "ROOTFileWriter"   , "esd-converter", "-datafile AliHLTESDs.root");
   }
 }
index 31922d1cd7bcbac60b7ae10e0320e35914652593..2211b50e5f00de369d76357424dcc34c1bf61f41 100644 (file)
@@ -36,9 +36,6 @@
 #include "AliHLTTPCDefinitions.h"
 #include "AliHLTTPCFileHandler.h"
 
-/** global instance for agent registration */
-AliHLTTPCDigitPublisherComponent gAliHLTTPCDigitPublisherComponent;
-
 /** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCDigitPublisherComponent)
 
index 0d717649b7f46a09051730b49aac0159d9f147d9..2fd3f8b4cf20dd4d64b919a5ebb4b814af789a5c 100644 (file)
@@ -42,10 +42,7 @@ using namespace std;
 #include "TStopwatch.h"
 #include "TMath.h"
 
-
-// this is a global object used for automatic component registration, do not use this
-AliHLTTPCCATrackerComponent gAliHLTTPCCATrackerComponent;
-
+/** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCCATrackerComponent)
 
 AliHLTTPCCATrackerComponent::AliHLTTPCCATrackerComponent()
index 95e7ab83cd1c07849f784efd32649837ca512de4..7b65615f9e56ec37536eb03c1a777cf210b28548 100644 (file)
@@ -116,4 +116,14 @@ PACKCXXFLAGS := ${HLTCXXFLAGS}
 PACKCFLAGS   := ${HLTCLFAGS}
 PACKDCXXFLAGS:= ${HLTDCXXFLAGS}
 
-EINCLUDE := HLT/TPCLib HLT/TPCLib/tracking HLT/TPCLib/comp HLT/TPCLib/tracking-ca HLT/BASE HLT/BASE/util HLT/RCU TPC RAW STEER
+EINCLUDE       := HLT/TPCLib \
+                  HLT/TPCLib/tracking \
+                  HLT/TPCLib/comp \
+                  HLT/TPCLib/tracking-ca \
+                  HLT/TPCLib/offline \
+                  HLT/BASE \
+                  HLT/BASE/util \
+                  HLT/RCU \
+                  TPC \
+                  RAW \
+                  STEER