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

Running code-format for dqm #26631

Merged
merged 2 commits into from May 7, 2019
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
51 changes: 26 additions & 25 deletions DQM/CastorMonitor/interface/CastorDigiMonitor.h
Expand Up @@ -3,35 +3,36 @@

#include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"

#include "CondFormats/CastorObjects/interface/CastorPedestal.h"
#include "CondFormats/CastorObjects/interface/CastorPedestalWidth.h"
#include "CalibFormats/CastorObjects/interface/CastorCoderDb.h"
#include "CalibFormats/CastorObjects/interface/CastorDbService.h"
#include "CondFormats/CastorObjects/interface/CastorPedestal.h"
#include "CondFormats/CastorObjects/interface/CastorPedestalWidth.h"

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

#include "DataFormats/Common/interface/TriggerResults.h"
#include "FWCore/Common/interface/TriggerNames.h"

//#include "FWCore/Framework/interface/Run.h"


class CastorDigiMonitor {

public:
CastorDigiMonitor(const edm::ParameterSet& ps);
~CastorDigiMonitor();
CastorDigiMonitor(const edm::ParameterSet &ps);
~CastorDigiMonitor();

void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &);
void processEvent(edm::Event const& event, const CastorDigiCollection& cast,
const edm::TriggerResults& trig, const CastorDbService& cond);
void endRun();
void getDbData(const edm::EventSetup& iSetup);
int ModSecToIndex(int module, int sector);
void fillTrigRes(edm::Event const& event,const edm::TriggerResults& TrigResults,
double Etot);
void bookHistograms(DQMStore::IBooker &, edm::Run const &,
edm::EventSetup const &);
void processEvent(edm::Event const &event, const CastorDigiCollection &cast,
const edm::TriggerResults &trig,
const CastorDbService &cond);
void endRun();
void getDbData(const edm::EventSetup &iSetup);
int ModSecToIndex(int module, int sector);
void fillTrigRes(edm::Event const &event,
const edm::TriggerResults &TrigResults, double Etot);

private:
std::string subsystemname_;
Expand All @@ -40,21 +41,21 @@ class CastorDigiMonitor {
float Qrms_DEAD;

MonitorElement *hBX, *hpBXtrig;
MonitorElement* hpTrigRes;
MonitorElement* h2QrmsTSvsCh;
MonitorElement* hQIErms[10];
MonitorElement* hTSratio;
MonitorElement* h2TSratio;
MonitorElement* h2status;
MonitorElement* h2digierr;
MonitorElement* h2repsum;
MonitorElement* h2qualityMap;
MonitorElement* hReport;
MonitorElement *hpTrigRes;
MonitorElement *h2QrmsTSvsCh;
MonitorElement *hQIErms[10];
MonitorElement *hTSratio;
MonitorElement *h2TSratio;
MonitorElement *h2status;
MonitorElement *h2digierr;
MonitorElement *h2repsum;
MonitorElement *h2qualityMap;
MonitorElement *hReport;
MonitorElement *h2QmeantsvsCh;
MonitorElement *h2QmeanMap;
MonitorElement *hModule;
MonitorElement *hSector;
MonitorElement* hdigisize;
MonitorElement *hdigisize;
MonitorElement *h2towEMvsHAD;
MonitorElement *htowE;

Expand Down
63 changes: 29 additions & 34 deletions DQM/CastorMonitor/interface/CastorLEDMonitor.h
@@ -1,50 +1,45 @@
#ifndef DQM_CASTORMONITOR_CASTORLEDMONITOR_H
#define DQM_CASTORMONITOR_CASTORLEDMONITOR_H

#include "DataFormats/HcalDigi/interface/HcalUnpackerReport.h"
#include "CalibFormats/CastorObjects/interface/CastorDbRecord.h"
#include "CalibFormats/CastorObjects/interface/CastorDbService.h"
#include "DQMServices/Core/interface/DQMStore.h"
#include "DQMServices/Core/interface/MonitorElement.h"
#include "DataFormats/HcalDigi/interface/HcalDigiCollections.h"
#include "CalibFormats/CastorObjects/interface/CastorDbService.h"
#include "CalibFormats/CastorObjects/interface/CastorDbRecord.h"
#include "DataFormats/HcalDigi/interface/HcalUnpackerReport.h"
#include "FWCore/Framework/interface/Frameworkfwd.h"

static const float LedMonAdc2fc[128]=
{ -0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5,
8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 15., 17.,
19., 21., 23., 25., 27., 29.5,
32.5, 35.5, 38.5, 42., 46., 50., 54.5, 59.5,
64.5, 59.5, 64.5, 69.5, 74.5,
79.5, 84.5, 89.5, 94.5, 99.5, 104.5, 109.5,
114.5, 119.5, 124.5, 129.5, 137.,
147., 157., 167., 177., 187., 197., 209.5, 224.5,
239.5, 254.5, 272., 292.,
312., 334.5, 359.5, 384.5, 359.5, 384.5, 409.5,
434.5, 459.5, 484.5, 509.5,
534.5, 559.5, 584.5, 609.5, 634.5, 659.5, 684.5, 709.5,
747., 797., 847.,
897., 947., 997., 1047., 1109.5, 1184.5, 1259.5,
1334.5, 1422., 1522., 1622.,
1734.5, 1859.5, 1984.5, 1859.5, 1984.5, 2109.5,
2234.5, 2359.5, 2484.5,
2609.5, 2734.5, 2859.5, 2984.5, 3109.5,
3234.5, 3359.5, 3484.5, 3609.5, 3797.,
4047., 4297., 4547., 4797., 5047., 5297.,
5609.5, 5984.5, 6359.5, 6734.5,
7172., 7672., 8172., 8734.5, 9359.5, 9984.5};

//class CastorLEDMonitor: public CastorBaseMonitor {
//class CastorLEDMonitor: public DQMEDHarvester {
//class CastorLEDMonitor: public CastorMonitorModule {
static const float LedMonAdc2fc[128] = {
-0.5, 0.5, 1.5, 2.5, 3.5, 4.5, 5.5, 6.5, 7.5,
8.5, 9.5, 10.5, 11.5, 12.5, 13.5, 15., 17., 19.,
21., 23., 25., 27., 29.5, 32.5, 35.5, 38.5, 42.,
46., 50., 54.5, 59.5, 64.5, 59.5, 64.5, 69.5, 74.5,
79.5, 84.5, 89.5, 94.5, 99.5, 104.5, 109.5, 114.5, 119.5,
124.5, 129.5, 137., 147., 157., 167., 177., 187., 197.,
209.5, 224.5, 239.5, 254.5, 272., 292., 312., 334.5, 359.5,
384.5, 359.5, 384.5, 409.5, 434.5, 459.5, 484.5, 509.5, 534.5,
559.5, 584.5, 609.5, 634.5, 659.5, 684.5, 709.5, 747., 797.,
847., 897., 947., 997., 1047., 1109.5, 1184.5, 1259.5, 1334.5,
1422., 1522., 1622., 1734.5, 1859.5, 1984.5, 1859.5, 1984.5, 2109.5,
2234.5, 2359.5, 2484.5, 2609.5, 2734.5, 2859.5, 2984.5, 3109.5, 3234.5,
3359.5, 3484.5, 3609.5, 3797., 4047., 4297., 4547., 4797., 5047.,
5297., 5609.5, 5984.5, 6359.5, 6734.5, 7172., 7672., 8172., 8734.5,
9359.5, 9984.5};

// class CastorLEDMonitor: public CastorBaseMonitor {
// class CastorLEDMonitor: public DQMEDHarvester {
// class CastorLEDMonitor: public CastorMonitorModule {

class CastorLEDMonitor {

public:
CastorLEDMonitor(const edm::ParameterSet& ps);
~CastorLEDMonitor();
CastorLEDMonitor(const edm::ParameterSet &ps);
~CastorLEDMonitor();

void bookHistograms(DQMStore::IBooker &, edm::Run const &, edm::EventSetup const &);
void processEvent(const CastorDigiCollection& cast, const CastorDbService& cond);
void bookHistograms(DQMStore::IBooker &, edm::Run const &,
edm::EventSetup const &);
void processEvent(const CastorDigiCollection &cast,
const CastorDbService &cond);

private:
int ievt_;
Expand Down
88 changes: 44 additions & 44 deletions DQM/CastorMonitor/interface/CastorMonitorModule.h
@@ -1,56 +1,56 @@
#ifndef CastorMonitorModule_H
#define CastorMonitorModule_H

#include "FWCore/Framework/interface/Frameworkfwd.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"
#include "FWCore/Framework/interface/MakerMacros.h"
#include "FWCore/Framework/interface/ESHandle.h"
#include "FWCore/Framework/interface/Run.h"
#include "FWCore/ServiceRegistry/interface/Service.h"
#include "FWCore/ParameterSet/interface/ParameterSet.h"
#include "FWCore/ServiceRegistry/interface/Service.h"

#include "DataFormats/L1TGlobal/interface/GlobalAlgBlk.h"
#include "DataFormats/L1TGlobal/interface/GlobalExtBlk.h"
#include "DataFormats/L1Trigger/interface/BXVector.h"
#include "L1Trigger/L1TGlobal/interface/L1TGlobalUtil.h"

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

#include "Geometry/Records/interface/IdealGeometryRecord.h"
#include "Geometry/CaloGeometry/interface/CaloGeometry.h"
#include "Geometry/CaloGeometry/interface/CaloCellGeometry.h"
#include "Geometry/CaloGeometry/interface/CaloGeometry.h"
#include "Geometry/CaloGeometry/interface/CaloSubdetectorGeometry.h"
#include "Geometry/Records/interface/CaloGeometryRecord.h"
#include "Geometry/Records/interface/IdealGeometryRecord.h"

#include "DataFormats/GeometryVector/interface/GlobalPoint.h"
#include "SimG4CMS/Calo/interface/CaloHit.h"
#include "SimDataFormats/CaloHit/interface/PCaloHit.h"
#include "SimDataFormats/CaloHit/interface/PCaloHitContainer.h"
#include "SimG4CMS/Calo/interface/CaloHit.h"

#include "DataFormats/Provenance/interface/EventID.h"
#include "FWCore/Utilities/interface/CPUTimer.h"
#include "FWCore/Utilities/interface/EDGetToken.h"
#include "DataFormats/Provenance/interface/EventID.h"

#include "DataFormats/Common/interface/TriggerResults.h"
#include "FWCore/Common/interface/TriggerNames.h"

#include "DataFormats/CastorReco/interface/CastorTower.h"
#include "DataFormats/CastorReco/interface/CastorCluster.h"
#include "DataFormats/CastorReco/interface/CastorJet.h"
#include "DataFormats/JetReco/interface/CastorJetID.h"
#include "RecoJets/JetProducers/interface/CastorJetIDHelper.h"
#include "RecoJets/JetProducers/plugins/CastorJetIDProducer.h"
#include "DataFormats/CastorReco/interface/CastorTower.h"
#include "DataFormats/JetReco/interface/BasicJet.h"
#include "DataFormats/JetReco/interface/BasicJetCollection.h"
#include "DataFormats/JetReco/interface/CastorJetID.h"
#include "DataFormats/JetReco/interface/Jet.h"
#include "RecoJets/JetProducers/interface/CastorJetIDHelper.h"
#include "RecoJets/JetProducers/plugins/CastorJetIDProducer.h"

#include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
#include "DataFormats/DetId/interface/DetId.h"
#include "DataFormats/HcalDigi/interface/HcalUnpackerReport.h" //no CastorUnpackerReport at the moment
#include "DataFormats/FEDRawData/interface/FEDRawDataCollection.h"
#include "DataFormats/HcalDetId/interface/HcalCastorDetId.h"
#include "DataFormats/HcalDigi/interface/HcalUnpackerReport.h" //no CastorUnpackerReport at the moment

//#include "DQM/CastorMonitor/interface/CastorMonitorSelector.h"
#include "DQM/CastorMonitor/interface/CastorDigiMonitor.h"
Expand All @@ -59,65 +59,65 @@
#include "DQM/CastorMonitor/interface/CastorLEDMonitor.h"
//#include "DQM/CastorMonitor/interface/CastorTowerJetMonitor.h"

#include "CalibCalorimetry/CastorCalib/interface/CastorDbASCIIIO.h" //-- use to get/dump Calib to DB
#include "CalibCalorimetry/CastorCalib/interface/CastorDbASCIIIO.h" //-- use to get/dump Calib to DB
#include "CondFormats/CastorObjects/interface/CastorChannelQuality.h" //-- use to get/hold channel status
#include "CondFormats/DataRecord/interface/CastorChannelQualityRcd.h"

#include <memory>
#include <iostream>
#include <fstream>
#include <vector>
#include <iostream>
#include <memory>
#include <string>
#include <sys/time.h>
#include <vector>

class CastorMonitorModule : public DQMEDAnalyzer{
class CastorMonitorModule : public DQMEDAnalyzer {

public:

CastorMonitorModule(const edm::ParameterSet& ps);
CastorMonitorModule(const edm::ParameterSet &ps);
~CastorMonitorModule() override;

protected:

void analyze(const edm::Event& iEvent, const edm::EventSetup& eventSetup) override;
void analyze(const edm::Event &iEvent,
const edm::EventSetup &eventSetup) override;

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

void endRun(const edm::Run& run, const edm::EventSetup& eventSetup) override;
void endRun(const edm::Run &run, const edm::EventSetup &eventSetup) override;

private:

int fVerbosity;
int fVerbosity;
std::string subsystemname_;
// int NBunchesOrbit;
// int NBunchesOrbit;
int ievt_;
// edm::EDGetTokenT<GlobalAlgBlkBxCollection> l1tStage2uGtSource_;//for L1 uGT DAQ readout record
// edm::EDGetTokenT<GlobalAlgBlkBxCollection> TokenL1TStage2uGtSource;
// edm::EDGetTokenT<GlobalAlgBlkBxCollection> l1tStage2uGtSource_;//for L1
// uGT DAQ readout record edm::EDGetTokenT<GlobalAlgBlkBxCollection>
// TokenL1TStage2uGtSource;

edm::EDGetTokenT<edm::TriggerResults> tokenTriggerResults;
edm::EDGetTokenT<FEDRawDataCollection> inputTokenRaw_;
edm::EDGetTokenT<HcalUnpackerReport> inputTokenReport_;
edm::EDGetTokenT<CastorDigiCollection> inputTokenDigi_;
edm::EDGetTokenT<CastorRecHitCollection> inputTokenRecHitCASTOR_;
typedef std::vector<reco::CastorTower> CastorTowerCollection;
typedef std::vector<reco::CastorTower> CastorTowerCollection;
edm::EDGetTokenT<CastorTowerCollection> inputTokenCastorTowers_;
typedef std::vector<reco::BasicJet> BasicJetCollection;
typedef std::vector<reco::BasicJet> BasicJetCollection;
edm::EDGetTokenT<BasicJetCollection> JetAlgorithm;

// std::shared_ptr<l1t::L1TGlobalUtil> gtUtil_;
// std::shared_ptr<l1t::L1TGlobalUtil> gtUtil_;

std::unique_ptr<CastorRecHitMonitor> RecHitMon_;
std::unique_ptr<CastorDigiMonitor> DigiMon_;
std::unique_ptr<CastorLEDMonitor> LedMon_;
std::unique_ptr<CastorRecHitMonitor> RecHitMon_;
std::unique_ptr<CastorDigiMonitor> DigiMon_;
std::unique_ptr<CastorLEDMonitor> LedMon_;

// MonitorElement* algoBits_before_bxmask_bx_inEvt;
// MonitorElement* algoBits_before_bxmask_bx_global;
MonitorElement* CastorEventProduct;
MonitorElement* hunpkrep;
// MonitorElement* algoBits_before_bxmask_bx_inEvt;
// MonitorElement* algoBits_before_bxmask_bx_global;
MonitorElement *CastorEventProduct;
MonitorElement *hunpkrep;

bool showTiming_;
edm::CPUTimer cpu_timer;
bool showTiming_;
edm::CPUTimer cpu_timer;
};

#endif