Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Migration of IORawDaata/CSCCommissioning/CSCFileDumper module to thread-safe edm:one::EDAnalyzer #35343

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
2 changes: 1 addition & 1 deletion IORawData/CSCCommissioning/src/CSCFileDumper.cc
Expand Up @@ -20,7 +20,7 @@
#include <iostream>
#include <sstream>

CSCFileDumper::CSCFileDumper(const edm::ParameterSet &pset) {
CSCFileDumper::CSCFileDumper(edm::ParameterSet const &pset) {
i_token = consumes<FEDRawDataCollection>(pset.getParameter<edm::InputTag>("source"));
// source_ = pset.getUntrackedParameter<std::string>("source","rawDataCollector");
output = pset.getUntrackedParameter<std::string>("output");
Expand Down
12 changes: 7 additions & 5 deletions IORawData/CSCCommissioning/src/CSCFileDumper.h
@@ -1,7 +1,7 @@
#ifndef CSCFileDumper_h
#define CSCFileDumper_h
#ifndef IORawData_CSCCommissioning_CSCFileDumper_h
#define IORawData_CSCCommissioning_CSCFileDumper_h

#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "DataFormats/Common/interface/Handle.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
Expand All @@ -11,7 +11,7 @@

#include <cstdio>

class CSCFileDumper : public edm::EDAnalyzer {
class CSCFileDumper : public edm::one::EDAnalyzer<> {
public:
std::map<int, FILE*> dump_files;
std::set<unsigned long> eventsToDump;
Expand All @@ -20,10 +20,12 @@ class CSCFileDumper : public edm::EDAnalyzer {
std::string output, events;
// int fedID_first, fedID_last;

CSCFileDumper(const edm::ParameterSet& pset);
CSCFileDumper(edm::ParameterSet const& pset);
~CSCFileDumper(void) override;

void beginJob() override{};
void analyze(const edm::Event& e, const edm::EventSetup& c) override;
void endJob() override{};

private:
std::vector<unsigned int> cscFEDids;
Expand Down
2 changes: 1 addition & 1 deletion IORawData/CSCCommissioning/test/dumpTest.py
Expand Up @@ -3,7 +3,7 @@
process = cms.Process("TEST")

process.load("FWCore.MessageLogger.MessageLogger_cfi")
process.MessageLogger.cout.placeholder = cms.untracked.bool(False)
#process.MessageLogger.cout.placeholder = cms.untracked.bool(False)
process.MessageLogger.cout.threshold = cms.untracked.string('INFO')
process.MessageLogger.debugModules = cms.untracked.vstring('*')

Expand Down