CMS 3D CMS Logo

List of all members | Public Member Functions | Public Attributes
JsonOutputProducer::JsonVars Struct Reference

Public Member Functions

 JsonVars ()
 
std::string serialise (size_t _indent=0) const
 

Public Attributes

std::vector< std::string > label
 
std::vector< std::string > state
 
std::vector< std::string > trigger
 
std::vector< std::pair< int, int > > trigger_passed_count
 
std::vector< std::string > type
 

Detailed Description

Definition at line 565 of file hltDiff.cc.

Constructor & Destructor Documentation

◆ JsonVars()

JsonOutputProducer::JsonVars::JsonVars ( )
inline

Definition at line 591 of file hltDiff.cc.

591 : state(0), trigger(0), trigger_passed_count(0), label(0), type(0) {}

Member Function Documentation

◆ serialise()

std::string JsonOutputProducer::JsonVars::serialise ( size_t  _indent = 0) const
inline

Definition at line 572 of file hltDiff.cc.

572  {
573  std::ostringstream json;
574  json << indent(_indent) << key("vars") << '{'; // line open
575  json << indent(_indent + 1) << key("state") << list_string(state) << ','; // line
576  json << indent(_indent + 1) << key("trigger") << list_string(trigger) << ','; // line
577  json << indent(_indent + 1) << key("trigger_passed_count") << '['; // line
578  for (auto it = trigger_passed_count.begin(); it != trigger_passed_count.end(); ++it) {
579  json << '{' << key("o") << (*it).first << ',' << key("n") << (*it).second << '}';
580  if (it != trigger_passed_count.end() - 1)
581  json << ',';
582  }
583  json << "],";
584  json << indent(_indent + 1) << key("label") << list_string(label) << ','; // line
585  json << indent(_indent + 1) << key("type") << list_string(type); // line
586  json << indent(_indent) << '}'; // line close
587 
588  return json.str();
589  }

References util.rrClient::indent, crabWrapper::key, and label.

Member Data Documentation

◆ label

std::vector<std::string> JsonOutputProducer::JsonVars::label

◆ state

std::vector<std::string> JsonOutputProducer::JsonVars::state

Definition at line 566 of file hltDiff.cc.

◆ trigger

std::vector<std::string> JsonOutputProducer::JsonVars::trigger

Definition at line 567 of file hltDiff.cc.

◆ trigger_passed_count

std::vector<std::pair<int, int> > JsonOutputProducer::JsonVars::trigger_passed_count

Definition at line 568 of file hltDiff.cc.

◆ type

std::vector<std::string> JsonOutputProducer::JsonVars::type
JsonOutputProducer::indent
static std::string indent(size_t _nTabs)
Definition: hltDiff.cc:425
JsonOutputProducer::JsonVars::trigger
std::vector< std::string > trigger
Definition: hltDiff.cc:567
JsonOutputProducer::key
static std::string key(const std::string &_key, const std::string &_delim="")
Definition: hltDiff.cc:439
JsonOutputProducer::JsonVars::type
std::vector< std::string > type
Definition: hltDiff.cc:570
JsonOutputProducer::JsonVars::state
std::vector< std::string > state
Definition: hltDiff.cc:566
type
type
Definition: SiPixelVCal_PayloadInspector.cc:39
JsonOutputProducer::list_string
static std::string list_string(const std::vector< std::string > &_values, const std::string &_delim="")
Definition: hltDiff.cc:470
JsonOutputProducer::JsonVars::label
std::vector< std::string > label
Definition: hltDiff.cc:569
JsonOutputProducer::JsonVars::trigger_passed_count
std::vector< std::pair< int, int > > trigger_passed_count
Definition: hltDiff.cc:568
trigger
Definition: HLTPrescaleTableCond.h:8
json
nlohmann::json json
Definition: FastTimerService.cc:21