24 printdebug_(iConfig.getUntrackedParameter<bool>(
"printDebug",
false)){}
33 edm::LogInfo(
"SiStripDetVOffFakeBuilder") <<
" There are "<<pDD->
detUnits().size() <<
" detectors"<<std::endl;
35 for(TrackerGeometry::DetUnitContainer::const_iterator it = pDD->
detUnits().begin(); it != pDD->
detUnits().end(); it++){
37 if( dynamic_cast<StripGeomDetUnit const*>((*it))!=0){
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.
~SiStripDetVOffFakeBuilder()
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)
virtual int nstrips() const =0
cond::Time_t endOfTime() const
std::vector< uint32_t > detids
cond::Time_t currentTime() const
virtual void analyze(const edm::Event &, const edm::EventSetup &)
virtual void initialize(const edm::EventSetup &)
SiStripDetVOffFakeBuilder(const edm::ParameterSet &iConfig)
const DetUnitContainer & detUnits() const override
Returm a vector of all GeomDetUnit.