CMS 3D CMS Logo

PayloadInspector.h
Go to the documentation of this file.
1 #ifndef CondCore_Utilities_PayloadInspector_h
2 #define CondCore_Utilities_PayloadInspector_h
3 
7 #include <iostream>
8 
9 #include <string>
10 #include <tuple>
11 #include <vector>
12 #include <type_traits>
13 
15 
16 #include <boost/python/list.hpp>
17 #include <boost/python/dict.hpp>
18 #include <boost/python/tuple.hpp>
19 
20 namespace PI {
21  inline boost::python::list mk_input(const std::string& tagName, cond::Time_t start, cond::Time_t end) {
22  boost::python::list ret;
23  ret.append(boost::python::make_tuple(tagName, std::to_string(start), std::to_string(end)));
24  return ret;
25  }
26  inline boost::python::list mk_input(const std::string& tagName0,
27  cond::Time_t start0,
28  cond::Time_t end0,
29  const std::string& tagName1,
30  cond::Time_t start1,
31  cond::Time_t end1) {
32  boost::python::list ret;
33  ret.append(boost::python::make_tuple(tagName0, std::to_string(start0), std::to_string(end0)));
34  ret.append(boost::python::make_tuple(tagName1, std::to_string(start1), std::to_string(end1)));
35  return ret;
36  }
37 } // namespace PI
38 
39 namespace cond {
40 
41  namespace payloadInspector {
42 
43  // Metadata dictionary
44  struct PlotAnnotations {
45  static constexpr const char* const PLOT_TYPE_K = "type";
46  static constexpr const char* const TITLE_K = "title";
47  static constexpr const char* const PAYLOAD_TYPE_K = "payload_type";
48  static constexpr const char* const INFO_K = "info";
49  static constexpr const char* const XAXIS_K = "x_label";
50  static constexpr const char* const YAXIS_K = "y_label";
51  static constexpr const char* const ZAXIS_K = "z_label";
53  std::string get(const std::string& key) const;
54  std::map<std::string, std::string> m;
55  int ntags = 1;
56  bool twoTags = false;
57  bool singleIov = false;
58  };
59 
60  static const char* const JSON_FORMAT_VERSION = "1.0";
61 
62  // Serialize functions
63  template <typename V>
64  std::string serializeValue(const std::string& entryLabel, const V& value) {
65  std::stringstream ss;
66 
67  // N.B.:
68  // This hack is to output a line to stringstream only in case the
69  // return type of getFromPayload is a std::pair<bool, float>
70  // and the bool is true. This allows to control which points should
71  // enter the trend and which should not.
72 
73  if constexpr (std::is_same_v<V, std::pair<bool, float>>) {
74  if (value.first) {
75  ss << "\"" << entryLabel << "\":" << value.second;
76  }
77  } else {
78  ss << "\"" << entryLabel << "\":" << value;
79  }
80  return ss.str();
81  }
82 
83  template <>
84  inline std::string serializeValue(const std::string& entryLabel, const std::string& value) {
85  std::stringstream ss;
86  ss << "\"" << entryLabel << "\":\"" << value << "\"";
87  return ss.str();
88  }
89 
90  // Specialization for the multi-values coordinates ( to support the combined time+runlumi abscissa )
91  template <typename V>
92  std::string serializeValue(const std::string& entryLabel, const std::tuple<V, std::string>& value) {
93  std::stringstream ss;
94  ss << serializeValue(entryLabel, std::get<0>(value));
95  ss << ", ";
96  ss << serializeValue(entryLabel + "_label", std::get<1>(value));
97  return ss.str();
98  }
99 
100  // Specialization for the error bars
101  template <typename V>
102  std::string serializeValue(const std::string& entryLabel, const std::pair<V, V>& value) {
103  std::stringstream ss;
104  ss << serializeValue(entryLabel, value.first);
105  ss << ", ";
106  ss << serializeValue(entryLabel + "_err", value.second);
107  return ss.str();
108  }
109 
110  inline std::string serializeAnnotations(const PlotAnnotations& annotations) {
111  std::stringstream ss;
112  ss << "\"version\": \"" << JSON_FORMAT_VERSION << "\",";
113  ss << "\"annotations\": {";
114  bool first = true;
115  for (const auto& a : annotations.m) {
116  if (!first)
117  ss << ",";
118  ss << "\"" << a.first << "\":\"" << a.second << "\"";
119  first = false;
120  }
121  ss << "}";
122  return ss.str();
123  }
124 
125  template <typename X, typename Y>
126  std::string serialize(const PlotAnnotations& annotations, const std::vector<std::tuple<X, Y>>& data) {
127  // prototype implementation...
128  std::stringstream ss;
129  ss << "{";
130  ss << serializeAnnotations(annotations);
131  ss << ",";
132  ss << "\"data\": [";
133  bool first = true;
134  for (auto d : data) {
135  auto serializedX = serializeValue("x", std::get<0>(d));
136  auto serializedY = serializeValue("y", std::get<1>(d));
137 
138  // N.B.:
139  // we output to JSON only if the stringstream
140  // from serializeValue is not empty
141 
142  if (!serializedY.empty()) {
143  if (!first) {
144  ss << ",";
145  }
146  ss << " { " << serializedX << ", " << serializedY << " }";
147  first = false;
148  }
149  }
150  ss << "]";
151  ss << "}";
152  return ss.str();
153  }
154 
155  template <typename X, typename Y, typename Z>
156  std::string serialize(const PlotAnnotations& annotations, const std::vector<std::tuple<X, Y, Z>>& data) {
157  // prototype implementation...
158  std::stringstream ss;
159  ss << "{";
160  ss << serializeAnnotations(annotations);
161  ss << ",";
162  ss << "\"data\": [";
163  bool first = true;
164  for (auto d : data) {
165  if (!first)
166  ss << ",";
167  ss << " { " << serializeValue("x", std::get<0>(d)) << ", " << serializeValue("y", std::get<1>(d)) << ", "
168  << serializeValue("z", std::get<2>(d)) << " }";
169  first = false;
170  }
171  ss << "]";
172  ss << "}";
173  return ss.str();
174  }
175 
176  inline std::string serialize(const PlotAnnotations& annotations, const std::string& imageFileName) {
177  std::stringstream ss;
178  ss << "{";
179  ss << serializeAnnotations(annotations);
180  ss << ",";
181  ss << "\"file\": \"" << imageFileName << "\"";
182  ss << "}";
183  return ss.str();
184  }
185 
186  struct ModuleVersion {
187  static constexpr const char* const label = "2.0";
188  };
189 
190  struct TagReference {
192  const std::pair<cond::Time_t, cond::Time_t>& b,
193  const std::vector<std::tuple<cond::Time_t, cond::Hash>>& i)
194  : name(n), boundary(b), iovs(i) {}
195  TagReference(const TagReference& rhs) : name(rhs.name), boundary(rhs.boundary), iovs(rhs.iovs) {}
197  const std::pair<cond::Time_t, cond::Time_t>& boundary;
198  const std::vector<std::tuple<cond::Time_t, cond::Hash>>& iovs;
199  };
200 
201  // Base class, factorizing the functions exposed in the python interface
202  class PlotBase {
203  public:
204  PlotBase();
205  virtual ~PlotBase() = default;
206  // required in the browser to find corresponding tags
207  std::string payloadType() const;
208 
209  // required in the browser
210  std::string title() const;
211 
212  // required in the browser
213  std::string type() const;
214 
215  // required in the browser
216  unsigned int ntags() const;
217 
218  //TBRemoved
219  bool isTwoTags() const;
220 
221  // required in the browser
222  bool isSingleIov() const;
223 
224  // required in the browser
225  boost::python::list inputParams() const;
226 
227  // required in the browser
228  void setInputParamValues(const boost::python::dict& values);
229 
230  // returns the json file with the plot data
231  std::string data() const;
232 
233  // triggers the processing producing the plot
234  bool process(const std::string& connectionString, const boost::python::list& tagsWithTimeBoundaries);
235 
236  // called by the above method - to be used in C++ unit tests...
238  const std::vector<std::tuple<std::string, cond::Time_t, cond::Time_t>>& tagsWithTimeBoundaries);
239 
240  // not exposed in python:
241  // called internally in process()
242  virtual void init();
243 
244  // not exposed in python:
245  // called internally in process()
246  //virtual std::string processData(const std::vector<std::tuple<cond::Time_t, cond::Hash> >& iovs);
247  virtual std::string processData();
248 
249  //
250  void addInputParam(const std::string& paramName);
251 
252  // access to the fetch function of the configured reader, to be used in the processData implementations
253  template <typename PayloadType>
254  std::shared_ptr<PayloadType> fetchPayload(const cond::Hash& payloadHash) {
255  return m_dbSession.fetchPayload<PayloadType>(payloadHash);
256  }
257 
259 
260  template <int index>
262  size_t sz = m_tagNames.size();
263  if (sz == 0 || index >= sz) {
264  cond::throwException("Index out of range", "PlotBase::getTag()");
265  }
267  }
268 
269  const std::map<std::string, std::string>& inputParamValues() const;
270 
271  // access to the underlying db session
273 
274  protected:
275  // possibly shared with the derived classes
277  std::set<std::string> m_inputParams;
278  std::vector<std::string> m_tagNames;
279  std::vector<std::pair<cond::Time_t, cond::Time_t>> m_tagBoundaries;
280  std::vector<std::vector<std::tuple<cond::Time_t, cond::Hash>>> m_tagIovs;
281  std::map<std::string, std::string> m_inputParamValues;
282 
283  private:
284  // this stuff should not be modified...
287  };
288 
290 
291  inline void setAnnotations(
292  const std::string& type, const std::string& title, IOVMultiplicity IOV_M, int NTAGS, PlotAnnotations& target) {
295  target.ntags = NTAGS;
296  target.singleIov = (IOV_M == SINGLE_IOV);
297  }
298 
299  template <IOVMultiplicity IOV_M, int NTAGS>
300  class PlotImpl : public PlotBase {
301  public:
303  setAnnotations(type, title, IOV_M, NTAGS, m_plotAnnotations);
304  }
305  ~PlotImpl() override = default;
306 
307  virtual std::string serializeData() = 0;
308 
310  fill();
311  return serializeData();
312  }
313 
314  virtual bool fill() = 0;
315  };
316 
317  // specialisations
318  template <int NTAGS>
319  class PlotImpl<UNSPECIFIED_IOV, NTAGS> : public PlotBase {
320  public:
323  }
324  ~PlotImpl() override = default;
325 
326  virtual std::string serializeData() = 0;
327 
329  fill();
330  return serializeData();
331  }
332 
333  virtual bool fill() = 0;
334 
336  };
337 
338  template <>
339  class PlotImpl<MULTI_IOV, 0> : public PlotBase {
340  public:
343  }
344  ~PlotImpl() override = default;
345 
346  virtual std::string serializeData() = 0;
347 
349  fill();
350  return serializeData();
351  }
352 
353  virtual bool fill() = 0;
354 
355  void setTwoTags(bool flag) {
356  if (flag)
358  else
360  }
361  };
362 
363  template <>
364  class PlotImpl<SINGLE_IOV, 0> : public PlotBase {
365  public:
368  }
369  ~PlotImpl() override = default;
370 
371  virtual std::string serializeData() = 0;
372 
374  fill();
375  return serializeData();
376  }
377 
378  virtual bool fill() = 0;
379 
380  void setTwoTags(bool flag) {
381  if (flag)
383  else
385  }
386  };
387 
388  template <>
389  class PlotImpl<UNSPECIFIED_IOV, 0> : public PlotBase {
390  public:
393  }
394  ~PlotImpl() override = default;
395 
396  virtual std::string serializeData() = 0;
397 
399  fill();
400  return serializeData();
401  }
402 
403  virtual bool fill() {
404  std::vector<std::tuple<cond::Time_t, cond::Hash>> theIovs = PlotBase::getTag<0>().iovs;
405  if (m_plotAnnotations.ntags == 2) {
406  auto tag2iovs = PlotBase::getTag<1>().iovs;
407  size_t oldSize = theIovs.size();
408  size_t newSize = oldSize + tag2iovs.size();
409  theIovs.resize(newSize);
410  for (size_t i = 0; i < tag2iovs.size(); i++) {
411  theIovs[i + oldSize] = tag2iovs[i];
412  }
413  }
414  return fill(theIovs);
415  }
416 
417  virtual bool fill(const std::vector<std::tuple<cond::Time_t, cond::Hash>>& iovs) { return false; }
418 
419  void setSingleIov(bool flag) {
421  m_singleIovSet = true;
422  }
423 
424  void setTwoTags(bool flag) {
425  if (flag) {
427  if (!m_singleIovSet)
429  } else
431  }
432 
433  bool m_singleIovSet = false;
434  };
435 
436  template <>
437  class PlotImpl<UNSPECIFIED_IOV, 1> : public PlotBase {
438  public:
441  }
442  ~PlotImpl() override = default;
443 
444  virtual std::string serializeData() = 0;
445 
447  fill();
448  return serializeData();
449  }
450 
451  virtual bool fill() {
452  std::vector<std::tuple<cond::Time_t, cond::Hash>> theIovs = PlotBase::getTag<0>().iovs;
453  if (m_plotAnnotations.ntags == 2) {
454  auto tag2iovs = PlotBase::getTag<1>().iovs;
455  size_t oldSize = theIovs.size();
456  size_t newSize = oldSize + tag2iovs.size();
457  theIovs.resize(newSize);
458  for (size_t i = 0; i < tag2iovs.size(); i++) {
459  theIovs[i + oldSize] = tag2iovs[i];
460  }
461  }
462  return fill(theIovs);
463  }
464 
465  virtual bool fill(const std::vector<std::tuple<cond::Time_t, cond::Hash>>& iovs) { return false; }
466 
468  };
469 
470  // Concrete plot-types implementations
471  template <typename PayloadType, typename X, typename Y, IOVMultiplicity IOV_M = UNSPECIFIED_IOV, int NTAGS = 0>
472  class Plot2D : public PlotImpl<IOV_M, NTAGS> {
473  public:
475  Plot2D(const std::string& type, const std::string& title, const std::string xLabel, const std::string& yLabel)
476  : Base(type, title), m_plotData() {
479  Base::m_plotAnnotations.m[PlotAnnotations::PAYLOAD_TYPE_K] = cond::demangledName(typeid(PayloadType));
480  }
481  ~Plot2D() override = default;
483 
484  std::shared_ptr<PayloadType> fetchPayload(const cond::Hash& payloadHash) {
485  return PlotBase::fetchPayload<PayloadType>(payloadHash);
486  }
487 
488  protected:
489  std::vector<std::tuple<X, Y>> m_plotData;
490  };
491 
492  template <typename PayloadType,
493  typename X,
494  typename Y,
495  typename Z,
497  int NTAGS = 0>
498  class Plot3D : public PlotImpl<IOV_M, NTAGS> {
499  public:
502  const std::string& title,
503  const std::string xLabel,
504  const std::string& yLabel,
505  const std::string& zLabel)
506  : Base(type, title), m_plotData() {
510  Base::m_plotAnnotations.m[PlotAnnotations::PAYLOAD_TYPE_K] = cond::demangledName(typeid(PayloadType));
511  }
512  ~Plot3D() override = default;
514 
515  std::shared_ptr<PayloadType> fetchPayload(const cond::Hash& payloadHash) {
516  return PlotBase::fetchPayload<PayloadType>(payloadHash);
517  }
518 
519  protected:
520  std::vector<std::tuple<X, Y, Z>> m_plotData;
521  };
522 
523  template <typename PayloadType, typename Y>
524  class HistoryPlot : public Plot2D<PayloadType, unsigned long long, Y, MULTI_IOV, 1> {
525  public:
527 
528  HistoryPlot(const std::string& title, const std::string& yLabel) : Base("History", title, "iov_since", yLabel) {}
529 
530  ~HistoryPlot() override = default;
531 
532  bool fill() override {
533  auto tag = PlotBase::getTag<0>();
534  for (auto iov : tag.iovs) {
535  std::shared_ptr<PayloadType> payload = Base::fetchPayload(std::get<1>(iov));
536  if (payload.get()) {
538  Base::m_plotData.push_back(std::make_tuple(std::get<0>(iov), value));
539  }
540  }
541  return true;
542  }
543  virtual Y getFromPayload(PayloadType& payload) = 0;
544  };
545 
546  template <typename PayloadType, typename Y>
547  class RunHistoryPlot : public Plot2D<PayloadType, std::tuple<float, std::string>, Y, MULTI_IOV, 1> {
548  public:
550 
552  : Base("RunHistory", title, "iov_since", yLabel) {}
553 
554  ~RunHistoryPlot() override = default;
555 
556  bool fill() override {
557  auto tag = PlotBase::getTag<0>();
558  // for the lumi iovs we need to count the number of lumisections in every runs
559  std::map<cond::Time_t, unsigned int> runs;
560 
562  if (tagInfo.timeType == cond::lumiid) {
563  for (auto iov : tag.iovs) {
564  unsigned int run = std::get<0>(iov) >> 32;
565  auto it = runs.find(run);
566  if (it == runs.end())
567  it = runs.insert(std::make_pair(run, 0)).first;
568  it->second++;
569  }
570  }
571  unsigned int currentRun = 0;
572  float lumiIndex = 0;
573  unsigned int lumiSize = 0;
574  unsigned int rind = 0;
575  float ind = 0;
576  std::string label("");
577  for (auto iov : tag.iovs) {
578  unsigned long long since = std::get<0>(iov);
579  // for the lumi iovs we squeeze the lumi section available in the constant run 'slot' of witdth=1
580  if (tagInfo.timeType == cond::lumiid) {
581  unsigned int run = since >> 32;
582  unsigned int lumi = since & 0xFFFFFFFF;
583  if (run != currentRun) {
584  rind++;
585  lumiIndex = 0;
586  auto it = runs.find(run);
587  if (it == runs.end()) {
588  // it should never happen
589  return false;
590  }
591  lumiSize = it->second;
592  } else {
593  lumiIndex++;
594  }
595  ind = rind + (lumiIndex / lumiSize);
596  label = std::to_string(run) + " : " + std::to_string(lumi);
597  currentRun = run;
598  } else {
599  ind++;
600  // for the timestamp based iovs, it does not really make much sense to use this plot...
601  if (tagInfo.timeType == cond::timestamp) {
602  boost::posix_time::ptime t = cond::time::to_boost(since);
603  label = boost::posix_time::to_simple_string(t);
604  } else {
605  label = std::to_string(since);
606  }
607  }
608  std::shared_ptr<PayloadType> payload = Base::fetchPayload(std::get<1>(iov));
609  if (payload.get()) {
611  Base::m_plotData.push_back(std::make_tuple(std::make_tuple(ind, label), value));
612  }
613  }
614  return true;
615  }
616 
617  virtual Y getFromPayload(PayloadType& payload) = 0;
618  };
619 
620  template <typename PayloadType, typename Y>
621  class TimeHistoryPlot : public Plot2D<PayloadType, std::tuple<unsigned long long, std::string>, Y, MULTI_IOV, 1> {
622  public:
624 
626  : Base("TimeHistory", title, "iov_since", yLabel) {}
627  ~TimeHistoryPlot() override = default;
628 
629  bool fill() override {
630  auto tag = PlotBase::getTag<0>();
632 
634  if (tagInfo.timeType == cond::lumiid || tagInfo.timeType == cond::runnumber) {
635  cond::Time_t min = std::get<0>(tag.iovs.front());
636  cond::Time_t max = std::get<0>(tag.iovs.back());
637  if (tagInfo.timeType == cond::lumiid) {
638  min = min >> 32;
639  max = max >> 32;
640  }
642  }
643  for (auto iov : tag.iovs) {
644  cond::Time_t since = std::get<0>(iov);
645  boost::posix_time::ptime time;
646  std::string label("");
647  if (tagInfo.timeType == cond::lumiid || tagInfo.timeType == cond::runnumber) {
648  unsigned int nlumi = since & 0xFFFFFFFF;
649  if (tagInfo.timeType == cond::lumiid)
650  since = since >> 32;
651  label = std::to_string(since);
652  auto it = runInfo.find(since);
653  if (it == runInfo.end()) {
654  // this should never happen...
655  return false;
656  }
657  time = (*it).start;
658  // add the lumi sections...
659  if (tagInfo.timeType == cond::lumiid) {
661  label += (" : " + std::to_string(nlumi));
662  }
663  } else if (tagInfo.timeType == cond::timestamp) {
665  label = boost::posix_time::to_simple_string(time);
666  }
667  std::shared_ptr<PayloadType> payload = Base::fetchPayload(std::get<1>(iov));
668  if (payload.get()) {
670  Base::m_plotData.push_back(std::make_tuple(std::make_tuple(cond::time::from_boost(time), label), value));
671  }
672  }
673  return true;
674  }
675 
676  virtual Y getFromPayload(PayloadType& payload) = 0;
677  };
678 
679  template <typename PayloadType, typename X, typename Y>
680  class ScatterPlot : public Plot2D<PayloadType, X, Y, MULTI_IOV, 1> {
681  public:
683  // the x axis label will be overwritten by the plot rendering application
684  ScatterPlot(const std::string& title, const std::string& xLabel, const std::string& yLabel)
685  : Base("Scatter", title, xLabel, yLabel) {}
686  ~ScatterPlot() override = default;
687 
688  bool fill() override {
689  auto tag = PlotBase::getTag<0>();
690  for (auto iov : tag.iovs) {
691  std::shared_ptr<PayloadType> payload = Base::fetchPayload(std::get<1>(iov));
692  if (payload.get()) {
693  std::tuple<X, Y> value = getFromPayload(*payload);
694  Base::m_plotData.push_back(value);
695  }
696  }
697  return true;
698  }
699 
700  virtual std::tuple<X, Y> getFromPayload(PayloadType& payload) = 0;
701  };
702 
703  //
704  template <typename PayloadType, IOVMultiplicity IOV_M = UNSPECIFIED_IOV>
705  class Histogram1D : public Plot2D<PayloadType, float, float, IOV_M, 1> {
706  public:
708  // naive implementation, essentially provided as an example...
710  const std::string& xLabel,
711  size_t nbins,
712  float min,
713  float max,
714  const std::string& yLabel = "entries")
715  : Base("Histo1D", title, xLabel, yLabel), m_nbins(nbins), m_min(min), m_max(max) {}
716 
717  //
718  void init() override {
719  Base::m_plotData.clear();
720  float binSize = (m_max - m_min) / m_nbins;
721  if (binSize > 0) {
722  m_binSize = binSize;
723  Base::m_plotData.resize(m_nbins);
724  for (size_t i = 0; i < m_nbins; i++) {
725  Base::m_plotData[i] = std::make_tuple(m_min + i * m_binSize, 0);
726  }
727  }
728  }
729 
730  // to be used to fill the histogram!
731  void fillWithValue(float value, float weight = 1) {
732  // ignoring underflow/overflows ( they can be easily added - the total entries as well )
733  if (!Base::m_plotData.empty() && (value < m_max) && (value >= m_min)) {
734  size_t ibin = (value - m_min) / m_binSize;
735  std::get<1>(Base::m_plotData[ibin]) += weight;
736  }
737  }
738 
739  // to be used to fill the histogram!
740  void fillWithBinAndValue(size_t bin, float weight = 1) {
741  if (bin < Base::m_plotData.size()) {
742  std::get<1>(Base::m_plotData[bin]) = weight;
743  }
744  }
745 
746  // this one can ( and in general should ) be overridden - the implementation should use fillWithValue
747  bool fill() override {
748  auto tag = PlotBase::getTag<0>();
749  for (auto iov : tag.iovs) {
750  std::shared_ptr<PayloadType> payload = Base::fetchPayload(std::get<1>(iov));
751  if (payload.get()) {
752  float value = getFromPayload(*payload);
754  }
755  }
756  return true;
757  }
758 
759  // implement this one if you use the default fill implementation, otherwise ignore it...
760  virtual float getFromPayload(PayloadType& payload) { return 0; }
761 
762  private:
763  float m_binSize = 0;
764  size_t m_nbins;
765  float m_min;
766  float m_max;
767  };
768 
769  //
770  template <typename PayloadType, IOVMultiplicity IOV_M = UNSPECIFIED_IOV>
771  class Histogram2D : public Plot3D<PayloadType, float, float, float, IOV_M, 1> {
772  public:
774  // naive implementation, essentially provided as an example...
776  const std::string& xLabel,
777  size_t nxbins,
778  float xmin,
779  float xmax,
780  const std::string& yLabel,
781  size_t nybins,
782  float ymin,
783  float ymax)
784  : Base("Histo2D", title, xLabel, yLabel, "entries"),
785  m_nxbins(nxbins),
786  m_xmin(xmin),
787  m_xmax(xmax),
788  m_nybins(nybins),
789  m_ymin(ymin),
790  m_ymax(ymax) {}
791 
792  //
793  void init() override {
794  Base::m_plotData.clear();
795  float xbinSize = (m_xmax - m_xmin) / m_nxbins;
796  float ybinSize = (m_ymax - m_ymin) / m_nybins;
797  if (xbinSize > 0 && ybinSize > 0) {
798  m_xbinSize = xbinSize;
799  m_ybinSize = ybinSize;
801  for (size_t i = 0; i < m_nybins; i++) {
802  for (size_t j = 0; j < m_nxbins; j++) {
803  Base::m_plotData[i * m_nxbins + j] = std::make_tuple(m_xmin + j * m_xbinSize, m_ymin + i * m_ybinSize, 0);
804  }
805  }
806  }
807  }
808 
809  // to be used to fill the histogram!
810  void fillWithValue(float xvalue, float yvalue, float weight = 1) {
811  // ignoring underflow/overflows ( they can be easily added - the total entries as well )
812  if (!Base::m_plotData.empty() && xvalue < m_xmax && xvalue >= m_xmin && yvalue < m_ymax && yvalue >= m_ymin) {
813  size_t ixbin = (xvalue - m_xmin) / m_xbinSize;
814  size_t iybin = (yvalue - m_ymin) / m_ybinSize;
815  std::get<2>(Base::m_plotData[iybin * m_nxbins + ixbin]) += weight;
816  }
817  }
818 
819  // this one can ( and in general should ) be overridden - the implementation should use fillWithValue
820  bool fill() override {
821  auto tag = PlotBase::getTag<0>();
822  for (auto iov : tag.iovs) {
823  std::shared_ptr<PayloadType> payload = Base::fetchPayload(std::get<1>(iov));
824  if (payload.get()) {
825  std::tuple<float, float> value = getFromPayload(*payload);
826  fillWithValue(std::get<0>(value), std::get<1>(value));
827  }
828  }
829  return true;
830  }
831 
832  // implement this one if you use the default fill implementation, otherwise ignore it...
833  virtual std::tuple<float, float> getFromPayload(PayloadType& payload) {
834  float x = 0;
835  float y = 0;
836  return std::make_tuple(x, y);
837  }
838 
839  private:
840  size_t m_nxbins;
841  float m_xbinSize = 0;
842  float m_xmin;
843  float m_xmax;
844  float m_ybinSize = 0;
845  size_t m_nybins;
846  float m_ymin;
847  float m_ymax;
848  };
849 
850  //
851  template <typename PayloadType, IOVMultiplicity IOV_M = UNSPECIFIED_IOV, int NTAGS = 0>
852  class PlotImage : public PlotImpl<IOV_M, NTAGS> {
853  public:
855  explicit PlotImage(const std::string& title) : Base("Image", title) {
856  std::string payloadTypeName = cond::demangledName(typeid(PayloadType));
859  }
860 
862 
863  std::shared_ptr<PayloadType> fetchPayload(const cond::Hash& payloadHash) {
864  return PlotBase::fetchPayload<PayloadType>(payloadHash);
865  }
866 
867  protected:
869  };
870 
871  } // namespace payloadInspector
872 
873 } // namespace cond
874 
875 #endif
cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, 0 >::fill
virtual bool fill(const std::vector< std::tuple< cond::Time_t, cond::Hash >> &iovs)
Definition: PayloadInspector.h:417
runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:367
cond::payloadInspector::Histogram1D::Base
Plot2D< PayloadType, float, float, IOV_M, 1 > Base
Definition: PayloadInspector.h:707
cond::payloadInspector::PlotImpl< SINGLE_IOV, 0 >::processData
std::string processData() override
Definition: PayloadInspector.h:373
cond::payloadInspector::Histogram2D::m_ymax
float m_ymax
Definition: PayloadInspector.h:847
PI
Definition: PayloadInspector.h:20
cms::cuda::V
cudaStream_t T uint32_t const T *__restrict__ const uint32_t *__restrict__ uint32_t int cudaStream_t V
Definition: HistoContainer.h:99
cond::payloadInspector::PlotBase::m_data
std::string m_data
Definition: PayloadInspector.h:286
cond::payloadInspector::PlotImage::m_imageFileName
std::string m_imageFileName
Definition: PayloadInspector.h:868
cond::lumiid
Definition: Time.h:19
runGCPTkAlMap.title
string title
Definition: runGCPTkAlMap.py:94
mps_fire.i
i
Definition: mps_fire.py:428
cond::payloadInspector::IOVMultiplicity
IOVMultiplicity
Definition: PayloadInspector.h:289
cond::payloadInspector::HistoryPlot::~HistoryPlot
~HistoryPlot() override=default
start
Definition: start.py:1
cond::payloadInspector::Plot3D::~Plot3D
~Plot3D() override=default
cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, NTAGS >::processData
std::string processData() override
Definition: PayloadInspector.h:328
dqmiodumpmetadata.n
n
Definition: dqmiodumpmetadata.py:28
cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, 0 >::PlotImpl
PlotImpl(const std::string &type, const std::string &title)
Definition: PayloadInspector.h:391
cond::time::to_boost
boost::posix_time::ptime to_boost(Time_t iValue)
Definition: TimeConversions.h:39
Exception.h
cond::Hash
std::string Hash
Definition: Types.h:43
cond::payloadInspector::PlotBase::process
bool process(const std::string &connectionString, const boost::python::list &tagsWithTimeBoundaries)
Definition: PayloadInspector.cc:71
cond::payloadInspector::Histogram1D::fillWithValue
void fillWithValue(float value, float weight=1)
Definition: PayloadInspector.h:731
cond::payloadInspector::Histogram1D::getFromPayload
virtual float getFromPayload(PayloadType &payload)
Definition: PayloadInspector.h:760
cond::payloadInspector::Histogram2D::m_xmin
float m_xmin
Definition: PayloadInspector.h:842
PI::mk_input
boost::python::list mk_input(const std::string &tagName, cond::Time_t start, cond::Time_t end)
Definition: PayloadInspector.h:21
cond::payloadInspector::PlotBase::payloadType
std::string payloadType() const
Definition: PayloadInspector.cc:40
X
#define X(str)
Definition: MuonsGrabber.cc:38
cond::payloadInspector::Histogram2D::Histogram2D
Histogram2D(const std::string &title, const std::string &xLabel, size_t nxbins, float xmin, float xmax, const std::string &yLabel, size_t nybins, float ymin, float ymax)
Definition: PayloadInspector.h:775
min
T min(T a, T b)
Definition: MathUtil.h:58
cond::persistency::RunInfoProxy
Definition: RunInfoProxy.h:26
cond::payloadInspector::PlotAnnotations::ntags
int ntags
Definition: PayloadInspector.h:55
cond::payloadInspector::TagReference
Definition: PayloadInspector.h:190
cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, 0 >::setSingleIov
void setSingleIov(bool flag)
Definition: PayloadInspector.h:419
cond::payloadInspector::RunHistoryPlot::fill
bool fill() override
Definition: PayloadInspector.h:556
cond::payloadInspector::TimeHistoryPlot::~TimeHistoryPlot
~TimeHistoryPlot() override=default
mps_merge.weight
weight
Definition: mps_merge.py:88
cond::payloadInspector::PlotBase::m_dbSession
cond::persistency::Session m_dbSession
Definition: PayloadInspector.h:285
cond::payloadInspector::PlotBase::m_tagBoundaries
std::vector< std::pair< cond::Time_t, cond::Time_t > > m_tagBoundaries
Definition: PayloadInspector.h:279
cond::payloadInspector::Histogram1D
Definition: PayloadInspector.h:705
cond::payloadInspector::Plot2D::~Plot2D
~Plot2D() override=default
cond::payloadInspector::Histogram1D::m_binSize
float m_binSize
Definition: PayloadInspector.h:763
cond::payloadInspector::PlotAnnotations::PLOT_TYPE_K
static constexpr const char *const PLOT_TYPE_K
Definition: PayloadInspector.h:45
cond::payloadInspector::Histogram2D::m_xmax
float m_xmax
Definition: PayloadInspector.h:843
cond::payloadInspector::PlotAnnotations
Definition: PayloadInspector.h:44
writedatasetfile.runs
runs
Definition: writedatasetfile.py:27
cond::payloadInspector::PlotAnnotations::get
std::string get(const std::string &key) const
Definition: PayloadInspector.cc:16
cond::payloadInspector::ScatterPlot::Base
Plot2D< PayloadType, X, Y, MULTI_IOV, 1 > Base
Definition: PayloadInspector.h:682
cond::payloadInspector::PlotAnnotations::INFO_K
static constexpr const char *const INFO_K
Definition: PayloadInspector.h:48
cond::payloadInspector::PlotBase::inputParamValues
const std::map< std::string, std::string > & inputParamValues() const
Definition: PayloadInspector.cc:139
cond::payloadInspector::Plot3D::fetchPayload
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)
Definition: PayloadInspector.h:515
cond::payloadInspector::ScatterPlot::~ScatterPlot
~ScatterPlot() override=default
cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, NTAGS >::setSingleIov
void setSingleIov(bool flag)
Definition: PayloadInspector.h:335
cond::payloadInspector::PlotImage::PlotImage
PlotImage(const std::string &title)
Definition: PayloadInspector.h:855
cond::payloadInspector::PlotBase::inputParams
boost::python::list inputParams() const
Definition: PayloadInspector.cc:52
cond::payloadInspector::PlotImage::Base
PlotImpl< IOV_M, NTAGS > Base
Definition: PayloadInspector.h:854
cond::payloadInspector::RunHistoryPlot::RunHistoryPlot
RunHistoryPlot(const std::string &title, const std::string &yLabel)
Definition: PayloadInspector.h:551
dqmdumpme.first
first
Definition: dqmdumpme.py:55
cond::payloadInspector::JSON_FORMAT_VERSION
static const char *const JSON_FORMAT_VERSION
Definition: PayloadInspector.h:60
cond::payloadInspector::serializeValue
std::string serializeValue(const std::string &entryLabel, const V &value)
Definition: PayloadInspector.h:64
cond::payloadInspector::ScatterPlot::fill
bool fill() override
Definition: PayloadInspector.h:688
cond::payloadInspector::serialize
std::string serialize(const PlotAnnotations &annotations, const std::vector< std::tuple< X, Y >> &data)
Definition: PayloadInspector.h:126
cond::payloadInspector::PlotImpl< MULTI_IOV, 0 >::setTwoTags
void setTwoTags(bool flag)
Definition: PayloadInspector.h:355
cond::payloadInspector::PlotImpl< SINGLE_IOV, 0 >::setTwoTags
void setTwoTags(bool flag)
Definition: PayloadInspector.h:380
cond::payloadInspector::TimeHistoryPlot::getFromPayload
virtual Y getFromPayload(PayloadType &payload)=0
cond::payloadInspector::PlotBase::exec_process
bool exec_process(const std::string &connectionString, const std::vector< std::tuple< std::string, cond::Time_t, cond::Time_t >> &tagsWithTimeBoundaries)
Definition: PayloadInspector.cc:91
cond::persistency::Session::fetchPayload
std::unique_ptr< T > fetchPayload(const cond::Hash &payloadHash)
Definition: Session.h:213
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
cond::timestamp
Definition: Time.h:19
cond::payloadInspector::ScatterPlot
Definition: PayloadInspector.h:680
cond::payloadInspector::PlotAnnotations::m
std::map< std::string, std::string > m
Definition: PayloadInspector.h:54
cond::payloadInspector::Plot2D
Definition: PayloadInspector.h:472
cond::payloadInspector::PlotAnnotations::ZAXIS_K
static constexpr const char *const ZAXIS_K
Definition: PayloadInspector.h:51
L1TOccupancyClient_cfi.ymax
ymax
Definition: L1TOccupancyClient_cfi.py:43
cond::payloadInspector::Plot2D::m_plotData
std::vector< std::tuple< X, Y > > m_plotData
Definition: PayloadInspector.h:489
cond::payloadInspector::ScatterPlot::getFromPayload
virtual std::tuple< X, Y > getFromPayload(PayloadType &payload)=0
cond::payloadInspector::PlotBase::getTag
TagReference getTag()
Definition: PayloadInspector.h:261
cond::payloadInspector::Histogram1D::m_min
float m_min
Definition: PayloadInspector.h:765
cond::payloadInspector::Plot2D::serializeData
std::string serializeData() override
Definition: PayloadInspector.h:482
Utils.h
cond::payloadInspector::Histogram2D::m_nxbins
size_t m_nxbins
Definition: PayloadInspector.h:840
cond::payloadInspector::setAnnotations
void setAnnotations(const std::string &type, const std::string &title, IOVMultiplicity IOV_M, int NTAGS, PlotAnnotations &target)
Definition: PayloadInspector.h:291
GlobalPosition_Frontier_DevDB_cff.tag
tag
Definition: GlobalPosition_Frontier_DevDB_cff.py:11
cond::payloadInspector::Histogram2D::init
void init() override
Definition: PayloadInspector.h:793
cond::time::SECONDS_PER_LUMI
const unsigned int SECONDS_PER_LUMI(23)
seconds
double seconds()
cond::payloadInspector::UNSPECIFIED_IOV
Definition: PayloadInspector.h:289
contentValuesCheck.values
values
Definition: contentValuesCheck.py:38
cond::payloadInspector::PlotImpl::PlotImpl
PlotImpl(const std::string &type, const std::string &title)
Definition: PayloadInspector.h:302
cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, 0 >::setTwoTags
void setTwoTags(bool flag)
Definition: PayloadInspector.h:424
cond::payloadInspector::PlotBase::ntags
unsigned int ntags() const
Definition: PayloadInspector.cc:48
mps_fire.end
end
Definition: mps_fire.py:242
cond::payloadInspector::TagReference::name
const std::string & name
Definition: PayloadInspector.h:196
cond::payloadInspector::ModuleVersion
Definition: PayloadInspector.h:186
cond::payloadInspector::PlotAnnotations::twoTags
bool twoTags
Definition: PayloadInspector.h:56
cond::payloadInspector::PlotImpl::serializeData
virtual std::string serializeData()=0
cond::payloadInspector::PlotBase::m_tagNames
std::vector< std::string > m_tagNames
Definition: PayloadInspector.h:278
cond::payloadInspector::Plot3D::Base
PlotImpl< IOV_M, NTAGS > Base
Definition: PayloadInspector.h:500
LaserClient_cfi.nbins
nbins
Definition: LaserClient_cfi.py:51
cond::payloadInspector::PlotBase::dbSession
cond::persistency::Session dbSession()
Definition: PayloadInspector.cc:141
cond::payloadInspector::PlotBase::m_inputParamValues
std::map< std::string, std::string > m_inputParamValues
Definition: PayloadInspector.h:281
cond::payloadInspector::TimeHistoryPlot::Base
Plot2D< PayloadType, std::tuple< unsigned long long, std::string >, Y, MULTI_IOV, 1 > Base
Definition: PayloadInspector.h:623
cond::payloadInspector::PlotBase::getTagInfo
cond::Tag_t getTagInfo(const std::string &tag)
Definition: PayloadInspector.cc:134
writeEcalDQMStatus.since
since
Definition: writeEcalDQMStatus.py:53
cond::payloadInspector::Plot2D::Plot2D
Plot2D(const std::string &type, const std::string &title, const std::string xLabel, const std::string &yLabel)
Definition: PayloadInspector.h:475
cond::persistency::Session::getRunInfo
RunInfoProxy getRunInfo(cond::Time_t start, cond::Time_t end)
Definition: Session.cc:193
jets_cff.payload
payload
Definition: jets_cff.py:32
cond::payloadInspector::ModuleVersion::label
static constexpr const char *const label
Definition: PayloadInspector.h:187
cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, 0 >::fill
virtual bool fill()
Definition: PayloadInspector.h:403
b
double b
Definition: hdecay.h:118
csv2json.lumiIndex
lumiIndex
Definition: csv2json.py:29
cond::payloadInspector::Plot2D::fetchPayload
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)
Definition: PayloadInspector.h:484
cond::payloadInspector::HistoryPlot
Definition: PayloadInspector.h:524
cond::payloadInspector::PlotImpl::~PlotImpl
~PlotImpl() override=default
cond::payloadInspector::PlotImpl< MULTI_IOV, 0 >::PlotImpl
PlotImpl(const std::string &type, const std::string &title)
Definition: PayloadInspector.h:341
cond::payloadInspector::PlotBase::type
std::string type() const
Definition: PayloadInspector.cc:44
cond::payloadInspector::Histogram1D::m_nbins
size_t m_nbins
Definition: PayloadInspector.h:764
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
cond::payloadInspector::Histogram2D::Base
Plot3D< PayloadType, float, float, float, IOV_M, 1 > Base
Definition: PayloadInspector.h:773
cond::payloadInspector::PlotBase::title
std::string title() const
Definition: PayloadInspector.cc:42
cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, NTAGS >::PlotImpl
PlotImpl(const std::string &type, const std::string &title)
Definition: PayloadInspector.h:321
cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, 1 >::processData
std::string processData() override
Definition: PayloadInspector.h:446
cond::payloadInspector::HistoryPlot::Base
Plot2D< PayloadType, unsigned long long, Y, MULTI_IOV, 1 > Base
Definition: PayloadInspector.h:526
cond
Definition: plugin.cc:23
cond::payloadInspector::PlotImpl::processData
std::string processData() override
Definition: PayloadInspector.h:309
cond::payloadInspector::PlotBase::setInputParamValues
void setInputParamValues(const boost::python::dict &values)
Definition: PayloadInspector.cc:60
cond::payloadInspector::Histogram2D
Definition: PayloadInspector.h:771
a
double a
Definition: hdecay.h:119
cond::payloadInspector::Histogram2D::getFromPayload
virtual std::tuple< float, float > getFromPayload(PayloadType &payload)
Definition: PayloadInspector.h:833
SiStripPI::max
Definition: SiStripPayloadInspectorHelper.h:169
cond::payloadInspector::ScatterPlot::ScatterPlot
ScatterPlot(const std::string &title, const std::string &xLabel, const std::string &yLabel)
Definition: PayloadInspector.h:684
cond::payloadInspector::Histogram2D::fillWithValue
void fillWithValue(float xvalue, float yvalue, float weight=1)
Definition: PayloadInspector.h:810
cond::time::from_boost
Time_t from_boost(boost::posix_time::ptime bt)
Definition: TimeConversions.h:43
cond::payloadInspector::Histogram1D::init
void init() override
Definition: PayloadInspector.h:718
type
type
Definition: SiPixelVCal_PayloadInspector.cc:37
cond::payloadInspector::Plot2D::Base
PlotImpl< IOV_M, NTAGS > Base
Definition: PayloadInspector.h:474
cond::payloadInspector::TimeHistoryPlot::fill
bool fill() override
Definition: PayloadInspector.h:629
cond::payloadInspector::Histogram1D::fill
bool fill() override
Definition: PayloadInspector.h:747
cond::payloadInspector::PlotAnnotations::singleIov
bool singleIov
Definition: PayloadInspector.h:57
cond::payloadInspector::PlotImpl
Definition: PayloadInspector.h:300
cond::runnumber
Definition: Time.h:19
cond::persistency::Session
Definition: Session.h:63
cond::payloadInspector::PlotImage::fetchPayload
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)
Definition: PayloadInspector.h:863
gainCalibHelper::gainCalibPI::type
type
Definition: SiPixelGainCalibHelper.h:39
cond::Time_t
unsigned long long Time_t
Definition: Time.h:14
cond::payloadInspector::PlotAnnotations::TITLE_K
static constexpr const char *const TITLE_K
Definition: PayloadInspector.h:46
cond::payloadInspector::RunHistoryPlot
Definition: PayloadInspector.h:547
cond::payloadInspector::MULTI_IOV
Definition: PayloadInspector.h:289
GlobalIdentifier.h
cond::payloadInspector::RunHistoryPlot::~RunHistoryPlot
~RunHistoryPlot() override=default
edm::createGlobalIdentifier
std::string createGlobalIdentifier(bool binary=false)
Definition: GlobalIdentifier.cc:5
cond::payloadInspector::HistoryPlot::HistoryPlot
HistoryPlot(const std::string &title, const std::string &yLabel)
Definition: PayloadInspector.h:528
cond::payloadInspector::Plot3D::m_plotData
std::vector< std::tuple< X, Y, Z > > m_plotData
Definition: PayloadInspector.h:520
value
Definition: value.py:1
cond::payloadInspector::PlotBase::isTwoTags
bool isTwoTags() const
Definition: PayloadInspector.cc:50
trackerHitRTTI::vector
Definition: trackerHitRTTI.h:21
cond::payloadInspector::TimeHistoryPlot
Definition: PayloadInspector.h:621
cond::Tag_t
Definition: Types.h:58
cond::payloadInspector::PlotBase::m_inputParams
std::set< std::string > m_inputParams
Definition: PayloadInspector.h:277
cond::payloadInspector::PlotAnnotations::PAYLOAD_TYPE_K
static constexpr const char *const PAYLOAD_TYPE_K
Definition: PayloadInspector.h:47
cond::payloadInspector::Histogram2D::m_nybins
size_t m_nybins
Definition: PayloadInspector.h:845
cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, 1 >::fill
virtual bool fill()
Definition: PayloadInspector.h:451
cond::payloadInspector::PlotBase::init
virtual void init()
Definition: PayloadInspector.cc:130
cond::payloadInspector::RunHistoryPlot::getFromPayload
virtual Y getFromPayload(PayloadType &payload)=0
cond::payloadInspector::PlotImpl< MULTI_IOV, 0 >::processData
std::string processData() override
Definition: PayloadInspector.h:348
cond::payloadInspector::PlotBase::fetchPayload
std::shared_ptr< PayloadType > fetchPayload(const cond::Hash &payloadHash)
Definition: PayloadInspector.h:254
cond::payloadInspector::PlotBase::m_tagIovs
std::vector< std::vector< std::tuple< cond::Time_t, cond::Hash > > > m_tagIovs
Definition: PayloadInspector.h:280
cond::payloadInspector::TagReference::TagReference
TagReference(const TagReference &rhs)
Definition: PayloadInspector.h:195
cond::payloadInspector::HistoryPlot::getFromPayload
virtual Y getFromPayload(PayloadType &payload)=0
cond::payloadInspector::PlotBase::processData
virtual std::string processData()
Definition: PayloadInspector.cc:132
cond::payloadInspector::Histogram2D::m_ybinSize
float m_ybinSize
Definition: PayloadInspector.h:844
cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, 0 >
Definition: PayloadInspector.h:389
newFWLiteAna.bin
bin
Definition: newFWLiteAna.py:161
cond::payloadInspector::PlotBase::isSingleIov
bool isSingleIov() const
Definition: PayloadInspector.cc:46
cond::payloadInspector::PlotBase::~PlotBase
virtual ~PlotBase()=default
cond::payloadInspector::HistoryPlot::fill
bool fill() override
Definition: PayloadInspector.h:532
cond::payloadInspector::PlotBase::data
std::string data() const
Definition: PayloadInspector.cc:69
cond::payloadInspector::TagReference::iovs
const std::vector< std::tuple< cond::Time_t, cond::Hash > > & iovs
Definition: PayloadInspector.h:198
cond::payloadInspector::TimeHistoryPlot::TimeHistoryPlot
TimeHistoryPlot(const std::string &title, const std::string &yLabel)
Definition: PayloadInspector.h:625
writedatasetfile.run
run
Definition: writedatasetfile.py:27
cond::payloadInspector::TagReference::boundary
const std::pair< cond::Time_t, cond::Time_t > & boundary
Definition: PayloadInspector.h:197
cond::payloadInspector::Histogram2D::m_ymin
float m_ymin
Definition: PayloadInspector.h:846
L1TOccupancyClient_cfi.ymin
ymin
Definition: L1TOccupancyClient_cfi.py:43
cond::payloadInspector::Plot3D::serializeData
std::string serializeData() override
Definition: PayloadInspector.h:513
cond::payloadInspector::PlotImpl::fill
virtual bool fill()=0
cond::payloadInspector::TagReference::TagReference
TagReference(const std::string &n, const std::pair< cond::Time_t, cond::Time_t > &b, const std::vector< std::tuple< cond::Time_t, cond::Hash >> &i)
Definition: PayloadInspector.h:191
TrackerOfflineValidation_Dqm_cff.xmax
xmax
Definition: TrackerOfflineValidation_Dqm_cff.py:11
relativeConstraints.value
value
Definition: relativeConstraints.py:53
relativeConstraints.empty
bool empty
Definition: relativeConstraints.py:46
cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, 0 >::processData
std::string processData() override
Definition: PayloadInspector.h:398
cond::payloadInspector::PlotBase::PlotBase
PlotBase()
Definition: PayloadInspector.cc:26
cond::payloadInspector::PlotImage
Definition: PayloadInspector.h:852
cond::payloadInspector::PlotAnnotations::XAXIS_K
static constexpr const char *const XAXIS_K
Definition: PayloadInspector.h:49
cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, 1 >::fill
virtual bool fill(const std::vector< std::tuple< cond::Time_t, cond::Hash >> &iovs)
Definition: PayloadInspector.h:465
submitPVValidationJobs.runInfo
dictionary runInfo
Definition: submitPVValidationJobs.py:1013
BeamSpotPI::Y
Definition: BeamSpotPayloadInspectorHelper.h:31
dumpRecoGeometry_cfg.tagInfo
tagInfo
Definition: dumpRecoGeometry_cfg.py:194
cond::payloadInspector::PlotAnnotations::PlotAnnotations
PlotAnnotations()
Definition: PayloadInspector.cc:14
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
AlignmentPI::index
index
Definition: AlignmentPayloadInspectorHelper.h:46
filterCSVwithJSON.target
target
Definition: filterCSVwithJSON.py:32
ztail.d
d
Definition: ztail.py:151
cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, 1 >::PlotImpl
PlotImpl(const std::string &type, const std::string &title)
Definition: PayloadInspector.h:439
cond::payloadInspector::RunHistoryPlot::Base
Plot2D< PayloadType, std::tuple< float, std::string >, Y, MULTI_IOV, 1 > Base
Definition: PayloadInspector.h:549
BeamSpotPI::Z
Definition: BeamSpotPayloadInspectorHelper.h:32
cond::payloadInspector::Plot3D::Plot3D
Plot3D(const std::string &type, const std::string &title, const std::string xLabel, const std::string &yLabel, const std::string &zLabel)
Definition: PayloadInspector.h:501
cond::payloadInspector::PlotImpl< SINGLE_IOV, 0 >::PlotImpl
PlotImpl(const std::string &type, const std::string &title)
Definition: PayloadInspector.h:366
TrackerOfflineValidation_Dqm_cff.xmin
xmin
Definition: TrackerOfflineValidation_Dqm_cff.py:10
cond::payloadInspector::PlotBase::addInputParam
void addInputParam(const std::string &paramName)
Definition: PayloadInspector.cc:35
cond::payloadInspector::PlotBase
Definition: PayloadInspector.h:202
cond::payloadInspector::Plot3D
Definition: PayloadInspector.h:498
dqmiolumiharvest.j
j
Definition: dqmiolumiharvest.py:66
cond::payloadInspector::SINGLE_IOV
Definition: PayloadInspector.h:289
ntuplemaker.time
time
Definition: ntuplemaker.py:310
l1RCTOmdsFedVectorProducer_cfi.connectionString
connectionString
Definition: l1RCTOmdsFedVectorProducer_cfi.py:4
cond::payloadInspector::Histogram2D::m_xbinSize
float m_xbinSize
Definition: PayloadInspector.h:841
Session.h
submitPVValidationJobs.t
string t
Definition: submitPVValidationJobs.py:644
crabWrapper.key
key
Definition: crabWrapper.py:19
cond::payloadInspector::Histogram1D::Histogram1D
Histogram1D(const std::string &title, const std::string &xLabel, size_t nbins, float min, float max, const std::string &yLabel="entries")
Definition: PayloadInspector.h:709
lumi
Definition: LumiSectionData.h:20
JetPartonCorrections_cff.tagName
tagName
Definition: JetPartonCorrections_cff.py:12
cond::payloadInspector::PlotImpl< UNSPECIFIED_IOV, 1 >::setSingleIov
void setSingleIov(bool flag)
Definition: PayloadInspector.h:467
cond::payloadInspector::PlotBase::m_plotAnnotations
PlotAnnotations m_plotAnnotations
Definition: PayloadInspector.h:276
label
const char * label
Definition: PFTauDecayModeTools.cc:11
cond::payloadInspector::Histogram1D::m_max
float m_max
Definition: PayloadInspector.h:766
weight
Definition: weight.py:1
cond::payloadInspector::PlotAnnotations::YAXIS_K
static constexpr const char *const YAXIS_K
Definition: PayloadInspector.h:50
cond::payloadInspector::serializeAnnotations
std::string serializeAnnotations(const PlotAnnotations &annotations)
Definition: PayloadInspector.h:110
cond::payloadInspector::PlotImage::serializeData
std::string serializeData() override
Definition: PayloadInspector.h:861
cond::payloadInspector::Histogram2D::fill
bool fill() override
Definition: PayloadInspector.h:820
RemoveAddSevLevel.flag
flag
Definition: RemoveAddSevLevel.py:116
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
cond::throwException
void throwException(const std::string &message, const std::string &methodName)
Definition: Exception.cc:18
cond::payloadInspector::Histogram1D::fillWithBinAndValue
void fillWithBinAndValue(size_t bin, float weight=1)
Definition: PayloadInspector.h:740