CMS 3D CMS Logo

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 *,
ScannerPolicy
ScannerUsed_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

typedef rule<ScannerUsed_1> cand::parser::Rule_1

Definition at line 40 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 38 of file decayParser.cc.

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

Definition at line 39 of file decayParser.cc.


Function Documentation

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

Definition at line 42 of file decayParser.cc.

References full, cand::parser::ConjInfo::kBar, cand::parser::ConjInfo::kMinus, cand::parser::ConjInfo::kPlus, label, and parse().

Referenced by reco::modules::CandCombinerBase::CandCombinerBase(), and reco::modules::NamedCandCombinerBase::NamedCandCombinerBase().

00042                                                                          {
00043       using namespace boost::spirit;
00044       
00045       Rule_1 label = ((+alnum_p) >> *ch_p(':') >> *ch_p('_') >>*alnum_p)[push_back_a(oStrings)];
00046       Rule_1 conj =  (ch_p('@') >> !((ch_p('b')>>ch_p('a')>>ch_p('r')[ModeSetter(oStrings,ConjInfo::kBar)] )| 
00047                                      ch_p('+')[ModeSetter(oStrings,ConjInfo::kPlus)] | 
00048                                      ch_p('-')[ModeSetter(oStrings,ConjInfo::kMinus)]) );
00049       
00050       return parse( iValue.c_str(),
00051                     (
00052                      (label >> ! conj)
00053                      % blank_p
00054                      )
00055                     ,
00056                     nothing_p).full;
00057     }

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 44 of file decayParser.h.

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

00044                                                                    {
00045       return out << info.tag_ .encode() << " " 
00046                  << ( 0 == info.mode_ ? "p" : ( info.mode_ == ConjInfo::kBar ? "b" : (info.mode_ == ConjInfo::kPlus ? "+" : "-" ) ) );
00047     }


Generated on Tue Jun 9 18:36:17 2009 for CMSSW by  doxygen 1.5.4