CMS 3D CMS Logo

Public Member Functions

L1MuCSCPtLutConfigOnlineProd Class Reference

#include <L1MuCSCPtLutConfigOnlineProd.h>

Inheritance diagram for L1MuCSCPtLutConfigOnlineProd:
L1ConfigOnlineProdBase< L1MuCSCPtLutRcd, L1MuCSCPtLut > edm::ESProducer edm::ESProxyFactoryProducer edm::eventsetup::DataProxyProvider

List of all members.

Public Member Functions

 L1MuCSCPtLutConfigOnlineProd (const edm::ParameterSet &iConfig)
virtual boost::shared_ptr
< L1MuCSCPtLut
newObject (const std::string &objectKey)
 ~L1MuCSCPtLutConfigOnlineProd ()

Detailed Description

Definition at line 5 of file L1MuCSCPtLutConfigOnlineProd.h.


Constructor & Destructor Documentation

L1MuCSCPtLutConfigOnlineProd::L1MuCSCPtLutConfigOnlineProd ( const edm::ParameterSet iConfig) [inline]
L1MuCSCPtLutConfigOnlineProd::~L1MuCSCPtLutConfigOnlineProd ( ) [inline]

Definition at line 9 of file L1MuCSCPtLutConfigOnlineProd.h.

{}

Member Function Documentation

boost::shared_ptr< L1MuCSCPtLut > L1MuCSCPtLutConfigOnlineProd::newObject ( const std::string &  objectKey) [virtual]

Implements L1ConfigOnlineProdBase< L1MuCSCPtLutRcd, L1MuCSCPtLut >.

Definition at line 4 of file L1MuCSCPtLutConfigOnlineProd.cc.

References l1t::OMDSReader::basicQuery(), l1t::OMDSReader::QueryResults::fillVariable(), L1ConfigOnlineProdBase< L1MuCSCPtLutRcd, L1MuCSCPtLut >::m_omdsReader, l1t::OMDSReader::QueryResults::queryFailed(), L1MuCSCPtLut::readFromDBS(), python::entryComment::results, and l1t::OMDSReader::singleAttribute().

{

  edm::LogInfo( "L1-O2O: L1MuCSCPtLutConfigOnlineProd" ) << "Producing "
                                                         << "L1MuCSCPtLut "
                                                         << "with key PTLUT_VERSION="
                                                         << objectKey;
  
  // read the Pt_LUT: it is CLOB with 2^21 different values 
  //SELECT PT_LUT FROM CMS_CSC_TF.CSCTF_PTLUS WHERE CSCTF_PTLUS.PTLUT_VERSION = objectKey
  l1t::OMDSReader::QueryResults results = m_omdsReader.basicQuery(
                                                                  "PT_LUT",
                                                                  "CMS_CSC_TF",
                                                                  "CSCTF_PTLUTS",
                                                                  "CSCTF_PTLUTS.PTLUT_VERSION",
                                                                  m_omdsReader.singleAttribute(objectKey)
                                                                  ) ;
  
  // check if query was successful
  if( results.queryFailed() ) 
    {
      edm::LogError( "L1-O2O" ) << "Problem with L1MuCSCPtLutParameters key" ;
      // return empty object
      return boost::shared_ptr< L1MuCSCPtLut >() ;
    }
  
  
  std::string ptlut;
  results.fillVariable( ptlut ) ;
  
  // if uncommented it will generate a huge output...
  //edm::LogInfo( "L1-O2O: L1MuCSCPtLutConfigOnlineProd" ) << "PtLUT is "
  //                                                       << "ptlut";
  
  edm::LogInfo( "L1-O2O: L1MuCSCPtLutConfigOnlineProd" ) << "Returning L1MuCSCPtLut";

  L1MuCSCPtLut* CSCTFPtLut = new L1MuCSCPtLut();
  CSCTFPtLut->readFromDBS(ptlut);

  return boost::shared_ptr< L1MuCSCPtLut >( CSCTFPtLut ) ;
}