CMS 3D CMS Logo

Public Types | Public Member Functions | Static Public Attributes | Protected Attributes

L1TriggerKey Class Reference

#include <L1TriggerKey.h>

List of all members.

Public Types

enum  L1Subsystems {
  kCSCTF, kDTTF, kRPC, kGMT,
  kRCT, kGCT, kGT, kTSP0,
  kNumberSubsystems
}
typedef std::map< std::string,
std::string > 
RecordToKey

Public Member Functions

void add (const std::string &record, const std::string &type, const std::string &key)
void add (const RecordToKey &map)
std::string get (const std::string &record, const std::string &type) const
 L1TriggerKey ()
const RecordToKeyrecordToKeyMap () const
void setSubsystemKey (L1Subsystems subsystem, const std::string &key)
void setTSCKey (const std::string &tscKey)
const std::string & subsystemKey (L1Subsystems subsystem) const
const std::string & tscKey () const

Static Public Attributes

static std::string kEmptyKey = ""
static std::string kNullKey = "NULL"

Protected Attributes

RecordToKey m_recordToKey
std::string m_subsystemKeys [kNumberSubsystems]
std::string m_tscKey

Detailed Description

Definition at line 21 of file L1TriggerKey.h.


Member Typedef Documentation

typedef std::map<std::string, std::string> L1TriggerKey::RecordToKey

Definition at line 24 of file L1TriggerKey.h.


Member Enumeration Documentation

Enumerator:
kCSCTF 
kDTTF 
kRPC 
kGMT 
kRCT 
kGCT 
kGT 
kTSP0 
kNumberSubsystems 

Definition at line 26 of file L1TriggerKey.h.


Constructor & Destructor Documentation

L1TriggerKey::L1TriggerKey ( ) [inline]

Definition at line 45 of file L1TriggerKey.h.

References i, kNullKey, kNumberSubsystems, and m_subsystemKeys.

      {
        for( int i = 0 ; i < kNumberSubsystems ; ++i )
          {
            m_subsystemKeys[ i ] = kNullKey ;
          }
      }

Member Function Documentation

void L1TriggerKey::add ( const std::string &  record,
const std::string &  type,
const std::string &  key 
) [inline]

Definition at line 54 of file L1TriggerKey.h.

References combine::key, kNullKey, and m_recordToKey.

Referenced by L1TriggerKeyDummyProd::L1TriggerKeyDummyProd().

    { m_recordToKey.insert (std::make_pair (record + "@" + type, key.empty() ? kNullKey : key)); }
void L1TriggerKey::add ( const RecordToKey map) [inline]

Definition at line 57 of file L1TriggerKey.h.

References kNullKey, and m_recordToKey.

    {
      for( RecordToKey::const_iterator itr = map.begin() ;
           itr != map.end() ;
           ++itr )
        {
          m_recordToKey.insert( std::make_pair( itr->first, itr->second.empty() ? kNullKey : itr->second ) ) ;
        }
    }
std::string L1TriggerKey::get ( const std::string &  record,
const std::string &  type 
) const [inline]

Definition at line 76 of file L1TriggerKey.h.

References kEmptyKey, kNullKey, m_recordToKey, record, and AlCaHLTBitMon_QueryRunRegistry::string.

    {
        RecordToKey::const_iterator it = m_recordToKey.find (record + "@" + type);
        if (it == m_recordToKey.end ())
            return std::string ();
        else
          return it->second == kNullKey ? kEmptyKey : it->second ;
    }
const RecordToKey& L1TriggerKey::recordToKeyMap ( ) const [inline]

Definition at line 92 of file L1TriggerKey.h.

References m_recordToKey.

Referenced by L1CondDBIOVWriter::analyze().

      { return m_recordToKey ; }
void L1TriggerKey::setSubsystemKey ( L1Subsystems  subsystem,
const std::string &  key 
) [inline]
void L1TriggerKey::setTSCKey ( const std::string &  tscKey) [inline]

Definition at line 67 of file L1TriggerKey.h.

References m_tscKey, and tscKey().

Referenced by L1TriggerKeyDummyProd::L1TriggerKeyDummyProd().

    { m_tscKey = tscKey ; }
const std::string& L1TriggerKey::subsystemKey ( L1Subsystems  subsystem) const [inline]
const std::string& L1TriggerKey::tscKey ( ) const [inline]

Definition at line 85 of file L1TriggerKey.h.

References m_tscKey.

Referenced by setTSCKey().

      { return m_tscKey ; }

Member Data Documentation

std::string L1TriggerKey::kEmptyKey = "" [static]

Definition at line 42 of file L1TriggerKey.h.

Referenced by get(), and subsystemKey().

std::string L1TriggerKey::kNullKey = "NULL" [static]

Definition at line 104 of file L1TriggerKey.h.

Referenced by add(), get(), and recordToKeyMap().

std::string L1TriggerKey::m_subsystemKeys[kNumberSubsystems] [protected]

Definition at line 109 of file L1TriggerKey.h.

Referenced by L1TriggerKey(), setSubsystemKey(), and subsystemKey().

std::string L1TriggerKey::m_tscKey [protected]

Definition at line 108 of file L1TriggerKey.h.

Referenced by setTSCKey(), and tscKey().