Public Member Functions | |
L1HfRingEtScaleOnlineProd (const edm::ParameterSet &) | |
virtual boost::shared_ptr < L1CaloEtScale > | newObject (const std::string &objectKey) |
~L1HfRingEtScaleOnlineProd () |
Description: <one line="" class="" summary>="">
Implementation: <Notes on="" implementation>="">
Definition at line 34 of file L1HfRingEtScaleOnlineProd.cc.
L1HfRingEtScaleOnlineProd::L1HfRingEtScaleOnlineProd | ( | const edm::ParameterSet & | iConfig | ) |
Definition at line 59 of file L1HfRingEtScaleOnlineProd.cc.
: L1ConfigOnlineProdBase< L1HfRingEtScaleRcd, L1CaloEtScale >( iConfig ) { //the following line is needed to tell the framework what // data is being produced //now do what ever other initialization is needed }
L1HfRingEtScaleOnlineProd::~L1HfRingEtScaleOnlineProd | ( | ) |
Definition at line 70 of file L1HfRingEtScaleOnlineProd.cc.
{ // do anything here that needs to be done at desctruction time // (e.g. close files, deallocate resources etc.) }
boost::shared_ptr< L1CaloEtScale > L1HfRingEtScaleOnlineProd::newObject | ( | const std::string & | objectKey | ) | [virtual] |
Implements L1ConfigOnlineProdBase< L1HfRingEtScaleRcd, L1CaloEtScale >.
Definition at line 79 of file L1HfRingEtScaleOnlineProd.cc.
References l1t::OMDSReader::basicQuery(), L1ConfigOnlineProdBase< L1HfRingEtScaleRcd, L1CaloEtScale >::m_omdsReader, l1t::OMDSReader::singleAttribute(), and ExpressReco_HICollisions_FallBack::thresh.
{ using namespace edm::es; // get scales keys l1t::OMDSReader::QueryResults scalesKeyResults = m_omdsReader.basicQuery( "GCT_SCALES_KEY", "CMS_GCT", "GCT_PHYS_PARAMS", "GCT_PHYS_PARAMS.CONFIG_KEY", m_omdsReader.singleAttribute( objectKey ) ); std::string scalesKey ; if( scalesKeyResults.queryFailed() ) { edm::LogError("L1-O2O") << "Problem with key for L1JetEtScaleRcd : GCT scales key query failed "; } else if( scalesKeyResults.numberRows() != 1 ) { edm::LogError("L1-O2O") << "Problem with key for L1JetEtScaleRcd : " << (scalesKeyResults.numberRows()) << " rows were returned when getting GCT scales key"; } else { scalesKeyResults.fillVariable( scalesKey ); } // get ring scale key l1t::OMDSReader::QueryResults hfRingScaleKeyResults = m_omdsReader.basicQuery( "SC_HF_ET_SUM_FK", "CMS_GT", "L1T_SCALES", "L1T_SCALES.ID", scalesKeyResults ); std::string hfRingScaleKey ; if( hfRingScaleKeyResults.queryFailed() ) { edm::LogError("L1-O2O") << "Problem with key for L1HfRingEtScaleRcd : HF ring Et scale key query failed "; } else if( hfRingScaleKeyResults.numberRows() != 1 ) { edm::LogError("L1-O2O") << "Problem with key for L1HfRingEtScaleRcd : " << (hfRingScaleKeyResults.numberRows()) << " rows were returned when getting HF ring Et scale key"; } else { hfRingScaleKeyResults.fillVariable( hfRingScaleKey ) ; } // get thresholds std::vector< std::string > queryStrings ; queryStrings.push_back( "E_GEV_BIN_LOW_0"); queryStrings.push_back( "E_GEV_BIN_LOW_1"); queryStrings.push_back( "E_GEV_BIN_LOW_2"); queryStrings.push_back( "E_GEV_BIN_LOW_3"); queryStrings.push_back( "E_GEV_BIN_LOW_4"); queryStrings.push_back( "E_GEV_BIN_LOW_5"); queryStrings.push_back( "E_GEV_BIN_LOW_6"); queryStrings.push_back( "E_GEV_BIN_LOW_7"); l1t::OMDSReader::QueryResults scaleResults = m_omdsReader.basicQuery( queryStrings, "CMS_GT", "L1T_SCALE_HF_ET_SUM", "L1T_SCALE_HF_ET_SUM.ID", hfRingScaleKeyResults ); std::vector<double> thresholds; if( scaleResults.queryFailed() ) { edm::LogError( "L1-O2O" ) << "Problem with L1HfRingEtScale key : scale query failed." ; } else if ( scaleResults.numberRows() != 1 ) { edm::LogError( "L1-O2O" ) << "Problem with L1HfRingEtScale key : scale query failed." ; } else { for( std::vector< std::string >::iterator thresh = queryStrings.begin(); thresh != queryStrings.end(); ++thresh) { float tempScale; scaleResults.fillVariable(*thresh,tempScale); thresholds.push_back(tempScale); } } // get region LSB double rgnEtLsb=0.; l1t::OMDSReader::QueryResults lsbResults = m_omdsReader.basicQuery( "GCT_RGN_ET_LSB", "CMS_GCT", "GCT_PHYS_PARAMS", "GCT_PHYS_PARAMS.CONFIG_KEY", m_omdsReader.singleAttribute( objectKey ) ) ; if( lsbResults.queryFailed() ) { edm::LogError( "L1-O2O" ) << "Problem with L1JetEtScale key." ; } else { lsbResults.fillVariable( "GCT_RGN_ET_LSB", rgnEtLsb ); } //~~~~~~~~~ Instantiate new L1HfRingEtScale object. ~~~~~~~~~ return boost::shared_ptr< L1CaloEtScale >( new L1CaloEtScale(0xff, 0x7, rgnEtLsb, thresholds ) ); }