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 "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 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 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 dtNoiseDBValidation_cfg::cerr, convertSQLitetoXML_cfg::connect, EcalCondDB::db, alignCSCRings::e, edm::hlt::Exception, HcalDbOmds::getObject(), and query::result.

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