CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
ConstBranchDescription.h
Go to the documentation of this file.
1 #ifndef DataFormats_Provenance_ConstBranchDescription_h
2 #define DataFormats_Provenance_ConstBranchDescription_h
3 
4 /*----------------------------------------------------------------------
5 
6 ConstBranchDescription: A class containing a constant shareable branch description
7 that is inexpensive to copy.
8 This class is not persistable.
9 
10 ----------------------------------------------------------------------*/
11 #include <iosfwd>
12 #include <string>
13 #include <map>
14 #include <set>
15 
16 #include "boost/shared_ptr.hpp"
17 
19 
20 /*
21  ConstBranchDescription
22 */
23 
24 namespace edm {
26  public:
28  ptr_(new BranchDescription(bd)) {}
29 
30  void init() const {ptr_->init();}
31 
32  void write(std::ostream& os) const {ptr_->write(os);}
33 
34  std::string const& moduleLabel() const {return ptr_->moduleLabel();}
35  std::string const& processName() const {return ptr_->processName();}
36  BranchID const& branchID() const {return ptr_->branchID();}
37  std::string const& fullClassName() const {return ptr_->fullClassName();}
38  std::string const& className() const {return ptr_->fullClassName();}
39  std::string const& friendlyClassName() const {return ptr_->friendlyClassName();}
40  std::string const& productInstanceName() const {return ptr_->productInstanceName();}
41  bool const& produced() const {return ptr_->produced();}
42  bool const& dropped() const {return ptr_->dropped();}
43  bool const& onDemand() const {return ptr_->onDemand();}
44  bool present() const {return ptr_->present();}
45  bool const& transient() const {return ptr_->transient();}
46  Reflex::Type const& type() const {return ptr_->type();}
47  TypeID const& typeID() const {return ptr_->typeID();}
48  int const& splitLevel() const {return ptr_->splitLevel();}
49  int const& basketSize() const {return ptr_->basketSize();}
50 
51  ParameterSetID const& parameterSetID() const {return ptr_->parameterSetID();}
52  std::map<ProcessConfigurationID, ParameterSetID> const& parameterSetIDs() const {return ptr_->parameterSetIDs();}
53  ParameterSetID const& psetID() const {return ptr_->psetID();}
54  bool isPsetIDUnique() const {return ptr_->parameterSetIDs().size() == 1;}
55  std::set<std::string> const& branchAliases() const {return ptr_->branchAliases();}
56  std::string const& branchName() const {return ptr_->branchName();}
57  BranchType const& branchType() const {return ptr_->branchType();}
58  std::string const& wrappedName() const {return ptr_->wrappedName();}
59 
60  BranchDescription const& me() const {return *ptr_;}
61 
62  private:
63  boost::shared_ptr<BranchDescription> ptr_;
64  };
65 
66  inline
67  std::ostream&
68  operator<<(std::ostream& os, ConstBranchDescription const& p) {
69  os << p.me();
70  return os;
71  }
72 
73  inline
75  return a.me() < b.me();
76  }
77 
78  inline
80  return a.me() == b.me();
81  }
82 
83  inline
84  std::string match(ConstBranchDescription const& a,
86  std::string const& fileName,
88  return match(a.me(), b.me(), fileName, m);
89  }
90 }
91 #endif
std::string const & processName() const
bool operator<(DetSet< T > const &x, DetSet< T > const &y)
Definition: DetSet.h:89
std::string const & wrappedName() const
BranchDescription const & me() const
Reflex::Type const & type() const
std::string const & friendlyClassName() const
std::string match(BranchDescription const &a, BranchDescription const &b, std::string const &fileName, BranchDescription::MatchMode m)
ParameterSetID const & psetID() const
BranchType
Definition: BranchType.h:11
std::set< std::string > const & branchAliases() const
void write(std::ostream &os) const
std::string const & productInstanceName() const
std::map< ProcessConfigurationID, ParameterSetID > const & parameterSetIDs() const
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &)
BranchID const & branchID() const
ParameterSetID const & parameterSetID() const
std::string const & fullClassName() const
std::string const & className() const
boost::shared_ptr< BranchDescription > ptr_
double b
Definition: hdecay.h:120
TypeID const & typeID() const
BranchType const & branchType() const
std::string const & branchName() const
double a
Definition: hdecay.h:121
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
ConstBranchDescription(BranchDescription const &bd)
std::string const & moduleLabel() const