LArSoft  v07_13_02
Liquid Argon Software toolkit - http://larsoft.org/
ProductID.cc
Go to the documentation of this file.
3 
4 #include <ostream>
5 
6 namespace art {
7 
8  ProductID::ProductID(value_type const value) : value_{value} {}
9 
11  : ProductID{toID(canonicalProductName)}
12  {}
13 
14  void
16  {
17  value_ = toID(canonicalProductName);
18  }
19 
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  }
30 
31  std::ostream&
32  operator<<(std::ostream& os, ProductID const id)
33  {
34  os << id.value();
35  return os;
36  }
37 }
std::ostream & operator<<(std::ostream &os, EDAnalyzer::Table< T > const &t)
Definition: EDAnalyzer.h:184
ProductID()=default
unsigned int value_type
Definition: ProductID.h:18
std::string canonicalProductName(std::string const &friendlyClassName, std::string const &moduleLabel, std::string const &productInstanceName, std::string const &processName)
void setID(std::string const &canonicalProductName)
Definition: ProductID.cc:15
static value_type toID(std::string const &branchName)
Definition: ProductID.cc:21
std::string value(boost::any const &)
value_type value_
Definition: ProductID.h:79
MaybeLogger_< ELseverityLevel::ELsev_success, false > LogDebug
HLT enums.