CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_4_4_5_patch3/src/EventFilter/L1GlobalTriggerRawToDigi/interface/ConditionDumperInEdm.h

Go to the documentation of this file.
00001 #ifndef ConditionDumperInEdm_H
00002 #define ConditionDumperInEdm_H
00003 // -*- C++ -*-
00004 //
00005 // Package:    ConditionDumperInEdm
00006 // Class:      ConditionDumperInEdm
00007 // 
00015 //
00016 // Original Author:  Jean-Roch Vlimant,40 3-A28,+41227671209,
00017 //         Created:  Thu Feb 11 19:46:28 CET 2010
00018 // $Id: ConditionDumperInEdm.h,v 1.3 2010/03/16 23:58:25 ghete Exp $
00019 //
00020 //
00021 
00022 
00023 // system include files
00024 #include <memory>
00025 
00026 // user include files
00027 #include "FWCore/Framework/interface/Frameworkfwd.h"
00028 #include "FWCore/Framework/interface/EDProducer.h"
00029 
00030 #include "FWCore/Framework/interface/LuminosityBlock.h"
00031 #include "FWCore/Framework/interface/Run.h"
00032 #include "FWCore/Framework/interface/Event.h"
00033 #include "FWCore/Framework/interface/MakerMacros.h"
00034 
00035 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00036 
00037 #include "FWCore/Framework/interface/EventSetup.h"
00038 #include "FWCore/Framework/interface/ESHandle.h"
00039 
00040 #include "FWCore/Utilities/interface/InputTag.h"
00041 
00042 #include "DataFormats/Common/interface/ConditionsInEdm.h"
00043 
00044 //
00045 // class declaration
00046 //
00047 
00048 class ConditionDumperInEdm : public edm::EDProducer {
00049    public:
00050       explicit ConditionDumperInEdm(const edm::ParameterSet&);
00051       ~ConditionDumperInEdm();
00052 
00053    private:
00054       virtual void beginLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&);
00055       virtual void endLuminosityBlock(edm::LuminosityBlock&, edm::EventSetup const&);
00056       virtual void beginRun(edm::Run& , const edm::EventSetup&);
00057       virtual void endRun(edm::Run& , const edm::EventSetup&);
00058       virtual void produce(edm::Event&, const edm::EventSetup&);
00059 
00060   template <typename R, typename T>
00061   const T * get(const edm::EventSetup & setup) {
00062     edm::ESHandle<T> handle;
00063     setup.get<R>().get(handle);
00064     return handle.product();
00065   }
00066 
00067   // ----------member data ---------------------------
00068 
00069   edm::InputTag gtEvmDigisLabel_;
00070 
00071   edm::ConditionsInLumiBlock lumiBlock_;
00072   edm::ConditionsInRunBlock runBlock_;
00073   edm::ConditionsInEventBlock eventBlock_;
00074 
00075 };
00076 
00077 #endif