CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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>
28 #include <boost/spirit/include/classic_core.hpp>
29 #include <boost/spirit/include/classic_push_back_actor.hpp>
31 
32 // forward declarations
33 
34 namespace cand {
35  namespace parser {
36  struct ConjInfo {
39  ConjInfo( const std::string& tag ) : mode_( kPrimary ), tag_( tag ) { }
40  ConjInfo( const char* begin, const char* end ) : mode_( kPrimary ), tag_( std::string( begin, end ) ) { }
41  };
42 
43  inline
44  std::ostream& operator<<(std::ostream& out, const ConjInfo& info ) {
45  return out << info.tag_ .encode() << " "
46  << ( 0 == info.mode_ ? "p" : ( info.mode_ == ConjInfo::kBar ? "b" : (info.mode_ == ConjInfo::kPlus ? "+" : "-" ) ) );
47  }
48 
49  bool decayParser( const std::string& iValue, std::vector<ConjInfo>& oStrings );
50  }
51 }
52 
53 #endif /* CANDCOMBINER_DECAYPARSER_H */
ConjInfo(const std::string &tag)
Definition: decayParser.h:39
static const TGPicture * info(bool iBackgroundIsBlack)
std::ostream & operator<<(std::ostream &out, const ConjInfo &info)
Definition: decayParser.h:44
std::string encode() const
Definition: InputTag.cc:164
edm::InputTag tag_
Definition: decayParser.h:38
enum cand::parser::ConjInfo::Mode mode_
#define end
Definition: vmac.h:37
tuple out
Definition: dbtoconf.py:99
ConjInfo(const char *begin, const char *end)
Definition: decayParser.h:40
bool decayParser(const std::string &iValue, std::vector< ConjInfo > &oStrings)
#define begin
Definition: vmac.h:30