Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 14:22:14

0001 //---------------------------------------------
0002 //
0003 //   \class L1MuGMTHWFileReader
0004 //
0005 //   Description: Puts the GMT input information from
0006 //                a GMT ascii HW testfile into the Event
0007 //
0008 //
0009 //
0010 //   Author :
0011 //   Tobias Noebauer                 HEPHY Vienna
0012 //   Ivan Mikulec                    HEPHY Vienna
0013 //
0014 //--------------------------------------------------
0015 #ifndef L1TriggerGlobalMuonTrigger_L1MuGMTHWFileReader_h
0016 #define L1TriggerGlobalMuonTrigger_L1MuGMTHWFileReader_h
0017 
0018 //---------------
0019 // C++ Headers --
0020 //---------------
0021 #include <fstream>
0022 
0023 //----------------------
0024 // Base Class Headers --
0025 //----------------------
0026 #include "FWCore/Sources/interface/ProducerSourceFromFiles.h"
0027 
0028 //------------------------------------
0029 // Collaborating Class Declarations --
0030 //------------------------------------
0031 #include "FWCore/Framework/interface/Event.h"
0032 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0033 #include "L1Trigger/GlobalMuonTrigger/src/L1MuGMTInputEvent.h"
0034 
0035 //---------------------
0036 //-- Class Interface --
0037 //---------------------
0038 
0039 class L1MuGMTHWFileReader : public edm::ProducerSourceFromFiles {
0040 public:
0041   explicit L1MuGMTHWFileReader(edm::ParameterSet const&, edm::InputSourceDescription const&);
0042 
0043   ~L1MuGMTHWFileReader() override;
0044 
0045   //read an event from the input stream
0046   //returns an event with run and event number zero when no more events
0047   void readNextEvent();
0048 
0049 private:
0050   bool setRunAndEventInfo(edm::EventID& id,
0051                           edm::TimeValue_t& time,
0052                           edm::EventAuxiliary::ExperimentType& eType) override;
0053   void produce(edm::Event&) override;
0054 
0055   std::ifstream m_in;
0056   L1MuGMTInputEvent m_evt;
0057 };
0058 
0059 #endif  // L1TriggerGlobalMuonTrigger_L1MuGMTHWFileReader_h