#include <L1GtTriggerMaskTechTrigConfigOnlineProd.h>
Public Member Functions | |
L1GtTriggerMaskTechTrigConfigOnlineProd (const edm::ParameterSet &) | |
constructor | |
virtual boost::shared_ptr < L1GtTriggerMask > | newObject (const std::string &objectKey) |
public methods | |
~L1GtTriggerMaskTechTrigConfigOnlineProd () | |
destructor | |
Private Attributes | |
int | m_partitionNumber |
partition number |
Description: online producer for L1GtTriggerMaskTechTrigRcd.
Implementation: <TODO: enter implementation details>
$Date$ $Revision$
Definition at line 34 of file L1GtTriggerMaskTechTrigConfigOnlineProd.h.
L1GtTriggerMaskTechTrigConfigOnlineProd::L1GtTriggerMaskTechTrigConfigOnlineProd | ( | const edm::ParameterSet & | parSet | ) |
constructor
Definition at line 28 of file L1GtTriggerMaskTechTrigConfigOnlineProd.cc.
: L1ConfigOnlineProdBase<L1GtTriggerMaskTechTrigRcd, L1GtTriggerMask> (parSet), m_partitionNumber(parSet.getParameter<int> ("PartitionNumber")) { // empty }
L1GtTriggerMaskTechTrigConfigOnlineProd::~L1GtTriggerMaskTechTrigConfigOnlineProd | ( | ) |
boost::shared_ptr< L1GtTriggerMask > L1GtTriggerMaskTechTrigConfigOnlineProd::newObject | ( | const std::string & | objectKey | ) | [virtual] |
public methods
Implements L1ConfigOnlineProdBase< L1GtTriggerMaskTechTrigRcd, L1GtTriggerMask >.
Definition at line 46 of file L1GtTriggerMaskTechTrigConfigOnlineProd.cc.
References l1t::OMDSReader::basicQuery(), l1t::OMDSReader::columnNames(), l1t::OMDSReader::QueryResults::fillVariable(), i, edm::isDebugEnabled(), LogTrace, L1ConfigOnlineProdBase< L1GtTriggerMaskTechTrigRcd, L1GtTriggerMask >::m_omdsReader, m_partitionNumber, l1t::OMDSReader::QueryResults::queryFailed(), python::entryComment::results, and l1t::OMDSReader::singleAttribute().
{ // shared pointer for L1GtTriggerMask boost::shared_ptr<L1GtTriggerMask> pL1GtTriggerMask = boost::shared_ptr<L1GtTriggerMask>( new L1GtTriggerMask()); // l1GtTriggerMaskTechTrig: FINOR_TT_FK key in GT_PARTITION_FINOR_TT const std::string gtSchema = "CMS_GT"; // SQL query: // // select * from CMS_GT.GT_PARTITION_FINOR_TT WHERE GT_PARTITION_FINOR_TT.ID = objectKey const std::vector<std::string>& columns = m_omdsReader.columnNames( gtSchema, "GT_PARTITION_FINOR_TT"); if (edm::isDebugEnabled()) { for (std::vector<std::string>::const_iterator iter = columns.begin(); iter != columns.end(); iter++) { LogTrace("L1GtTriggerMaskTechTrigConfigOnlineProd") << ( *iter ) << std::endl; } } l1t::OMDSReader::QueryResults results = m_omdsReader.basicQuery( columns, gtSchema, "GT_PARTITION_FINOR_TT", "GT_PARTITION_FINOR_TT.ID", m_omdsReader.singleAttribute(objectKey)); // check if query was successful if (results.queryFailed()) { edm::LogError("L1-O2O") << "Problem with L1GtTriggerMaskTechTrigRcd key:" << objectKey; return pL1GtTriggerMask; } // mask for other partitions than m_partitionNumber set to 1 (algorithm masked) int maskSize = columns.size() - 1; // table ID is also in columns std::vector<bool> trigMaskBool(maskSize, false); std::vector<unsigned int> trigMask(maskSize, 0); for (int i = 0; i < maskSize; i++) { bool tMask = trigMaskBool[i]; results.fillVariable(columns[i + 1], tMask); trigMask[i] = 0xFF & (~( static_cast<unsigned int> (tMask) << m_partitionNumber )); } // fill the record pL1GtTriggerMask->setGtTriggerMask(trigMask); if (edm::isDebugEnabled()) { std::ostringstream myCoutStream; pL1GtTriggerMask->print(myCoutStream); LogTrace("L1GtTriggerMaskTechTrigConfigOnlineProd") << "\nThe following L1GtTriggerMaskTechTrigRcd record was read from OMDS: \n" << myCoutStream.str() << "\n" << std::endl; } return pL1GtTriggerMask; }
partition number
Definition at line 52 of file L1GtTriggerMaskTechTrigConfigOnlineProd.h.
Referenced by newObject().