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

Fix unsafe modules #3658

Merged
merged 18 commits into from May 4, 2014
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
11 changes: 5 additions & 6 deletions DQMOffline/Muon/interface/DiMuonHistograms.h
Expand Up @@ -13,13 +13,14 @@
#include <fstream>
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"

#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
#include "RecoMuon/TrackingTools/interface/MuonServiceProxy.h"

#include "DataFormats/MuonReco/interface/Muon.h"
Expand All @@ -29,7 +30,7 @@
#include "DataFormats/VertexReco/interface/VertexFwd.h"


class DiMuonHistograms : public edm::EDAnalyzer {
class DiMuonHistograms : public DQMEDAnalyzer {
public:
/* Constructor */
DiMuonHistograms(const edm::ParameterSet& pset);
Expand All @@ -38,13 +39,11 @@ class DiMuonHistograms : public edm::EDAnalyzer {
virtual ~DiMuonHistograms() ;

/* Operations */
void beginJob();
void beginRun(const edm::Run& iRun, const edm::EventSetup& iSetup);
void analyze (const edm::Event &, const edm::EventSetup&);
void analyze(const edm::Event&, const edm::EventSetup&);
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;

private:
MuonServiceProxy* theService;
DQMStore* theDbe;
edm::ParameterSet parameters;

// Switch for verbosity
Expand Down
11 changes: 3 additions & 8 deletions DQMOffline/Muon/interface/EfficiencyAnalyzer.h
Expand Up @@ -13,13 +13,13 @@
#include <fstream>
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
#include "RecoMuon/TrackingTools/interface/MuonServiceProxy.h"

#include "DataFormats/MuonReco/interface/Muon.h"
Expand All @@ -34,7 +34,7 @@
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/MonitorElement.h"

class EfficiencyAnalyzer : public edm::EDAnalyzer {
class EfficiencyAnalyzer : public thread_unsafe::DQMEDAnalyzer {

public:
/* Constructor */
Expand All @@ -44,16 +44,11 @@ class EfficiencyAnalyzer : public edm::EDAnalyzer {
virtual ~EfficiencyAnalyzer() ;

/* Operations */
void beginJob();
void beginRun(const edm::Run& iRun, const edm::EventSetup& iSetup);


void analyze(const edm::Event & event, const edm::EventSetup& eventSetup);
// void endJob ();
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;

private:
edm::ParameterSet parameters;
DQMStore* theDbe;
MuonServiceProxy *theService;

// Switch for verbosity
Expand Down
19 changes: 3 additions & 16 deletions DQMOffline/Muon/interface/EfficiencyPlotter.h
Expand Up @@ -3,7 +3,7 @@


#include "FWCore/Framework/interface/Frameworkfwd.h"
#include <FWCore/Framework/interface/EDAnalyzer.h>
#include "DQMServices/Core/interface/DQMEDHarvester.h"
#include "DataFormats/Common/interface/Handle.h"
#include <FWCore/Framework/interface/ESHandle.h>
#include <FWCore/Framework/interface/Event.h>
Expand All @@ -23,7 +23,7 @@
#include <map>
#include "TH1F.h"

class EfficiencyPlotter: public edm::EDAnalyzer{
class EfficiencyPlotter: public DQMEDHarvester {

public:

Expand All @@ -35,21 +35,8 @@ class EfficiencyPlotter: public edm::EDAnalyzer{

protected:

/// BeginJob
void beginJob(void);

/// Analyze
void analyze(const edm::Event& e, const edm::EventSetup& c);

/// Endjob
void endJob();

void beginRun(edm::Run const& run, edm::EventSetup const& eSetup);
void beginLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& context) ;

/// DQM Client Diagnostic
void endLuminosityBlock(edm::LuminosityBlock const& lumiSeg, edm::EventSetup const& c);
void endRun(edm::Run const& run, edm::EventSetup const& eSetup);
void dqmEndJob(DQMStore::IBooker &, DQMStore::IGetter &) override; //performed in the endJob


private:
Expand Down
17 changes: 7 additions & 10 deletions DQMOffline/Muon/interface/MuonEnergyDepositAnalyzer.h
Expand Up @@ -18,18 +18,18 @@
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Utilities/interface/InputTag.h"

#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"
#include "RecoMuon/TrackingTools/interface/MuonServiceProxy.h"

#include "DataFormats/MuonReco/interface/Muon.h"
#include "DataFormats/MuonReco/interface/MuonFwd.h"
#include "DataFormats/MuonReco/interface/MuonEnergy.h"

class MuonEnergyDepositAnalyzer : public edm::EDAnalyzer{
class MuonEnergyDepositAnalyzer : public DQMEDAnalyzer{
public:

/// Constructor
Expand All @@ -38,23 +38,20 @@ class MuonEnergyDepositAnalyzer : public edm::EDAnalyzer{
/// Destructor
virtual ~MuonEnergyDepositAnalyzer();

/// Inizialize parameters for histo binning
void beginJob();
void beginRun(const edm::Run& run, const edm::EventSetup& iSetup);

/// Get the analysis
/* Operations */
void analyze(const edm::Event&, const edm::EventSetup&);

void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;

private:
// ----------member data ---------------------------
DQMStore* theDbe;
edm::ParameterSet parameters;
MuonServiceProxy *theService;
edm::EDGetTokenT<reco::MuonCollection> theMuonCollectionLabel_;

// Switch for verbosity
std::string metname;

std::string AlgoName;

//histo binning parameters
int emNoBin;
double emNoMin;
Expand Down
14 changes: 6 additions & 8 deletions DQMOffline/Muon/interface/MuonIdDQM.h
Expand Up @@ -33,8 +33,8 @@

#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"

#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"
Expand All @@ -47,20 +47,18 @@
#include "Geometry/CSCGeometry/interface/CSCGeometry.h"
#include "Geometry/Records/interface/GlobalTrackingGeometryRecord.h"

class MuonIdDQM : public edm::EDAnalyzer {
class MuonIdDQM : public thread_unsafe::DQMEDAnalyzer {
public:
explicit MuonIdDQM(const edm::ParameterSet&);
~MuonIdDQM();

/* Operations */
void analyze(const edm::Event&, const edm::EventSetup&);
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;

private:
virtual void beginJob();
virtual void beginRun(const edm::Run&, const edm::EventSetup&);
virtual void analyze(const edm::Event&, const edm::EventSetup&);
virtual void endJob();
virtual void Fill(MonitorElement*, float);

DQMStore* dbe_;

// ----------member data ---------------------------
edm::EDGetTokenT<reco::MuonCollection> inputMuonCollection_;
edm::EDGetTokenT<DTRecSegment4DCollection> inputDTRecSegment4DCollection_;
Expand Down
15 changes: 5 additions & 10 deletions DQMOffline/Muon/interface/MuonIsolationDQM.h
Expand Up @@ -27,7 +27,7 @@ method, even the simple types.
//

//Base class
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"

//Member types
#include "FWCore/Utilities/interface/InputTag.h"
Expand Down Expand Up @@ -57,7 +57,7 @@ class TProfile;
//------------------------------------------
// Class Declaration: MuonIsolationDQM
//--------------------------------------
class MuonIsolationDQM : public edm::EDAnalyzer {
class MuonIsolationDQM : public DQMEDAnalyzer {
//---------namespace and typedefs--------------
typedef edm::View<reco::Muon>::const_iterator MuonIterator;
typedef edm::RefToBase<reco::Muon> MuonBaseRef;
Expand All @@ -69,13 +69,11 @@ class MuonIsolationDQM : public edm::EDAnalyzer {
explicit MuonIsolationDQM(const edm::ParameterSet&);
~MuonIsolationDQM();


void analyze(const edm::Event&, const edm::EventSetup&);
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;

private:
//---------methods----------------------------
virtual void beginJob(void) ;
virtual void beginRun(void) ;
virtual void analyze(const edm::Event&, const edm::EventSetup&);
virtual void endJob() ;
void InitStatics();
void RecordData(const reco::Muon& muon);//Fills Histograms with info from single muo
// void doPFIsoPlots(MuonIterator muon); //Fills Histograms with PF info from single muo (only for GLB)
Expand Down Expand Up @@ -131,9 +129,6 @@ class MuonIsolationDQM : public edm::EDAnalyzer {
std::vector<std::string> axis_titles_NVtxs;
//---------------Dynamic Variables---------------------

//MonitorElement
DQMStore* dbe;

//The Data
double theData[NUM_VARS];
double theData2D[NUM_VARS_2D];
Expand Down
12 changes: 4 additions & 8 deletions DQMOffline/Muon/interface/MuonKinVsEtaAnalyzer.h
Expand Up @@ -15,9 +15,9 @@
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"

#include "DataFormats/Common/interface/Handle.h"
#include "DataFormats/MuonReco/interface/Muon.h"
Expand All @@ -31,22 +31,18 @@
#include "DataFormats/MuonReco/interface/MuonSelectors.h"
#include "RecoMuon/TrackingTools/interface/MuonServiceProxy.h"

class MuonKinVsEtaAnalyzer : public edm::EDAnalyzer {
class MuonKinVsEtaAnalyzer : public thread_unsafe::DQMEDAnalyzer {
public:

/// Constructor
MuonKinVsEtaAnalyzer(const edm::ParameterSet& pSet);

/// Destructor
~MuonKinVsEtaAnalyzer();

/// Initialize parameters for histo binning
void beginJob(void);
void beginRun(const edm::Run& iRun, const edm::EventSetup& iSetup);

/// Get the analysis
void analyze(const edm::Event&, const edm::EventSetup&);

void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;

private:

// ----------member data ---------------------------
Expand Down
14 changes: 5 additions & 9 deletions DQMOffline/Muon/interface/MuonPFAnalyzer.h
Expand Up @@ -11,7 +11,7 @@


//Base class
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"

#include "FWCore/Utilities/interface/InputTag.h"
#include "DQMServices/Core/interface/DQMStore.h"
Expand All @@ -31,7 +31,7 @@
#include <map>
#include <string>

class MuonPFAnalyzer : public edm::EDAnalyzer {
class MuonPFAnalyzer : public DQMEDAnalyzer {

public:

Expand All @@ -44,16 +44,13 @@ class MuonPFAnalyzer : public edm::EDAnalyzer {
/// Destructor
~MuonPFAnalyzer();

/// Initialize an book plots
virtual void beginRun(edm::Run const &, edm::EventSetup const &);

/// Perform the PF - TUNEP muon analysis
virtual void analyze(const edm::Event&, const edm::EventSetup&);
void analyze(const edm::Event&, const edm::EventSetup&);
void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;

private:

// Book histos for a given group of plots (e.g. for Tight TUNEP muons)
void bookHistos(const std::string & group);
void bookHistos(DQMStore::IBooker &, const std::string &);

// Get a specific plot for a given group
MonitorElement* getPlot(const std::string & group, const std::string & type);
Expand Down Expand Up @@ -89,7 +86,6 @@ class MuonPFAnalyzer : public edm::EDAnalyzer {

std::vector<std::string> theMuonKinds;

DQMStore *theDbe;

std::map<std::string,std::map<std::string,MonitorElement*> > thePlots;
RecoGenCollection theRecoGen;
Expand Down
14 changes: 5 additions & 9 deletions DQMOffline/Muon/interface/MuonRecoAnalyzer.h
Expand Up @@ -11,7 +11,6 @@
#include <memory>
#include <fstream>
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
#include "FWCore/Utilities/interface/InputTag.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/Event.h"
Expand All @@ -20,13 +19,14 @@

#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include "DQMServices/Core/interface/DQMEDAnalyzer.h"

#include "RecoMuon/TrackingTools/interface/MuonServiceProxy.h"

#include "DataFormats/MuonReco/interface/Muon.h"
#include "DataFormats/MuonReco/interface/MuonFwd.h"

class MuonRecoAnalyzer : public edm::EDAnalyzer {
class MuonRecoAnalyzer : public thread_unsafe::DQMEDAnalyzer {
public:

/// Constructor
Expand All @@ -36,19 +36,15 @@ class MuonRecoAnalyzer : public edm::EDAnalyzer {
virtual ~MuonRecoAnalyzer();

/// Inizialize parameters for histo binning
void beginJob();
void beginRun(const edm::Run& iRun, const edm::EventSetup& iSetup);

/// Get the analysis
void analyze(const edm::Event&, const edm::EventSetup&);

void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &) override;

//calculate residual & pull:
void GetRes( reco::TrackRef t1, reco::TrackRef t2, std::string par, float &res, float &pull);

private:
// ----------member data ---------------------------
DQMStore *theDbe;
MuonServiceProxy *theService;
MuonServiceProxy *theService;
edm::ParameterSet parameters;

edm::EDGetTokenT<reco::MuonCollection> theMuonCollectionLabel_;
Expand Down