|
|
Go to the documentation of this file.
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",
"")) {
64 }
else if (!
m_Time.empty()) {
72 edm::LogInfo(
"SiStripDetVOffMapPlotter") <<
"[SiStripDetVOffMapPlotter::" << __func__ <<
"] "
78 auto iiov = iovs.
find(theIov);
79 if (iiov == iovs.end())
82 theIov = (*iiov).since;
83 edm::LogInfo(
"SiStripDetVOffMapPlotter") <<
"[SiStripDetVOffMapPlotter::" << __func__ <<
"] "
84 <<
"Make tkMap for IOV " << theIov <<
" ("
90 const TkDetMap* tkDetMap = tkDetMapHandle.product();
92 TkHistoMap lvhisto(tkDetMap,
"LV_Status",
"LV_Status", -1);
93 TkHistoMap hvhisto(tkDetMap,
"HV_Status",
"HV_Status", -1);
99 for (
auto id : detids) {
100 if (
payload->IsModuleLVOff(
id))
103 lvhisto.
fill(
id, 0.5);
105 if (
payload->IsModuleHVOff(
id))
108 hvhisto.
fill(
id, 0.5);
127 auto facet =
new boost::posix_time::time_facet(
format.c_str());
128 std::ostringstream
stream;
void analyze(const edm::Event &evt, const edm::EventSetup &evtSetup) override
boost::posix_time::ptime to_boost(Time_t iValue)
void setPalette(int numpalette)
void save(const std::string &filename)
Session createSession(const std::string &connectionString, bool writeCapable=false)
cond::persistency::ConnectionPool m_connectionPool
std::vector< uint32_t > getSiStripDetIds(const GeometricDet &geomDet)
std::unique_ptr< T > fetchPayload(const cond::Hash &payloadHash)
Iterator find(cond::Time_t time) const
void fill(DetId detid, float value)
#define DEFINE_FWK_MODULE(type)
IOVProxy readIov(const std::string &tag)
void dumpInTkMap(TrackerMap *tkmap, bool dumpEntries=false)
Time_t from_boost(boost::posix_time::ptime bt)
unsigned long long Time_t
void setParameters(const edm::ParameterSet &connectionPset)
T getParameter(std::string const &) const
Transaction & transaction()
void start(bool readOnly=true)
void save(bool print_total=true, float minval=0., float maxval=0., std::string s="svgmap.svg", int width=1500, int height=800)
~SiStripDetVOffTkMapPlotter() override
std::string formatIOV(cond::Time_t iov, std::string format="%Y-%m-%d__%H_%M_%S")
SiStripDetVOffTkMapPlotter(const edm::ParameterSet &iConfig)