CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 {
34 
35  public:
37  virtual ~L1TriggerKeyList();
38 
39  typedef std::map< std::string, std::string > KeyToToken ;
40  typedef std::map< std::string, KeyToToken > RecordToKeyToToken ;
41 
42  // ---------- const member functions ---------------------
43 
44  // Get payload token for L1TriggerKey
45  std::string token( const std::string& tscKey ) const ;
46 
47  // Get payload token for configuration data
49  const std::string& dataType,
50  const std::string& key ) const ;
51 
52  // Get payload token for configuration data
53  std::string token( const std::string& recordType, // "record@type"
54  const std::string& key ) const ;
55 
57  { return m_tscKeyToToken ; }
58 
60  { return m_recordKeyToken ; }
61 
62  // Get object key for a given payload token. In practice, each
63  // record in the CondDB has only one object, so there is no need to
64  // specify the data type.
66  const std::string& payloadToken ) const ;
67 
68  // Get TSC key for a given L1TriggerKey payload token
69  std::string tscKey( const std::string& triggerKeyPayloadToken ) const ;
70 
71  // ---------- static member functions --------------------
72 
73  // ---------- member functions ---------------------------
74 
75  // Store payload token for L1TriggerKey, return true if successful
76  bool addKey( const std::string& tscKey,
77  const std::string& payloadToken,
78  bool overwriteKey = false ) ;
79 
80  // Store payload token for configuration data, return true if successful
81  bool addKey( const std::string& recordType, // "record@type"
82  const std::string& key,
83  const std::string& payloadToken,
84  bool overwriteKey = false ) ;
85 
86  private:
87  //L1TriggerKeyList(const L1TriggerKeyList&); // stop default
88 
89  //const L1TriggerKeyList& operator=(const L1TriggerKeyList&); // stop default
90 
91  // ---------- member data --------------------------------
92 
93  // map of TSC key (first) to L1TriggerKey payload token (second)
95 
96  // map of subsystem key (second/first) to configuration data payload
97  // token (second/second), keyed by record@type (first)
99 
101 };
102 
103 
104 #endif
RecordToKeyToToken m_recordKeyToken
std::map< std::string, std::string > KeyToToken
KeyToToken m_tscKeyToToken
std::string tscKey(const std::string &triggerKeyPayloadToken) const
const RecordToKeyToToken & recordTypeToKeyToTokenMap() const
std::string objectKey(const std::string &recordName, const std::string &payloadToken) const
virtual ~L1TriggerKeyList()
const KeyToToken & tscKeyToTokenMap() const
#define COND_SERIALIZABLE
Definition: Serializable.h:37
std::string token(const std::string &tscKey) const
bool addKey(const std::string &tscKey, const std::string &payloadToken, bool overwriteKey=false)
std::map< std::string, KeyToToken > RecordToKeyToToken