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& processName() const {return ptr_->processName();}
00036 BranchID const& branchID() const {return ptr_->branchID();}
00037 std::string const& fullClassName() const {return ptr_->fullClassName();}
00038 std::string const& className() const {return ptr_->fullClassName();}
00039 std::string const& friendlyClassName() const {return ptr_->friendlyClassName();}
00040 std::string const& productInstanceName() const {return ptr_->productInstanceName();}
00041 bool const& produced() const {return ptr_->produced();}
00042 bool const& dropped() const {return ptr_->dropped();}
00043 bool const& onDemand() const {return ptr_->onDemand();}
00044 bool present() const {return ptr_->present();}
00045 bool const& transient() const {return ptr_->transient();}
00046 Reflex::Type const& type() const {return ptr_->type();}
00047 TypeID const& typeID() const {return ptr_->typeID();}
00048 int const& splitLevel() const {return ptr_->splitLevel();}
00049 int const& basketSize() const {return ptr_->basketSize();}
00050
00051 ParameterSetID const& parameterSetID() const {return ptr_->parameterSetID();}
00052 std::map<ProcessConfigurationID, ParameterSetID> const& parameterSetIDs() const {return ptr_->parameterSetIDs();}
00053 ParameterSetID const& psetID() const {return ptr_->psetID();}
00054 bool isPsetIDUnique() const {return ptr_->parameterSetIDs().size() == 1;}
00055 std::set<std::string> const& branchAliases() const {return ptr_->branchAliases();}
00056 std::string const& branchName() const {return ptr_->branchName();}
00057 BranchType const& branchType() const {return ptr_->branchType();}
00058 std::string const& wrappedName() const {return ptr_->wrappedName();}
00059
00060 BranchDescription const& me() const {return *ptr_;}
00061
00062 private:
00063 boost::shared_ptr<BranchDescription> ptr_;
00064 };
00065
00066 inline
00067 std::ostream&
00068 operator<<(std::ostream& os, ConstBranchDescription const& p) {
00069 os << p.me();
00070 return os;
00071 }
00072
00073 inline
00074 bool operator<(ConstBranchDescription const& a, ConstBranchDescription const& b) {
00075 return a.me() < b.me();
00076 }
00077
00078 inline
00079 bool operator==(ConstBranchDescription const& a, ConstBranchDescription const& b) {
00080 return a.me() == b.me();
00081 }
00082
00083 inline
00084 std::string match(ConstBranchDescription const& a,
00085 ConstBranchDescription const& b,
00086 std::string const& fileName,
00087 BranchDescription::MatchMode m) {
00088 return match(a.me(), b.me(), fileName, m);
00089 }
00090 }
00091 #endif