CMS 3D CMS Logo

Public Member Functions | Private Attributes

triggerExpression::Data Class Reference

#include <TriggerExpressionData.h>

List of all members.

Public Member Functions

bool configurationUpdated () const
unsigned int daqPartitions () const
 Data ()
 Data (const edm::ParameterSet &config)
 Data (edm::InputTag const &hltResultsTag, edm::InputTag const &l1tResultsTag, unsigned int daqPartitions, bool l1tIgnoreMask, bool l1techIgnorePrescales, bool doThrow)
edm::EventNumber_t eventNumber () const
bool hasHLT () const
bool hasL1T () const
bool hltConfigurationUpdated () const
const edm::TriggerNameshltMenu () const
const edm::TriggerResultshltResults () const
bool ignoreL1Mask () const
bool ignoreL1TechPrescales () const
const L1GtTriggerMaskl1tAlgoMask () const
bool l1tConfigurationUpdated () const
const L1GtTriggerMenul1tMenu () const
const
L1GlobalTriggerReadoutRecord
l1tResults () const
const L1GtTriggerMaskl1tTechMask () const
void setDaqPartitions (unsigned int daqPartitions)
bool setEvent (const edm::Event &event, const edm::EventSetup &setup)
void setHltResultsTag (edm::InputTag const &tag)
void setL1techIgnorePrescales (bool l1techIgnorePrescales)
void setL1tIgnoreMask (bool l1tIgnoreMask)
void setL1tResultsTag (edm::InputTag const &tag)
void setThrow (bool doThrow)
bool shouldThrow () const

Private Attributes

unsigned int m_daqPartitions
edm::EventNumber_t m_eventNumber
edm::ParameterSetID m_hltCacheID
const edm::TriggerNamesm_hltMenu
const edm::TriggerResultsm_hltResults
edm::InputTag m_hltResultsTag
bool m_hltUpdated
const L1GtTriggerMaskm_l1tAlgoMask
unsigned long long m_l1tCacheID
bool m_l1techIgnorePrescales
bool m_l1tIgnoreMask
const L1GtTriggerMenum_l1tMenu
const
L1GlobalTriggerReadoutRecord
m_l1tResults
edm::InputTag m_l1tResultsTag
const L1GtTriggerMaskm_l1tTechMask
bool m_l1tUpdated
bool m_throw

Detailed Description

Definition at line 22 of file TriggerExpressionData.h.


Constructor & Destructor Documentation

triggerExpression::Data::Data ( ) [inline]

Definition at line 25 of file TriggerExpressionData.h.

         :
    // configuration
    m_hltResultsTag(""),
    m_l1tResultsTag(""),
    m_daqPartitions(0x01),
    m_l1tIgnoreMask(false),
    m_l1techIgnorePrescales(false),
    m_throw(true),
    // l1 values and status
    m_l1tResults(0),
    m_l1tMenu(0),
    m_l1tAlgoMask(0),
    m_l1tTechMask(0),
    m_l1tCacheID(),
    m_l1tUpdated(false),
    // hlt values and status
    m_hltResults(0),
    m_hltMenu(0),
    m_hltCacheID(),
    m_hltUpdated(false),
    // event values
    m_eventNumber()
  { }
triggerExpression::Data::Data ( const edm::ParameterSet config) [inline, explicit]

Definition at line 50 of file TriggerExpressionData.h.

                                                :
    // configuration
    m_hltResultsTag(config.getParameter<edm::InputTag>("hltResults")),
    m_l1tResultsTag(config.getParameter<edm::InputTag>("l1tResults")),
    m_daqPartitions(config.getParameter<unsigned int>("daqPartitions")),
    m_l1tIgnoreMask(config.getParameter<bool>("l1tIgnoreMask")),
    m_l1techIgnorePrescales(config.getParameter<bool>("l1techIgnorePrescales")),
    m_throw(config.getParameter<bool>("throw")),
    // l1 values and status
    m_l1tResults(0),
    m_l1tMenu(0),
    m_l1tAlgoMask(0),
    m_l1tTechMask(0),
    m_l1tCacheID(),
    m_l1tUpdated(false),
    // hlt values and status
    m_hltResults(0),
    m_hltMenu(0),
    m_hltCacheID(),
    m_hltUpdated(false),
    // event values
    m_eventNumber()
  { }
triggerExpression::Data::Data ( edm::InputTag const &  hltResultsTag,
edm::InputTag const &  l1tResultsTag,
unsigned int  daqPartitions,
bool  l1tIgnoreMask,
bool  l1techIgnorePrescales,
bool  doThrow 
) [inline]

Definition at line 75 of file TriggerExpressionData.h.

    :
    // configuration
    m_hltResultsTag(hltResultsTag),
    m_l1tResultsTag(l1tResultsTag),
    m_daqPartitions(daqPartitions),
    m_l1tIgnoreMask(l1tIgnoreMask),
    m_l1techIgnorePrescales(l1techIgnorePrescales),
    m_throw(doThrow),
    // l1 values and status
    m_l1tResults(0),
    m_l1tMenu(0),
    m_l1tAlgoMask(0),
    m_l1tTechMask(0),
    m_l1tCacheID(),
    m_l1tUpdated(false),
    // hlt values and status
    m_hltResults(0),
    m_hltMenu(0),
    m_hltCacheID(),
    m_hltUpdated(false),
    // event values
    m_eventNumber()
  { }

Member Function Documentation

bool triggerExpression::Data::configurationUpdated ( ) const [inline]
unsigned int triggerExpression::Data::daqPartitions ( ) const [inline]
edm::EventNumber_t triggerExpression::Data::eventNumber ( ) const [inline]

Definition at line 181 of file TriggerExpressionData.h.

References m_eventNumber.

Referenced by triggerExpression::Prescaler::init().

                                       {
    return m_eventNumber;
  }
bool triggerExpression::Data::hasHLT ( ) const [inline]

Definition at line 141 of file TriggerExpressionData.h.

References edm::InputTag::label(), and m_hltResultsTag.

Referenced by triggerExpression::HLTReader::operator()().

                      {
    return not m_hltResultsTag.label().empty();
  }
bool triggerExpression::Data::hasL1T ( ) const [inline]
bool triggerExpression::Data::hltConfigurationUpdated ( ) const [inline]

Definition at line 169 of file TriggerExpressionData.h.

References m_hltUpdated.

                                       {
    return m_hltUpdated;
  }
const edm::TriggerNames& triggerExpression::Data::hltMenu ( ) const [inline]

Definition at line 149 of file TriggerExpressionData.h.

References m_hltMenu.

Referenced by triggerExpression::HLTReader::init().

                                          {
    return * m_hltMenu;
  }
const edm::TriggerResults& triggerExpression::Data::hltResults ( ) const [inline]

Definition at line 145 of file TriggerExpressionData.h.

References m_hltResults.

Referenced by triggerExpression::HLTReader::operator()().

                                               {
    return * m_hltResults;
  }
bool triggerExpression::Data::ignoreL1Mask ( ) const [inline]
bool triggerExpression::Data::ignoreL1TechPrescales ( ) const [inline]
const L1GtTriggerMask& triggerExpression::Data::l1tAlgoMask ( ) const [inline]

Definition at line 161 of file TriggerExpressionData.h.

References m_l1tAlgoMask.

Referenced by triggerExpression::L1Reader::init().

                                              {
    return * m_l1tAlgoMask;
  }
bool triggerExpression::Data::l1tConfigurationUpdated ( ) const [inline]

Definition at line 173 of file TriggerExpressionData.h.

References m_l1tUpdated.

                                       {
    return m_l1tUpdated;
  }
const L1GtTriggerMenu& triggerExpression::Data::l1tMenu ( ) const [inline]

Definition at line 157 of file TriggerExpressionData.h.

References m_l1tMenu.

Referenced by triggerExpression::L1TechReader::init(), and triggerExpression::L1Reader::init().

                                          {
    return * m_l1tMenu;
  }
const L1GlobalTriggerReadoutRecord& triggerExpression::Data::l1tResults ( ) const [inline]
const L1GtTriggerMask& triggerExpression::Data::l1tTechMask ( ) const [inline]

Definition at line 165 of file TriggerExpressionData.h.

References m_l1tTechMask.

Referenced by triggerExpression::L1TechReader::init().

                                              {
    return * m_l1tTechMask;
  }
void triggerExpression::Data::setDaqPartitions ( unsigned int  daqPartitions) [inline]

Definition at line 119 of file TriggerExpressionData.h.

References daqPartitions(), and m_daqPartitions.

bool Data::setEvent ( const edm::Event event,
const edm::EventSetup setup 
)

Definition at line 43 of file TriggerExpressionData.cc.

References L1GtTriggerMenu::buildGtConditionMap(), event(), edm::EventSetup::get(), edm::InputTag::label(), m_eventNumber, m_hltCacheID, m_hltMenu, m_hltResults, m_hltResultsTag, m_hltUpdated, m_l1tAlgoMask, m_l1tCacheID, m_l1tMenu, m_l1tResults, m_l1tResultsTag, m_l1tTechMask, m_l1tUpdated, edm::TriggerNames::parameterSetID(), HcalObjRepresent::setup(), and edm::TriggerNames::triggerNames().

Referenced by TriggerResultsFilterFromDB::filter(), and TriggerResultsFilter::filter().

                                                                       {

  // cache the event number
  m_eventNumber = event.id().event();

  // access L1 objects only if L1 is used
  if (not m_l1tResultsTag.label().empty()) {
    // cache the L1 GT results objects
    m_l1tResults = get<L1GlobalTriggerReadoutRecord>(event, m_l1tResultsTag);
    if (not m_l1tResults)
      return false;

    // cache the L1 trigger masks
    m_l1tAlgoMask = get<L1GtTriggerMaskAlgoTrigRcd, L1GtTriggerMask>(setup);
    m_l1tTechMask = get<L1GtTriggerMaskTechTrigRcd, L1GtTriggerMask>(setup);

    // cache the L1 trigger menu
    unsigned long long l1tCacheID = setup.get<L1GtTriggerMenuRcd>().cacheIdentifier();
    if (m_l1tCacheID == l1tCacheID) {
      m_l1tUpdated = false;
    } else {
      m_l1tMenu = get<L1GtTriggerMenuRcd, L1GtTriggerMenu>(setup);
      (const_cast<L1GtTriggerMenu *>(m_l1tMenu))->buildGtConditionMap();
      m_l1tCacheID = l1tCacheID;
      m_l1tUpdated = true;
    }
  }

  // access HLT objects only if HLT is used
  if (not m_hltResultsTag.label().empty()) {
    // cache the HLT TriggerResults
    m_hltResults = get<edm::TriggerResults>(event, m_hltResultsTag);
    if (not m_hltResults)
      return false;

    // access the TriggerNames, and check if it has changed
    m_hltMenu = & event.triggerNames(* m_hltResults);
    if (m_hltMenu->parameterSetID() == m_hltCacheID) {
      m_hltUpdated = false;
    } else {
      m_hltCacheID = m_hltMenu->parameterSetID();
      m_hltUpdated = true;
    }
  }

  return true;
}
void triggerExpression::Data::setHltResultsTag ( edm::InputTag const &  tag) [inline]
void triggerExpression::Data::setL1techIgnorePrescales ( bool  l1techIgnorePrescales) [inline]

Definition at line 127 of file TriggerExpressionData.h.

References m_l1techIgnorePrescales.

                                                            {
    m_l1techIgnorePrescales = l1techIgnorePrescales;
  }
void triggerExpression::Data::setL1tIgnoreMask ( bool  l1tIgnoreMask) [inline]

Definition at line 123 of file TriggerExpressionData.h.

References m_l1tIgnoreMask.

                                            {
    m_l1tIgnoreMask = l1tIgnoreMask;
  }
void triggerExpression::Data::setL1tResultsTag ( edm::InputTag const &  tag) [inline]
void triggerExpression::Data::setThrow ( bool  doThrow) [inline]

Definition at line 131 of file TriggerExpressionData.h.

References m_throw.

                              {
    m_throw = doThrow;
  }
bool triggerExpression::Data::shouldThrow ( ) const [inline]

Member Data Documentation

Definition at line 205 of file TriggerExpressionData.h.

Referenced by daqPartitions(), and setDaqPartitions().

Definition at line 225 of file TriggerExpressionData.h.

Referenced by eventNumber(), and setEvent().

Definition at line 221 of file TriggerExpressionData.h.

Referenced by setEvent().

Definition at line 220 of file TriggerExpressionData.h.

Referenced by hltMenu(), and setEvent().

Definition at line 219 of file TriggerExpressionData.h.

Referenced by hltResults(), and setEvent().

Definition at line 203 of file TriggerExpressionData.h.

Referenced by hasHLT(), setEvent(), and setHltResultsTag().

Definition at line 213 of file TriggerExpressionData.h.

Referenced by l1tAlgoMask(), and setEvent().

unsigned long long triggerExpression::Data::m_l1tCacheID [private]

Definition at line 215 of file TriggerExpressionData.h.

Referenced by setEvent().

Definition at line 207 of file TriggerExpressionData.h.

Referenced by ignoreL1TechPrescales(), and setL1techIgnorePrescales().

Definition at line 206 of file TriggerExpressionData.h.

Referenced by ignoreL1Mask(), and setL1tIgnoreMask().

Definition at line 212 of file TriggerExpressionData.h.

Referenced by l1tMenu(), and setEvent().

Definition at line 211 of file TriggerExpressionData.h.

Referenced by l1tResults(), and setEvent().

Definition at line 204 of file TriggerExpressionData.h.

Referenced by hasL1T(), setEvent(), and setL1tResultsTag().

Definition at line 214 of file TriggerExpressionData.h.

Referenced by l1tTechMask(), and setEvent().

Definition at line 208 of file TriggerExpressionData.h.

Referenced by setThrow(), and shouldThrow().