+// @(#) $Id: AliHLTDynamicAliLog.cxx 23318 2008-01-14 12:43:28Z hristov $
+
+/**************************************************************************
+ * This file is property of and copyright by the ALICE HLT Project *
+ * ALICE Experiment at CERN, All rights reserved. *
+ * *
+ * Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no> *
+ * for The ALICE HLT Project. *
+ * *
+ * Permission to use, copy, modify and distribute this software and its *
+ * documentation strictly for non-commercial purposes is hereby granted *
+ * without fee, provided that the above copyright notice appears in all *
+ * copies and that both the copyright notice and this permission notice *
+ * appear in the supporting documentation. The authors make no claims *
+ * about the suitability of this software for any purpose. It is *
+ * provided "as is" without express or implied warranty. *
+ **************************************************************************/
+
+/** @file AliHLTMisc.cxx
+ @author Matthias Richter
+ @date
+ @brief Miscellaneous methods for the HLT AliRoot integration
+*/
+
+#include "AliHLTMisc.h"
+#include "AliHLTLogging.h"
+#include "AliCDBManager.h"
+
+int AliHLTMiscInitCDB(const char* cdbpath)
+{
+ int iResult=0;
+ AliCDBManager* pCDB = AliCDBManager::Instance();
+ AliHLTLogging log;
+ if (!pCDB) {
+ log.Logging(kHLTLogError, "InitCDB", "CDB handling", "Could not get CDB instance");
+ } else {
+ pCDB->SetRun(0); // This will be retrieved during the SOR event
+ pCDB->SetDefaultStorage(cdbpath);
+ log.Logging(kHLTLogDebug, "InitCDB", "CDB handling", "CDB instance 0x%x", pCDB);
+ }
+ return iResult;
+}
+
+int AliHLTMiscSetCDBRunNo(int runNo)
+{
+ int iResult=0;
+ AliCDBManager* pCDB = AliCDBManager::Instance();
+ AliHLTLogging log;
+ if (!pCDB) {
+ log.Logging(kHLTLogError, "InitCDB", "CDB handling", "Could not get CDB instance");
+ } else {
+ pCDB->SetRun(runNo);
+ }
+ return iResult;
+}