CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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 53 of file OMDSReader.h.

Constructor & Destructor Documentation

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

Definition at line 56 of file OMDSReader.h.

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

Definition at line 57 of file OMDSReader.h.

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

Definition at line 61 of file OMDSReader.h.

61 {}

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

Definition at line 63 of file OMDSReader.h.

References m_columnNames.

Referenced by l1t::OMDSReader::basicQuery(), l1t::OMDSReader::basicQueryGenericKey(), and l1t::OMDSReader::basicQueryView().

64  { return m_columnNames ; }
std::vector< std::string > m_columnNames
Definition: OMDSReader.h:89
template<class T >
bool l1t::OMDSReader::QueryResults::fillVariable ( const std::string &  columnName,
T outputVariable 
) const

Definition at line 312 of file OMDSReader.h.

References fillVariableFromRow().

Referenced by l1t::OMDSReader::basicQuery(), l1t::OMDSReader::basicQueryGenericKey(), l1t::OMDSReader::basicQueryView(), CSCTFObjectKeysOnlineProd::fillObjectKeys(), L1TMuonEndcapObjectKeysOnlineProd::fillObjectKeys(), L1TMuonOverlapObjectKeysOnlineProd::fillObjectKeys(), L1TUtmTriggerMenuObjectKeysOnlineProd::fillObjectKeys(), L1GctRSObjectKeysOnlineProd::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(), L1MuGMTChannelMaskOnlineProducer::newObject(), L1GctJetFinderParamsOnlineProd::newObject(), L1MuCSCPtLutConfigOnlineProd::newObject(), L1GctChannelMaskOnlineProd::newObject(), CSCTFConfigOnlineProd::newObject(), DTTFParametersOnlineProd::newObject(), L1CaloEcalScaleConfigOnlineProd::newObject(), L1RCTChannelMaskOnlineProd::newObject(), L1GtTriggerMaskAlgoTrigConfigOnlineProd::newObject(), L1GtTriggerMaskTechTrigConfigOnlineProd::newObject(), L1GtParametersConfigOnlineProd::newObject(), L1GtPrescaleFactorsAlgoTrigConfigOnlineProd::newObject(), L1GtTriggerMaskVetoTechTrigConfigOnlineProd::newObject(), L1GtPrescaleFactorsTechTrigConfigOnlineProd::newObject(), L1GtPsbSetupConfigOnlineProd::newObject(), L1SubsystemKeysOnlineProdExt::produce(), L1SubsystemKeysOnlineProd::produce(), and L1GtTriggerMenuConfigOnlineProd::tableMenuGeneralFromDB().

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

Definition at line 334 of file OMDSReader.h.

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

Definition at line 320 of file OMDSReader.h.

References edm::false, 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(), L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuObjectParametersFromDB(), and L1GtTriggerMenuConfigOnlineProd::tableMenuTechTrigFromDB().

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

Definition at line 340 of file OMDSReader.h.

References funct::true.

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

Definition at line 68 of file OMDSReader.h.

References m_attributeLists.

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

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

Definition at line 67 of file OMDSReader.h.

References m_attributeLists.

Referenced by L1GtPsbSetupConfigOnlineProd::checkOneLineResult(), L1GctRSObjectKeysOnlineProd::fillObjectKeys(), L1TMuonEndcapObjectKeysOnlineProd::fillObjectKeys(), L1TMuonOverlapObjectKeysOnlineProd::fillObjectKeys(), L1TUtmTriggerMenuObjectKeysOnlineProd::fillObjectKeys(), CSCTFObjectKeysOnlineProd::fillObjectKeys(), L1GctTSCObjectKeysOnlineProd::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(), CSCTFAlignmentOnlineProd::newObject(), L1GctChannelMaskOnlineProd::newObject(), L1GctJetFinderParamsOnlineProd::newObject(), CSCTFConfigOnlineProd::newObject(), L1MuCSCPtLutConfigOnlineProd::newObject(), L1MuGMTChannelMaskOnlineProducer::newObject(), DTTFParametersOnlineProd::newObject(), L1RCTParametersOnlineProd::newObject(), L1GtTriggerMaskAlgoTrigConfigOnlineProd::newObject(), L1GtPrescaleFactorsTechTrigConfigOnlineProd::newObject(), L1GtTriggerMaskVetoTechTrigConfigOnlineProd::newObject(), L1GtTriggerMaskTechTrigConfigOnlineProd::newObject(), L1GtPrescaleFactorsAlgoTrigConfigOnlineProd::newObject(), L1GtParametersConfigOnlineProd::newObject(), L1CaloHcalScaleConfigOnlineProd::newObject(), L1SubsystemKeysOnlineProdExt::produce(), L1SubsystemKeysOnlineProd::produce(), L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuAlgoFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuCondFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuGeneralFromDB(), L1GtTriggerMenuConfigOnlineProd::tableMenuObjectParametersFromDB(), and L1GtTriggerMenuConfigOnlineProd::tableMenuTechTrigFromDB().

67 { return m_attributeLists.size() == 0 ; }
std::vector< coral::AttributeList > m_attributeLists
Definition: OMDSReader.h:90

Member Data Documentation

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

Definition at line 90 of file OMDSReader.h.

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

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

Definition at line 89 of file OMDSReader.h.

Referenced by columnNames().