LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
art::BranchID Class Reference

#include "BranchID.h"

Classes

struct  Hash
 

Public Types

typedef unsigned int value_type
 

Public Member Functions

 BranchID ()=default
 
 BranchID (std::string const &branchName)
 
 BranchID (value_type const id)
 
void setID (std::string const &branchName)
 
unsigned int id () const
 
bool isValid () const
 
bool operator< (BranchID const &rh) const
 
bool operator> (BranchID const &rh) const
 
bool operator== (BranchID const &rh) const
 
bool operator!= (BranchID const &rh) const
 

Static Private Member Functions

static value_type toID (std::string const &branchName)
 

Private Attributes

value_type id_ {}
 

Detailed Description

Definition at line 15 of file BranchID.h.

Member Typedef Documentation

typedef unsigned int art::BranchID::value_type

Definition at line 17 of file BranchID.h.

Constructor & Destructor Documentation

art::BranchID::BranchID ( )
default
art::BranchID::BranchID ( std::string const &  branchName)
inlineexplicit

Definition at line 20 of file BranchID.h.

References toID().

21  : BranchID{toID(branchName)}
22  {}
static value_type toID(std::string const &branchName)
Definition: BranchID.cc:9
BranchID()=default
art::BranchID::BranchID ( value_type const  id)
inlineexplicit

Definition at line 23 of file BranchID.h.

23 : id_{id} {}
value_type id_
Definition: BranchID.h:73

Member Function Documentation

unsigned int art::BranchID::id ( ) const
inline

Definition at line 31 of file BranchID.h.

References id_.

Referenced by art::BranchID::Hash::operator()().

32  {
33  return id_;
34  }
value_type id_
Definition: BranchID.h:73
bool art::BranchID::isValid ( ) const
inline

Definition at line 36 of file BranchID.h.

References id_.

37  {
38  return id_ != 0;
39  }
value_type id_
Definition: BranchID.h:73
bool art::BranchID::operator!= ( BranchID const &  rh) const
inline

Definition at line 57 of file BranchID.h.

References id_.

58  {
59  return id_ != rh.id_;
60  }
value_type id_
Definition: BranchID.h:73
bool art::BranchID::operator< ( BranchID const &  rh) const
inline

Definition at line 42 of file BranchID.h.

References id_.

43  {
44  return id_ < rh.id_;
45  }
value_type id_
Definition: BranchID.h:73
bool art::BranchID::operator== ( BranchID const &  rh) const
inline

Definition at line 52 of file BranchID.h.

References id_.

53  {
54  return id_ == rh.id_;
55  }
value_type id_
Definition: BranchID.h:73
bool art::BranchID::operator> ( BranchID const &  rh) const
inline

Definition at line 47 of file BranchID.h.

References id_.

48  {
49  return id_ > rh.id_;
50  }
value_type id_
Definition: BranchID.h:73
void art::BranchID::setID ( std::string const &  branchName)
inline

Definition at line 26 of file BranchID.h.

References id_, and toID().

27  {
28  id_ = toID(branchName);
29  }
value_type id_
Definition: BranchID.h:73
static value_type toID(std::string const &branchName)
Definition: BranchID.cc:9
BranchID::value_type art::BranchID::toID ( std::string const &  branchName)
staticprivate

Definition at line 9 of file BranchID.cc.

Referenced by BranchID(), art::BranchID::Hash::operator()(), and setID().

10  {
11  auto const& check = cet::crc32{branchName}.digest();
12  mf::LogDebug("BranchID") << "Product created with branch id: "
13  << "[" << check << "] "
14  << "from branch name: "
15  << "\"" << branchName << "\"";
16  return check;
17  }
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug

Member Data Documentation

value_type art::BranchID::id_ {}
private

Definition at line 73 of file BranchID.h.

Referenced by id(), isValid(), operator!=(), operator<(), operator==(), operator>(), and setID().


The documentation for this class was generated from the following files: