Skip to content

Commit

Permalink
PR for HLT online DQM monitoring code for Proton-Lead run in 80X (upd…
Browse files Browse the repository at this point in the history
…ated cms-sw#16355)
  • Loading branch information
varuns23 authored and thomreis committed Nov 14, 2016
1 parent eaaad30 commit 7879eba
Show file tree
Hide file tree
Showing 5 changed files with 38 additions and 40 deletions.
@@ -1,9 +1,9 @@
// -*- C++ -*-
//
// Package: QM/HLTObjectMonitorHeavyIon
// Class: HLTObjectMonitorHeavyIon
// Package: QM/HLTObjectMonitorProtonLead
// Class: HLTObjectMonitorProtonLead
//
/**\class HLTObjectMonitorHeavyIon HLTObjectMonitorHeavyIon.cc DQM/HLTEvF/plugins/HLTObjectMonitorHeavyIon.cc
/**\class HLTObjectMonitorProtonLead HLTObjectMonitorProtonLead.cc DQM/HLTEvF/plugins/HLTObjectMonitorProtonLead.cc
Description: [one line class summary]
Expand All @@ -27,7 +27,6 @@
#include "DataFormats/HLTReco/interface/TriggerObject.h"
#include "DataFormats/HLTReco/interface/TriggerEvent.h"
#include "DataFormats/HLTReco/interface/TriggerTypeDefs.h"
#include "DataFormats/Scalers/interface/LumiScalers.h"

#include "FWCore/Framework/interface/Frameworkfwd.h"
#include "FWCore/Framework/interface/EDAnalyzer.h"
Expand Down Expand Up @@ -69,7 +68,7 @@ using std::vector;
using std::string;
using std::unordered_map;

class HLTObjectMonitorHeavyIon : public DQMEDAnalyzer {
class HLTObjectMonitorProtonLead : public DQMEDAnalyzer {
struct hltPlot
{

Expand All @@ -90,8 +89,8 @@ class HLTObjectMonitorHeavyIon : public DQMEDAnalyzer {
};

public:
explicit HLTObjectMonitorHeavyIon(const edm::ParameterSet&);
~HLTObjectMonitorHeavyIon();
explicit HLTObjectMonitorProtonLead(const edm::ParameterSet&);
~HLTObjectMonitorProtonLead();

// static void fillDescriptions(edm::ConfigurationDescriptions& descriptions);

Expand All @@ -116,9 +115,8 @@ class HLTObjectMonitorHeavyIon : public DQMEDAnalyzer {
unordered_map<hltPlot*, edm::ParameterSet*> plotMap;

//set Token(-s)
edm::EDGetTokenT<edm::TriggerResults> triggerResultsToken_;
edm::EDGetTokenT<edm::TriggerResults> triggerResultsToken_;
edm::EDGetTokenT<trigger::TriggerEvent> aodTriggerToken_;
edm::EDGetTokenT<LumiScalersCollection> lumiScalersToken_;

//declare params
//pPb run
Expand Down Expand Up @@ -219,7 +217,7 @@ class HLTObjectMonitorHeavyIon : public DQMEDAnalyzer {
//
// constructors and destructor
//
HLTObjectMonitorHeavyIon::HLTObjectMonitorHeavyIon(const edm::ParameterSet& iConfig)
HLTObjectMonitorProtonLead::HLTObjectMonitorProtonLead(const edm::ParameterSet& iConfig)

{
//now do what ever initialization is needed
Expand Down Expand Up @@ -339,14 +337,13 @@ HLTObjectMonitorHeavyIon::HLTObjectMonitorHeavyIon(const edm::ParameterSet& iCon
plotMap.clear();

//set Token(s)
triggerResultsToken_ = consumes<edm::TriggerResults>(edm::InputTag("TriggerResults","", processName_));
aodTriggerToken_ = consumes<trigger::TriggerEvent>(edm::InputTag("hltTriggerSummaryAOD", "", processName_));
lumiScalersToken_ = consumes<LumiScalersCollection>(edm::InputTag("hltScalersRawToDigi","",""));
triggerResultsToken_ = consumes<edm::TriggerResults> (iConfig.getParameter<edm::InputTag>("triggerResults"));
aodTriggerToken_ = consumes<trigger::TriggerEvent> (iConfig.getParameter<edm::InputTag>("triggerEvent"));

}


HLTObjectMonitorHeavyIon::~HLTObjectMonitorHeavyIon()
HLTObjectMonitorProtonLead::~HLTObjectMonitorProtonLead()
{

// do anything here that needs to be done at desctruction time
Expand All @@ -361,7 +358,7 @@ HLTObjectMonitorHeavyIon::~HLTObjectMonitorHeavyIon()

// ------------ method called for each event ------------
void
HLTObjectMonitorHeavyIon::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup)
HLTObjectMonitorProtonLead::analyze(const edm::Event& iEvent, const edm::EventSetup& iSetup)
{
double start = get_wall_time();

Expand Down Expand Up @@ -586,7 +583,7 @@ HLTObjectMonitorHeavyIon::analyze(const edm::Event& iEvent, const edm::EventSetu

// ------------ method called when starting to processes a run ------------
void
HLTObjectMonitorHeavyIon::dqmBeginRun(edm::Run const& iRun, edm::EventSetup const& iSetup)
HLTObjectMonitorProtonLead::dqmBeginRun(edm::Run const& iRun, edm::EventSetup const& iSetup)
{
if (debugPrint) std::cout << "Calling beginRun. " << std::endl;
bool changed = true;
Expand Down Expand Up @@ -633,12 +630,12 @@ HLTObjectMonitorHeavyIon::dqmBeginRun(edm::Run const& iRun, edm::EventSetup cons
// ------------ method called when ending the processing of a run ------------

void
HLTObjectMonitorHeavyIon::endRun(edm::Run const&, edm::EventSetup const&)
HLTObjectMonitorProtonLead::endRun(edm::Run const&, edm::EventSetup const&)
{
if (debugPrint) std::cout << "Calling endRun. " << std::endl;
}

void HLTObjectMonitorHeavyIon::bookHistograms(DQMStore::IBooker & ibooker, edm::Run const& iRun, edm::EventSetup const& iSetup)
void HLTObjectMonitorProtonLead::bookHistograms(DQMStore::IBooker & ibooker, edm::Run const& iRun, edm::EventSetup const& iSetup)
{

////////////////////////////////
Expand Down Expand Up @@ -674,7 +671,7 @@ void HLTObjectMonitorHeavyIon::bookHistograms(DQMStore::IBooker & ibooker, edm::

}

double HLTObjectMonitorHeavyIon::get_wall_time()
double HLTObjectMonitorProtonLead::get_wall_time()
{
struct timeval time;
if (gettimeofday(&time,NULL)) return 0;
Expand All @@ -684,22 +681,22 @@ double HLTObjectMonitorHeavyIon::get_wall_time()
// ------------ method called when starting to processes a luminosity block ------------
/*
void
HLTObjectMonitorHeavyIon::beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&)
HLTObjectMonitorProtonLead::beginLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&)
{
}
*/

// ------------ method called when ending the processing of a luminosity block ------------
/*
void
HLTObjectMonitorHeavyIon::endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&)
HLTObjectMonitorProtonLead::endLuminosityBlock(edm::LuminosityBlock const&, edm::EventSetup const&)
{
}
*/

// ------------ method fills 'descriptions' with the allowed parameters for the module ------------
// void
// HLTObjectMonitorHeavyIon::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
// HLTObjectMonitorProtonLead::fillDescriptions(edm::ConfigurationDescriptions& descriptions) {
// //The following says we do not know what parameters are allowed so do no validation
// // Please change this to state exactly what you do use, even if it is no parameters
// edm::ParameterSetDescription desc;
Expand All @@ -708,4 +705,4 @@ HLTObjectMonitorHeavyIon::endLuminosityBlock(edm::LuminosityBlock const&, edm::E
// }

//define this as a plug-in
DEFINE_FWK_MODULE(HLTObjectMonitorHeavyIon);
DEFINE_FWK_MODULE(HLTObjectMonitorProtonLead);
8 changes: 0 additions & 8 deletions DQM/HLTEvF/python/HLTObjectMonitorHeavyIon_cff.py

This file was deleted.

8 changes: 8 additions & 0 deletions DQM/HLTEvF/python/HLTObjectMonitorProtonLead_cff.py
@@ -0,0 +1,8 @@
import FWCore.ParameterSet.Config as cms


from DQM.HLTEvF.HLTObjectMonitorProtonLead_cfi import *

hlt4vector = cms.Path(
hltObjectMonitorProtonLead
)
Expand Up @@ -39,8 +39,10 @@

#To avoid booking histogram, set pathName = cms.string("")

hltObjectMonitorHeavyIon = cms.EDAnalyzer('HLTObjectMonitorHeavyIon',
processName = cms.string("HLT"),
hltObjectMonitorProtonLead = cms.EDAnalyzer('HLTObjectMonitorProtonLead',
processName = cms.string("HLT"),
triggerResults = cms.InputTag("TriggerResults", "", "HLT"),
triggerEvent = cms.InputTag("hltTriggerSummaryAOD", "", "HLT"),
caloAK4JetPt = cms.PSet(
pathName = cms.string(caloJet_pathName),
moduleName = cms.string(caloJet_moduleName),
Expand Down
13 changes: 6 additions & 7 deletions DQM/Integration/python/clients/hlt_dqm_sourceclient-live_cfg.py
Expand Up @@ -24,15 +24,14 @@

#---- for P5 (online) DB access
process.load("DQM.Integration.config.FrontierCondition_GT_cfi")
# Condition for lxplus
#process.load("DQM.Integration.config.FrontierCondition_GT_Offline_cfi")
# Condition for lxplus: change and possibly customise the GT
#from Configuration.AlCa.GlobalTag import GlobalTag as gtCustomise
#process.GlobalTag = gtCustomise(process.GlobalTag, 'auto:run2_data', '')

### for pp collisions
#process.load("DQM.HLTEvF.HLTObjectMonitor_cff")
#For HI run HLTObjectMonitorHeavyIon is used while for pp or cosmic run HLTObjectMonitor
if (process.runType.getRunType() == process.runType.hi_run):
process.load("DQM.HLTEvF.HLTObjectMonitorHeavyIon_cff")
else:
process.load("DQM.HLTEvF.HLTObjectMonitor_cff")
### for Proton-Lead collisions only (2016 Proton-Lead Era)
process.load("DQM.HLTEvF.HLTObjectMonitorProtonLead_cff")

# added for hlt scalars
process.load("DQM.TrigXMonitor.HLTSeedL1LogicScalers_cfi")
Expand Down

0 comments on commit 7879eba

Please sign in to comment.