src
CondCore
DBOutputService
interface
KeyedElement.h
Go to the documentation of this file.
1
#include "
CondFormats/Common/interface/Time.h
"
2
#include "
CondFormats/Common/interface/BaseKeyed.h
"
3
#include "
CondFormats/Common/interface/hash64.h
"
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
13
KeyedElement
(
BaseKeyed
*
obj
,
cond::Time_t
key
) :
m_obj
(
obj
),
m_skey
(
""
),
m_key
(
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
21
KeyedElement
(
BaseKeyed
*
obj
,
std::string
key
) :
m_obj
(
obj
),
m_skey
(
key
),
m_key
(
convert
(
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
27
BaseKeyed
*
m_obj
;
28
std::string
m_skey
;
29
cond::Time_t
m_key
;
30
};
31
32
}
// namespace cond
cond::BaseKeyed
Definition:
BaseKeyed.h:14
cond::KeyedElement
Definition:
KeyedElement.h:10
contentValuesCheck.ss
ss
Definition:
contentValuesCheck.py:33
cond::hash64
unsigned long long hash64(unsigned char *k, unsigned long long length, unsigned long long level)
Definition:
hash64.cc:68
cond::KeyedElement::KeyedElement
KeyedElement(BaseKeyed *obj, cond::Time_t key)
Definition:
KeyedElement.h:13
hash64.h
Time.h
BaseKeyed.h
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
cond::KeyedElement::m_obj
BaseKeyed * m_obj
Definition:
KeyedElement.h:27
cond::Time_t
unsigned long long Time_t
Definition:
Time.h:14
submitPVResolutionJobs.key
key
prepare the HTCondor submission files and eventually submit them
Definition:
submitPVResolutionJobs.py:398
getGTfromDQMFile.obj
obj
Definition:
getGTfromDQMFile.py:32
cond
cond::KeyedElement::convert
static cond::Time_t convert(std::string key)
Definition:
KeyedElement.h:25
cond::KeyedElement::m_skey
std::string m_skey
Definition:
KeyedElement.h:28
cond::KeyedElement::m_key
cond::Time_t m_key
Definition:
KeyedElement.h:29
cond::KeyedElement::KeyedElement
KeyedElement(BaseKeyed *obj, std::string key)
Definition:
KeyedElement.h:21
Generated for CMSSW Reference Manual by
1.8.14