Go to the documentation of this file.00001 #ifndef DataFormats_Provenance_ConstBranchDescription_h
00002 #define DataFormats_Provenance_ConstBranchDescription_h
00003
00004
00005
00006
00007
00008
00009
00010
00011 #include <iosfwd>
00012 #include <string>
00013 #include <map>
00014 #include <set>
00015
00016 #include "boost/shared_ptr.hpp"
00017
00018 #include "DataFormats/Provenance/interface/BranchDescription.h"
00019
00020
00021
00022
00023
00024 namespace edm {
00025 class ConstBranchDescription {
00026 public:
00027 explicit ConstBranchDescription(BranchDescription const& bd) :
00028 ptr_(new BranchDescription(bd)) {}
00029
00030 void init() const {ptr_->init();}
00031
00032 void write(std::ostream& os) const {ptr_->write(os);}
00033
00034 std::string const& moduleLabel() const {return ptr_->moduleLabel();}
00035 std::string const& moduleName() const {return ptr_->moduleName();}
00036 std::string const& processName() const {return ptr_->processName();}
00037 BranchID const& branchID() const {return ptr_->branchID();}
00038 bool isAlias() const {return ptr_->isAlias();}
00039 BranchID const& originalBranchID() const {return ptr_->originalBranchID();}
00040 std::string const& fullClassName() const {return ptr_->fullClassName();}
00041 std::string const& className() const {return ptr_->fullClassName();}
00042 std::string const& friendlyClassName() const {return ptr_->friendlyClassName();}
00043 std::string const& productInstanceName() const {return ptr_->productInstanceName();}
00044 bool const& produced() const {return ptr_->produced();}
00045 bool const& dropped() const {return ptr_->dropped();}
00046 bool const& onDemand() const {return ptr_->onDemand();}
00047 bool present() const {return ptr_->present();}
00048 bool const& transient() const {return ptr_->transient();}
00049 TypeWithDict const& wrappedType() const {return ptr_->wrappedType();}
00050 TypeWithDict const& unwrappedType() const {return ptr_->unwrappedType();}
00051 TypeID wrappedTypeID() const {return ptr_->wrappedTypeID();}
00052 TypeID unwrappedTypeID() const {return ptr_->unwrappedTypeID();}
00053 int const& splitLevel() const {return ptr_->splitLevel();}
00054 int const& basketSize() const {return ptr_->basketSize();}
00055
00056 ParameterSetID const& parameterSetID() const {return ptr_->parameterSetID();}
00057 std::map<ProcessConfigurationID, ParameterSetID> const& parameterSetIDs() const {return ptr_->parameterSetIDs();}
00058 ParameterSetID const& psetID() const {return ptr_->psetID();}
00059 bool isPsetIDUnique() const {return ptr_->parameterSetIDs().size() == 1;}
00060 std::set<std::string> const& branchAliases() const {return ptr_->branchAliases();}
00061 std::string const& branchName() const {return ptr_->branchName();}
00062 BranchType const& branchType() const {return ptr_->branchType();}
00063 std::string const& wrappedName() const {return ptr_->wrappedName();}
00064 WrapperInterfaceBase const* getInterface() const {return ptr_->getInterface();}
00065
00066 BranchDescription const& me() const {return *ptr_;}
00067
00068 private:
00069 boost::shared_ptr<BranchDescription> ptr_;
00070 };
00071
00072 inline
00073 std::ostream&
00074 operator<<(std::ostream& os, ConstBranchDescription const& p) {
00075 os << p.me();
00076 return os;
00077 }
00078
00079 inline
00080 bool operator<(ConstBranchDescription const& a, ConstBranchDescription const& b) {
00081 return a.me() < b.me();
00082 }
00083
00084 inline
00085 bool operator==(ConstBranchDescription const& a, ConstBranchDescription const& b) {
00086 return a.me() == b.me();
00087 }
00088
00089 inline
00090 std::string match(ConstBranchDescription const& a,
00091 ConstBranchDescription const& b,
00092 std::string const& fileName,
00093 BranchDescription::MatchMode m) {
00094 return match(a.me(), b.me(), fileName, m);
00095 }
00096 }
00097 #endif