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