#include <memory>
#include <iostream>
#include <fstream>
#include "FWCore/Utilities/interface/Exception.h"
#include "FWCore/ParameterSet/interface/FileInPath.h"
#include "FWCore/Framework/interface/ValidityInterval.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "CaloOnlineTools/HcalOnlineDb/interface/HcalDbOmds.h"
#include "CondFormats/DataRecord/interface/HcalPedestalsRcd.h"
#include "CondFormats/DataRecord/interface/HcalPedestalWidthsRcd.h"
#include "CondFormats/DataRecord/interface/HcalGainsRcd.h"
#include "CondFormats/DataRecord/interface/HcalGainWidthsRcd.h"
#include "CondFormats/DataRecord/interface/HcalElectronicsMapRcd.h"
#include "CondFormats/DataRecord/interface/HcalChannelQualityRcd.h"
#include "CondFormats/DataRecord/interface/HcalQIEDataRcd.h"
#include "CondFormats/DataRecord/interface/HcalRespCorrsRcd.h"
#include "CondFormats/DataRecord/interface/HcalZSThresholdsRcd.h"
#include "CondFormats/DataRecord/interface/HcalL1TriggerObjectsRcd.h"
#include "CondFormats/DataRecord/interface/HcalValidationCorrsRcd.h"
#include "CondFormats/DataRecord/interface/HcalLutMetadataRcd.h"
#include "CondFormats/DataRecord/interface/HcalDcsRcd.h"
#include "CaloOnlineTools/HcalOnlineDb/interface/HCALConfigDB.h"
#include "CaloOnlineTools/HcalOnlineDb/interface/HcalOmdsCalibrations.h"
Go to the source code of this file.
Functions | |
template<class T > | |
std::auto_ptr< T > | produce_impl (const HcalTopology *topo, const std::string &fTag, const std::string &fVersion=default_version, const int fSubversion=1, const int fIOVBegin=1, const std::string &fQuery=default_query, const std::string &fAccessor=omds_occi_default_accessor) |
template<class T > | |
std::auto_ptr< T > | produce_impl (const std::string &fTag, const std::string &fVersion=default_version, const int fSubversion=1, const int fIOVBegin=1, const std::string &fQuery=default_query, const std::string &fAccessor=omds_occi_default_accessor) |
Variables | |
static const std::string | default_query = "" |
static const std::string | default_version = "" |
static const std::string | omds_occi_default_accessor = "occi://CMS_HCL_APPUSER_R@anyhost/cms_omds_lb?PASSWORD=HCAL_Reader_44,LHWM_VERSION=22" |
std::auto_ptr<T> produce_impl | ( | const HcalTopology * | topo, |
const std::string & | fTag, | ||
const std::string & | fVersion = default_version , |
||
const int | fSubversion = 1 , |
||
const int | fIOVBegin = 1 , |
||
const std::string & | fQuery = default_query , |
||
const std::string & | fAccessor = omds_occi_default_accessor |
||
) |
Definition at line 144 of file HcalOmdsCalibrations.cc.
References dtNoiseDBValidation_cfg::cerr, convertSQLitetoXML_cfg::connect, EcalCondDB::db, alignCSCRings::e, Exception, HcalDbOmds::getObject(), and query::result.
{ std::auto_ptr<T> result (new T (topo)); HCALConfigDB * db = new HCALConfigDB(); try { db -> connect( fAccessor ); } catch (hcal::exception::ConfigurationDatabaseException & e) { std::cerr << "Cannot connect to the database" << std::endl; } oracle::occi::Connection * _connection = db -> getConnection(); if (_connection){ if (!HcalDbOmds::getObject (_connection, fTag, fVersion, fSubversion, fIOVBegin, fQuery, &*result)) { std::cerr << "HcalOmdsCalibrations-> Can not read tag name '" << fTag << "' from database '" << fAccessor << "'" << std::endl; throw cms::Exception("ReadError") << "Can not read tag name '" << fTag << "' from database '" << fAccessor << "'" << std::endl; } } else{ std::cerr << "Database connection is null. This should NEVER happen here. Something fishy is going on..." << std::endl; } return result; }
std::auto_ptr<T> produce_impl | ( | const std::string & | fTag, |
const std::string & | fVersion = default_version , |
||
const int | fSubversion = 1 , |
||
const int | fIOVBegin = 1 , |
||
const std::string & | fQuery = default_query , |
||
const std::string & | fAccessor = omds_occi_default_accessor |
||
) |
Definition at line 172 of file HcalOmdsCalibrations.cc.
References dtNoiseDBValidation_cfg::cerr, convertSQLitetoXML_cfg::connect, EcalCondDB::db, alignCSCRings::e, Exception, HcalDbOmds::getObject(), and query::result.
{ std::auto_ptr<T> result (new T ()); HCALConfigDB * db = new HCALConfigDB(); try { db -> connect( fAccessor ); } catch (hcal::exception::ConfigurationDatabaseException & e) { std::cerr << "Cannot connect to the database" << std::endl; } oracle::occi::Connection * _connection = db -> getConnection(); if (_connection){ if (!HcalDbOmds::getObject (_connection, fTag, fVersion, fSubversion, fIOVBegin, fQuery, &*result)) { std::cerr << "HcalOmdsCalibrations-> Can not read tag name '" << fTag << "' from database '" << fAccessor << "'" << std::endl; throw cms::Exception("ReadError") << "Can not read tag name '" << fTag << "' from database '" << fAccessor << "'" << std::endl; } } else{ std::cerr << "Database connection is null. This should NEVER happen here. Something fishy is going on..." << std::endl; } return result; }
const std::string default_query = "" [static] |
Definition at line 141 of file HcalOmdsCalibrations.cc.
const std::string default_version = "" [static] |
Definition at line 140 of file HcalOmdsCalibrations.cc.
const std::string omds_occi_default_accessor = "occi://CMS_HCL_APPUSER_R@anyhost/cms_omds_lb?PASSWORD=HCAL_Reader_44,LHWM_VERSION=22" [static] |
Definition at line 139 of file HcalOmdsCalibrations.cc.