CMS 3D CMS Logo

decayParser.h
Go to the documentation of this file.
1 #ifndef CANDCOMBINER_DECAYPARSER_H
2 #define CANDCOMBINER_DECAYPARSER_H
3 // -*- C++ -*-
4 //
5 // Package: CandCombiner
6 // Class : decayParser
7 //
16 //
17 // Original Author:
18 // Created: Sun Aug 7 20:26:36 EDT 2005
19 // $Id: decayParser.h,v 1.2 2009/05/08 12:54:34 llista Exp $
20 //
21 
22 // system include files
23 
24 // user include files
25 #include <vector>
26 #include <iostream>
27 #include <string>
29 
30 // forward declarations
31 
32 namespace cand {
33  namespace parser {
34  struct ConjInfo {
38  ConjInfo(const char* begin, const char* end) : mode_(kPrimary), tag_(std::string(begin, end)) {}
39  };
40 
41  inline std::ostream& operator<<(std::ostream& out, const ConjInfo& info) {
42  return out << info.tag_.encode() << " "
43  << (0 == info.mode_
44  ? "p"
45  : (info.mode_ == ConjInfo::kBar ? "b" : (info.mode_ == ConjInfo::kPlus ? "+" : "-")));
46  }
47 
48  bool decayParser(const std::string& iValue, std::vector<ConjInfo>& oStrings);
49  } // namespace parser
50 } // namespace cand
51 
52 #endif /* CANDCOMBINER_DECAYPARSER_H */
ConjInfo(const std::string &tag)
Definition: decayParser.h:37
static const TGPicture * info(bool iBackgroundIsBlack)
std::ostream & operator<<(std::ostream &out, const ConjInfo &info)
Definition: decayParser.h:41
edm::InputTag tag_
Definition: decayParser.h:36
enum cand::parser::ConjInfo::Mode mode_
ConjInfo(const char *begin, const char *end)
Definition: decayParser.h:38
bool decayParser(const std::string &iValue, std::vector< ConjInfo > &oStrings)