Skip to content

Commit

Permalink
Merge pull request #21432 from Jangbae/master
Browse files Browse the repository at this point in the history
Spy Software update
  • Loading branch information
cmsbuild committed Jan 17, 2018
2 parents a3990fe + fac8164 commit a55c43a
Show file tree
Hide file tree
Showing 9 changed files with 129 additions and 87 deletions.
12 changes: 6 additions & 6 deletions DQM/SiStripMonitorHardware/src/SiStripSpyDigiConverterModule.cc
Expand Up @@ -76,9 +76,9 @@ namespace sistrip {
<< " Constructing object...";
}

if (storePayloadDigis_) produces< edm::DetSetVector<SiStripRawDigi> >("Payload");
if (storeReorderedDigis_) produces< edm::DetSetVector<SiStripRawDigi> >("Reordered");
if (storeModuleDigis_) produces< edm::DetSetVector<SiStripRawDigi> >("VirginRaw");
if (storePayloadDigis_) produces< edm::DetSetVector<SiStripRawDigi> >("SpyPayload");
if (storeReorderedDigis_) produces< edm::DetSetVector<SiStripRawDigi> >("SpyReordered");
if (storeModuleDigis_) produces< edm::DetSetVector<SiStripRawDigi> >("SpyVirginRaw");

if (storeAPVAddress_) {
produces< std::vector<uint32_t> >("APVAddress");
Expand Down Expand Up @@ -164,9 +164,9 @@ namespace sistrip {
}

//add to event
if (storePayloadDigis_) event.put(std::move(payloadDigis),"Payload");
if (storeReorderedDigis_) event.put(std::move(reorderedDigis),"Reordered");
if (storeModuleDigis_) event.put(std::move(moduleDigis),"VirginRaw");
if (storePayloadDigis_) event.put(std::move(payloadDigis),"SpyPayload");
if (storeReorderedDigis_) event.put(std::move(reorderedDigis),"SpyReordered");
if (storeModuleDigis_) event.put(std::move(moduleDigis),"SpyVirginRaw");
if (storeAPVAddress_) {
event.put(std::move(pAPVAddresses), "APVAddress");
}
Expand Down
40 changes: 20 additions & 20 deletions DQM/SiStripMonitorHardware/src/SiStripSpyDisplayModule.cc
Expand Up @@ -139,17 +139,17 @@ class SiStripSpyDisplayModule : public edm::EDAnalyzer {
edm::InputTag inputCompVirginRawDigiLabel_; //!< VR RawDigis to compare (from mainline)
edm::InputTag inputCompZeroSuppressedDigiLabel_; //!< Zero-suppressed digis to compare (from mainline)

edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > inputScopeModeRawDigiToken_; //!< Token for the scope-mode RawDigi collection input tag
edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > inputPayloadRawDigiToken_; //!< Token for the virgin raw RawDigi collection input tag.
edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > inputReorderedPayloadRawDigiToken_; //!< Token for the re-ordered RawDigi module input tag.
edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > inputReorderedModuleRawDigiToken_; //!< Token for the re-ordered RawDigi module input tag.
edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > inputPedestalsToken_; //!< Token for the pedestals.
edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > inputNoisesToken_; //!< Token for the noises.
edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > inputPostPedestalRawDigiToken_; //!< Token for the post-pedestal subtraction RawDigi module input tag.
edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > inputPostCMRawDigiToken_; //!< Token for the post-common mode subtraction RawDigi module input tag.
edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > inputZeroSuppressedRawDigiToken_; //!< Token for the zero-suppressed, zero-padded RawDigi module input tag.
edm::EDGetTokenT<edm::DetSetVector<SiStripRawDigi> > inputScopeModeRawDigiToken_; //!< Token for the scope-mode RawDigi collection input tag
edm::EDGetTokenT<edm::DetSetVector<SiStripRawDigi> > inputPayloadRawDigiToken_; //!< Token for the virgin raw RawDigi collection input tag.
edm::EDGetTokenT<edm::DetSetVector<SiStripRawDigi> > inputReorderedPayloadRawDigiToken_; //!< Token for the re-ordered RawDigi module input tag.
edm::EDGetTokenT<edm::DetSetVector<SiStripRawDigi> > inputReorderedModuleRawDigiToken_; //!< Token for the re-ordered RawDigi module input tag.
edm::EDGetTokenT<edm::DetSetVector<SiStripRawDigi> > inputPedestalsToken_; //!< Token for the pedestals.
edm::EDGetTokenT<edm::DetSetVector<SiStripProcessedRawDigi> > inputNoisesToken_; //!< Token for the noises.
edm::EDGetTokenT<edm::DetSetVector<SiStripRawDigi> > inputPostPedestalRawDigiToken_; //!< Token for the post-pedestal subtraction RawDigi module input tag.
edm::EDGetTokenT<edm::DetSetVector<SiStripRawDigi> > inputPostCMRawDigiToken_; //!< Token for the post-common mode subtraction RawDigi module input tag.
edm::EDGetTokenT<edm::DetSetVector<SiStripRawDigi> > inputZeroSuppressedRawDigiToken_; //!< Token for the zero-suppressed, zero-padded RawDigi module input tag.
edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > inputZeroSuppressedDigiToken_; //!< Guess what? It's the input label for the zero-suppressed digi
edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > inputCompVirginRawDigiToken_; //!< VR RawDigis to compare (from mainline)
edm::EDGetTokenT<edm::DetSetVector<SiStripRawDigi> > inputCompVirginRawDigiToken_; //!< VR RawDigis to compare (from mainline)
edm::EDGetTokenT<edm::DetSetVector<SiStripDigi> > inputCompZeroSuppressedDigiToken_; //!< Zero-suppressed digis to compare (from mainline)
//
// Output information
Expand Down Expand Up @@ -187,17 +187,17 @@ SiStripSpyDisplayModule::SiStripSpyDisplayModule(const edm::ParameterSet& iConfi
outputFolderName_( iConfig.getParameter<std::string>( "OutputFolderName" ) )
{
//now do what ever initialization is needed
inputScopeModeRawDigiToken_ = consumes<edm::DetSetVector<SiStripDigi> >(inputScopeModeRawDigiLabel_ );
inputPayloadRawDigiToken_ = consumes<edm::DetSetVector<SiStripDigi> >(inputPayloadRawDigiLabel_ );
inputReorderedPayloadRawDigiToken_ = consumes<edm::DetSetVector<SiStripDigi> >(inputReorderedPayloadRawDigiLabel_ );
inputReorderedModuleRawDigiToken_ = consumes<edm::DetSetVector<SiStripDigi> >(inputReorderedModuleRawDigiLabel_ );
inputPedestalsToken_ = consumes<edm::DetSetVector<SiStripDigi> >(inputPedestalsLabel_ );
inputNoisesToken_ = consumes<edm::DetSetVector<SiStripDigi> >(inputNoisesLabel_ );
inputPostPedestalRawDigiToken_ = consumes<edm::DetSetVector<SiStripDigi> >(inputPostPedestalRawDigiLabel_ );
inputPostCMRawDigiToken_ = consumes<edm::DetSetVector<SiStripDigi> >(inputPostCMRawDigiLabel_ );
inputZeroSuppressedRawDigiToken_ = consumes<edm::DetSetVector<SiStripDigi> >(inputZeroSuppressedRawDigiLabel_ );
inputScopeModeRawDigiToken_ = consumes<edm::DetSetVector<SiStripRawDigi> >(inputScopeModeRawDigiLabel_ );
inputPayloadRawDigiToken_ = consumes<edm::DetSetVector<SiStripRawDigi> >(inputPayloadRawDigiLabel_ );
inputReorderedPayloadRawDigiToken_ = consumes<edm::DetSetVector<SiStripRawDigi> >(inputReorderedPayloadRawDigiLabel_ );
inputReorderedModuleRawDigiToken_ = consumes<edm::DetSetVector<SiStripRawDigi> >(inputReorderedModuleRawDigiLabel_ );
inputPedestalsToken_ = consumes<edm::DetSetVector<SiStripRawDigi> >(inputPedestalsLabel_ );
inputNoisesToken_ = consumes<edm::DetSetVector<SiStripProcessedRawDigi> >(inputNoisesLabel_ );
inputPostPedestalRawDigiToken_ = consumes<edm::DetSetVector<SiStripRawDigi> >(inputPostPedestalRawDigiLabel_ );
inputPostCMRawDigiToken_ = consumes<edm::DetSetVector<SiStripRawDigi> >(inputPostCMRawDigiLabel_ );
inputZeroSuppressedRawDigiToken_ = consumes<edm::DetSetVector<SiStripRawDigi> >(inputZeroSuppressedRawDigiLabel_ );
inputZeroSuppressedDigiToken_ = consumes<edm::DetSetVector<SiStripDigi> >(inputZeroSuppressedDigiLabel_ );
inputCompVirginRawDigiToken_ = consumes<edm::DetSetVector<SiStripDigi> >(inputCompVirginRawDigiLabel_ );
inputCompVirginRawDigiToken_ = consumes<edm::DetSetVector<SiStripRawDigi> >(inputCompVirginRawDigiLabel_ );
inputCompZeroSuppressedDigiToken_ = consumes<edm::DetSetVector<SiStripDigi> >(inputCompZeroSuppressedDigiLabel_ );

}
Expand Down
7 changes: 7 additions & 0 deletions DQM/SiStripMonitorHardware/test/makeInputlist.py
@@ -0,0 +1,7 @@
import os,sys, glob

spyInput = '/eos/cms/store/group/dpg_tracker_strip/tracker/Online/store/streamer/SiStripSpy/Commissioning11/'
spyRun = '234824/'

for path in glob.glob(spyInput+spyRun+'*.root'):
print "'file:"+path+"',"
6 changes: 3 additions & 3 deletions DQM/SiStripMonitorHardware/test/spyCompleteChain_cfg.py
Expand Up @@ -112,15 +112,15 @@
process.SiStripSpyUnpacker
*process.SiStripSpyDigiConverter
*process.SiStripFEDEmulator
*process.SiStripSpyMonitor
*process.SiStripSpyDisplay
# *process.SiStripSpyMonitor
# *process.SiStripSpyDisplay
)


# --- What to output ---
process.output = cms.OutputModule(
"PoolOutputModule",
fileName = cms.untracked.string("SpyRawToDigis.root"),
fileName = cms.untracked.string("SpyRawToDigis298270_FED.root"),
outputCommands = cms.untracked.vstring(
'keep *',
#'drop *',
Expand Down
22 changes: 16 additions & 6 deletions DQM/SiStripMonitorHardware/test/spyDigiProducer_cfg.py
@@ -1,6 +1,7 @@
#test configuration for the spy data unpacking code

import FWCore.ParameterSet.Config as cms
from Configuration.AlCa.GlobalTag import GlobalTag

process = cms.Process('SPYPROD')

Expand All @@ -10,11 +11,19 @@
'PoolSource',
fileNames = cms.untracked.vstring(
# Spy data (raw) in edm format, as converted from .dat
'rfio:/castor/cern.ch/user/w/whyntie/data/spychannel/121834/edm/spydata_0001.root',
'file:/eos/cms/store/group/dpg_tracker_strip/tracker/Online/store/streamer/SiStripSpy/Commissioning11/234824/USC.00234824.0001.A.storageManager.00.0026.RUN00234874.root',
'file:/eos/cms/store/group/dpg_tracker_strip/tracker/Online/store/streamer/SiStripSpy/Commissioning11/234824/USC.00234824.0001.A.storageManager.00.0027.RUN00234874.root',
'file:/eos/cms/store/group/dpg_tracker_strip/tracker/Online/store/streamer/SiStripSpy/Commissioning11/234824/USC.00234824.0001.A.storageManager.00.0028.RUN00234874.root',
'file:/eos/cms/store/group/dpg_tracker_strip/tracker/Online/store/streamer/SiStripSpy/Commissioning11/234824/USC.00234824.0001.A.storageManager.00.0029.RUN00234874.root',
'file:/eos/cms/store/group/dpg_tracker_strip/tracker/Online/store/streamer/SiStripSpy/Commissioning11/234824/USC.00234824.0001.A.storageManager.00.0030.RUN00234874.root',
'file:/eos/cms/store/group/dpg_tracker_strip/tracker/Online/store/streamer/SiStripSpy/Commissioning11/234824/USC.00234824.0001.A.storageManager.00.0031.RUN00234874.root',
'file:/eos/cms/store/group/dpg_tracker_strip/tracker/Online/store/streamer/SiStripSpy/Commissioning11/234824/USC.00234824.0001.A.storageManager.00.0032.RUN00234874.root',
'file:/eos/cms/store/group/dpg_tracker_strip/tracker/Online/store/streamer/SiStripSpy/Commissioning11/234824/USC.00234824.0001.A.storageManager.00.0033.RUN00234874.root',
'file:/eos/cms/store/group/dpg_tracker_strip/tracker/Online/store/streamer/SiStripSpy/Commissioning11/234824/USC.00234824.0001.A.storageManager.00.0034.RUN00234874.root',
)
)

process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(10) )
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1) )

# --- Message Logging ---
#process.Tracer = cms.Service('Tracer',indentation = cms.untracked.string('$$'))
Expand All @@ -29,7 +38,8 @@
# Find the appropriate Global Tags at
# https://twiki.cern.ch/twiki/bin/view/CMS/SWGuideFrontierConditions
process.load('Configuration.StandardSequences.FrontierConditions_GlobalTag_cff')
process.GlobalTag.globaltag = 'GR09_P_V8_34X::All'
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_data', '')
process.load("Configuration.Geometry.GeometryRecoDB_cff")

# --- The unpacking configuration ---
process.load('DQM.SiStripMonitorHardware.SiStripSpyUnpacker_cfi')
Expand All @@ -38,7 +48,7 @@
## * Scope digi settings
process.SiStripSpyUnpacker.FEDIDs = cms.vuint32() #use a subset of FEDs or leave empty for all.
#process.SiStripSpy.FEDIDs = cms.vuint32(50, 187, 260, 356) #one from each partition
process.SiStripSpyUnpacker.InputProductLabel = cms.InputTag('source')
process.SiStripSpyUnpacker.InputProductLabel = cms.InputTag('rawDataCollector')
process.SiStripSpyUnpacker.AllowIncompleteEvents = True
process.SiStripSpyUnpacker.StoreCounters = True
process.SiStripSpyUnpacker.StoreScopeRawDigis = cms.bool(True) # Note - needs to be True for use in other modules.
Expand All @@ -54,7 +64,7 @@
process.SiStripSpyDigiConverter.MaxZeroLight = 1024
process.SiStripSpyDigiConverter.MinTickHeight = 0
process.SiStripSpyDigiConverter.MaxTickHeight = 1024
process.SiStripSpyDigiConverter.ExpectedPositionOfFirstHeaderBit = 0
process.SiStripSpyDigiConverter.ExpectedPositionOfFirstHeaderBit = 6
process.SiStripSpyDigiConverter.DiscardDigisWithWrongAPVAddress = False

# --- Define the path ---
Expand All @@ -67,7 +77,7 @@
# --- What to output ---
process.output = cms.OutputModule(
"PoolOutputModule",
fileName = cms.untracked.string("SpyRawToDigis.root"),
fileName = cms.untracked.string("/eos/cms/store/user/jblee/SpyRawToDigis234824_TEST.root"),
outputCommands = cms.untracked.vstring(
'keep *',
#'drop *',
Expand Down
34 changes: 20 additions & 14 deletions DQM/SiStripMonitorHardware/test/spyDisplay_cfg.py
Expand Up @@ -2,29 +2,32 @@
##=============================================================

import FWCore.ParameterSet.Config as cms
from Configuration.AlCa.GlobalTag import GlobalTag

process = cms.Process('SPYDISPLAY')

process.source = cms.Source(
"PoolSource",
fileNames = cms.untracked.vstring(
'file:SpyZeroSuppressed.root',
'file:/afs/cern.ch/work/j/jblee/public/SpyChannel/CMSSW_9_4_0/src/DQM/SiStripMonitorHardware/test/SpyMatchedEvents298270.root',
)
)

process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(1))
process.maxEvents = cms.untracked.PSet( input = cms.untracked.int32(-1))

## ---- Services ----
process.load("DQM.SiStripCommon.MessageLogger_cfi")

## ---- Conditions ----
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")

## Global tag see SWGuideFrontierConditions
process.GlobalTag.globaltag = 'GR09_P_V8_34X::All' ## For CMSSW 34X
process.load("Configuration.StandardSequences.FrontierConditions_GlobalTag_cff")
process.GlobalTag = GlobalTag(process.GlobalTag, 'auto:run2_data', '')
process.load("Configuration.Geometry.GeometryRecoDB_cff")

## ---- Retrieve the ZS digis from the mainline ----
## ---- if running on matched events ----
#process.load('EventFilter.SiStripRawToDigi.SiStripDigis_cfi')
process.load('EventFilter.SiStripRawToDigi.SiStripDigis_cfi')
#process.siStripDigis.ProductLabel = cms.InputTag('source')
#process.siStripDigis.UnpackCommonModeValues = cms.bool(True)

Expand All @@ -35,31 +38,34 @@

## Select the detIDs of choice here
process.SiStripSpyDisplay.detIDs = cms.vuint32(
470079220
470079220, 470083621, 470083622, 470083625, 470083626, 470083653, 470083654, 470083657, 470083658, 470083684, 470083688, 470083692, 470083716, 470083720, 470083724, 470083728, 470083780, 470083784, 470083788,
369124565, 369124566, 369124569, 369124570, 369124573, 369124574, 369125557, 369125558, 369125561, 369125562, 369125565, 369125566, 369125573, 369125574, 369125577, 369125578, 369125581, 369125582, 369125589,
402672433, 402672434, 402672265, 402672266, 402672269, 402672270, 402672273, 402672274, 402672261, 402672262, 402672301, 402672302, 402672305, 402672306, 402672901, 402672902, 402672905, 402672906, 402672945,
436298448, 436298452, 436298456, 436298404, 436298408, 436298412, 436298416, 436298420, 436298424, 436298372, 436298376, 436298380, 436298384, 436298388, 436298392, 436298916, 436298920, 436298924, 436298928,
)
process.SiStripSpyDisplay.InputScopeModeRawDigiLabel = cms.InputTag("SiStripSpyUnpacker","ScopeRawDigis")
process.SiStripSpyDisplay.InputPayloadRawDigiLabel = cms.InputTag("SiStripSpyDigiConverter", "Payload")
process.SiStripSpyDisplay.InputReorderedPayloadRawDigiLabel = cms.InputTag("SiStripSpyDigiConverter", "Reordered")
process.SiStripSpyDisplay.InputReorderedModuleRawDigiLabel = cms.InputTag("SiStripSpyDigiConverter", "VirginRaw")
process.SiStripSpyDisplay.InputScopeModeRawDigiLabel = cms.InputTag("SiStripSpyEventMatcher","SpyScope")
process.SiStripSpyDisplay.InputPayloadRawDigiLabel = cms.InputTag("SiStripSpyEventMatcher", "SpyPayload")
process.SiStripSpyDisplay.InputReorderedPayloadRawDigiLabel = cms.InputTag("SiStripSpyEventMatcher", "SpyReordered")
process.SiStripSpyDisplay.InputReorderedModuleRawDigiLabel = cms.InputTag("SiStripSpyEventMatcher", "SpyVirginRaw")
process.SiStripSpyDisplay.InputPedestalsLabel = cms.InputTag("SiStripFEDEmulator","ModulePedestals")
process.SiStripSpyDisplay.InputNoisesLabel = cms.InputTag("SiStripFEDEmulator","ModuleNoises")
process.SiStripSpyDisplay.InputPostPedestalRawDigiLabel = cms.InputTag("SiStripFEDEmulator","PedSubtrModuleDigis")
process.SiStripSpyDisplay.InputPostCMRawDigiLabel = cms.InputTag("SiStripFEDEmulator","CMSubtrModuleDigis")
process.SiStripSpyDisplay.InputZeroSuppressedDigiLabel = cms.InputTag("SiStripFEDEmulator","ZSModuleDigis")
##mainline data - if running on matched events
#process.SiStripSpy.InputCompZeroSuppressedDigiLabel = cms.InputTag("siStripDigis","ZeroSuppressed")

# process.SiStripSpy.InputCompZeroSuppressedDigiLabel = cms.InputTag("siStripDigis","ZeroSuppressed")
process.SiStripSpyDisplay.InputCompVirginRawDigiLabel = cms.InputTag("siStripDigis","VirginRaw")
process.SiStripSpyDisplay.OutputFolderName = cms.string("Display")

## ---- Sequence ----
process.p = cms.Path(
#process.siStripDigis* ## if running on matched events
process.siStripDigis* ## if running on matched events
process.SiStripSpyDisplay
)

## ------ TFileService
process.TFileService = cms.Service(
"TFileService",
fileName = cms.string('SpyDisplay.root')
fileName = cms.string('SpyDisplay298270.root')
)

0 comments on commit a55c43a

Please sign in to comment.