dummy reconfiguration handler added
authorrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 23 Jan 2008 19:31:49 +0000 (19:31 +0000)
committerrichterm <richterm@f7af4fe6-9843-0410-8265-dc069ae4e863>
Wed, 23 Jan 2008 19:31:49 +0000 (19:31 +0000)
HLT/TPCLib/AliHLTTPCClusterFinderComponent.cxx
HLT/TPCLib/AliHLTTPCClusterFinderComponent.h

index f3a3e179e853caa4939ae2fa2bac04e133ed040e..9b7490cc8440bbec30254bbbf39a8ba9b8031700 100644 (file)
@@ -43,9 +43,13 @@ using namespace std;
 #include "AliHLTTPCTransform.h"
 #include "AliHLTTPCClusters.h"
 #include "AliHLTTPCDefinitions.h"
 #include "AliHLTTPCTransform.h"
 #include "AliHLTTPCClusters.h"
 #include "AliHLTTPCDefinitions.h"
+#include "AliCDBEntry.h"
+#include "AliCDBManager.h"
+
 #include <cstdlib>
 #include <cerrno>
 #include "TString.h"
 #include <cstdlib>
 #include <cerrno>
 #include "TString.h"
+#include "TObjString.h"
 #include <sys/time.h>
 
 // this is a global object used for automatic component registration, do not use this
 #include <sys/time.h>
 
 // this is a global object used for automatic component registration, do not use this
@@ -54,6 +58,7 @@ using namespace std;
 AliHLTTPCClusterFinderComponent gAliHLTTPCClusterFinderComponentPacked(true);
 AliHLTTPCClusterFinderComponent gAliHLTTPCClusterFinderComponentUnpacked(false);
 
 AliHLTTPCClusterFinderComponent gAliHLTTPCClusterFinderComponentPacked(true);
 AliHLTTPCClusterFinderComponent gAliHLTTPCClusterFinderComponentUnpacked(false);
 
+/** ROOT macro for the implementation of ROOT specific class methods */
 ClassImp(AliHLTTPCClusterFinderComponent)
 
 AliHLTTPCClusterFinderComponent::AliHLTTPCClusterFinderComponent(bool packed)
 ClassImp(AliHLTTPCClusterFinderComponent)
 
 AliHLTTPCClusterFinderComponent::AliHLTTPCClusterFinderComponent(bool packed)
@@ -517,3 +522,24 @@ int AliHLTTPCClusterFinderComponent::DoEvent( const AliHLTComponentEventData& ev
 
   return 0;
 }
 
   return 0;
 }
+
+int AliHLTTPCClusterFinderComponent::Reconfigure(const char* cdbEntry, const char* chainId)
+{
+  // see header file for class documentation
+  const char* path="HLT/ConfigTPC";
+  if (cdbEntry) path=cdbEntry;
+  if (path) {
+    HLTInfo("reconfigure from entry %s, chain id %s", path, (chainId!=NULL && chainId[0]!=0)?chainId:"<none>");
+    AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(path/*,GetRunNo()*/);
+    if (pEntry) {
+      TObjString* pString=dynamic_cast<TObjString*>(pEntry->GetObject());
+      if (pString) {
+       HLTInfo("received configuration object: %s", pString->GetString().Data());
+      } else {
+       HLTError("configuration object \"%s\" has wrong type, required TObjString", path);
+      }
+    } else {
+      HLTError("can not fetch object \"%s\" from CDB", path);
+    }
+  }
+}
index 2c7b48ce19e78b425f9b332d2111cadbe6ff042c..327c89575a850441cf9ff2ebe4408c2ca63dbdcf 100644 (file)
@@ -85,6 +85,7 @@ class AliHLTTPCClusterFinderComponent : public AliHLTProcessor
        int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, 
                     AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, 
                     AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
        int DoEvent( const AliHLTComponentEventData& evtData, const AliHLTComponentBlockData* blocks, 
                     AliHLTComponentTriggerData& trigData, AliHLTUInt8_t* outputPtr, 
                     AliHLTUInt32_t& size, vector<AliHLTComponentBlockData>& outputBlocks );
+       int Reconfigure(const char* cdbEntry, const char* chainId);
        
        using AliHLTProcessor::DoEvent;
 
        
        using AliHLTProcessor::DoEvent;