Skip to content

Commit

Permalink
getByLabel to getByToken migration in DQM/SiPixelMonitorDigi package
Browse files Browse the repository at this point in the history
Signed-off-by: Antanas Norkus <[email protected]>
  • Loading branch information
Antanas Norkus committed Nov 21, 2013
1 parent 418c18f commit 93660b8
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 1 deletion.
3 changes: 3 additions & 0 deletions DQM/SiPixelMonitorDigi/interface/SiPixelDigiSource.h
Original file line number Diff line number Diff line change
Expand Up @@ -196,6 +196,9 @@
int numberOfDigis[192];
int nDigisA;
int nDigisB;

//define Token(-s)
edm::EDGetTokenT<edm::DetSetVector<PixelDigi> > srcToken_;
};

#endif
6 changes: 5 additions & 1 deletion DQM/SiPixelMonitorDigi/src/SiPixelDigiSource.cc
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,9 @@ SiPixelDigiSource::SiPixelDigiSource(const edm::ParameterSet& iConfig) :
diskOn( conf_.getUntrackedParameter<bool>("diskOn",false) ),
bigEventSize( conf_.getUntrackedParameter<int>("bigEventSize",1000) )
{
//set Token(-s)
srcToken_ = consumes<edm::DetSetVector<PixelDigi> >(conf_.getParameter<edm::InputTag>( "src" ));

theDMBE = edm::Service<DQMStore>().operator->();
LogInfo ("PixelDQM") << "SiPixelDigiSource::SiPixelDigiSource: Got DQM BackEnd interface"<<endl;
}
Expand Down Expand Up @@ -179,7 +182,8 @@ void SiPixelDigiSource::analyze(const edm::Event& iEvent, const edm::EventSetup&

// get input data
edm::Handle< edm::DetSetVector<PixelDigi> > input;
iEvent.getByLabel( src_, input );
//iEvent.getByLabel( src_, input );
iEvent.getByToken(srcToken_, input);
if (!input.isValid()) return;
// Get DQM interface
DQMStore* theDMBE = edm::Service<DQMStore>().operator->();
Expand Down

0 comments on commit 93660b8

Please sign in to comment.