CMS 3D CMS Logo

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