CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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  class ConstBranchDescription;
17 
18  struct BranchKey {
20  {}
21 
22  BranchKey(std::string const& cn, std::string const& ml,
23  std::string const& pin, std::string const& pn) :
24  friendlyClassName_(cn),
25  moduleLabel_(ml),
27  processName_(pn)
28  {}
29 
30  explicit BranchKey(BranchDescription const& desc);
31  explicit BranchKey(ConstBranchDescription const& desc);
32 
37  };
38 
39  inline
40  bool
41  operator<(BranchKey const& a, BranchKey const& b) {
42  return
45  a.moduleLabel_ < b.moduleLabel_ ? true :
46  a.moduleLabel_ > b.moduleLabel_ ? false :
49  a.processName_ < b.processName_ ? true :
50  false;
51  }
52 
53  inline
54  bool
55  operator==(BranchKey const& a, BranchKey const& b) {
56  return !(a < b || b < a);
57  }
58 
59  inline
60  bool
61  operator!=(BranchKey const& a, BranchKey const& b) {
62  return !(a == b);
63  }
64 
65  std::ostream&
66  operator<<(std::ostream& os, BranchKey const& bk);
67 }
68 #endif
bool operator<(DetSet< T > const &x, DetSet< T > const &y)
Definition: DetSet.h:91
BranchKey(std::string const &cn, std::string const &ml, std::string const &pin, std::string const &pn)
Definition: BranchKey.h:22
std::string processName_
Definition: BranchKey.h:36
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &)
std::string productInstanceName_
Definition: BranchKey.h:35
std::string moduleLabel_
Definition: BranchKey.h:34
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &)
double b
Definition: hdecay.h:120
std::string friendlyClassName_
Definition: BranchKey.h:33
double a
Definition: hdecay.h:121
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.