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()
40  ? true
42  ? false
43  : a.moduleLabel() < b.moduleLabel()
44  ? true
45  : a.moduleLabel() > b.moduleLabel()
46  ? false
48  ? true
50  ? false
51  : a.processName() < b.processName() ? true : false;
52  }
53 
54  inline bool operator==(BranchKey const& a, BranchKey const& b) { return !(a < b || b < a); }
55 
56  inline bool operator!=(BranchKey const& a, BranchKey const& b) { return !(a == b); }
57 
58  std::ostream& operator<<(std::ostream& os, BranchKey const& bk);
59 } // namespace edm
60 #endif
bool operator<(DetSet< T > const &x, DetSet< T > const &y)
Definition: DetSet.h:90
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 & processName() const
Definition: BranchKey.h:29
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &) noexcept
std::string moduleLabel_
Definition: BranchKey.h:33
std::string processName_
Definition: BranchKey.h:35
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &) noexcept
std::string const & moduleLabel() const
Definition: BranchKey.h:27
double b
Definition: hdecay.h:118
std::string const & productInstanceName() const
Definition: BranchKey.h:28
HLT enums.
double a
Definition: hdecay.h:119
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.