Main Page
Namespaces
Classes
Package Documentation
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
12
public
:
13
// constructor from int key
14
KeyedElement
(
BaseKeyed
*
obj
,
cond::Time_t
key
) :
15
m_obj
(obj),
16
m_skey
(
""
),
17
m_key
(key) {
18
std::ostringstream ss; ss <<
key
;
19
m_skey
= ss.str();
20
(*obj).setKey(
m_skey
);
21
}
22
23
// constructor from ascii key
24
KeyedElement
(
BaseKeyed
*
obj
,
std::string
key
) :
25
m_obj
(obj),
26
m_skey
(key),
27
m_key
(
convert
(key)) {
28
(*obj).setKey(
m_skey
);
29
}
30
31
static
cond::Time_t
convert
(
std::string
key
) {
32
return
cond::hash64
( (
unsigned
char
*)(&key[0]),key.size(),0);
33
}
34
35
BaseKeyed
*
m_obj
;
36
std::string
m_skey
;
37
cond::Time_t
m_key
;
38
};
39
40
41
}
cond::BaseKeyed
Definition:
BaseKeyed.h:14
cond::KeyedElement
Definition:
KeyedElement.h:10
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
cond::hash64
unsigned long long hash64(unsigned char *k, unsigned long long length, unsigned long long level)
Definition:
hash64.cc:45
cond::KeyedElement::KeyedElement
KeyedElement(BaseKeyed *obj, cond::Time_t key)
Definition:
KeyedElement.h:14
hash64.h
Time.h
BaseKeyed.h
crabWrapper.key
key
Definition:
crabWrapper.py:18
cond::KeyedElement::m_obj
BaseKeyed * m_obj
Definition:
KeyedElement.h:35
cond::Time_t
unsigned long long Time_t
Definition:
Time.h:16
GetRecoTauVFromDQM_MC_cff.obj
obj
Definition:
GetRecoTauVFromDQM_MC_cff.py:88
cond
Definition:
plugin.cc:24
cond::KeyedElement::convert
static cond::Time_t convert(std::string key)
Definition:
KeyedElement.h:31
cond::KeyedElement::m_skey
std::string m_skey
Definition:
KeyedElement.h:36
cond::KeyedElement::m_key
cond::Time_t m_key
Definition:
KeyedElement.h:37
cond::KeyedElement::KeyedElement
KeyedElement(BaseKeyed *obj, std::string key)
Definition:
KeyedElement.h:24
Generated for CMSSW Reference Manual by
1.8.11