Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2022-06-07 22:22:47

0001 #ifndef RCTINPUTTEXTTODIGI_H
0002 #define RCTINPUTTEXTTODIGI_H
0003 
0004 // -*- C++ -*-
0005 //
0006 // Class:      RctInputTextToDigi
0007 //
0008 /**\class RctInputTextToDigi L1Trigger/TextToDigi/plugins/RctInputTextToDigi.cc
0009  L1Trigger/TextToDigi/plugins/RctInputTextToDigi.h
0010 
0011  Description: Creates an EcalTrigPrimDigiCollection and an
0012  HcalTrigPrimDigiCollection from a text file (formatted as
0013  read out from saveRCTInput module), for input to the
0014  L1Trigger/RegionalCaloTrigger module.
0015 
0016 */
0017 
0018 //
0019 // Original Author:  jleonard
0020 //         Created:  Fri Sep 21 16:16:27 CEST 2007
0021 //
0022 //
0023 
0024 // system include files
0025 #include <fstream>
0026 #include <iostream>
0027 #include <memory>
0028 #include <string>
0029 
0030 // user include files
0031 #include "FWCore/Framework/interface/one/EDProducer.h"
0032 #include "FWCore/Framework/interface/ESHandle.h"
0033 #include "FWCore/Framework/interface/Event.h"
0034 #include "FWCore/Framework/interface/EventSetup.h"
0035 #include "FWCore/Framework/interface/Frameworkfwd.h"
0036 #include "FWCore/Framework/interface/MakerMacros.h"
0037 
0038 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0039 
0040 #include "CondFormats/DataRecord/interface/L1RCTParametersRcd.h"
0041 #include "CondFormats/L1TObjects/interface/L1RCTParameters.h"
0042 #include "DataFormats/EcalDigi/interface/EcalDigiCollections.h"
0043 #include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
0044 #include "L1Trigger/RegionalCaloTrigger/interface/L1RCTLookupTables.h"
0045 
0046 //
0047 // class declaration
0048 //
0049 
0050 class RctInputTextToDigi : public edm::one::EDProducer<> {
0051 public:
0052   explicit RctInputTextToDigi(const edm::ParameterSet &);
0053   ~RctInputTextToDigi() override;
0054 
0055 private:
0056   void beginJob() override;
0057   void produce(edm::Event &, const edm::EventSetup &) override;
0058   void endJob() override;
0059 
0060   // ----------member data ---------------------------
0061 
0062   edm::FileInPath inputFile_;
0063   std::ifstream inputStream_;
0064   L1RCTLookupTables *lookupTables_;
0065   edm::ESGetToken<L1RCTParameters, L1RCTParametersRcd> paramsToken_;
0066   int nEvent_;
0067   bool oldVersion_;
0068 };
0069 
0070 #endif