18 #include "Reflex/Base.h"
19 #include "Reflex/Base.h"
41 if ( iType.Name() ==
"CaloTower" )
43 if ( iPurpose ==
"ECal" )
45 else if ( iPurpose ==
"HCal" )
47 else if (iPurpose ==
"HCal Outer")
50 else if (strstr(iPurpose.c_str(),
"Beam Spot") )
56 else if (strstr(iPurpose.c_str(),
"Vertices") )
62 else if (strstr(iPurpose.c_str(),
"Conversion") )
64 addEntry(
"pairMomentum().rho()", 1,
"pt",
"GeV" );
65 addEntry(
"pairMomentum().eta()", 2,
"eta");
66 addEntry(
"pairMomentum().phi()", 2,
"phi");
68 else if (strstr(iPurpose.c_str(),
"Candidate") || strstr(iPurpose.c_str(),
"GenParticle"))
75 else if (iPurpose ==
"Jets" )
94 using namespace boost::spirit::classic;
101 using namespace fireworks::expression;
109 if(
parse(
temp.c_str(), grammar.use_parser<1>() >> end_p, space_p).full)
111 m_entries.push_back(
Entry(tmpPtr, iExpression, iUnit, iTitle.empty() ? iExpression :iTitle , iPrec));
131 Reflex::Object
o(
m_type, const_cast<void *>(iObject));
141 std::vector<std::string>
144 std::vector<std::string> titles;
148 titles.push_back((*i).m_title.empty() ? (*i).m_expression : (*i).m_title );
156 return static_cast<int>(
m_entries.size());
163 static std::string buff(128, 0);
164 static std::string fs =
"\n %*s = %.*f";
166 Reflex::Object
o(
m_type, const_cast<void *>(iObject));
boost::spirit::classic::parser_error< reco::parser::SyntaxErrors > BaseException
Evaluator * parse(const T &text)
bool addEntry(std::string iExpression, int iPrec=2, std::string iTitle="", std::string iUnit="")
boost::shared_ptr< ExpressionBase > ExpressionPtr
FWItemValueGetter(const Reflex::Type &, const std::string &iPurpose)
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