From: richterm Date: Wed, 23 Jan 2008 19:31:49 +0000 (+0000) Subject: dummy reconfiguration handler added X-Git-Url: http://git.uio.no/git/?p=u%2Fmrichter%2FAliRoot.git;a=commitdiff_plain;h=c3cda3949dd0d3766462b5267b795f8897108c23 dummy reconfiguration handler added --- diff --git a/HLT/TPCLib/AliHLTTPCClusterFinderComponent.cxx b/HLT/TPCLib/AliHLTTPCClusterFinderComponent.cxx index f3a3e179e85..9b7490cc844 100644 --- a/HLT/TPCLib/AliHLTTPCClusterFinderComponent.cxx +++ b/HLT/TPCLib/AliHLTTPCClusterFinderComponent.cxx @@ -43,9 +43,13 @@ using namespace std; #include "AliHLTTPCTransform.h" #include "AliHLTTPCClusters.h" #include "AliHLTTPCDefinitions.h" +#include "AliCDBEntry.h" +#include "AliCDBManager.h" + #include #include #include "TString.h" +#include "TObjString.h" #include // 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); +/** ROOT macro for the implementation of ROOT specific class methods */ ClassImp(AliHLTTPCClusterFinderComponent) AliHLTTPCClusterFinderComponent::AliHLTTPCClusterFinderComponent(bool packed) @@ -517,3 +522,24 @@ int AliHLTTPCClusterFinderComponent::DoEvent( const AliHLTComponentEventData& ev 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:""); + AliCDBEntry *pEntry = AliCDBManager::Instance()->Get(path/*,GetRunNo()*/); + if (pEntry) { + TObjString* pString=dynamic_cast(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); + } + } +} diff --git a/HLT/TPCLib/AliHLTTPCClusterFinderComponent.h b/HLT/TPCLib/AliHLTTPCClusterFinderComponent.h index 2c7b48ce19e..327c89575a8 100644 --- a/HLT/TPCLib/AliHLTTPCClusterFinderComponent.h +++ b/HLT/TPCLib/AliHLTTPCClusterFinderComponent.h @@ -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& outputBlocks ); + int Reconfigure(const char* cdbEntry, const char* chainId); using AliHLTProcessor::DoEvent;