48 m_condDb( iConfig.getParameter< std::
string >(
"conditionDatabase") ),
49 m_plotTag( iConfig.getParameter< std::
string >(
"Tag") ),
50 m_IOV( iConfig.getUntrackedParameter< cond::
Time_t >(
"IOV", 0) ),
51 m_Time( iConfig.getUntrackedParameter< std::
string >(
"Time",
"") ),
52 m_plotFormat( iConfig.getUntrackedParameter< std::
string >(
"plotFormat",
"png") ),
53 m_outputFile( iConfig.getUntrackedParameter< std::
string >(
"outputFile",
"") ){
66 }
else if (!
m_Time.empty()){
74 edm::LogInfo(
"SiStripDetVOffMapPlotter") <<
"[SiStripDetVOffMapPlotter::" << __func__ <<
"] "
79 auto iiov = iovProxy.
find(theIov);
80 if (iiov==iovProxy.
end())
83 theIov = (*iiov).since;
84 edm::LogInfo(
"SiStripDetVOffMapPlotter") <<
"[SiStripDetVOffMapPlotter::" << __func__ <<
"] "
85 <<
"Make tkMap for IOV " << theIov <<
" (" << boost::posix_time::to_simple_string(
cond::time::to_boost(theIov)) <<
")";
89 TkHistoMap lvhisto(
"LV_Status",
"LV_Status",-1);
90 TkHistoMap hvhisto(
"HV_Status",
"HV_Status",-1);
93 for (
auto id : detids){
94 if (payload->IsModuleLVOff(
id))
97 lvhisto.
fill(
id, 0.5);
99 if (payload->IsModuleHVOff(
id))
102 hvhisto.
fill(
id, 0.5);
123 auto facet =
new boost::posix_time::time_facet(format.c_str());
124 std::ostringstream stream;
125 stream.imbue(std::locale(stream.getloc(), facet));
T getParameter(std::string const &) const
#define DEFINE_FWK_MODULE(type)
void start(bool readOnly=true)
Transaction & transaction()
SiStripDetVOffTkMapPlotter(const edm::ParameterSet &iConfig)
virtual ~SiStripDetVOffTkMapPlotter()
void setParameters(const edm::ParameterSet &connectionPset)
edm::Service< SiStripDetInfoFileReader > detidReader
IOVProxy readIov(const std::string &tag, bool full=false)
void save(std::string filename)
unsigned long long Time_t
const std::vector< uint32_t > & getAllDetIds() const
void fill(uint32_t &detid, float value)
virtual void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup)
Iterator find(cond::Time_t time)
Session createSession(const std::string &connectionString, bool writeCapable=false)
void dumpInTkMap(TrackerMap *tkmap, bool dumpEntries=false)
Time_t from_boost(boost::posix_time::ptime bt)
cond::persistency::ConnectionPool m_connectionPool
std::string formatIOV(cond::Time_t iov, std::string format="%Y-%m-%d__%H_%M_%S")
boost::posix_time::ptime to_boost(Time_t iValue)
std::shared_ptr< T > fetchPayload(const cond::Hash &payloadHash)