Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-04-06 12:21:42

0001 #ifndef RCTTEXTTORCTDIGI_H
0002 #define RCTTEXTTORCTDIGI_H
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:    RctTextToRctDigi
0007 // Class:      RctTextToRctDigi
0008 //
0009 /**\class RctTextToRctDigi RctTextToRctDigi.h
0010  L1Trigger/TextToDigi/src/RctTextToRctDigi.h
0011 
0012  Description: Makes RCT digis from the file format specified by Pam Klabbers
0013 
0014 */
0015 //
0016 // Original Author:  Alex Tapper
0017 //         Created:  Fri Mar  9 19:11:51 CET 2007
0018 //
0019 //
0020 
0021 // system include files
0022 #include <memory>
0023 
0024 // user include files
0025 #include "FWCore/Framework/interface/one/EDProducer.h"
0026 #include "FWCore/Framework/interface/Frameworkfwd.h"
0027 
0028 #include "FWCore/Framework/interface/Event.h"
0029 #include "FWCore/Framework/interface/MakerMacros.h"
0030 
0031 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0032 
0033 // RCT data includes
0034 #include "DataFormats/L1CaloTrigger/interface/L1CaloCollections.h"
0035 
0036 #include <fstream>
0037 #include <iostream>
0038 
0039 class RctTextToRctDigi : public edm::one::EDProducer<> {
0040 public:
0041   explicit RctTextToRctDigi(const edm::ParameterSet &);
0042   ~RctTextToRctDigi() override;
0043 
0044 private:
0045   void produce(edm::Event &, const edm::EventSetup &) override;
0046 
0047   /// Create empty digi collection
0048   void putEmptyDigi(edm::Event &);
0049 
0050   /// Synchronize bunch crossing
0051   void bxSynchro(int &, int);
0052 
0053   /// Name out input file
0054   std::string m_textFileName;
0055 
0056   /// Number of events to be offset wrt input
0057   int m_fileEventOffset;
0058 
0059   /// Event counter
0060   int m_nevt;
0061 
0062   /// file handle
0063   std::ifstream m_file[18];
0064 };
0065 
0066 #endif