File indexing completed on 2024-04-06 12:02:21
0001 #ifndef CondFormats_L1TObjects_L1TriggerKeyListExt_h
0002 #define CondFormats_L1TObjects_L1TriggerKeyListExt_h
0003
0004
0005 #include "CondFormats/Serialization/interface/Serializable.h"
0006
0007 #include <string>
0008 #include <map>
0009
0010 class L1TriggerKeyListExt {
0011 public:
0012 L1TriggerKeyListExt();
0013 virtual ~L1TriggerKeyListExt();
0014
0015 typedef std::map<std::string, std::string> KeyToToken;
0016 typedef std::map<std::string, KeyToToken> RecordToKeyToToken;
0017
0018
0019
0020
0021 std::string token(const std::string& tscKey) const;
0022
0023
0024 std::string token(const std::string& recordName, const std::string& dataType, const std::string& key) const;
0025
0026
0027 std::string token(const std::string& recordType,
0028 const std::string& key) const;
0029
0030 const KeyToToken& tscKeyToTokenMap() const { return m_tscKeyToToken; }
0031
0032 const RecordToKeyToToken& recordTypeToKeyToTokenMap() const { return m_recordKeyToken; }
0033
0034
0035
0036
0037 std::string objectKey(const std::string& recordName, const std::string& payloadToken) const;
0038
0039
0040 std::string tscKey(const std::string& triggerKeyPayloadToken) const;
0041
0042
0043
0044
0045
0046
0047 bool addKey(const std::string& tscKey, const std::string& payloadToken, bool overwriteKey = false);
0048
0049
0050 bool addKey(const std::string& recordType,
0051 const std::string& key,
0052 const std::string& payloadToken,
0053 bool overwriteKey = false);
0054
0055 private:
0056
0057
0058
0059
0060
0061
0062
0063 KeyToToken m_tscKeyToToken;
0064
0065
0066
0067 RecordToKeyToToken m_recordKeyToken;
0068
0069 COND_SERIALIZABLE;
0070 };
0071
0072 #endif