LArSoft  v06_85_00
Liquid Argon Software toolkit - http://larsoft.org/
art::ProductID Class Reference

#include "ProductID.h"

Classes

struct  Hash
 

Public Types

using value_type = unsigned int
 

Public Member Functions

 ProductID ()=default
 
 ProductID (std::string const &canonicalProductName)
 
 ProductID (value_type const value)
 
void setID (std::string const &canonicalProductName)
 
bool isValid () const
 
auto value () const
 
bool operator< (ProductID const rh) const
 
bool operator> (ProductID const rh) const
 
bool operator== (ProductID const rh) const
 
bool operator!= (ProductID const rh) const
 

Static Public Member Functions

static ProductID invalid ()
 

Static Private Member Functions

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

Private Attributes

value_type value_ {0u}
 

Friends

class ProductIDStreamer
 

Detailed Description

Definition at line 16 of file ProductID.h.

Member Typedef Documentation

using art::ProductID::value_type = unsigned int

Definition at line 18 of file ProductID.h.

Constructor & Destructor Documentation

art::ProductID::ProductID ( )
default
art::ProductID::ProductID ( std::string const &  canonicalProductName)
explicit

Definition at line 10 of file ProductID.cc.

References toID().

12  {}
ProductID()=default
std::string canonicalProductName(std::string const &friendlyClassName, std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName)
static value_type toID(std::string const &branchName)
Definition: ProductID.cc:21
art::ProductID::ProductID ( value_type const  value)
explicit

Definition at line 8 of file ProductID.cc.

8 : value_{value} {}
auto value() const
Definition: ProductID.h:38
value_type value_
Definition: ProductID.h:79

Member Function Documentation

static ProductID art::ProductID::invalid ( )
inlinestatic

Definition at line 25 of file ProductID.h.

References art::canonicalProductName(), and setID().

26  {
27  return ProductID{};
28  }
ProductID()=default
bool art::ProductID::isValid ( ) const
inline

Definition at line 33 of file ProductID.h.

References value_.

Referenced by art::BranchDescription::initProductID_(), art::RefCore::isAvailable(), and art::RefCore::isNonnull().

34  {
35  return value_ != 0u;
36  }
value_type value_
Definition: ProductID.h:79
bool art::ProductID::operator!= ( ProductID const  rh) const
inline

Definition at line 59 of file ProductID.h.

60  {
61  return !(*this == rh);
62  }
bool art::ProductID::operator< ( ProductID const  rh) const
inline

Definition at line 44 of file ProductID.h.

References value_.

45  {
46  return value_ < rh.value_;
47  }
value_type value_
Definition: ProductID.h:79
bool art::ProductID::operator== ( ProductID const  rh) const
inline

Definition at line 54 of file ProductID.h.

References value_.

55  {
56  return value_ == rh.value_;
57  }
value_type value_
Definition: ProductID.h:79
bool art::ProductID::operator> ( ProductID const  rh) const
inline

Definition at line 49 of file ProductID.h.

50  {
51  return rh < *this;
52  }
void art::ProductID::setID ( std::string const &  canonicalProductName)

Definition at line 15 of file ProductID.cc.

References toID(), and value_.

Referenced by art::BranchDescription::initProductID_(), and invalid().

16  {
18  }
std::string canonicalProductName(std::string const &friendlyClassName, std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName)
static value_type toID(std::string const &branchName)
Definition: ProductID.cc:21
value_type value_
Definition: ProductID.h:79
ProductID::value_type art::ProductID::toID ( std::string const &  branchName)
staticprivate

Definition at line 21 of file ProductID.cc.

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

22  {
23  auto const& check = cet::crc32{canonicalProductName}.digest();
24  mf::LogDebug("ProductID") << "Product created with id: "
25  << "[" << check << "] "
26  << "from canonical product name: "
27  << "\"" << canonicalProductName << "\"";
28  return check;
29  }
std::string canonicalProductName(std::string const &friendlyClassName, std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName)
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
auto art::ProductID::value ( ) const
inline

Definition at line 38 of file ProductID.h.

References value_.

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

39  {
40  return value_;
41  }
value_type value_
Definition: ProductID.h:79

Friends And Related Function Documentation

friend class ProductIDStreamer
friend

Definition at line 75 of file ProductID.h.

Member Data Documentation

value_type art::ProductID::value_ {0u}
private

Definition at line 79 of file ProductID.h.

Referenced by isValid(), operator<(), operator==(), setID(), and value().


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