CMS 3D CMS Logo

/data/refman/pasoursint/CMSSW_6_1_2_SLHC2/src/L1Trigger/GlobalMuonTrigger/src/L1MuGMTHWFileReader.h

Go to the documentation of this file.
00001 //---------------------------------------------
00002 //
00003 //   \class L1MuGMTHWFileReader
00004 //
00005 //   Description: Puts the GMT input information from 
00006 //                a GMT ascii HW testfile into the Event   
00007 //
00008 //
00009 //   $Date: 2012/11/19 21:03:41 $
00010 //   $Revision: 1.3 $
00011 //
00012 //   Author :
00013 //   Tobias Noebauer                 HEPHY Vienna
00014 //   Ivan Mikulec                    HEPHY Vienna
00015 //
00016 //--------------------------------------------------
00017 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTHWFileReader_h
00018 #define L1TriggerGlobalMuonTrigger_L1MuGMTHWFileReader_h
00019 
00020 //---------------
00021 // C++ Headers --
00022 //---------------
00023 #include <fstream>
00024 
00025 //----------------------
00026 // Base Class Headers --
00027 //----------------------
00028 #include "FWCore/Sources/interface/ProducerSourceFromFiles.h"
00029 
00030 //------------------------------------
00031 // Collaborating Class Declarations --
00032 //------------------------------------
00033 #include "FWCore/Framework/interface/Event.h"
00034 #include "FWCore/ParameterSet/interface/ParameterSet.h"
00035 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTInputEvent.h"
00036 
00037 //---------------------
00038 //-- Class Interface --
00039 //---------------------
00040 
00041 class L1MuGMTHWFileReader : public edm::ProducerSourceFromFiles {
00042 
00043  public:
00044   explicit L1MuGMTHWFileReader(edm::ParameterSet const&,
00045                                edm::InputSourceDescription const&);
00046 
00047   ~L1MuGMTHWFileReader();
00048 
00049   //read an event from the input stream
00050   //returns an event with run and event number zero when no more events
00051   void readNextEvent();
00052 
00053 
00054  private:
00055    virtual bool setRunAndEventInfo(edm::EventID& id, edm::TimeValue_t& time);
00056    virtual void produce(edm::Event&);
00057 
00058    std::ifstream m_in;
00059    L1MuGMTInputEvent m_evt;
00060 };
00061 
00062 #endif // L1TriggerGlobalMuonTrigger_L1MuGMTHWFileReader_h