Skip to content

Commit

Permalink
Merge CMSSW_7_5_X into CMSSW_7_6_X.
Browse files Browse the repository at this point in the history
  • Loading branch information
cmsbuild committed Sep 4, 2015
2 parents 0d9bb37 + 3ebbeec commit 0694993
Show file tree
Hide file tree
Showing 3 changed files with 149 additions and 0 deletions.
94 changes: 94 additions & 0 deletions DQM/Integration/python/clients/scal_dqm_sourceclient-live_cfg.py
@@ -0,0 +1,94 @@
import FWCore.ParameterSet.Config as cms

process = cms.Process("DQM")

#----------------------------
#### Event Source
#----------------------------
# for live online DQM in P5
process.load("DQM.Integration.config.inputsource_cfi")

# for testing in lxplus
#process.load("DQM.Integration.config.fileinputsource_cfi")

#----------------------------
#### DQM Environment
#----------------------------
process.load("DQM.Integration.config.environment_cfi")
process.dqmEnv.subSystemFolder = 'Scal'
process.dqmSaver.tag = 'Scal'
#-----------------------------
process.load("DQMServices.Components.DQMScalInfo_cfi")

# message logger
process.MessageLogger = cms.Service("MessageLogger",
destinations = cms.untracked.vstring('cout'),
cout = cms.untracked.PSet(threshold = cms.untracked.string('WARNING'))
)

# Global tag
# Condition for P5 cluster
process.load("DQM.Integration.config.FrontierCondition_GT_cfi")
process.load("EventFilter.L1GlobalTriggerRawToDigi.l1GtUnpack_cfi")
process.load("EventFilter.L1GlobalTriggerRawToDigi.l1GtEvmUnpack_cfi")
process.load("EventFilter.L1GlobalTriggerRawToDigi.l1GtRecord_cfi")

import EventFilter.L1GlobalTriggerRawToDigi.l1GtUnpack_cfi
gtDigis = EventFilter.L1GlobalTriggerRawToDigi.l1GtUnpack_cfi.l1GtUnpack.clone()
import EventFilter.L1GlobalTriggerRawToDigi.l1GtEvmUnpack_cfi
gtEvmDigis = EventFilter.L1GlobalTriggerRawToDigi.l1GtEvmUnpack_cfi.l1GtEvmUnpack.clone()

if (process.runType.getRunType() == process.runType.pp_run):
process.source.SelectEvents = cms.untracked.vstring('HLT_ZeroBias*')

process.physicsBitSelector = cms.EDFilter("PhysDecl",
applyfilter = cms.untracked.bool(False),
debugOn = cms.untracked.bool(False),
HLTriggerResults = cms.InputTag("TriggerResults","","HLT")
)


process.load("EventFilter.ScalersRawToDigi.ScalersRawToDigi_cfi")

## Collision Reconstruction
process.load("Configuration.StandardSequences.RawToDigi_Data_cff")
#process.load("Configuration.StandardSequences.Reconstruction_cff")

#-----------------------------
#### Sub-system configuration follows
process.dump = cms.EDAnalyzer('EventContentAnalyzer')

# DQM Modules
process.dqmmodules = cms.Sequence(process.dqmEnv + process.dqmSaver)
process.evfDQMmodulesPath = cms.Path(
process.l1GtUnpack*
process.gtDigis*
process.l1GtRecord*
process.physicsBitSelector*
process.scalersRawToDigi*
process.dqmscalInfo*
process.dqmmodules
)
process.schedule = cms.Schedule(process.evfDQMmodulesPath)

if (process.runType.getRunType() == process.runType.hi_run):
process.castorDigis.InputLabel = cms.InputTag("rawDataRepacker")
process.csctfDigis.producer = cms.InputTag("rawDataRepacker")
process.dttfDigis.DTTF_FED_Source = cms.InputTag("rawDataRepacker")
process.ecalDigis.InputLabel = cms.InputTag("rawDataRepacker")
process.ecalPreshowerDigis.sourceTag = cms.InputTag("rawDataRepacker")
process.gctDigis.inputLabel = cms.InputTag("rawDataRepacker")
process.gtDigis.DaqGtInputTag = cms.InputTag("rawDataRepacker")
process.gtEvmDigis.EvmGtInputTag = cms.InputTag("rawDataRepacker")
process.hcalDigis.InputLabel = cms.InputTag("rawDataRepacker")
process.muonCSCDigis.InputObjects = cms.InputTag("rawDataRepacker")
process.muonDTDigis.inputLabel = cms.InputTag("rawDataRepacker")
process.muonRPCDigis.InputLabel = cms.InputTag("rawDataRepacker")
process.scalersRawToDigi.scalersInputTag = cms.InputTag("rawDataRepacker")
process.siPixelDigis.InputLabel = cms.InputTag("rawDataRepacker")
process.siStripDigis.ProductLabel = cms.InputTag("rawDataRepacker")


### process customizations included here
from DQM.Integration.config.online_customizations_cfi import *
process = customise(process)
45 changes: 45 additions & 0 deletions DQMServices/Components/src/DQMScalInfo.cc
Expand Up @@ -11,6 +11,12 @@
#include "DataFormats/L1GlobalTrigger/interface/L1GtFdlWord.h"
#include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutRecord.h"

#include "DataFormats/Scalers/interface/Level1TriggerScalers.h"
#include "DataFormats/Scalers/interface/Level1TriggerRates.h"
#include "DataFormats/Scalers/interface/ScalersRaw.h"
#include "DataFormats/Scalers/interface/TimeSpec.h"
#include "DataFormats/Scalers/interface/LumiScalers.h"

using namespace std;


Expand All @@ -25,6 +31,7 @@ DQMScalInfo::DQMScalInfo(const edm::ParameterSet& ps)
gtCollection_ = consumes<L1GlobalTriggerReadoutRecord>(parameters_.getUntrackedParameter<std::string>("gtCollection","gtDigis"));
dcsStatusCollection_ = consumes<DcsStatusCollection>(parameters_.getUntrackedParameter<std::string>("dcsStatusCollection","scalersRawToDigi"));
l1tscollectionToken_ = consumes<Level1TriggerScalersCollection>(parameters_.getUntrackedParameter<std::string>("l1TSCollection", "scalersRawToDigi"));
lumicollectionToken_ = consumes<LumiScalersCollection>(parameters_.getUntrackedParameter<std::string>("lumiCollection", "scalersRawToDigi"));

}

Expand All @@ -35,6 +42,8 @@ void DQMScalInfo::bookHistograms(DQMStore::IBooker & ibooker,
edm::Run const & /* iRun */,
edm::EventSetup const & /* iSetup */) {

const int maxNbins = 2001;

// Fetch GlobalTag information and fill the string/ME.
ibooker.cd();
ibooker.setCurrentFolder(scalfolder_ +"/L1TriggerScalers/");
Expand All @@ -46,10 +55,18 @@ void DQMScalInfo::bookHistograms(DQMStore::IBooker & ibooker,
hlstart_ = ibooker.book1D("lstart","Orbit of last Start",fracLS*maxLS,0,maxLS*262144);
hlEC0_ = ibooker.book1D("lEC0","Orbit of last EC0",fracLS*maxLS,0,maxLS*262144);
hlHR_ = ibooker.book1D("lHR","Orbit of last HardReset",fracLS*maxLS,0,maxLS*262144);

hphysTrig_ = ibooker.book1D("Physics_Triggers", "Physics Triggers", maxNbins, -0.5, double(maxNbins)-0.5);
hphysTrig_->setAxisTitle("Lumi Section", 1);

ibooker.cd();
ibooker.setCurrentFolder(scalfolder_ +"/LumiScalers/");
hinstLumi_ = ibooker.book1D("Instant_Lumi", "Instant Lumi", maxNbins, -0.5, double(maxNbins)-0.5);
}

void DQMScalInfo::analyze(const edm::Event& e, const edm::EventSetup& c){
makeL1Scalars(e);
makeLumiScalars(e);
return;
}

Expand All @@ -58,6 +75,11 @@ DQMScalInfo::makeL1Scalars(const edm::Event& e)
{
edm::Handle<Level1TriggerScalersCollection> l1ts;
e.getByToken(l1tscollectionToken_,l1ts);
edm::Handle<LumiScalersCollection> lumiScalers;
e.getByToken(lumicollectionToken_,lumiScalers);

Level1TriggerScalersCollection::const_iterator it = l1ts->begin();

if(l1ts->size()==0) return;
hlresync_->Fill((*l1ts)[0].lastResync());
hlOC0_->Fill((*l1ts)[0].lastOrbitCounter0());
Expand All @@ -66,5 +88,28 @@ DQMScalInfo::makeL1Scalars(const edm::Event& e)
hlEC0_->Fill((*l1ts)[0].lastEventCounter0());
hlHR_->Fill((*l1ts)[0].lastHardReset());

unsigned int lumisection = it->lumiSegmentNr();
if(lumisection){
hphysTrig_->setBinContent(lumisection + 1, it->l1AsPhysics());
}

return ;
}

void
DQMScalInfo::makeLumiScalars(const edm::Event& e)
{
edm::Handle<LumiScalersCollection> lumiScalers;
e.getByToken(lumicollectionToken_,lumiScalers);

LumiScalersCollection::const_iterator it = lumiScalers->begin();

if(lumiScalers->size()){
unsigned int lumisection = it->sectionNumber();
if(lumisection){
hinstLumi_->setBinContent(lumisection + 1, it->instantLumi());
}
}

return;
}
10 changes: 10 additions & 0 deletions DQMServices/Components/src/DQMScalInfo.h
Expand Up @@ -24,6 +24,12 @@
#include "DataFormats/L1GlobalTrigger/interface/L1GlobalTriggerReadoutRecord.h"
#include "DataFormats/Scalers/interface/Level1TriggerScalers.h"

#include "DataFormats/Scalers/interface/Level1TriggerScalers.h"
#include "DataFormats/Scalers/interface/Level1TriggerRates.h"
#include "DataFormats/Scalers/interface/ScalersRaw.h"
#include "DataFormats/Scalers/interface/TimeSpec.h"
#include "DataFormats/Scalers/interface/LumiScalers.h"

class DQMScalInfo: public DQMEDAnalyzer{

public:
Expand All @@ -43,20 +49,24 @@ class DQMScalInfo: public DQMEDAnalyzer{
private:

void makeL1Scalars(const edm::Event& e);
void makeLumiScalars(const edm::Event& e);

edm::ParameterSet parameters_;
std::string scalfolder_;
edm::EDGetTokenT<L1GlobalTriggerReadoutRecord> gtCollection_;
edm::EDGetTokenT<DcsStatusCollection> dcsStatusCollection_;
edm::EDGetTokenT<Level1TriggerScalersCollection> l1tscollectionToken_;
edm::EDGetTokenT<LumiScalersCollection> lumicollectionToken_;
// histograms
MonitorElement * hlresync_;
MonitorElement * hlOC0_;
MonitorElement * hlTE_;
MonitorElement * hlstart_;
MonitorElement * hlEC0_;
MonitorElement * hlHR_;
MonitorElement * hphysTrig_;

MonitorElement * hinstLumi_;
};

#endif

0 comments on commit 0694993

Please sign in to comment.