CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Functions | Variables
HcalOmdsCalibrations.cc File Reference
#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< Tproduce_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< Tproduce_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"
 

Function Documentation

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 
)

Definition at line 143 of file HcalOmdsCalibrations.cc.

References ecal_dqm_sourceclient-live_cfg::cerr, convertSQLitetoXML_cfg::connect, EcalCondDB::db, alignCSCRings::e, Exception, HcalDbOmds::getObject(), and mps_fire::result.

149  {
150  std::auto_ptr<T> result (new T (topo));
151 
152  HCALConfigDB * db = new HCALConfigDB();
153  try {
154  db -> connect( fAccessor );
155  } catch (hcal::exception::ConfigurationDatabaseException & e) {
156  std::cerr << "Cannot connect to the database" << std::endl;
157  }
158  oracle::occi::Connection * _connection = db -> getConnection();
159  if (_connection){
160  if (!HcalDbOmds::getObject (_connection, fTag, fVersion, fSubversion, fIOVBegin, fQuery, &*result)) {
161  std::cerr << "HcalOmdsCalibrations-> Can not read tag name '" << fTag << "' from database '" << fAccessor << "'" << std::endl;
162  throw cms::Exception("ReadError") << "Can not read tag name '" << fTag << "' from database '" << fAccessor << "'" << std::endl;
163  }
164  }
165  else{
166  std::cerr << "Database connection is null. This should NEVER happen here. Something fishy is going on..." << std::endl;
167  }
168  return result;
169 }
bool getObject(oracle::occi::Connection *connection, const std::string &fTag, const std::string &fVersion, const int fSubversion, const int fIOVBegin, const std::string &fQuery, HcalPedestals *fObject)
tuple db
Definition: EcalCondDB.py:151
tuple result
Definition: mps_fire.py:84
Gather config data from online DB.
Definition: HCALConfigDB.h:21
long double T
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 
)

Definition at line 171 of file HcalOmdsCalibrations.cc.

References ecal_dqm_sourceclient-live_cfg::cerr, convertSQLitetoXML_cfg::connect, EcalCondDB::db, alignCSCRings::e, Exception, HcalDbOmds::getObject(), and mps_fire::result.

176  {
177  std::auto_ptr<T> result (new T ());
178 
179  HCALConfigDB * db = new HCALConfigDB();
180  try {
181  db -> connect( fAccessor );
182  } catch (hcal::exception::ConfigurationDatabaseException & e) {
183  std::cerr << "Cannot connect to the database" << std::endl;
184  }
185  oracle::occi::Connection * _connection = db -> getConnection();
186  if (_connection){
187  if (!HcalDbOmds::getObject (_connection, fTag, fVersion, fSubversion, fIOVBegin, fQuery, &*result)) {
188  std::cerr << "HcalOmdsCalibrations-> Can not read tag name '" << fTag << "' from database '" << fAccessor << "'" << std::endl;
189  throw cms::Exception("ReadError") << "Can not read tag name '" << fTag << "' from database '" << fAccessor << "'" << std::endl;
190  }
191  }
192  else{
193  std::cerr << "Database connection is null. This should NEVER happen here. Something fishy is going on..." << std::endl;
194  }
195  return result;
196 }
bool getObject(oracle::occi::Connection *connection, const std::string &fTag, const std::string &fVersion, const int fSubversion, const int fIOVBegin, const std::string &fQuery, HcalPedestals *fObject)
tuple db
Definition: EcalCondDB.py:151
tuple result
Definition: mps_fire.py:84
Gather config data from online DB.
Definition: HCALConfigDB.h:21
long double T

Variable Documentation

const std::string default_query = ""
static

Definition at line 140 of file HcalOmdsCalibrations.cc.

const std::string default_version = ""
static

Definition at line 139 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 138 of file HcalOmdsCalibrations.cc.