41 : printdebug_(iConfig.getUntrackedParameter<
bool>(
"printDebug",
false)), tkGeomToken_(
esConsumes()) {}
47 edm::LogInfo(
"SiStripDetVOffFakeBuilder") <<
" There are " << tkGeom.detUnits().size() <<
" detectors" << std::endl;
49 for (
const auto& it : tkGeom.detUnits()) {
50 if (dynamic_cast<StripGeomDetUnit const*>(it) !=
nullptr) {
51 uint32_t detid = (it->geographicalId()).rawId();
53 unsigned short Nstrips =
p.nstrips();
54 if (Nstrips < 1 || Nstrips > 768) {
56 <<
" Problem with Number of strips in detector.. " <<
p.nstrips() <<
" Exiting program" << endl;
61 edm::LogInfo(
"SiStripDetVOffFakeBuilder") <<
"detid " << detid;
72 <<
"... creating dummy SiStripDetVOff Data for Run " <<
run <<
"\n " << std::endl;
78 for (std::vector<uint32_t>::const_iterator it =
detids.begin(); it !=
detids.end(); it++) {
83 edm::LogInfo(
"SiStripDetVOffFakeBuilder") <<
"detid: " << *it <<
" HV\t OFF" << std::endl;
84 SiStripDetVOff_.
put(*it, 1, -1);
88 edm::LogInfo(
"SiStripDetVOffFakeBuilder") <<
"detid: " << *it <<
" LV\t OFF" << std::endl;
89 SiStripDetVOff_.
put(*it, -1, 1);
92 if (lv <= 2 || hv <= 2)
93 edm::LogInfo(
"SiStripDetVOffFakeBuilder") <<
"detid: " << *it <<
" V\t OFF" << std::endl;
111 edm::LogError(
"SiStripDetVOffFakeBuilder") <<
"caught std::exception " << er.what() << std::endl;
114 edm::LogError(
"SiStripDetVOffFakeBuilder") <<
"Service is unavailable" << std::endl;
Base exception class for the object to relational access.
cond::Time_t beginOfTime() const
bool put(const uint32_t DetId, const int HVoff, const int LVoff)
Insert information for a single detId.
Log< level::Error, false > LogError
void createOneIOV(const T &payload, cond::Time_t firstSinceTime, const std::string &recordName)
void appendOneIOV(const T &payload, cond::Time_t sinceTime, const std::string &recordName)
bool isNewTagRequest(const std::string &recordName)
cond::Time_t currentTime() const
const edm::ESGetToken< TrackerGeometry, TrackerDigiGeometryRecord > tkGeomToken_
#define DEFINE_FWK_MODULE(type)
bool getData(T &iHolder) const
Namespace of DDCMS conversion namespace.
void analyze(const edm::Event &, const edm::EventSetup &) override
Log< level::Info, false > LogInfo
std::vector< uint32_t > detids
char const * what() const noexcept override
virtual void initialize(const edm::EventSetup &)
SiStripDetVOffFakeBuilder(const edm::ParameterSet &iConfig)
~SiStripDetVOffFakeBuilder() override