CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
Typedefs | Functions
edm::hash_detail Namespace Reference

Typedefs

typedef std::string value_type
 

Functions

value_type compactForm_ (value_type const &hash)
 
void fixup_ (value_type &hash)
 
bool isCompactForm_ (value_type const &hash)
 
bool isValid_ (value_type const &hash)
 
std::ostream & print_ (std::ostream &os, value_type const &hash)
 
void throwIfIllFormed (value_type const &hash)
 
void toString_ (std::string &result, value_type const &hash)
 

Typedef Documentation

typedef std::string edm::hash_detail::value_type

Definition at line 25 of file Hash.h.

Function Documentation

value_type edm::hash_detail::compactForm_ ( value_type const &  hash)

Definition at line 17 of file Hash.cc.

References fixup_(), cond::hash, isCompactForm_(), and cond::rpcobtemp::temp.

Referenced by edm::Hash< I >::compactForm().

17  {
18  if (isCompactForm_(hash)) {
19  return hash;
20  }
22  fixup_(temp);
23  return temp;
24  }
bool isCompactForm_(value_type const &hash)
Definition: Hash.cc:55
void fixup_(value_type &hash)
Definition: Hash.cc:30
Container::value_type value_type
void edm::hash_detail::fixup_ ( value_type &  hash)

Definition at line 30 of file Hash.cc.

References cms::MD5Result::compactForm(), edm::hlt::Exception, cms::MD5Result::fromHexifiedString(), edm::errors::LogicError, and cond::rpcobtemp::temp.

Referenced by compactForm_(), edm::Hash< I >::Hash(), edm::Hash< I >::operator=(), print_(), edm::Vector< T >::swap(), edm::OwnVector< T, P >::swap(), and toString_().

30  {
31  switch (hash.size()) {
32  case 16: {
33  break;
34  }
35  case 32: {
38  hash = temp.compactForm();
39  break;
40  }
41  case 0: {
43  << "Empty edm::Hash<> instance:\n" << "\nPlease report this to the core framework developers";
44  }
45  default: {
47  << "edm::Hash<> instance with data in illegal state:\n"
48  << hash
49  << "\nPlease report this to the core framework developers";
50  }
51  }
52  }
void fromHexifiedString(std::string const &s)
Definition: Digest.cc:111
std::string compactForm() const
Definition: Digest.cc:102
bool edm::hash_detail::isCompactForm_ ( value_type const &  hash)

Definition at line 55 of file Hash.cc.

Referenced by compactForm_(), edm::Hash< EntryDescriptionType >::compareUsing(), edm::Hash< I >::isCompactForm(), and isValid_().

55  {
56  return 16 == hash.size();
57  }
bool edm::hash_detail::isValid_ ( value_type const &  hash)

Definition at line 60 of file Hash.cc.

References edm::detail::InvalidHash(), and isCompactForm_().

Referenced by edm::Hash< I >::isValid().

60  {
61  return isCompactForm_(hash) ? (hash != detail::InvalidHash()) : (!hash.empty());
62  }
bool isCompactForm_(value_type const &hash)
Definition: Hash.cc:55
std::string const & InvalidHash()
Definition: Hash.cc:9
std::ostream & edm::hash_detail::print_ ( std::ostream &  os,
value_type const &  hash 
)

Definition at line 84 of file Hash.cc.

References cms::MD5Result::bytes, edm::copy_all(), fixup_(), cond::rpcobtemp::temp, and cms::MD5Result::toString().

Referenced by EcalTPGAnalyzer::analyze(), EcalTPGAnalyzer::EcalTPGAnalyzer(), and edm::Hash< I >::print().

84  {
85  value_type temp1(hash);
86  fixup_(temp1);
88  copy_all(temp1, temp.bytes);
89  os << temp.toString();
90  return os;
91  }
void fixup_(value_type &hash)
Definition: Hash.cc:30
unsigned char bytes[16]
Definition: Digest.h:21
Container::value_type value_type
std::string toString() const
Definition: Digest.cc:87
Func copy_all(ForwardSequence &s, Func f)
wrappers for copy
Definition: Algorithms.h:24
void edm::hash_detail::throwIfIllFormed ( value_type const &  hash)

Definition at line 65 of file Hash.cc.

References edm::hlt::Exception, and edm::errors::LogicError.

65  {
66  // Fixup not needed here.
67  if (hash.size() % 2 == 1) {
69  << "Ill-formed Hash instance. "
70  << "Please report this to the core framework developers";
71  }
72  }
void edm::hash_detail::toString_ ( std::string &  result,
value_type const &  hash 
)

Definition at line 75 of file Hash.cc.

References cms::MD5Result::bytes, edm::copy_all(), fixup_(), cond::rpcobtemp::temp, and cms::MD5Result::toString().

Referenced by edm::Hash< I >::toString().

75  {
76  value_type temp1(hash);
77  fixup_(temp1);
79  copy_all(temp1, temp.bytes);
80  result += temp.toString();
81  }
void fixup_(value_type &hash)
Definition: Hash.cc:30
unsigned char bytes[16]
Definition: Digest.h:21
tuple result
Definition: query.py:137
Container::value_type value_type
std::string toString() const
Definition: Digest.cc:87
Func copy_all(ForwardSequence &s, Func f)
wrappers for copy
Definition: Algorithms.h:24