CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
KeyedElement.h
Go to the documentation of this file.
4 #include <sstream>
5 
6 namespace cond {
7 
8  /* encapsulate data to write a keyed element in an IOVSequence
9  */
10  class KeyedElement {
11  public:
12  // constructor from int key
14  std::ostringstream ss;
15  ss << key;
16  m_skey = ss.str();
17  (*obj).setKey(m_skey);
18  }
19 
20  // constructor from ascii key
22  (*obj).setKey(m_skey);
23  }
24 
25  static cond::Time_t convert(std::string key) { return cond::hash64((unsigned char*)(&key[0]), key.size(), 0); }
26 
30  };
31 
32 } // namespace cond
unsigned long long hash64(unsigned char *k, unsigned long long length, unsigned long long level)
Definition: hash64.cc:68
KeyedElement(BaseKeyed *obj, cond::Time_t key)
Definition: KeyedElement.h:13
BaseKeyed * m_obj
Definition: KeyedElement.h:27
unsigned long long Time_t
Definition: Time.h:14
tuple key
prepare the HTCondor submission files and eventually submit them
static cond::Time_t convert(std::string key)
Definition: KeyedElement.h:25
std::string m_skey
Definition: KeyedElement.h:28
cond::Time_t m_key
Definition: KeyedElement.h:29
KeyedElement(BaseKeyed *obj, std::string key)
Definition: KeyedElement.h:21