1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
|
#ifndef CondFormats_L1TObjects_L1TriggerKeyList_h
#define CondFormats_L1TObjects_L1TriggerKeyList_h
// -*- C++ -*-
//
// Package: L1TObjects
// Class : L1TriggerKeyList
//
/**\class L1TriggerKeyList L1TriggerKeyList.h CondFormats/L1TObjects/interface/L1TriggerKeyList.h
Description: <one line class summary>
Usage:
<usage>
*/
//
// Original Author: Werner Sun
// Created: Fri Feb 29 20:44:53 CET 2008
// $Id: L1TriggerKeyList.h,v 1.3 2008/11/06 23:13:00 wsun Exp $
//
// system include files
#include "CondFormats/Serialization/interface/Serializable.h"
#include <string>
#include <map>
// user include files
// forward declarations
class L1TriggerKeyList {
public:
L1TriggerKeyList();
virtual ~L1TriggerKeyList();
typedef std::map<std::string, std::string> KeyToToken;
typedef std::map<std::string, KeyToToken> RecordToKeyToToken;
// ---------- const member functions ---------------------
// Get payload token for L1TriggerKey
std::string token(const std::string& tscKey) const;
// Get payload token for configuration data
std::string token(const std::string& recordName, const std::string& dataType, const std::string& key) const;
// Get payload token for configuration data
std::string token(const std::string& recordType, // "record@type"
const std::string& key) const;
const KeyToToken& tscKeyToTokenMap() const { return m_tscKeyToToken; }
const RecordToKeyToToken& recordTypeToKeyToTokenMap() const { return m_recordKeyToken; }
// Get object key for a given payload token. In practice, each
// record in the CondDB has only one object, so there is no need to
// specify the data type.
std::string objectKey(const std::string& recordName, const std::string& payloadToken) const;
// Get TSC key for a given L1TriggerKey payload token
std::string tscKey(const std::string& triggerKeyPayloadToken) const;
// ---------- static member functions --------------------
// ---------- member functions ---------------------------
// Store payload token for L1TriggerKey, return true if successful
bool addKey(const std::string& tscKey, const std::string& payloadToken, bool overwriteKey = false);
// Store payload token for configuration data, return true if successful
bool addKey(const std::string& recordType, // "record@type"
const std::string& key,
const std::string& payloadToken,
bool overwriteKey = false);
private:
//L1TriggerKeyList(const L1TriggerKeyList&); // stop default
//const L1TriggerKeyList& operator=(const L1TriggerKeyList&); // stop default
// ---------- member data --------------------------------
// map of TSC key (first) to L1TriggerKey payload token (second)
KeyToToken m_tscKeyToToken;
// map of subsystem key (second/first) to configuration data payload
// token (second/second), keyed by record@type (first)
RecordToKeyToToken m_recordKeyToken;
COND_SERIALIZABLE;
};
#endif
|