Classes | Public Types | Public Member Functions | Static Private Member Functions | Private Attributes | List of all members
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
 
 operator std::size_t () 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 16 of file BranchID.h.

Member Typedef Documentation

typedef unsigned int art::BranchID::value_type

Definition at line 18 of file BranchID.h.

Constructor & Destructor Documentation

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

Definition at line 21 of file BranchID.h.

22  : BranchID{toID(branchName)}
23  {}
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 24 of file BranchID.h.

24 : id_{id} {}
value_type id_
Definition: BranchID.h:81

Member Function Documentation

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

Definition at line 32 of file BranchID.h.

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

Definition at line 37 of file BranchID.h.

38  {
39  return id_ != 0;
40  }
value_type id_
Definition: BranchID.h:81
art::BranchID::operator std::size_t ( ) const
inlineexplicit

Definition at line 44 of file BranchID.h.

45  {
46  return static_cast<std::size_t>(id_);
47  }
value_type id_
Definition: BranchID.h:81
bool art::BranchID::operator!= ( BranchID const &  rh) const
inline

Definition at line 65 of file BranchID.h.

66  {
67  return id_ != rh.id_;
68  }
value_type id_
Definition: BranchID.h:81
bool art::BranchID::operator< ( BranchID const &  rh) const
inline

Definition at line 50 of file BranchID.h.

51  {
52  return id_ < rh.id_;
53  }
value_type id_
Definition: BranchID.h:81
bool art::BranchID::operator== ( BranchID const &  rh) const
inline

Definition at line 60 of file BranchID.h.

61  {
62  return id_ == rh.id_;
63  }
value_type id_
Definition: BranchID.h:81
bool art::BranchID::operator> ( BranchID const &  rh) const
inline

Definition at line 55 of file BranchID.h.

56  {
57  return id_ > rh.id_;
58  }
value_type id_
Definition: BranchID.h:81
void art::BranchID::setID ( std::string const &  branchName)
inline

Definition at line 27 of file BranchID.h.

28  {
29  id_ = toID(branchName);
30  }
value_type id_
Definition: BranchID.h:81
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.

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  }
bool check(const std::vector< std::vector< float > > &outputs)
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
constexpr digest_t digest() const
Definition: crc32.h:138

Member Data Documentation

value_type art::BranchID::id_ {}
private

Definition at line 81 of file BranchID.h.


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