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
41  : a.friendlyClassName() > b.friendlyClassName()
42  ? false
43  : a.moduleLabel() < b.moduleLabel()
44  ? true
45  : a.moduleLabel() > b.moduleLabel()
46  ? false
47  : a.productInstanceName() < b.productInstanceName()
48  ? true
49  : a.productInstanceName() > b.productInstanceName()
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
funct::false
false
Definition: Factorize.h:29
edm::BranchKey::processName
std::string const & processName() const
Definition: BranchKey.h:29
edm::BranchKey::productInstanceName_
std::string productInstanceName_
Definition: BranchKey.h:34
edm
HLT enums.
Definition: AlignableModifier.h:19
edm::BranchKey::friendlyClassName
std::string const & friendlyClassName() const
Definition: BranchKey.h:26
bk
Definition: Breakpoints.cc:13
edm::BranchKey::BranchKey
BranchKey()
Definition: BranchKey.h:19
edm::BranchKey::friendlyClassName_
std::string friendlyClassName_
Definition: BranchKey.h:32
edm::BranchKey::BranchKey
BranchKey(std::string const &cn, std::string const &ml, std::string const &pin, std::string const &pn)
Definition: BranchKey.h:21
edm::operator<<
std::ostream & operator<<(std::ostream &ost, const HLTGlobalStatus &hlt)
Formatted printout of trigger tbale.
Definition: HLTGlobalStatus.h:106
edm::operator!=
bool operator!=(debugging_allocator< X > const &, debugging_allocator< Y > const &) noexcept
Definition: debugging_allocator.h:75
edm::operator==
bool operator==(debugging_allocator< X > const &, debugging_allocator< Y > const &) noexcept
Definition: debugging_allocator.h:72
edm::BranchKey::moduleLabel_
std::string moduleLabel_
Definition: BranchKey.h:33
edm::operator<
bool operator<(DetSet< T > const &x, DetSet< T > const &y)
Definition: DetSet.h:89
edm::BranchKey::productInstanceName
std::string const & productInstanceName() const
Definition: BranchKey.h:28
b
double b
Definition: hdecay.h:118
edm::BranchKey::moduleLabel
std::string const & moduleLabel() const
Definition: BranchKey.h:27
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
funct::true
true
Definition: Factorize.h:173
a
double a
Definition: hdecay.h:119
edm_modernize_messagelogger.ml
ml
Definition: edm_modernize_messagelogger.py:25
edm::BranchKey::processName_
std::string processName_
Definition: BranchKey.h:35
submitPVResolutionJobs.desc
string desc
Definition: submitPVResolutionJobs.py:251
edm::BranchDescription
Definition: BranchDescription.h:32
edm::BranchKey
Definition: BranchKey.h:17