]> git.uio.no Git - u/mrichter/AliRoot.git/commitdiff
Adding cluster finder component which integrates offline algorithms with online HLT.
authoraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 Jul 2008 23:40:00 +0000 (23:40 +0000)
committeraszostak <aszostak@f7af4fe6-9843-0410-8265-dc069ae4e863>
Thu, 31 Jul 2008 23:40:00 +0000 (23:40 +0000)
HLT/MUON/AliHLTMUONConstants.cxx
HLT/MUON/AliHLTMUONConstants.h
HLT/MUON/AliHLTMUONProcessor.cxx
HLT/MUON/AliHLTMUONProcessor.h
HLT/MUON/HLTMUONLinkDef.h
HLT/MUON/OfflineInterface/AliHLTMUONAgent.cxx
HLT/libAliHLTMUON.pkg

index 433aa06bcad6cc8a3ed2fd70b00f2cce100fc227..f5d541542a3a3f4775ea44e86cd385c2bc98c671 100644 (file)
@@ -168,6 +168,13 @@ AliHLTMUONConstants::fgkPairsDecisionBlockDataType = (AliHLTComponentDataType){
 const AliHLTComponentDataType
 AliHLTMUONConstants::fgkESDDataType = kAliHLTDataTypeESDObject | kAliHLTDataOriginMUON;
 
+const AliHLTComponentDataType
+AliHLTMUONConstants::fgkClusterStoreDataType = (AliHLTComponentDataType){
+       sizeof(AliHLTComponentDataType),
+       {'C','L','U','S','T','O','R','E'},
+       kAliHLTDataOriginAny
+} | kAliHLTDataOriginMUON;
+
 
 const char* AliHLTMUONConstants::fgkRecHitsSourceId = "MUONRecHitsSource";
 const char* AliHLTMUONConstants::fgkTriggerRecordsSourceId = "MUONTriggerRecordsSource";
@@ -181,6 +188,7 @@ const char* AliHLTMUONConstants::fgkESDMakerId = "MUONESDMaker";
 const char* AliHLTMUONConstants::fgkRootifierComponentId = "MUONRootifier";
 const char* AliHLTMUONConstants::fgkEmptyEventFilterComponentId = "MUONEmptyEventFilter";
 const char* AliHLTMUONConstants::fgkDataCheckerComponentId = "MUONDataChecker";
+const char* AliHLTMUONConstants::fgkClusterFinderId = "MUONClusterFinder";
 
 const char* AliHLTMUONConstants::fgkTriggerReconstructorCDBPath = "HLT/ConfigMUON/TriggerReconstructor";
 const char* AliHLTMUONConstants::fgkHitReconstructorCDBPath = "HLT/ConfigMUON/HitReconstructor";
index e9da65ea448aa0b547739bff9d5f6a83cded644e..37454f4e71cf50b1f8543f2aecdd43ae7c178476 100644 (file)
@@ -160,6 +160,11 @@ public:
        {
                return fgkESDDataType;
        }
+
+       static const AliHLTComponentDataType& ClusterStoreDataType()
+       {
+               return fgkClusterStoreDataType;
+       }
        
        static const char* RecHitsSourceId()
        {
@@ -221,6 +226,11 @@ public:
                return fgkDataCheckerComponentId;
        }
        
+       static const char* ClusterFinderId()
+       {
+               return fgkClusterFinderId;
+       }
+       
        static const char* TriggerReconstructorCDBPath()
        {
                return fgkTriggerReconstructorCDBPath;
@@ -273,6 +283,7 @@ private:
        static const AliHLTComponentDataType fgkSinglesDecisionBlockDataType; // Trigger decision block type for single track decisions.
        static const AliHLTComponentDataType fgkPairsDecisionBlockDataType; // Trigger decision block type for pairs of particles.
        static const AliHLTComponentDataType fgkESDDataType; // The ESD data type with origin equal to MUON.
+       static const AliHLTComponentDataType fgkClusterStoreDataType; // Offline algorithm cluster store object.
        
        // Component ID names:
        static const char* fgkRecHitsSourceId; // Name of source component for reconstructed hits for debugging.
@@ -287,6 +298,7 @@ private:
        static const char* fgkRootifierComponentId; // The name of the event filter debugging component.
        static const char* fgkEmptyEventFilterComponentId; // The name of the event filter debugging component.
        static const char* fgkDataCheckerComponentId; // Name of data checking component for debugging.
+       static const char* fgkClusterFinderId; // Name of cluster finder implementing offline algorithms.
        
        // CDB path entries to configuration information.
        static const char* fgkTriggerReconstructorCDBPath; // Path to CDB entry for the trigger reconstruction component.
index c33a73147d9cc6b779d252ec23fe53c2967accf7..46675005998e1b0abf79863c004ed292f471a83c 100644 (file)
@@ -27,6 +27,7 @@
 ///
 
 #include "AliHLTMUONProcessor.h"
+#include "AliMUONRecoParam.h"
 #include "AliCDBManager.h"
 #include "AliCDBStorage.h"
 #include "AliCDBEntry.h"
@@ -401,3 +402,50 @@ int AliHLTMUONProcessor::GetPositiveFloatFromTMap(
        
        return 0;
 }
+
+
+int AliHLTMUONProcessor::LoadRecoParamsFromCDB(AliMUONRecoParam*& params) const
+{
+       /// Fetches the reconstruction parameters object from the CDB for MUON.
+       /// [out] \param params  This will be filled with the reconstruction
+       ///      parameters object found if a successful status code is returned.
+       ///      Otherwise it will be unchanged.
+       /// \return Zero if the object could be found. Otherwise an error code,
+       ///      which is compatible with the HLT framework, is returned.
+       
+       assert(AliCDBManager::Instance() != NULL);
+       
+       const char* pathToEntry = "MUON/Calib/RecoParam";
+       AliCDBEntry* entry = AliCDBManager::Instance()->Get(pathToEntry);
+       if (entry == NULL)
+       {
+               HLTError("Could not get the CDB entry for \"%s\".", pathToEntry);
+               return -EIO;
+       }
+       
+       TObject* obj = entry->GetObject();
+       if (obj == NULL)
+       {
+               HLTError("Reconstruction parameters object for \"%s\" is missing.", pathToEntry);
+               return -ENOENT;
+       }
+       
+       TObjArray* objarr = dynamic_cast<TObjArray*>(obj);
+       if (objarr != NULL)
+       {
+               obj = objarr->Last();
+       }
+       
+       AliMUONRecoParam* par = dynamic_cast<AliMUONRecoParam*>(obj);
+       if (par == NULL)
+       {
+               HLTError("No AliMUONRecoParam class found for entry \"%s\". Found a %s class instead.",
+                       pathToEntry, obj->ClassName()
+               );
+               return -EPROTO;
+       }
+       
+       params = par;
+       return 0;
+}
+
index 422ec28db4ea5dd9fef27d34e319f034a72ee756..877012deb7b12b8a2c711b6fffa3bd4a9660d52b 100644 (file)
@@ -18,6 +18,7 @@
 #include "AliHLTMUONUtils.h"
 
 class TMap;
+class AliMUONRecoParam;
 
 /**
  * @class AliHLTMUONProcessor
@@ -261,6 +262,16 @@ protected:
                        const char* pathToEntry = NULL, const char* prettyName = NULL
                ) const;
        
+       /**
+        * Fetches the reconstruction parameters object from the CDB for MUON.
+        * [out] \param params  This will be filled with the reconstruction
+        *      parameters object found if a successful status code is returned.
+        *      Otherwise it will be unchanged.
+        * \return Zero if the object could be found. Otherwise an error code,
+        *      which is compatible with the HLT framework, is returned.
+        */
+       int LoadRecoParamsFromCDB(AliMUONRecoParam*& params) const;
+
 private:
 
        // Do not allow copying of this class.
index bc86de7bc8e3fe47f44f5e1cddac96a4b03820e0..5496f0137dfd00ece2df724090e26a5dd2e7033b 100644 (file)
@@ -58,5 +58,6 @@
 #pragma link C++ class AliHLTMUONRootifierComponent+;
 #pragma link C++ class AliHLTMUONEmptyEventFilterComponent+;
 #pragma link C++ class AliHLTMUONDataCheckerComponent+;
+#pragma link C++ class AliHLTMUONClusterFinderComponent+;
 
 #endif // __CINT__
index 476f9b66578680aae02666ec328fddee5cb79aab..455c3836cd1bfac56890aa4412ea2d6757c10131 100644 (file)
@@ -35,6 +35,7 @@
 #include "AliHLTMUONESDMaker.h"
 #include "AliHLTMUONEmptyEventFilterComponent.h"
 #include "AliHLTMUONDataCheckerComponent.h"
+#include "AliHLTMUONClusterFinderComponent.h"
 #include "AliHLTOUTHandlerChain.h"
 #include "AliRawReader.h"
 #include "AliRunLoader.h"
@@ -383,6 +384,7 @@ int AliHLTMUONAgent::RegisterComponents(AliHLTComponentHandler* pHandler) const
        pHandler->AddComponent(new AliHLTMUONESDMaker);
        pHandler->AddComponent(new AliHLTMUONEmptyEventFilterComponent);
        pHandler->AddComponent(new AliHLTMUONDataCheckerComponent);
+       pHandler->AddComponent(new AliHLTMUONClusterFinderComponent);
        return 0;
 }
 
index 7932f9e9613bc630cb81be7c2c596b82d40696b9..b05888299badeaad7d941472afaa121f3438ad79 100644 (file)
@@ -13,6 +13,7 @@ CLASS_HDRS :=         OfflineInterface/AliHLTMUONAgent.h \
                OnlineAnalysis/AliHLTMUONHitReconstructorComponent.h \
                OnlineAnalysis/AliHLTMUONMansoTrackerFSMComponent.h \
                OnlineAnalysis/AliHLTMUONDecisionComponent.h \
+               OnlineAnalysis/AliHLTMUONClusterFinderComponent.h \
                utils/AliHLTMUONEmptyEventFilterComponent.h \
                utils/AliHLTMUONDataCheckerComponent.h \
                AliHLTMUONProcessor.h \