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& moduleName() const {return ptr_->moduleName();}
36  std::string const& processName() const {return ptr_->processName();}
37  BranchID const& branchID() const {return ptr_->branchID();}
38  bool isAlias() const {return ptr_->isAlias();}
39  BranchID const& originalBranchID() const {return ptr_->originalBranchID();}
40  std::string const& fullClassName() const {return ptr_->fullClassName();}
41  std::string const& className() const {return ptr_->fullClassName();}
42  std::string const& friendlyClassName() const {return ptr_->friendlyClassName();}
43  std::string const& productInstanceName() const {return ptr_->productInstanceName();}
44  bool const& produced() const {return ptr_->produced();}
45  bool const& dropped() const {return ptr_->dropped();}
46  bool const& onDemand() const {return ptr_->onDemand();}
47  bool present() const {return ptr_->present();}
48  bool const& transient() const {return ptr_->transient();}
49  TypeWithDict const& wrappedType() const {return ptr_->wrappedType();}
50  TypeWithDict const& unwrappedType() const {return ptr_->unwrappedType();}
51  TypeID wrappedTypeID() const {return ptr_->wrappedTypeID();}
52  TypeID unwrappedTypeID() const {return ptr_->unwrappedTypeID();}
53  int const& splitLevel() const {return ptr_->splitLevel();}
54  int const& basketSize() const {return ptr_->basketSize();}
55 
56  ParameterSetID const& parameterSetID() const {return ptr_->parameterSetID();}
57  std::map<ProcessConfigurationID, ParameterSetID> const& parameterSetIDs() const {return ptr_->parameterSetIDs();}
58  ParameterSetID const& psetID() const {return ptr_->psetID();}
59  bool isPsetIDUnique() const {return ptr_->parameterSetIDs().size() == 1;}
60  std::set<std::string> const& branchAliases() const {return ptr_->branchAliases();}
61  std::string const& branchName() const {return ptr_->branchName();}
62  BranchType const& branchType() const {return ptr_->branchType();}
63  std::string const& wrappedName() const {return ptr_->wrappedName();}
64  WrapperInterfaceBase const* getInterface() const {return ptr_->getInterface();}
65 
66  BranchDescription const& me() const {return *ptr_;}
67 
68  private:
69  boost::shared_ptr<BranchDescription> ptr_;
70  };
71 
72  inline
73  std::ostream&
74  operator<<(std::ostream& os, ConstBranchDescription const& p) {
75  os << p.me();
76  return os;
77  }
78 
79  inline
81  return a.me() < b.me();
82  }
83 
84  inline
86  return a.me() == b.me();
87  }
88 
89  inline
92  std::string const& fileName,
94  return match(a.me(), b.me(), fileName, m);
95  }
96 }
97 #endif
std::string const & processName() const
bool operator<(DetSet< T > const &x, DetSet< T > const &y)
Definition: DetSet.h:91
TypeWithDict const & unwrappedType() const
std::string const & wrappedName() const
BranchDescription const & me() const
BranchID const & originalBranchID() 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::string const & moduleName() const
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
WrapperInterfaceBase const * getInterface() 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
BranchType const & branchType() const
std::string const & branchName() const
double a
Definition: hdecay.h:121
TypeWithDict const & wrappedType() const
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
ConstBranchDescription(BranchDescription const &bd)
std::string const & moduleLabel() const