CMS 3D CMS Logo

Classes | Enumerations | Functions | Variables
cond::payloadInspector Namespace Reference

Classes

class  Histogram1D
 
class  Histogram2D
 
class  HistoryPlot
 
struct  ModuleVersion
 
class  Plot2D
 
class  Plot3D
 
struct  PlotAnnotations
 
class  PlotBase
 
class  PlotImage
 
class  PlotImpl
 
class  PlotImpl< MULTI_IOV, 0 >
 
class  PlotImpl< SINGLE_IOV, 0 >
 
class  PlotImpl< UNSPECIFIED_IOV, 0 >
 
class  PlotImpl< UNSPECIFIED_IOV, 1 >
 
class  PlotImpl< UNSPECIFIED_IOV, NTAGS >
 
class  RunHistoryPlot
 
class  ScatterPlot
 
struct  TagReference
 
class  TimeHistoryPlot
 

Enumerations

enum  IOVMultiplicity { UNSPECIFIED_IOV = 0, MULTI_IOV = 1, SINGLE_IOV = 2 }
 

Functions

std::string serialize (const PlotAnnotations &annotations, const std::string &imageFileName)
 
template<typename X , typename Y >
std::string serialize (const PlotAnnotations &annotations, const std::vector< std::tuple< X, Y >> &data)
 
template<typename X , typename Y , typename Z >
std::string serialize (const PlotAnnotations &annotations, const std::vector< std::tuple< X, Y, Z >> &data)
 
std::string serializeAnnotations (const PlotAnnotations &annotations)
 
template<typename V >
std::string serializeValue (const std::string &entryLabel, const std::pair< V, V > &value)
 
template<>
std::string serializeValue (const std::string &entryLabel, const std::string &value)
 
template<typename V >
std::string serializeValue (const std::string &entryLabel, const std::tuple< V, std::string > &value)
 
template<typename V >
std::string serializeValue (const std::string &entryLabel, const V &value)
 
void setAnnotations (const std::string &type, const std::string &title, IOVMultiplicity IOV_M, int NTAGS, PlotAnnotations &target)
 

Variables

static const char *const JSON_FORMAT_VERSION = "1.0"
 

Enumeration Type Documentation

◆ IOVMultiplicity

Enumerator
UNSPECIFIED_IOV 
MULTI_IOV 
SINGLE_IOV 

Definition at line 265 of file PayloadInspector.h.

265 { UNSPECIFIED_IOV = 0, MULTI_IOV = 1, SINGLE_IOV = 2 };

Function Documentation

◆ serialize() [1/3]

std::string cond::payloadInspector::serialize ( const PlotAnnotations annotations,
const std::string &  imageFileName 
)

Definition at line 152 of file PayloadInspector.h.

152  {
153  std::stringstream ss;
154  ss << "{";
155  ss << serializeAnnotations(annotations);
156  ss << ",";
157  ss << "\"file\": \"" << imageFileName << "\"";
158  ss << "}";
159  return ss.str();
160  }

References serializeAnnotations(), and contentValuesCheck::ss.

◆ serialize() [2/3]

template<typename X , typename Y >
std::string cond::payloadInspector::serialize ( const PlotAnnotations annotations,
const std::vector< std::tuple< X, Y >> &  data 
)

Definition at line 112 of file PayloadInspector.h.

112  {
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  }

References ztail::d, data, dqmdumpme::first, serializeAnnotations(), serializeValue(), and contentValuesCheck::ss.

Referenced by cond::payloadInspector::Plot2D< PayloadType, X, Y, MULTI_IOV, 1 >::serializeData(), cond::payloadInspector::Plot3D< PayloadType, float, float, float, IOV_M, 1 >::serializeData(), and cond::payloadInspector::PlotImage< PayloadType >::serializeData().

◆ serialize() [3/3]

template<typename X , typename Y , typename Z >
std::string cond::payloadInspector::serialize ( const PlotAnnotations annotations,
const std::vector< std::tuple< X, Y, Z >> &  data 
)

Definition at line 132 of file PayloadInspector.h.

132  {
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  }

References ztail::d, data, dqmdumpme::first, serializeAnnotations(), serializeValue(), and contentValuesCheck::ss.

◆ serializeAnnotations()

std::string cond::payloadInspector::serializeAnnotations ( const PlotAnnotations annotations)

Definition at line 96 of file PayloadInspector.h.

96  {
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  }

References a, dqmdumpme::first, JSON_FORMAT_VERSION, cond::payloadInspector::PlotAnnotations::m, and contentValuesCheck::ss.

Referenced by serialize().

◆ serializeValue() [1/4]

template<typename V >
std::string cond::payloadInspector::serializeValue ( const std::string &  entryLabel,
const std::pair< V, V > &  value 
)

Definition at line 88 of file PayloadInspector.h.

88  {
89  std::stringstream ss;
90  ss << serializeValue(entryLabel, value.first);
91  ss << ", ";
92  ss << serializeValue(entryLabel + "_err", value.second);
93  return ss.str();
94  }

References serializeValue(), and contentValuesCheck::ss.

◆ serializeValue() [2/4]

template<>
std::string cond::payloadInspector::serializeValue ( const std::string &  entryLabel,
const std::string &  value 
)

Definition at line 70 of file PayloadInspector.h.

70  {
71  std::stringstream ss;
72  ss << "\"" << entryLabel << "\":\"" << value << "\"";
73  return ss.str();
74  }

References contentValuesCheck::ss.

◆ serializeValue() [3/4]

template<typename V >
std::string cond::payloadInspector::serializeValue ( const std::string &  entryLabel,
const std::tuple< V, std::string > &  value 
)

Definition at line 78 of file PayloadInspector.h.

78  {
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  }

References serializeValue(), and contentValuesCheck::ss.

◆ serializeValue() [4/4]

template<typename V >
std::string cond::payloadInspector::serializeValue ( const std::string &  entryLabel,
const V &  value 
)

Definition at line 63 of file PayloadInspector.h.

63  {
64  std::stringstream ss;
65  ss << "\"" << entryLabel << "\":" << value;
66  return ss.str();
67  }

References contentValuesCheck::ss, and relativeConstraints::value.

Referenced by serialize(), and serializeValue().

◆ setAnnotations()

void cond::payloadInspector::setAnnotations ( const std::string &  type,
const std::string &  title,
IOVMultiplicity  IOV_M,
int  NTAGS,
PlotAnnotations target 
)
inline

Variable Documentation

◆ JSON_FORMAT_VERSION

const char* const cond::payloadInspector::JSON_FORMAT_VERSION = "1.0"
static

Definition at line 59 of file PayloadInspector.h.

Referenced by serializeAnnotations().

dqmdumpme.first
first
Definition: dqmdumpme.py:55
cond::payloadInspector::JSON_FORMAT_VERSION
static const char *const JSON_FORMAT_VERSION
Definition: PayloadInspector.h:59
contentValuesCheck.ss
ss
Definition: contentValuesCheck.py:33
cond::payloadInspector::UNSPECIFIED_IOV
Definition: PayloadInspector.h:265
cond::payloadInspector::serializeValue
std::string serializeValue(const std::string &entryLabel, const std::pair< V, V > &value)
Definition: PayloadInspector.h:88
a
double a
Definition: hdecay.h:119
cond::payloadInspector::MULTI_IOV
Definition: PayloadInspector.h:265
value
Definition: value.py:1
overlapproblemtsosanalyzer_cfi.title
title
Definition: overlapproblemtsosanalyzer_cfi.py:7
type
type
Definition: HCALResponse.h:21
relativeConstraints.value
value
Definition: relativeConstraints.py:53
data
char data[epos_bytes_allocation]
Definition: EPOS_Wrapper.h:79
filterCSVwithJSON.target
target
Definition: filterCSVwithJSON.py:32
ztail.d
d
Definition: ztail.py:151
cond::payloadInspector::SINGLE_IOV
Definition: PayloadInspector.h:265
cond::payloadInspector::serializeAnnotations
std::string serializeAnnotations(const PlotAnnotations &annotations)
Definition: PayloadInspector.h:96