Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2024-09-07 04:36:40

0001 #ifndef IORawData_CSCCommissioning_CSCFileDumper_h
0002 #define IORawData_CSCCommissioning_CSCFileDumper_h
0003 
0004 #include "FWCore/Framework/interface/one/EDAnalyzer.h"
0005 #include "FWCore/Framework/interface/Event.h"
0006 #include "DataFormats/Common/interface/Handle.h"
0007 #include "FWCore/ParameterSet/interface/ParameterSet.h"
0008 #include "FWCore/Framework/interface/EventSetup.h"
0009 #include "FWCore/Framework/interface/ESHandle.h"
0010 #include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
0011 
0012 #include <cstdio>
0013 
0014 class CSCFileDumper : public edm::one::EDAnalyzer<> {
0015 public:
0016   std::map<int, FILE*> dump_files;
0017   std::set<unsigned long> eventsToDump;
0018   //    std::??? rangesToDump; to be implemented
0019 
0020   std::string output, events;
0021   //    int fedID_first, fedID_last;
0022 
0023   CSCFileDumper(edm::ParameterSet const& pset);
0024   ~CSCFileDumper(void) override;
0025 
0026   void beginJob() override {}
0027   void analyze(const edm::Event& e, const edm::EventSetup& c) override;
0028   void endJob() override {}
0029 
0030 private:
0031   std::vector<unsigned int> cscFEDids;
0032 
0033   // std::string source_;
0034   /// Token for consumes interface & access to data
0035   edm::EDGetTokenT<FEDRawDataCollection> i_token;
0036 };
0037 
0038 #endif