// $Id$ /************************************************************************** * This file is property of and copyright by the ALICE HLT Project * * ALICE Experiment at CERN, All rights reserved. * * * * Primary Authors: Matthias Richter * * 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->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; }