#include <L1GtTriggerMaskAlgoTrigConfigOnlineProd.h>
Public Member Functions | |
L1GtTriggerMaskAlgoTrigConfigOnlineProd (const edm::ParameterSet &) | |
constructor | |
virtual boost::shared_ptr < L1GtTriggerMask > | newObject (const std::string &objectKey) |
public methods | |
~L1GtTriggerMaskAlgoTrigConfigOnlineProd () | |
destructor | |
Private Attributes | |
int | m_partitionNumber |
partition number |
Description: online producer for L1GtTriggerMaskAlgoTrigRcd.
Implementation: <TODO: enter implementation details>
$Date$ $Revision$
Definition at line 34 of file L1GtTriggerMaskAlgoTrigConfigOnlineProd.h.
L1GtTriggerMaskAlgoTrigConfigOnlineProd::L1GtTriggerMaskAlgoTrigConfigOnlineProd | ( | const edm::ParameterSet & | parSet | ) |
constructor
Definition at line 29 of file L1GtTriggerMaskAlgoTrigConfigOnlineProd.cc.
: L1ConfigOnlineProdBase<L1GtTriggerMaskAlgoTrigRcd, L1GtTriggerMask> (parSet), m_partitionNumber(parSet.getParameter<int> ("PartitionNumber")) { // empty }
L1GtTriggerMaskAlgoTrigConfigOnlineProd::~L1GtTriggerMaskAlgoTrigConfigOnlineProd | ( | ) |
boost::shared_ptr< L1GtTriggerMask > L1GtTriggerMaskAlgoTrigConfigOnlineProd::newObject | ( | const std::string & | objectKey | ) | [virtual] |
public methods
Implements L1ConfigOnlineProdBase< L1GtTriggerMaskAlgoTrigRcd, L1GtTriggerMask >.
Definition at line 47 of file L1GtTriggerMaskAlgoTrigConfigOnlineProd.cc.
References l1t::OMDSReader::basicQuery(), l1t::OMDSReader::columnNames(), l1t::OMDSReader::QueryResults::fillVariable(), i, edm::isDebugEnabled(), LogTrace, L1ConfigOnlineProdBase< L1GtTriggerMaskAlgoTrigRcd, L1GtTriggerMask >::m_omdsReader, m_partitionNumber, l1t::OMDSReader::QueryResults::queryFailed(), python::entryComment::results, l1t::OMDSReader::singleAttribute(), and AlCaHLTBitMon_QueryRunRegistry::string.
{ // shared pointer for L1GtTriggerMask boost::shared_ptr<L1GtTriggerMask> pL1GtTriggerMask = boost::shared_ptr<L1GtTriggerMask>( new L1GtTriggerMask()); // l1GtTriggerMaskAlgoTrig: FINOR_ALGO_FK key in GT_PARTITION_FINOR_ALGO const std::string gtSchema = "CMS_GT"; // SQL query: // select * from CMS_GT.GT_PARTITION_FINOR_ALGO WHERE GT_PARTITION_FINOR_ALGO.ID = objectKey const std::vector<std::string>& columns = m_omdsReader.columnNames( gtSchema, "GT_PARTITION_FINOR_ALGO"); if (edm::isDebugEnabled()) { for (std::vector<std::string>::const_iterator iter = columns.begin(); iter != columns.end(); iter++) { LogTrace("L1GtTriggerMaskAlgoTrigConfigOnlineProd") << ( *iter ) << std::endl; } } l1t::OMDSReader::QueryResults results = m_omdsReader.basicQuery( columns, gtSchema, "GT_PARTITION_FINOR_ALGO", "GT_PARTITION_FINOR_ALGO.ID", m_omdsReader.singleAttribute(objectKey)); // check if query was successful if (results.queryFailed()) { edm::LogError("L1-O2O") << "Problem with L1GtTriggerMaskAlgoTrigRcd 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("L1GtTriggerMaskAlgoTrigConfigOnlineProd") << "\nThe following L1GtTriggerMaskAlgoTrigRcd record was read from OMDS: \n" << myCoutStream.str() << "\n" << std::endl; } return pL1GtTriggerMask; }
partition number
Definition at line 52 of file L1GtTriggerMaskAlgoTrigConfigOnlineProd.h.
Referenced by newObject().