Skip to content

Commit

Permalink
Merge pull request #35343 from barvic/CSCCommissioning_migrate_to_thr…
Browse files Browse the repository at this point in the history
…ead_safe

Migration of  IORawDaata/CSCCommissioning/CSCFileDumper module to thread-safe edm:one::EDAnalyzer
  • Loading branch information
cmsbuild committed Sep 20, 2021
2 parents 53b8d1f + ed5ce8f commit 9b78054
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 7 deletions.
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

0 comments on commit 9b78054

Please sign in to comment.