CMS 3D CMS Logo

/data/doxygen/doxygen-1.7.3/gen/CMSSW_4_2_8/src/L1TriggerConfig/DTTrackFinder/src/DTTFTSCObjectKeysOnlineProd.cc

Go to the documentation of this file.
00001 // -*- C++ -*-
00002 //
00003 // Package:    L1TriggerConfig
00004 // Class:      DTTFTSCObjectKeysOnlineProd
00005 // 
00013 //
00014 // Original Author:  Werner Man-Li Sun
00015 //         Created:  Thu Oct  2 21:43:50 CEST 2008
00016 // $Id: DTTFTSCObjectKeysOnlineProd.cc,v 1.2 2009/05/25 14:05:01 wsun Exp $
00017 //
00018 //
00019 
00020 
00021 // system include files
00022 
00023 // user include files
00024 #include "CondTools/L1Trigger/interface/L1ObjectKeysOnlineProdBase.h"
00025 
00026 #include "FWCore/MessageLogger/interface/MessageLogger.h"
00027 
00028 //
00029 // class declaration
00030 //
00031 
00032 class DTTFTSCObjectKeysOnlineProd : public L1ObjectKeysOnlineProdBase {
00033    public:
00034       DTTFTSCObjectKeysOnlineProd(const edm::ParameterSet&);
00035       ~DTTFTSCObjectKeysOnlineProd();
00036 
00037       virtual void fillObjectKeys( ReturnType pL1TriggerKey ) ;
00038    private:
00039       // ----------member data ---------------------------
00040 };
00041 
00042 //
00043 // constants, enums and typedefs
00044 //
00045 
00046 //
00047 // static data member definitions
00048 //
00049 
00050 //
00051 // constructors and destructor
00052 //
00053 DTTFTSCObjectKeysOnlineProd::DTTFTSCObjectKeysOnlineProd(const edm::ParameterSet& iConfig)
00054   : L1ObjectKeysOnlineProdBase( iConfig )
00055 {}
00056 
00057 
00058 DTTFTSCObjectKeysOnlineProd::~DTTFTSCObjectKeysOnlineProd()
00059 {
00060  
00061    // do anything here that needs to be done at desctruction time
00062    // (e.g. close files, deallocate resources etc.)
00063 
00064 }
00065 
00066 
00067 //
00068 // member functions
00069 //
00070 
00071 // ------------ method called to produce the data  ------------
00072 void
00073 DTTFTSCObjectKeysOnlineProd::fillObjectKeys( ReturnType pL1TriggerKey )
00074 {
00075   std::string dttfKey = pL1TriggerKey->subsystemKey( L1TriggerKey::kDTTF ) ;
00076 
00077   if( !dttfKey.empty() )
00078     {
00079       // SELECT LUT_KEY FROM CMS_DT_TF.DTTF_CONF WHERE DTTF_CONF.ID = dttfKey
00080       l1t::OMDSReader::QueryResults lutKeyResults =
00081         m_omdsReader.basicQuery( "LUT_KEY",
00082                                  "CMS_DT_TF",
00083                                  "DTTF_CONF",
00084                                  "DTTF_CONF.ID",
00085                                  m_omdsReader.singleAttribute( dttfKey  ) );
00086 
00087 
00088       if( lutKeyResults.queryFailed() ||
00089           lutKeyResults.numberRows() != 1 ) // check query successful
00090         {
00091           edm::LogError( "L1-O2O" ) << "Problem with DTTF key." ;
00092           return ;
00093         }
00094 
00095       std::string lutKey ;
00096       lutKeyResults.fillVariable( lutKey ) ;
00097 
00098       pL1TriggerKey->add( "L1MuDTEtaPatternLutRcd",
00099                           "L1MuDTEtaPatternLut",
00100                           lutKey ) ;
00101 
00102       pL1TriggerKey->add( "L1MuDTExtLutRcd",
00103                           "L1MuDTExtLut",
00104                           lutKey ) ;
00105 
00106       pL1TriggerKey->add( "L1MuDTPhiLutRcd",
00107                           "L1MuDTPhiLut",
00108                           lutKey ) ;
00109 
00110       pL1TriggerKey->add( "L1MuDTPtaLutRcd",
00111                           "L1MuDTPtaLut",
00112                           lutKey ) ;
00113 
00114       pL1TriggerKey->add( "L1MuDTQualPatternLutRcd",
00115                           "L1MuDTQualPatternLut",
00116                           lutKey ) ;
00117 
00118       pL1TriggerKey->add( "L1MuDTTFParametersRcd",
00119                           "L1MuDTTFParameters",
00120                           dttfKey ) ;
00121     }
00122 }
00123 
00124 //define this as a plug-in
00125 DEFINE_FWK_EVENTSETUP_MODULE(DTTFTSCObjectKeysOnlineProd);