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 52 of file OMDSReader.h.

Constructor & Destructor Documentation

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

Definition at line 55 of file OMDSReader.h.

Referenced by l1t::OMDSReader::basicQueryGenericKey(), and l1t::OMDSReader::singleAttribute().

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

Definition at line 56 of file OMDSReader.h.

58  : m_columnNames( columnNames), m_attributeLists( attLists ) {}
std::vector< std::string > m_columnNames
Definition: OMDSReader.h:88
std::vector< coral::AttributeList > m_attributeLists
Definition: OMDSReader.h:89
const std::vector< std::string > & columnNames() const
Definition: OMDSReader.h:62
virtual l1t::OMDSReader::QueryResults::~QueryResults ( )
inlinevirtual

Definition at line 60 of file OMDSReader.h.

60 {}

Member Function Documentation

const std::vector< coral::AttributeList >& l1t::OMDSReader::QueryResults::attributeLists ( ) const
inline
const std::vector< std::string >& l1t::OMDSReader::QueryResults::columnNames ( ) const
inline
template<class T >
bool l1t::OMDSReader::QueryResults::fillVariable ( const std::string &  columnName,
T outputVariable 
) const

Definition at line 311 of file OMDSReader.h.

References fillVariableFromRow().

Referenced by l1t::OMDSReader::basicQuery(), l1t::OMDSReader::basicQueryGenericKey(), l1t::OMDSReader::basicQueryView(), l1t::OnlineDBqueryHelper::fetch(), CSCTFObjectKeysOnlineProd::fillObjectKeys(), L1GctRSObjectKeysOnlineProd::fillObjectKeys(), L1TMuonOverlapObjectKeysOnlineProd::fillObjectKeys(), L1TUtmTriggerMenuObjectKeysOnlineProd::fillObjectKeys(), L1GctTSCObjectKeysOnlineProd::fillObjectKeys(), L1MuGMTRSKeysOnlineProd::fillObjectKeys(), L1MuGMTParametersKeysOnlineProd::fillObjectKeys(), L1MuTriggerScaleKeysOnlineProd::fillObjectKeys(), DTTFRSKeysOnlineProd::fillObjectKeys(), DTTFTSCObjectKeysOnlineProd::fillObjectKeys(), RCTObjectKeysOnlineProd::fillObjectKeys(), L1RCT_RSKeysOnlineProd::fillObjectKeys(), L1GtPsbSetupConfigOnlineProd::getRequiredValue(), L1GtTscObjectKeysOnlineProd::keyL1GtParameters(), L1GtRsObjectKeysOnlineProd::keyL1GtPrescaleFactorsAlgoTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtPrescaleFactorsTechTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskAlgoTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskTechTrig(), L1GtRsObjectKeysOnlineProd::keyL1GtTriggerMaskVetoTechTrig(), L1GtTscObjectKeysOnlineProd::keyL1GtTriggerMenu(), PhiScaleHelper::makeBinnedScale(), CSCTFAlignmentOnlineProd::newObject(), L1GctJetFinderParamsOnlineProd::newObject(), CSCTFConfigOnlineProd::newObject(), L1MuGMTChannelMaskOnlineProducer::newObject(), L1MuCSCPtLutConfigOnlineProd::newObject(), L1GctChannelMaskOnlineProd::newObject(), L1TUtmTriggerMenuOnlineProd::newObject(), L1TGlobalPrescalesVetosOnlineProd::newObject(), L1EmEtScaleOnlineProd::newObject(), DTTFParametersOnlineProd::newObject(), DTTFMasksOnlineProd::newObject(), L1JetEtScaleOnlineProd::newObject(), L1HtMissScaleOnlineProd::newObject(), L1HfRingEtScaleOnlineProd::newObject(), L1MuTriggerScalesOnlineProducer::newObject(), L1RCTParametersOnlineProd::newObject(), L1RCTChannelMaskOnlineProd::newObject(), L1CaloEcalScaleConfigOnlineProd::newObject(), L1GtTriggerMaskAlgoTrigConfigOnlineProd::newObject(), L1GtTriggerMaskVetoTechTrigConfigOnlineProd::newObject(), L1GtPrescaleFactorsAlgoTrigConfigOnlineProd::newObject(), L1GtTriggerMaskTechTrigConfigOnlineProd::newObject(), L1GtPrescaleFactorsTechTrigConfigOnlineProd::newObject(), L1GtParametersConfigOnlineProd::newObject(), L1GtPsbSetupConfigOnlineProd::newObject(), L1CaloHcalScaleConfigOnlineProd::newObject(), numberRows(), L1SubsystemKeysOnlineProdExt::produce(), L1SubsystemKeysOnlineProd::produce(), and L1GtTriggerMenuConfigOnlineProd::tableMenuGeneralFromDB().

314  {
315  return fillVariableFromRow( columnName, 0, outputVariable ) ;
316  }
bool fillVariableFromRow(const std::string &columnName, int rowNumber, T &outputVariable) const
Definition: OMDSReader.h:319
template<class T >
bool l1t::OMDSReader::QueryResults::fillVariable ( T outputVariable) const

Definition at line 333 of file OMDSReader.h.

References fillVariableFromRow().

334  {
335  return fillVariableFromRow( 0, outputVariable ) ;
336  }
bool fillVariableFromRow(const std::string &columnName, int rowNumber, T &outputVariable) const
Definition: OMDSReader.h:319
template<class T >
bool l1t::OMDSReader::QueryResults::fillVariableFromRow ( const std::string &  columnName,
int  rowNumber,
T outputVariable 
) const

Definition at line 319 of file OMDSReader.h.

References funct::false, m_attributeLists, numberRows(), and funct::true.

Referenced by L1RCTParametersOnlineProd::fillScaleFactors(), fillVariable(), L1TOMDSHelper::getBeamConfiguration(), L1TOMDSHelper::getBunchStructure(), L1TOMDSHelper::getInitBunchLumi(), L1TOMDSHelper::getNumberCollidingBunches(), L1TOMDSHelper::getRelativeBunchLumi(), L1TOMDSHelper::getWbMTriggerXsecFits(), L1CaloEcalScaleConfigOnlineProd::newObject(), L1GtPrescaleFactorsAlgoTrigConfigOnlineProd::newObject(), L1GtPrescaleFactorsTechTrigConfigOnlineProd::newObject(), L1CaloHcalScaleConfigOnlineProd::newObject(), numberRows(), L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuObjectParametersFromDB(), and L1GtTriggerMenuConfigOnlineProd::tableMenuTechTrigFromDB().

323  {
324  // Check index in bounds
325  if( rowNumber < 0 || rowNumber >= numberRows() ) return false ;
326  const coral::AttributeList& row = m_attributeLists[ rowNumber ] ;
327  if( row[ columnName ].isNull() ) return false ;
328  outputVariable = row[ columnName ].template data< T >() ;
329  return true ;
330  }
std::vector< coral::AttributeList > m_attributeLists
Definition: OMDSReader.h:89
template<class T >
bool l1t::OMDSReader::QueryResults::fillVariableFromRow ( int  rowNumber,
T outputVariable 
) const

Definition at line 339 of file OMDSReader.h.

References m_attributeLists, m_columnNames, numberRows(), and funct::true.

341  {
342  // Check index in bounds and only one column
343  if( rowNumber < 0 || rowNumber >= numberRows() ||
344  m_columnNames.size() != 1 ) return false ;
345  const coral::AttributeList& row = m_attributeLists[ rowNumber ] ;
346  if( row[ m_columnNames.front() ].isNull() ) return false ;
347  outputVariable = row[ m_columnNames.front() ].template data< T >() ;
348  return true ;
349  }
std::vector< std::string > m_columnNames
Definition: OMDSReader.h:88
std::vector< coral::AttributeList > m_attributeLists
Definition: OMDSReader.h:89
int l1t::OMDSReader::QueryResults::numberRows ( ) const
inline

Definition at line 67 of file OMDSReader.h.

References fillVariable(), fillVariableFromRow(), m_attributeLists, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by l1t::OMDSReader::basicQuery(), l1t::OMDSReader::basicQueryGenericKey(), l1t::OMDSReader::basicQueryView(), L1GtPsbSetupConfigOnlineProd::checkOneLineResult(), l1t::OnlineDBqueryHelper::fetch(), L1GctRSObjectKeysOnlineProd::fillObjectKeys(), CSCTFObjectKeysOnlineProd::fillObjectKeys(), L1TUtmTriggerMenuObjectKeysOnlineProd::fillObjectKeys(), L1TMuonOverlapObjectKeysOnlineProd::fillObjectKeys(), L1GctTSCObjectKeysOnlineProd::fillObjectKeys(), L1MuGMTRSKeysOnlineProd::fillObjectKeys(), L1MuGMTParametersKeysOnlineProd::fillObjectKeys(), L1MuTriggerScaleKeysOnlineProd::fillObjectKeys(), DTTFTSCObjectKeysOnlineProd::fillObjectKeys(), DTTFRSKeysOnlineProd::fillObjectKeys(), RCTObjectKeysOnlineProd::fillObjectKeys(), L1RCT_RSKeysOnlineProd::fillObjectKeys(), L1RCTParametersOnlineProd::fillScaleFactors(), fillVariableFromRow(), 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(), L1MuTriggerPtScaleOnlineProducer::newObject(), DTTFParametersOnlineProd::newObject(), L1EmEtScaleOnlineProd::newObject(), L1HtMissScaleOnlineProd::newObject(), L1JetEtScaleOnlineProd::newObject(), L1HfRingEtScaleOnlineProd::newObject(), DTTFMasksOnlineProd::newObject(), L1MuTriggerScalesOnlineProducer::newObject(), L1RCTParametersOnlineProd::newObject(), L1CaloEcalScaleConfigOnlineProd::newObject(), L1RCTChannelMaskOnlineProd::newObject(), L1GtPrescaleFactorsAlgoTrigConfigOnlineProd::newObject(), L1GtPrescaleFactorsTechTrigConfigOnlineProd::newObject(), L1CaloHcalScaleConfigOnlineProd::newObject(), L1SubsystemKeysOnlineProdExt::produce(), L1SubsystemKeysOnlineProd::produce(), L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuObjectParametersFromDB(), and L1GtTriggerMenuConfigOnlineProd::tableMenuTechTrigFromDB().

67 { return m_attributeLists.size() ; }
std::vector< coral::AttributeList > m_attributeLists
Definition: OMDSReader.h:89
bool l1t::OMDSReader::QueryResults::queryFailed ( ) const
inline

Definition at line 66 of file OMDSReader.h.

References m_attributeLists.

Referenced by L1GtPsbSetupConfigOnlineProd::checkOneLineResult(), l1t::OnlineDBqueryHelper::fetch(), L1GctRSObjectKeysOnlineProd::fillObjectKeys(), CSCTFObjectKeysOnlineProd::fillObjectKeys(), L1TMuonOverlapObjectKeysOnlineProd::fillObjectKeys(), L1TUtmTriggerMenuObjectKeysOnlineProd::fillObjectKeys(), L1GctTSCObjectKeysOnlineProd::fillObjectKeys(), L1MuGMTRSKeysOnlineProd::fillObjectKeys(), L1MuGMTParametersKeysOnlineProd::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(), CSCTFAlignmentOnlineProd::newObject(), L1GctChannelMaskOnlineProd::newObject(), L1GctJetFinderParamsOnlineProd::newObject(), CSCTFConfigOnlineProd::newObject(), L1MuGMTChannelMaskOnlineProducer::newObject(), L1MuCSCPtLutConfigOnlineProd::newObject(), L1TUtmTriggerMenuOnlineProd::newObject(), L1TGlobalPrescalesVetosOnlineProd::newObject(), L1EmEtScaleOnlineProd::newObject(), L1JetEtScaleOnlineProd::newObject(), L1HtMissScaleOnlineProd::newObject(), DTTFMasksOnlineProd::newObject(), DTTFParametersOnlineProd::newObject(), L1HfRingEtScaleOnlineProd::newObject(), L1RCTParametersOnlineProd::newObject(), L1RCTChannelMaskOnlineProd::newObject(), L1CaloEcalScaleConfigOnlineProd::newObject(), L1GtPrescaleFactorsTechTrigConfigOnlineProd::newObject(), L1GtTriggerMaskTechTrigConfigOnlineProd::newObject(), L1GtPrescaleFactorsAlgoTrigConfigOnlineProd::newObject(), L1GtTriggerMaskAlgoTrigConfigOnlineProd::newObject(), L1GtTriggerMaskVetoTechTrigConfigOnlineProd::newObject(), L1GtParametersConfigOnlineProd::newObject(), L1CaloHcalScaleConfigOnlineProd::newObject(), L1SubsystemKeysOnlineProdExt::produce(), L1SubsystemKeysOnlineProd::produce(), L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuGeneralFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuObjectParametersFromDB(), and L1GtTriggerMenuConfigOnlineProd::tableMenuTechTrigFromDB().

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

Member Data Documentation

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

Definition at line 89 of file OMDSReader.h.

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

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

Definition at line 88 of file OMDSReader.h.

Referenced by columnNames(), and fillVariableFromRow().