CMS 3D CMS Logo

Classes | Typedefs | Functions
cand::parser Namespace Reference

Classes

struct  ConjInfo
 
class  ModeSetter
 

Typedefs

typedef rule< ScannerUsed_1Rule_1
 
typedef scanner_policies< skip_parser_iteration_policy< nothing_parser, iteration_policy >, match_policy, action_policy > ScannerPolicy
 
typedef scanner< const char *, ScannerPolicyScannerUsed_1
 

Functions

bool decayParser (const string &iValue, vector< ConjInfo > &oStrings)
 
bool decayParser (const std::string &iValue, std::vector< ConjInfo > &oStrings)
 
std::ostream & operator<< (std::ostream &out, const ConjInfo &info)
 

Typedef Documentation

Definition at line 35 of file decayParser.cc.

typedef scanner_policies<skip_parser_iteration_policy<nothing_parser, iteration_policy>, match_policy, action_policy> cand::parser::ScannerPolicy

Definition at line 33 of file decayParser.cc.

typedef scanner<const char*, ScannerPolicy> cand::parser::ScannerUsed_1

Definition at line 34 of file decayParser.cc.

Function Documentation

bool cand::parser::decayParser ( const string &  iValue,
vector< ConjInfo > &  oStrings 
)

Definition at line 37 of file decayParser.cc.

References full, reco::ParticleMasses::kPlus, label, and dumpparser::parse().

37  {
38  using namespace boost::spirit;
39 
40  Rule_1 label = ((+alnum_p) >> *ch_p(':') >> *ch_p('_') >> *alnum_p)[push_back_a(oStrings)];
41  Rule_1 conj = (ch_p('@') >> !((ch_p('b') >> ch_p('a') >> ch_p('r')[ModeSetter(oStrings, ConjInfo::kBar)]) |
42  ch_p('+')[ModeSetter(oStrings, ConjInfo::kPlus)] |
43  ch_p('-')[ModeSetter(oStrings, ConjInfo::kMinus)]));
44 
45  return parse(iValue.c_str(), ((label >> !conj) % blank_p), nothing_p).full;
46  }
rule< ScannerUsed_1 > Rule_1
Definition: decayParser.cc:35
const double kPlus
Definition: ParticleMasses.h:8
char const * label
Definition: GenABIO.cc:168
def parse(path, config)
Definition: dumpparser.py:13
bool cand::parser::decayParser ( const std::string &  iValue,
std::vector< ConjInfo > &  oStrings 
)
std::ostream& cand::parser::operator<< ( std::ostream &  out,
const ConjInfo info 
)
inline

Definition at line 43 of file decayParser.h.

References decayParser(), edm::InputTag::encode(), cand::parser::ConjInfo::kBar, cand::parser::ConjInfo::kPlus, cand::parser::ConjInfo::mode_, AlCaHLTBitMon_QueryRunRegistry::string, and cand::parser::ConjInfo::tag_.

43  {
44  return out << info.tag_.encode() << " "
45  << (0 == info.mode_
46  ? "p"
47  : (info.mode_ == ConjInfo::kBar ? "b" : (info.mode_ == ConjInfo::kPlus ? "+" : "-")));
48  }
static const TGPicture * info(bool iBackgroundIsBlack)
const double kPlus
Definition: ParticleMasses.h:8