CMS 3D CMS Logo

L1TriggerKeyListExt.h
Go to the documentation of this file.
1 #ifndef CondFormats_L1TObjects_L1TriggerKeyListExt_h
2 #define CondFormats_L1TObjects_L1TriggerKeyListExt_h
3 
4 // system include files
6 
7 #include <string>
8 #include <map>
9 
11 {
12 
13  public:
15  virtual ~L1TriggerKeyListExt();
16 
17  typedef std::map< std::string, std::string > KeyToToken ;
18  typedef std::map< std::string, KeyToToken > RecordToKeyToToken ;
19 
20  // ---------- const member functions ---------------------
21 
22  // Get payload token for L1TriggerKeyExt
23  std::string token( const std::string& tscKey ) const ;
24 
25  // Get payload token for configuration data
27  const std::string& dataType,
28  const std::string& key ) const ;
29 
30  // Get payload token for configuration data
31  std::string token( const std::string& recordType, // "record@type"
32  const std::string& key ) const ;
33 
34  const KeyToToken& tscKeyToTokenMap() const
35  { return m_tscKeyToToken ; }
36 
37  const RecordToKeyToToken& recordTypeToKeyToTokenMap() const
38  { return m_recordKeyToken ; }
39 
40  // Get object key for a given payload token. In practice, each
41  // record in the CondDB has only one object, so there is no need to
42  // specify the data type.
44  const std::string& payloadToken ) const ;
45 
46  // Get TSC key for a given L1TriggerKeyExt payload token
47  std::string tscKey( const std::string& triggerKeyPayloadToken ) const ;
48 
49  // ---------- static member functions --------------------
50 
51  // ---------- member functions ---------------------------
52 
53  // Store payload token for L1TriggerKey, return true if successful
54  bool addKey( const std::string& tscKey,
55  const std::string& payloadToken,
56  bool overwriteKey = false ) ;
57 
58  // Store payload token for configuration data, return true if successful
59  bool addKey( const std::string& recordType, // "record@type"
60  const std::string& key,
61  const std::string& payloadToken,
62  bool overwriteKey = false ) ;
63 
64  private:
65  //L1TriggerKeyListExt(const L1TriggerKeyListExt&); // stop default
66 
67  //const L1TriggerKeyListExt& operator=(const L1TriggerKeyListExt&); // stop default
68 
69  // ---------- member data --------------------------------
70 
71  // map of TSC key (first) to L1TriggerKeyExt payload token (second)
72  KeyToToken m_tscKeyToToken ;
73 
74  // map of subsystem key (second/first) to configuration data payload
75  // token (second/second), keyed by record@type (first)
76  RecordToKeyToToken m_recordKeyToken ;
77 
79 };
80 
81 
82 #endif
const KeyToToken & tscKeyToTokenMap() const
RecordToKeyToToken m_recordKeyToken
std::map< std::string, std::string > KeyToToken
std::string tscKey(const std::string &triggerKeyPayloadToken) const
std::map< std::string, KeyToToken > RecordToKeyToToken
#define COND_SERIALIZABLE
Definition: Serializable.h:38
std::string objectKey(const std::string &recordName, const std::string &payloadToken) const
const RecordToKeyToToken & recordTypeToKeyToTokenMap() const
bool addKey(const std::string &tscKey, const std::string &payloadToken, bool overwriteKey=false)
std::string token(const std::string &tscKey) const