Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef RCTDIGITOSOURCECARDTEXT_H
0002 #define RCTDIGITOSOURCECARDTEXT_H
0003 
0004 // -*- C++ -*-
0005 //
0006 // Package:    RctDigiToSourceCardText
0007 // Class:      RctDigiToSourceCardText
0008 //
0009 /**\class RctDigiToSourceCardText RctDigiToSourceCardText.h
0010  L1Trigger/TextToDigi/interface/RctDigiToSourceCardText.h
0011 
0012  Description: Input RCT digis and output text file to be loaded into the source
0013  cards for pattern tests.
0014 
0015  Implementation:
0016      <Notes on implementation>
0017 */
0018 //
0019 // Original Author:  Alex Tapper
0020 //         Created:  Fri Feb 16 14:52:19 CET 2007
0021 //
0022 //
0023 
0024 // system include files
0025 #include <memory>
0026 
0027 // user include files
0028 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0029 #include "FWCore/Framework/interface/Frameworkfwd.h"
0030 
0031 #include "FWCore/Framework/interface/Event.h"
0032 #include "FWCore/Framework/interface/MakerMacros.h"
0033 
0034 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0035 
0036 // RCT data includes
0037 #include "DataFormats/L1CaloTrigger/interface/L1CaloCollections.h"
0038 
0039 #include "L1Trigger/TextToDigi/interface/SourceCardRouting.h"
0040 
0041 #include <fstream>
0042 #include <iostream>
0043 
0044 class RctDigiToSourceCardText : public edm::one::EDAnalyzer<> {
0045 public:
0046   explicit RctDigiToSourceCardText(const edm::ParameterSet &);
0047   ~RctDigiToSourceCardText() override;
0048 
0049 private:
0050   void analyze(const edm::Event &, const edm::EventSetup &) override;
0051 
0052   /// Label for RCT digis
0053   edm::InputTag m_rctInputLabel;
0054 
0055   /// Name out output file
0056   std::string m_textFileName;
0057 
0058   /// file handle
0059   std::ofstream m_file;
0060 
0061   /// event counter
0062   unsigned short m_nevt;
0063 
0064   /// source card router
0065   SourceCardRouting m_scRouting;
0066 };
0067 
0068 #endif