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

References fillVariableFromRow().

Referenced by l1t::OMDSReader::basicQuery(), l1t::OMDSReader::basicQueryGenericKey(), l1t::OMDSReader::basicQueryView(), CSCTFObjectKeysOnlineProd::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(), L1MuCSCPtLutConfigOnlineProd::newObject(), L1MuGMTChannelMaskOnlineProducer::newObject(), CSCTFConfigOnlineProd::newObject(), L1GctChannelMaskOnlineProd::newObject(), L1GctJetFinderParamsOnlineProd::newObject(), DTTFParametersOnlineProd::newObject(), L1CaloEcalScaleConfigOnlineProd::newObject(), L1RCTChannelMaskOnlineProd::newObject(), L1GtTriggerMaskTechTrigConfigOnlineProd::newObject(), L1GtPrescaleFactorsAlgoTrigConfigOnlineProd::newObject(), L1GtTriggerMaskVetoTechTrigConfigOnlineProd::newObject(), L1GtParametersConfigOnlineProd::newObject(), L1GtTriggerMaskAlgoTrigConfigOnlineProd::newObject(), L1GtPrescaleFactorsTechTrigConfigOnlineProd::newObject(), L1GtPsbSetupConfigOnlineProd::newObject(), 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.

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 edm::false, and funct::true.

Referenced by L1RCTParametersOnlineProd::fillScaleFactors(), fillVariable(), L1TOMDSHelper::getBeamConfiguration(), L1TOMDSHelper::getBunchStructure(), L1TOMDSHelper::getInitBunchLumi(), L1TOMDSHelper::getNumberCollidingBunches(), L1TOMDSHelper::getRelativeBunchLumi(), L1TOMDSHelper::getWbMTriggerXsecFits(), L1CaloEcalScaleConfigOnlineProd::newObject(), L1CaloHcalScaleConfigOnlineProd::newObject(), L1GtPrescaleFactorsTechTrigConfigOnlineProd::newObject(), L1GtPrescaleFactorsAlgoTrigConfigOnlineProd::newObject(), 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:90
volatile std::atomic< bool > shutdown_flag false
template<class T >
bool l1t::OMDSReader::QueryResults::fillVariableFromRow ( int  rowNumber,
T outputVariable 
) const

Definition at line 339 of file OMDSReader.h.

References 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: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(), CSCTFObjectKeysOnlineProd::fillObjectKeys(), L1GctRSObjectKeysOnlineProd::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(), L1CaloHcalScaleConfigOnlineProd::newObject(), L1GtPrescaleFactorsTechTrigConfigOnlineProd::newObject(), L1GtPrescaleFactorsAlgoTrigConfigOnlineProd::newObject(), 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(), 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(), L1GctJetFinderParamsOnlineProd::newObject(), CSCTFConfigOnlineProd::newObject(), L1MuGMTChannelMaskOnlineProducer::newObject(), L1MuCSCPtLutConfigOnlineProd::newObject(), L1GctChannelMaskOnlineProd::newObject(), DTTFParametersOnlineProd::newObject(), L1RCTParametersOnlineProd::newObject(), L1CaloHcalScaleConfigOnlineProd::newObject(), L1GtPrescaleFactorsAlgoTrigConfigOnlineProd::newObject(), L1GtPrescaleFactorsTechTrigConfigOnlineProd::newObject(), L1GtTriggerMaskVetoTechTrigConfigOnlineProd::newObject(), L1GtTriggerMaskTechTrigConfigOnlineProd::newObject(), L1GtParametersConfigOnlineProd::newObject(), L1GtTriggerMaskAlgoTrigConfigOnlineProd::newObject(), 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().