CMS 3D CMS Logo

BranchKey.h
Go to the documentation of this file.
1 #ifndef DataFormats_Provenance_BranchKey_h
2 #define DataFormats_Provenance_BranchKey_h
3 
4 /*----------------------------------------------------------------------
5 
6 BranchKey: The key used to identify a Product in the EventPrincipal. The
7 name of the branch to which the related data product will be written
8 is determined entirely from the BranchKey.
9 
10 ----------------------------------------------------------------------*/
11 #include <iosfwd>
12 #include <string>
13 
14 namespace edm {
15  class BranchDescription;
16 
17  class BranchKey {
18  public:
20 
21  BranchKey(std::string const& cn, std::string const& ml, std::string const& pin, std::string const& pn)
23 
24  explicit BranchKey(BranchDescription const& desc);
25 
27  std::string const& moduleLabel() const { return moduleLabel_; }
29  std::string const& processName() const { return processName_; }
30 
31  private:
36  };
37 
38  inline bool operator<(BranchKey const& a, BranchKey const& b) {
39  return a.friendlyClassName() < b.friendlyClassName() ? true
40  : a.friendlyClassName() > b.friendlyClassName() ? false
41  : a.moduleLabel() < b.moduleLabel() ? true
42  : a.moduleLabel() > b.moduleLabel() ? false
43  : a.productInstanceName() < b.productInstanceName() ? true
44  : a.productInstanceName() > b.productInstanceName() ? false
45  : a.processName() < b.processName() ? true
46  : false;
47  }
48 
49  inline bool operator==(BranchKey const& a, BranchKey const& b) { return !(a < b || b < a); }
50 
51  inline bool operator!=(BranchKey const& a, BranchKey const& b) { return !(a == b); }
52 
53  std::ostream& operator<<(std::ostream& os, BranchKey const& bk);
54 } // namespace edm
55 #endif
bool operator<(DetSet< T > const &x, DetSet< T > const &y)
Definition: DetSet.h:89
constexpr bool operator==(ELseverityLevel const &e1, ELseverityLevel const &e2) noexcept
BranchKey(std::string const &cn, std::string const &ml, std::string const &pin, std::string const &pn)
Definition: BranchKey.h:21
std::string const & friendlyClassName() const
Definition: BranchKey.h:26
std::string productInstanceName_
Definition: BranchKey.h:34
std::string friendlyClassName_
Definition: BranchKey.h:32
std::string const & moduleLabel() const
Definition: BranchKey.h:27
std::string moduleLabel_
Definition: BranchKey.h:33
constexpr bool operator!=(ELseverityLevel const &e1, ELseverityLevel const &e2) noexcept
std::string processName_
Definition: BranchKey.h:35
std::string const & productInstanceName() const
Definition: BranchKey.h:28
double b
Definition: hdecay.h:120
HLT enums.
double a
Definition: hdecay.h:121
std::string const & processName() const
Definition: BranchKey.h:29
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger table.