64 : ps_(ps), mode_(ps.getParameter<
string>(
"mode")), iomode_write_(
true), done_(
false) {
65 if (
mode_ ==
"read") {
79 if (
mode_ ==
"online_config" ||
mode_ ==
"combine_config") {
88 if (
mode_ ==
"python_config" ||
mode_ ==
"combine_config") {
92 if (!(
mode_ ==
"python_config" ||
mode_ ==
"online_config" ||
mode_ ==
"combine_config" || (
mode_ ==
"read"))) {
94 <<
"Valid values: online_config, python_config, combine_config, read";
103 if (!
db.isAvailable()) {
104 throw cms::Exception(
"CondDBAccess") <<
"Failed to connect to PoolDBOutputService\n";
109 db->writeOneIOV(sr, firstSinceTime,
"EcalSRSettingsRcd");
114 cout <<
"EcalSRSettings record not found. Check the Cond DB Global tag.\n";
117 cout <<
"ECAL Seletive readout settings:\n";
118 cout << *ssr <<
"\n" << endl;
124 cout <<
"EcalTPGPhysicsConst record not found. Check the Cond DB Global tag.\n";
128 if (mymap.size() != 2) {
129 cout <<
"Error: TPG physics record is of unexpected size: " << mymap.size()
130 <<
" elements instead of two (one for EB, one for EE)\n";
132 EcalTPGPhysicsConstMap::const_iterator it = mymap.begin();
133 cout <<
"----------------------------------------------------------------------\n" 134 "Trigger tower Et thresholds extracted from TPG configuration \n" 135 "(EcalSRCondTools modules supports only read mode for these parameters):\n\n";
137 <<
"LT = " << it->second.ttf_threshold_Low <<
" GeV " 138 <<
"HT = " << it->second.ttf_threshold_High <<
" GeV\n";
141 <<
"LT = " << it->second.ttf_threshold_Low <<
" GeV " 142 <<
"HT = " << it->second.ttf_threshold_High <<
" GeV\n";
T getParameter(std::string const &) const
T const * product() const
unsigned long long Time_t
#define DEFINE_FWK_MODULE(type)
ESHandle< T > getHandle(const ESGetToken< T, R > &iToken) const
std::map< uint32_t, EcalTPGPhysicsConst::Item > EcalTPGPhysicsConstMap