00001 #ifndef RAWTOTEXT_H 00002 #define RAWTOTEXT_H 00003 00004 /*\class RawToText 00005 *\description conversion of GCT raw to text formats 00006 based on and reverses J.Brooke's TextToRaw 00007 *\usage trigger pattern tests 00008 *\author Nuno Leonardo (CERN) 00009 *\date 07.08 00010 */ 00011 00012 // system include files 00013 #include <memory> 00014 #include <string> 00015 #include <fstream> 00016 // user include files 00017 #include "FWCore/Framework/interface/Frameworkfwd.h" 00018 #include "FWCore/Framework/interface/EDAnalyzer.h" 00019 #include "FWCore/Framework/interface/Event.h" 00020 #include "FWCore/ParameterSet/interface/ParameterSet.h" 00021 00022 #include "DataFormats/FEDRawData/interface/FEDRawData.h" 00023 00024 00025 class RawToText : public edm::EDAnalyzer { 00026 public: 00027 explicit RawToText(const edm::ParameterSet&); 00028 ~RawToText(); 00029 00030 private: 00031 virtual void beginJob(const edm::EventSetup&); 00032 virtual void analyze (const edm::Event&, const edm::EventSetup&); 00033 virtual void endJob (); 00034 00035 private: 00036 00037 // FED collection label 00038 edm::InputTag inputLabel_; 00039 00040 // ID of the FED to emulate 00041 int fedId_; 00042 00043 // File to write 00044 std::string filename_; 00045 std::ofstream file_; 00046 00047 int nevt_; 00048 }; 00049 00050 #endif