Skip to content

Commit

Permalink
Removed deprecation warnings in EventFilter/DTRawToDigi
Browse files Browse the repository at this point in the history
- changed to thread-friendly module types
- removed unnecessary use of deprecated headers
  • Loading branch information
Dr15Jones committed Sep 27, 2022
1 parent 30a3bf4 commit 3478ab7
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 43 deletions.
1 change: 0 additions & 1 deletion EventFilter/DTRawToDigi/plugins/DTDigiToRaw.h
@@ -1,7 +1,6 @@
#ifndef EventFilter_DTDigiToRaw_h
#define EventFilter_DTDigiToRaw_h

#include <FWCore/Framework/interface/EDProducer.h>
#include <DataFormats/DTDigi/interface/DTDigiCollection.h>

class FEDRawDataCollection;
Expand Down
4 changes: 2 additions & 2 deletions EventFilter/DTRawToDigi/test/FilterByLTC/FilterByLTC.h
Expand Up @@ -8,7 +8,7 @@
*
*/

#include "FWCore/Framework/interface/EDFilter.h"
#include "FWCore/Framework/interface/one/EDFilter.h"
#include "FWCore/Utilities/interface/InputTag.h"

namespace edm {
Expand All @@ -17,7 +17,7 @@ namespace edm {
class EventSetup;
} // namespace edm

class FilterByLTC : public edm::EDFilter {
class FilterByLTC : public edm::one::EDFilter<> {
public:
/// Constructor
FilterByLTC(const edm::ParameterSet& pset);
Expand Down
64 changes: 24 additions & 40 deletions EventFilter/DTRawToDigi/test/stubs/DummyHitFinderModule.cc
@@ -1,4 +1,4 @@
/**
/**
* \file DummyHitFinderModule.h
* dummy module for the test of DaqFileInputService
*
Expand All @@ -7,52 +7,36 @@
*
*/

#include <FWCore/Framework/interface/EDAnalyzer.h>
#include <FWCore/Framework/interface/Event.h>
#include <FWCore/Framework/interface/MakerMacros.h>
#include <DataFormats/DTDigi/interface/DTDigiCollection.h>
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "DataFormats/DTDigi/interface/DTDigiCollection.h"
#include <iostream>
#include <vector>

class DummyHitFinderModule : public edm::one::EDAnalyzer<> {
public:
DummyHitFinderModule(const edm::ParameterSet& ps) {}

protected:
void analyze(edm::Event const& e, const edm::EventSetup& c) {
// ...Reconstruction, first step are the unpacking modules to
// build digis...

class DummyHitFinderModule: public edm::EDAnalyzer{
edm::Handle<DTDigiCollection> dtdigis;

public:
DummyHitFinderModule(const edm::ParameterSet& ps){}

protected:
e.getByLabel("dtunpacker", dtdigis);

void analyze( edm::Event const & e, const edm::EventSetup& c){

// ...Reconstruction, first step are the unpacking modules to
// build digis...


edm::Handle<DTDigiCollection> dtdigis;

e.getByLabel("dtunpacker", dtdigis);


DTDigiCollection::DigiRangeIterator detUnitIt;
for (detUnitIt=dtdigis->begin();
detUnitIt!=dtdigis->end();
++detUnitIt){

for (DTDigiCollection::const_iterator digiIt =
(*detUnitIt).second.first;
digiIt!=(*detUnitIt).second.second;
++digiIt){
std::cout << "Digi: " << *digiIt << std::endl;

}// for cells
}// for layers


} // analyze
};// class DummyHitFinderModule

DEFINE_FWK_MODULE(DummyHitFinderModule);
DTDigiCollection::DigiRangeIterator detUnitIt;
for (detUnitIt = dtdigis->begin(); detUnitIt != dtdigis->end(); ++detUnitIt) {
for (DTDigiCollection::const_iterator digiIt = (*detUnitIt).second.first; digiIt != (*detUnitIt).second.second;
++digiIt) {
std::cout << "Digi: " << *digiIt << std::endl;

} // for cells
} // for layers

} // analyze
}; // class DummyHitFinderModule

DEFINE_FWK_MODULE(DummyHitFinderModule);

0 comments on commit 3478ab7

Please sign in to comment.