24 printdebug_(iConfig.getUntrackedParameter<
bool>(
"printDebug",
false)){}
33 edm::LogInfo(
"SiStripDetVOffFakeBuilder") <<
" There are "<<pDD->
detUnits().size() <<
" detectors"<<std::endl;
35 for(
const auto& it : pDD->
detUnits()) {
37 if( dynamic_cast<StripGeomDetUnit const*>(it)!=
nullptr){
38 uint32_t detid=(it->geographicalId()).rawId();
40 unsigned short Nstrips = p.
nstrips();
41 if(Nstrips<1 || Nstrips>768 ) {
42 edm::LogError(
"SiStripDetVOffFakeBuilder")<<
" Problem with Number of strips in detector.. "<< p.
nstrips() <<
" Exiting program"<<endl;
47 edm::LogInfo(
"SiStripDetVOffFakeBuilder")<<
"detid " << detid;
58 edm::LogInfo(
"SiStripDetVOffFakeBuilder") <<
"... creating dummy SiStripDetVOff Data for Run " << run <<
"\n " << std::endl;
66 for(std::vector<uint32_t>::const_iterator it =
detids.begin(); it !=
detids.end(); it++){
72 edm::LogInfo(
"SiStripDetVOffFakeBuilder") <<
"detid: " << *it <<
" HV\t OFF" << std::endl;
73 SiStripDetVOff_->
put( *it, 1, -1 );
77 edm::LogInfo(
"SiStripDetVOffFakeBuilder") <<
"detid: " << *it <<
" LV\t OFF" << std::endl;
78 SiStripDetVOff_->
put( *it, -1, 1 );
81 if( lv<=2 || hv<=2 )
edm::LogInfo(
"SiStripDetVOffFakeBuilder") <<
"detid: " << *it <<
" V\t OFF" << std::endl;
101 edm::LogError(
"SiStripDetVOffFakeBuilder")<<
"caught std::exception "<<er.what()<<std::endl;
104 edm::LogError(
"SiStripDetVOffFakeBuilder")<<
"Service is unavailable"<<std::endl;
Base exception class for the object to relational access.
const DetContainer & detUnits() const override
Returm a vector of all GeomDet.
char const * what() const override
bool put(const uint32_t DetId, const int HVoff, const int LVoff)
Insert information for a single detId.
void appendSinceTime(T *payloadObj, cond::Time_t sinceTime, const std::string &recordName, bool withlogging=false)
bool isNewTagRequest(const std::string &recordName)
cond::Time_t beginOfTime() const
void createNewIOV(T *firstPayloadObj, cond::Time_t firstSinceTime, cond::Time_t firstTillTime, const std::string &recordName, bool withlogging=false)
Namespace of DDCMS conversion namespace.
void analyze(const edm::Event &, const edm::EventSetup &) override
virtual int nstrips() const =0
cond::Time_t endOfTime() const
std::vector< uint32_t > detids
cond::Time_t currentTime() const
virtual void initialize(const edm::EventSetup &)
SiStripDetVOffFakeBuilder(const edm::ParameterSet &iConfig)
~SiStripDetVOffFakeBuilder() override