Back to home page

Project CMSSW displayed by LXR

 
 

    


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

0001 #ifndef RAWTOTEXT_H
0002 #define RAWTOTEXT_H
0003 
0004 /*\class RawToText
0005  *\description conversion of GCT raw to text formats
0006                based on and reverses J.Brooke's TextToRaw
0007  *\usage trigger pattern tests
0008  *\author Nuno Leonardo (CERN)
0009  *\date 07.08
0010  */
0011 
0012 // system include files
0013 #include <fstream>
0014 #include <memory>
0015 #include <string>
0016 // user include files
0017 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0018 #include "FWCore/Framework/interface/Event.h"
0019 #include "FWCore/Framework/interface/Frameworkfwd.h"
0020 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0021 
0022 #include "DataFormats/FEDRawData/interface/FEDRawData.h"
0023 
0024 class RawToText : public edm::one::EDAnalyzer<> {
0025 public:
0026   explicit RawToText(const edm::ParameterSet &);
0027   ~RawToText() override;
0028 
0029 private:
0030   void beginJob() override;
0031   void analyze(const edm::Event &, const edm::EventSetup &) override;
0032   void endJob() override;
0033 
0034 private:
0035   // FED collection label
0036   edm::InputTag inputLabel_;
0037 
0038   // ID of the FED to emulate
0039   int fedId_;
0040 
0041   // File to write
0042   std::string filename_;
0043   std::ofstream file_;
0044 
0045   int nevt_;
0046 };
0047 
0048 #endif