CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
l1t::OMDSReader::QueryResults Class Reference

#include <OMDSReader.h>

Public Member Functions

const std::vector< coral::AttributeList > & attributeLists () const
 
const std::vector< std::string > & columnNames () const
 
template<class T >
bool fillVariable (const std::string &columnName, T &outputVariable) const
 
template<class T >
bool fillVariable (T &outputVariable) const
 
template<class T >
bool fillVariableFromRow (const std::string &columnName, int rowNumber, T &outputVariable) const
 
template<class T >
bool fillVariableFromRow (int rowNumber, T &outputVariable) const
 
int numberRows () const
 
bool queryFailed () const
 
 QueryResults ()
 
 QueryResults (const std::vector< std::string > &columnNames, const std::vector< coral::AttributeList > &attLists)
 
virtual ~QueryResults ()
 

Private Attributes

std::vector< coral::AttributeList > m_attributeLists
 
std::vector< std::string > m_columnNames
 

Detailed Description

Definition at line 49 of file OMDSReader.h.

Constructor & Destructor Documentation

◆ QueryResults() [1/2]

l1t::OMDSReader::QueryResults::QueryResults ( )
inline

Definition at line 51 of file OMDSReader.h.

51 {}

◆ QueryResults() [2/2]

l1t::OMDSReader::QueryResults::QueryResults ( const std::vector< std::string > &  columnNames,
const std::vector< coral::AttributeList > &  attLists 
)
inline

Definition at line 52 of file OMDSReader.h.

const std::vector< std::string > & columnNames() const
Definition: OMDSReader.h:57
std::vector< coral::AttributeList > m_attributeLists
Definition: OMDSReader.h:78
std::vector< std::string > m_columnNames
Definition: OMDSReader.h:77

◆ ~QueryResults()

virtual l1t::OMDSReader::QueryResults::~QueryResults ( )
inlinevirtual

Definition at line 55 of file OMDSReader.h.

55 {}

Member Function Documentation

◆ attributeLists()

const std::vector<coral::AttributeList>& l1t::OMDSReader::QueryResults::attributeLists ( ) const
inline

◆ columnNames()

const std::vector<std::string>& l1t::OMDSReader::QueryResults::columnNames ( ) const
inline

◆ fillVariable() [1/2]

template<class T >
bool l1t::OMDSReader::QueryResults::fillVariable ( const std::string &  columnName,
T outputVariable 
) const

Definition at line 274 of file OMDSReader.h.

References fillVariableFromRow().

Referenced by l1t::OMDSReader::basicQuery(), l1t::OMDSReader::basicQueryGenericKey(), l1t::OMDSReader::basicQueryView(), l1t::OnlineDBqueryHelper::fetch(), L1TUtmTriggerMenuObjectKeysOnlineProd::fillObjectKeys(), CSCTFObjectKeysOnlineProd::fillObjectKeys(), L1GctRSObjectKeysOnlineProd::fillObjectKeys(), L1GctTSCObjectKeysOnlineProd::fillObjectKeys(), L1MuGMTRSKeysOnlineProd::fillObjectKeys(), L1MuGMTParametersKeysOnlineProd::fillObjectKeys(), L1MuTriggerScaleKeysOnlineProd::fillObjectKeys(), DTTFRSKeysOnlineProd::fillObjectKeys(), DTTFTSCObjectKeysOnlineProd::fillObjectKeys(), RCTObjectKeysOnlineProd::fillObjectKeys(), L1RCT_RSKeysOnlineProd::fillObjectKeys(), L1GtTscObjectKeysOnlineProd::keyL1GtParameters(), L1GtRsObjectKeysOnlineProd::keyL1GtPrescaleFactorsAlgoTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtPrescaleFactorsTechTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskAlgoTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskTechTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskVetoTechTrig(), L1GtTscObjectKeysOnlineProd::keyL1GtTriggerMenu(), L1GctChannelMaskOnlineProd::newObject(), L1GctJetFinderParamsOnlineProd::newObject(), L1TUtmTriggerMenuOnlineProd::newObject(), L1TGlobalPrescalesVetosOnlineProd::newObject(), L1JetEtScaleOnlineProd::newObject(), L1HtMissScaleOnlineProd::newObject(), L1EmEtScaleOnlineProd::newObject(), L1HfRingEtScaleOnlineProd::newObject(), DTTFMasksOnlineProd::newObject(), DTTFParametersOnlineProd::newObject(), L1RCTParametersOnlineProd::newObject(), L1MuTriggerScalesOnlineProducer::newObject(), L1CaloEcalScaleConfigOnlineProd::newObject(), L1RCTChannelMaskOnlineProd::newObject(), L1GtPsbSetupConfigOnlineProd::newObject(), L1CaloHcalScaleConfigOnlineProd::newObject(), L1SubsystemKeysOnlineProdExt::produce(), and L1SubsystemKeysOnlineProd::produce().

274  {
275  return fillVariableFromRow(columnName, 0, outputVariable);
276  }
bool fillVariableFromRow(const std::string &columnName, int rowNumber, T &outputVariable) const
Definition: OMDSReader.h:279

◆ fillVariable() [2/2]

template<class T >
bool l1t::OMDSReader::QueryResults::fillVariable ( T outputVariable) const

Definition at line 293 of file OMDSReader.h.

293  {
294  return fillVariableFromRow(0, outputVariable);
295  }
bool fillVariableFromRow(const std::string &columnName, int rowNumber, T &outputVariable) const
Definition: OMDSReader.h:279

◆ fillVariableFromRow() [1/2]

template<class T >
bool l1t::OMDSReader::QueryResults::fillVariableFromRow ( const std::string &  columnName,
int  rowNumber,
T outputVariable 
) const

◆ fillVariableFromRow() [2/2]

template<class T >
bool l1t::OMDSReader::QueryResults::fillVariableFromRow ( int  rowNumber,
T outputVariable 
) const

Definition at line 298 of file OMDSReader.h.

298  {
299  // Check index in bounds and only one column
300  if (rowNumber < 0 || rowNumber >= numberRows() || m_columnNames.size() != 1)
301  return false;
302  const coral::AttributeList& row = m_attributeLists[rowNumber];
303  if (row[m_columnNames.front()].isNull())
304  return false;
305  outputVariable = row[m_columnNames.front()].template data<T>();
306  return true;
307  }
std::vector< coral::AttributeList > m_attributeLists
Definition: OMDSReader.h:78
std::vector< std::string > m_columnNames
Definition: OMDSReader.h:77

◆ numberRows()

int l1t::OMDSReader::QueryResults::numberRows ( ) const
inline

Definition at line 60 of file OMDSReader.h.

References m_attributeLists.

Referenced by l1t::OMDSReader::basicQuery(), l1t::OMDSReader::basicQueryGenericKey(), l1t::OMDSReader::basicQueryView(), l1t::OnlineDBqueryHelper::fetch(), L1TUtmTriggerMenuObjectKeysOnlineProd::fillObjectKeys(), CSCTFObjectKeysOnlineProd::fillObjectKeys(), L1GctRSObjectKeysOnlineProd::fillObjectKeys(), L1GctTSCObjectKeysOnlineProd::fillObjectKeys(), L1MuGMTRSKeysOnlineProd::fillObjectKeys(), L1MuGMTParametersKeysOnlineProd::fillObjectKeys(), L1MuTriggerScaleKeysOnlineProd::fillObjectKeys(), DTTFTSCObjectKeysOnlineProd::fillObjectKeys(), DTTFRSKeysOnlineProd::fillObjectKeys(), RCTObjectKeysOnlineProd::fillObjectKeys(), L1RCT_RSKeysOnlineProd::fillObjectKeys(), L1TOMDSHelper::getBeamConfiguration(), L1TOMDSHelper::getBunchStructure(), L1TOMDSHelper::getInitBunchLumi(), L1TOMDSHelper::getNumberCollidingBunches(), L1TOMDSHelper::getRelativeBunchLumi(), L1TOMDSHelper::getWbMTriggerXsecFits(), L1GtTscObjectKeysOnlineProd::keyL1GtParameters(), L1GtRsObjectKeysOnlineProd::keyL1GtPrescaleFactorsAlgoTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtPrescaleFactorsTechTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskAlgoTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskTechTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskVetoTechTrig(), L1GtTscObjectKeysOnlineProd::keyL1GtTriggerMenu(), L1TUtmTriggerMenuOnlineProd::newObject(), L1TGlobalPrescalesVetosOnlineProd::newObject(), L1MuGMTParametersOnlineProducer::newObject(), L1EmEtScaleOnlineProd::newObject(), L1HfRingEtScaleOnlineProd::newObject(), L1HtMissScaleOnlineProd::newObject(), L1JetEtScaleOnlineProd::newObject(), DTTFMasksOnlineProd::newObject(), L1MuTriggerPtScaleOnlineProducer::newObject(), DTTFParametersOnlineProd::newObject(), L1MuTriggerScalesOnlineProducer::newObject(), L1RCTParametersOnlineProd::newObject(), L1CaloEcalScaleConfigOnlineProd::newObject(), L1GtPrescaleFactorsTechTrigConfigOnlineProd::newObject(), L1RCTChannelMaskOnlineProd::newObject(), L1GtPrescaleFactorsAlgoTrigConfigOnlineProd::newObject(), L1CaloHcalScaleConfigOnlineProd::newObject(), L1SubsystemKeysOnlineProdExt::produce(), L1SubsystemKeysOnlineProd::produce(), L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuObjectParametersFromDB(), and L1GtTriggerMenuConfigOnlineProd::tableMenuTechTrigFromDB().

60 { return m_attributeLists.size(); }
std::vector< coral::AttributeList > m_attributeLists
Definition: OMDSReader.h:78

◆ queryFailed()

bool l1t::OMDSReader::QueryResults::queryFailed ( ) const
inline

Definition at line 59 of file OMDSReader.h.

References m_attributeLists.

Referenced by l1t::OnlineDBqueryHelper::fetch(), CSCTFObjectKeysOnlineProd::fillObjectKeys(), L1TUtmTriggerMenuObjectKeysOnlineProd::fillObjectKeys(), L1GctTSCObjectKeysOnlineProd::fillObjectKeys(), L1GctRSObjectKeysOnlineProd::fillObjectKeys(), L1MuGMTRSKeysOnlineProd::fillObjectKeys(), L1MuGMTParametersKeysOnlineProd::fillObjectKeys(), DTTFRSKeysOnlineProd::fillObjectKeys(), DTTFTSCObjectKeysOnlineProd::fillObjectKeys(), RCTObjectKeysOnlineProd::fillObjectKeys(), L1RCT_RSKeysOnlineProd::fillObjectKeys(), L1TOMDSHelper::getBeamConfiguration(), L1TOMDSHelper::getBunchStructure(), L1TOMDSHelper::getInitBunchLumi(), L1TOMDSHelper::getNumberCollidingBunches(), L1TOMDSHelper::getRelativeBunchLumi(), L1TOMDSHelper::getWbMTriggerXsecFits(), L1GtTscObjectKeysOnlineProd::keyL1GtParameters(), L1GtRsObjectKeysOnlineProd::keyL1GtPrescaleFactorsAlgoTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtPrescaleFactorsTechTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskAlgoTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskTechTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskVetoTechTrig(), L1GtTscObjectKeysOnlineProd::keyL1GtTriggerMenu(), L1GctChannelMaskOnlineProd::newObject(), L1GctJetFinderParamsOnlineProd::newObject(), L1TUtmTriggerMenuOnlineProd::newObject(), L1TGlobalPrescalesVetosOnlineProd::newObject(), L1HfRingEtScaleOnlineProd::newObject(), L1EmEtScaleOnlineProd::newObject(), L1HtMissScaleOnlineProd::newObject(), L1JetEtScaleOnlineProd::newObject(), DTTFMasksOnlineProd::newObject(), DTTFParametersOnlineProd::newObject(), L1RCTParametersOnlineProd::newObject(), L1GtPrescaleFactorsTechTrigConfigOnlineProd::newObject(), L1CaloEcalScaleConfigOnlineProd::newObject(), L1RCTChannelMaskOnlineProd::newObject(), L1GtPrescaleFactorsAlgoTrigConfigOnlineProd::newObject(), L1CaloHcalScaleConfigOnlineProd::newObject(), L1SubsystemKeysOnlineProdExt::produce(), L1SubsystemKeysOnlineProd::produce(), L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuObjectParametersFromDB(), and L1GtTriggerMenuConfigOnlineProd::tableMenuTechTrigFromDB().

59 { return m_attributeLists.empty(); }
std::vector< coral::AttributeList > m_attributeLists
Definition: OMDSReader.h:78

Member Data Documentation

◆ m_attributeLists

std::vector<coral::AttributeList> l1t::OMDSReader::QueryResults::m_attributeLists
private

Definition at line 78 of file OMDSReader.h.

Referenced by attributeLists(), numberRows(), and queryFailed().

◆ m_columnNames

std::vector<std::string> l1t::OMDSReader::QueryResults::m_columnNames
private

Definition at line 77 of file OMDSReader.h.

Referenced by columnNames().