40 if (!strcmp(iType.
name().c_str(),
"CaloTower"))
42 if ( iPurpose ==
"ECal" )
44 else if ( iPurpose ==
"HCal" )
46 else if (iPurpose ==
"HCal Outer")
49 else if (strstr(iPurpose.c_str(),
"Beam Spot") )
55 else if (strstr(iPurpose.c_str(),
"Vertices") )
61 else if (strstr(iPurpose.c_str(),
"Conversion") )
63 addEntry(
"pairMomentum().rho()", 1,
"pt",
"GeV" );
64 addEntry(
"pairMomentum().eta()", 2,
"eta");
65 addEntry(
"pairMomentum().phi()", 2,
"phi");
67 else if (strstr(iPurpose.c_str(),
"Candidate") || strstr(iPurpose.c_str(),
"GenParticle"))
74 else if (iPurpose ==
"Jets" )
78 else if ( iPurpose ==
"DT-segments")
80 addEntry(
"chamberId().wheel()", 0,
"wh");
81 addEntry(
"chamberId().station()", 0,
"st");
82 addEntry(
"chamberId().sector()", 0,
"sc");
85 else if ( iPurpose ==
"CSC-segments")
87 addEntry(
"cscDetId().endcap()", 0,
"ec");
88 addEntry(
"cscDetId().station()", 0,
"st");
89 addEntry(
"cscDetId().ring()", 0,
"rn");
106 using namespace boost::spirit::classic;
113 using namespace fireworks::expression;
121 if(
parse(
temp.c_str(), grammar.use_parser<1>() >> end_p, space_p).full)
123 m_entries.push_back(
Entry(tmpPtr, iExpression, iUnit, iTitle.empty() ? iExpression :iTitle , iPrec));
153 std::vector<std::string>
156 std::vector<std::string> titles;
160 titles.push_back((*i).m_title.empty() ? (*i).m_expression : (*i).m_title );
168 return static_cast<int>(
m_entries.size());
boost::spirit::classic::parser_error< reco::parser::SyntaxErrors > BaseException
bool addEntry(std::string iExpression, int iPrec=2, std::string iTitle="", std::string iUnit="")
FWItemValueGetter(const edm::TypeWithDict &, const std::string &iPurpose)
boost::shared_ptr< ExpressionBase > ExpressionPtr
std::vector< std::string > getTitles() const
double valueFor(const void *, int idx) const
std::string oldToNewFormat(const std::string &iExpression)
const std::string & getToolTip(const void *iObject) const
reco::parser::ExpressionPtr m_expr
UInt_t precision(int idx) const
edm::Service< TFileService > fs