Skip to content

Commit

Permalink
remove deprecation warnings from DQMServices/Components
Browse files Browse the repository at this point in the history
  • Loading branch information
mmusich committed May 4, 2022
1 parent ef3080b commit 1caa54d
Show file tree
Hide file tree
Showing 22 changed files with 1,127 additions and 1,234 deletions.
83 changes: 80 additions & 3 deletions DQMServices/Components/plugins/DQMDaqInfo.cc
@@ -1,11 +1,84 @@
#include "DQMDaqInfo.h"
// -*- C++ -*-
//
// Package: DQMDaqInfo
// Class: DQMDaqInfo
//
/**\class DQMDaqInfo DQMDaqInfo.cc CondCore/DQMDaqInfo/src/DQMDaqInfo.cc
Description: <one line class summary>
Implementation:
<Notes on implementation>
*/
//
// Original Author: Ilaria SEGONI
// Created: Thu Sep 25 11:17:43 CEST 2008
//
//

// system include files
#include <memory>
#include <iostream>
#include <fstream>

// user include files
#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/LuminosityBlock.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/EventSetup.h"

//Run Info
#include "CondFormats/DataRecord/interface/RunSummaryRcd.h"
#include "CondFormats/RunInfo/interface/RunSummary.h"
#include "CondFormats/RunInfo/interface/RunInfo.h"

//DQM
#include "DQMServices/Core/interface/DQMStore.h"
#include "FWCore/ServiceRegistry/interface/Service.h"

//DataFormats
#include "DataFormats/FEDRawData/interface/FEDNumbering.h"

class DQMDaqInfo : public edm::one::EDAnalyzer<> {
public:
typedef dqm::legacy::DQMStore DQMStore;
typedef dqm::legacy::MonitorElement MonitorElement;
explicit DQMDaqInfo(const edm::ParameterSet&);
~DQMDaqInfo() override = default;

private:
void beginJob() override;
void beginLuminosityBlock(const edm::LuminosityBlock&, const edm::EventSetup&);
void analyze(const edm::Event&, const edm::EventSetup&) override;

edm::ESGetToken<RunInfo, RunInfoRcd> runInfoToken_;
DQMStore* dbe_;

enum subDetList { Pixel, SiStrip, EcalBarrel, EcalEndcap, Hcal, DT, CSC, RPC, L1T };

MonitorElement* DaqFraction[9];

std::pair<int, int> PixelRange;
std::pair<int, int> TrackerRange;
std::pair<int, int> CSCRange;
std::pair<int, int> RPCRange;
std::pair<int, int> DTRange;
std::pair<int, int> HcalRange;
std::pair<int, int> ECALBarrRange;
std::pair<int, int> ECALEndcapRangeLow;
std::pair<int, int> ECALEndcapRangeHigh;
std::pair<int, int> L1TRange;

float NumberOfFeds[9];
};

DQMDaqInfo::DQMDaqInfo(const edm::ParameterSet& iConfig)
: runInfoToken_{esConsumes<edm::Transition::BeginLuminosityBlock>()} {}

DQMDaqInfo::~DQMDaqInfo() = default;

void DQMDaqInfo::beginLuminosityBlock(const edm::LuminosityBlock& lumiBlock, const edm::EventSetup& iSetup) {
edm::eventsetup::EventSetupRecordKey recordKey(edm::eventsetup::EventSetupRecordKey::TypeTag::findType("RunInfoRcd"));

Expand Down Expand Up @@ -137,3 +210,7 @@ void DQMDaqInfo::beginJob() {
}

void DQMDaqInfo::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup) {}

#include "FWCore/PluginManager/interface/ModuleDef.h"
#include "FWCore/Framework/interface/MakerMacros.h"
DEFINE_FWK_MODULE(DQMDaqInfo);
78 changes: 0 additions & 78 deletions DQMServices/Components/plugins/DQMDaqInfo.h

This file was deleted.

16 changes: 7 additions & 9 deletions DQMServices/Components/plugins/DQMEventInfo.cc
Expand Up @@ -4,14 +4,14 @@
* \author M. Zanetti - INFN Padova
*
*/
#include <DQMServices/Core/interface/DQMOneEDAnalyzer.h>

#include "DQMServices/Core/interface/DQMOneEDAnalyzer.h"
#include "FWCore/Framework/interface/LuminosityBlock.h"
#include "FWCore/Version/interface/GetReleaseVersion.h"
#include <FWCore/Framework/interface/Event.h>
#include <FWCore/Framework/interface/Run.h>
#include <FWCore/Framework/interface/MakerMacros.h>
#include <FWCore/ParameterSet/interface/ParameterSet.h>
#include "FWCore/Framework/interface/Event.h"
#include "FWCore/Framework/interface/Run.h"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ServiceRegistry/interface/Service.h"

#include <algorithm>
#include <iostream>
Expand All @@ -35,7 +35,7 @@ class DQMEventInfo : public DQMOneEDAnalyzer<> {
DQMEventInfo(const edm::ParameterSet& ps);

/// Destructor
~DQMEventInfo() override;
~DQMEventInfo() override = default;

protected:
/// Analyze
Expand Down Expand Up @@ -106,8 +106,6 @@ DQMEventInfo::DQMEventInfo(const edm::ParameterSet& ps) {
evtRateWindow_ = 0.15;
}

DQMEventInfo::~DQMEventInfo() = default;

void DQMEventInfo::bookHistograms(DQMStore::IBooker& ibooker,
edm::Run const& iRun,
edm::EventSetup const& /* iSetup */) {
Expand Down
72 changes: 67 additions & 5 deletions DQMServices/Components/plugins/DQMFEDIntegrityClient.cc
@@ -1,16 +1,74 @@

/*
* \file DQMFEDIntegrityClient.cc
* \author M. Marienfeld
* Last Update:
*
* Description: Summing up FED entries from all subdetectors.
*
*/
*/

#include <string>
#include <vector>

#include "DQMFEDIntegrityClient.h"
#include "FWCore/Framework/interface/one/EDAnalyzer.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "FWCore/ServiceRegistry/interface/Service.h"

//
// class declaration
//

class DQMFEDIntegrityClient : public edm::one::EDAnalyzer<edm::one::WatchRuns, edm::one::WatchLuminosityBlocks> {
public:
typedef dqm::legacy::DQMStore DQMStore;
typedef dqm::legacy::MonitorElement MonitorElement;
DQMFEDIntegrityClient(const edm::ParameterSet&);
~DQMFEDIntegrityClient() override = default;

protected:
void beginJob() override;
void beginRun(const edm::Run& r, const edm::EventSetup& c) override;

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

void beginLuminosityBlock(const edm::LuminosityBlock& l, const edm::EventSetup& c) override;
void endLuminosityBlock(const edm::LuminosityBlock& l, const edm::EventSetup& c) override;

void endRun(const edm::Run& r, const edm::EventSetup& c) override;
void endJob() override;

private:
void initialize();
void fillHistograms();

edm::ParameterSet parameters_;

DQMStore* dbe_;

// ---------- member data ----------

int NBINS;
float XMIN, XMAX;
float SummaryContent[10];

MonitorElement* FedEntries;
MonitorElement* FedFatal;
MonitorElement* FedNonFatal;

MonitorElement* reportSummary;
MonitorElement* reportSummaryContent[10];
MonitorElement* reportSummaryMap;

bool fillInEventloop;
bool fillOnEndRun;
bool fillOnEndJob;
bool fillOnEndLumi;
std::string moduleName;
std::string fedFolderName;
};

// -----------------------------
// constructors and destructor
// -----------------------------
Expand All @@ -26,8 +84,6 @@ DQMFEDIntegrityClient::DQMFEDIntegrityClient(const edm::ParameterSet& ps) {
fedFolderName = ps.getUntrackedParameter<std::string>("fedFolderName", "FEDIntegrity");
}

DQMFEDIntegrityClient::~DQMFEDIntegrityClient() = default;

void DQMFEDIntegrityClient::initialize() {
// get back-end interface
dbe_ = edm::Service<DQMStore>().operator->();
Expand Down Expand Up @@ -151,6 +207,8 @@ void DQMFEDIntegrityClient::analyze(const edm::Event& e, const edm::EventSetup&
fillHistograms();
}

void DQMFEDIntegrityClient::beginLuminosityBlock(const edm::LuminosityBlock& l, const edm::EventSetup& c) {}

void DQMFEDIntegrityClient::endLuminosityBlock(const edm::LuminosityBlock& lumiBlock, const edm::EventSetup& context) {
if (fillOnEndLumi)
fillHistograms();
Expand Down Expand Up @@ -315,3 +373,7 @@ void DQMFEDIntegrityClient::endJob() {
if (fillOnEndJob)
fillHistograms();
}

#include "FWCore/PluginManager/interface/ModuleDef.h"
#include "FWCore/Framework/interface/MakerMacros.h"
DEFINE_FWK_MODULE(DQMFEDIntegrityClient);
73 changes: 0 additions & 73 deletions DQMServices/Components/plugins/DQMFEDIntegrityClient.h
@@ -1,74 +1 @@

/*
* \class DQMFEDIntegrityClient
*
* DQM FED Client
*
* \author M. Marienfeld
*
*/

#ifndef DQMFEDINTEGRITYCLIENT_H
#define DQMFEDINTEGRITYCLIENT_H

#include <string>
#include <vector>

#include <FWCore/Framework/interface/EDAnalyzer.h>
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "DQMServices/Core/interface/DQMStore.h"

//
// class declaration
//

class DQMFEDIntegrityClient : public edm::EDAnalyzer {
public:
typedef dqm::legacy::DQMStore DQMStore;
typedef dqm::legacy::MonitorElement MonitorElement;
DQMFEDIntegrityClient(const edm::ParameterSet&);
~DQMFEDIntegrityClient() override;

protected:
void beginJob() override;
void beginRun(const edm::Run& r, const edm::EventSetup& c) override;

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

void endLuminosityBlock(const edm::LuminosityBlock& l, const edm::EventSetup& c) override;

void endRun(const edm::Run& r, const edm::EventSetup& c) override;
void endJob() override;

private:
void initialize();
void fillHistograms();

edm::ParameterSet parameters_;

DQMStore* dbe_;

// ---------- member data ----------

int NBINS;
float XMIN, XMAX;
float SummaryContent[10];

MonitorElement* FedEntries;
MonitorElement* FedFatal;
MonitorElement* FedNonFatal;

MonitorElement* reportSummary;
MonitorElement* reportSummaryContent[10];
MonitorElement* reportSummaryMap;

bool fillInEventloop;
bool fillOnEndRun;
bool fillOnEndJob;
bool fillOnEndLumi;
std::string moduleName;
std::string fedFolderName;
};

#endif

0 comments on commit 1caa54d

Please sign in to comment.