Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2023-10-25 09:56:08

0001 #ifndef RCTDIGITORCTTEXT_H
0002 #define RCTDIGITORCTTEXT_H
0003 
0004 /*\class RctDigiToRctText
0005  *\description produces from RCT digis RCT data files
0006  *  format specified by Pam Klabbers
0007  *\author Nuno Leonardo (CERN)
0008  *\created Thu Mar 29 23:22:57 CEST 2007
0009  */
0010 
0011 // system include files
0012 #include <fstream>
0013 #include <iostream>
0014 #include <memory>
0015 
0016 // user include files
0017 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0018 #include "FWCore/Framework/interface/Frameworkfwd.h"
0019 
0020 #include "FWCore/Framework/interface/Event.h"
0021 #include "FWCore/Framework/interface/MakerMacros.h"
0022 
0023 #include "FWCore/MessageLogger/interface/MessageLogger.h"  // Logger
0024 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0025 
0026 #include "DataFormats/L1CaloTrigger/interface/L1CaloCollections.h"
0027 
0028 const static unsigned NUM_RCT_CRATES = 18;
0029 
0030 class RctDigiToRctText : public edm::one::EDAnalyzer<> {
0031 public:
0032   explicit RctDigiToRctText(const edm::ParameterSet &);
0033   ~RctDigiToRctText() override;
0034 
0035 private:
0036   void analyze(const edm::Event &, const edm::EventSetup &) override;
0037 
0038   /// label for RCT digis
0039   edm::InputTag m_rctInputLabel;
0040 
0041   /// basename for output files
0042   std::string m_textFileName;
0043 
0044   /// write upper case hex words
0045   bool m_hexUpperCase;
0046 
0047   /// handles for output files
0048   std::ofstream m_file[NUM_RCT_CRATES];
0049 
0050   /// handle for debug file
0051   std::ofstream fdebug;
0052 
0053   int nevt = -1;
0054 };
0055 
0056 #endif