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.4 2009/04/06 01:58:49 wsun Exp $
20 //
21 
22 // system include files
23 #include <string>
24 #include <map>
25 
26 // user include files
27 
28 // forward declarations
29 
31 {
32 
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
46  std::string token( const std::string& recordName,
47  const std::string& dataType,
48  const std::string& key ) const ;
49 
50  // Get payload token for configuration data
51  std::string token( const std::string& recordType, // "record@type"
52  const std::string& key ) const ;
53 
55  { return m_tscKeyToToken ; }
56 
58  { return m_recordKeyToken ; }
59 
60  // Get object key for a given payload token. In practice, each
61  // record in the CondDB has only one object, so there is no need to
62  // specify the data type.
63  std::string objectKey( const std::string& recordName,
64  const std::string& payloadToken ) const ;
65 
66  // Get TSC key for a given L1TriggerKey payload token
67  std::string tscKey( const std::string& triggerKeyPayloadToken ) const ;
68 
69  // ---------- static member functions --------------------
70 
71  // ---------- member functions ---------------------------
72 
73  // Store payload token for L1TriggerKey, return true if successful
74  bool addKey( const std::string& tscKey,
75  const std::string& payloadToken,
76  bool overwriteKey = false ) ;
77 
78  // Store payload token for configuration data, return true if successful
79  bool addKey( const std::string& recordType, // "record@type"
80  const std::string& key,
81  const std::string& payloadToken,
82  bool overwriteKey = false ) ;
83 
84  private:
85  //L1TriggerKeyList(const L1TriggerKeyList&); // stop default
86 
87  //const L1TriggerKeyList& operator=(const L1TriggerKeyList&); // stop default
88 
89  // ---------- member data --------------------------------
90 
91  // map of TSC key (first) to L1TriggerKey payload token (second)
93 
94  // map of subsystem key (second/first) to configuration data payload
95  // token (second/second), keyed by record@type (first)
97 };
98 
99 
100 #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
std::string token(const std::string &tscKey) const
list key
Definition: combine.py:13
bool addKey(const std::string &tscKey, const std::string &payloadToken, bool overwriteKey=false)
std::map< std::string, KeyToToken > RecordToKeyToToken