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