35 : m_type(iType), m_titleWidth(0) {
36 if (!strcmp(iType.
name().c_str(),
"CaloTower")) {
37 if (iPurpose ==
"ECal")
39 else if (iPurpose ==
"HCal")
41 else if (iPurpose ==
"HCal Outer")
43 }
else if (strstr(iPurpose.c_str(),
"Beam Spot")) {
47 }
else if (strstr(iPurpose.c_str(),
"Vertices")) {
51 }
else if (strstr(iPurpose.c_str(),
"Conversion")) {
52 addEntry(
"pairMomentum().rho()", 1,
"pt",
"GeV");
53 addEntry(
"pairMomentum().eta()", 2,
"eta");
54 addEntry(
"pairMomentum().phi()", 2,
"phi");
55 }
else if (strstr(iPurpose.c_str(),
"Candidate") || strstr(iPurpose.c_str(),
"GenParticle")) {
62 }
else if (iPurpose ==
"Jets") {
64 }
else if (iPurpose ==
"DT-segments") {
65 addEntry(
"chamberId().wheel()", 0,
"wh");
66 addEntry(
"chamberId().station()", 0,
"st");
67 addEntry(
"chamberId().sector()", 0,
"sc");
68 }
else if (iPurpose ==
"CSC-segments") {
69 addEntry(
"cscDetId().endcap()", 0,
"ec");
70 addEntry(
"cscDetId().station()", 0,
"st");
71 addEntry(
"cscDetId().ring()", 0,
"rn");
72 }
else if (iPurpose ==
"BTLclusters" || iPurpose ==
"BTLrechits") {
75 }
else if (iPurpose ==
"ETLclusters" || iPurpose ==
"ETLrechits") {
78 }
else if (iPurpose ==
"HGCal Trigger Cell" || iPurpose ==
"HGCal Trigger Cluster") {
80 }
else if (iPurpose ==
"CaloParticle") {
83 addEntry(
"simClusters().size()", 3,
"SimClSize");
84 }
else if (iPurpose ==
"Trackster" || iPurpose ==
"Trackster hits" || iPurpose ==
"Trackster layers") {
85 addEntry(
"raw_energy", 3,
"E",
"GeV");
86 addEntry(
"barycenter().Eta()", 3,
"eta");
87 addEntry(
"barycenter().Phi()", 3,
"phi");
88 }
else if (iPurpose ==
"HGCal MultiCluster") {
117 if (
parse(
temp.c_str(), grammar.use_parser<1>() >> end_p, space_p).full) {
118 m_entries.push_back(
Entry(tmpPtr, iExpression, iUnit, iTitle.empty() ? iExpression : iTitle, iPrec));
140 std::vector<std::string>
titles;
144 titles.push_back((*i).m_title.empty() ? (*i).m_expression : (*i).m_title);
161 off += snprintf(&buff[off],
166 e.m_precision ? (
e.m_precision + 1) : 0,
static const std::array< std::string, 5 > titles
vector< string > parse(string line, const string &delimiter)
boost::spirit::classic::parser_error< reco::parser::SyntaxErrors > BaseException
bool addEntry(std::string iExpression, int iPrec=2, std::string iTitle="", std::string iUnit="")
std::shared_ptr< ExpressionBase > ExpressionPtr
FWItemValueGetter(const edm::TypeWithDict &, const std::string &iPurpose)
UInt_t precision(int idx) const
std::vector< std::string > getTitles() const
const std::string & getToolTip(const void *iObject) const
std::string oldToNewFormat(const std::string &iExpression)
double valueFor(const void *, int idx) const