Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52
import FWCore.ParameterSet.Config as cms
from DQMServices.Core.DQMEDHarvester import DQMEDHarvester

from DQM.EcalMonitorTasks.ClusterTask_cfi import ecalClusterTask
from DQM.EcalMonitorTasks.EnergyTask_cfi import ecalEnergyTask
from DQM.EcalMonitorTasks.IntegrityTask_cfi import ecalIntegrityTask
from DQM.EcalMonitorTasks.OccupancyTask_cfi import ecalOccupancyTask
from DQM.EcalMonitorTasks.PresampleTask_cfi import ecalPresampleTask
from DQM.EcalMonitorTasks.RawDataTask_cfi import ecalRawDataTask
from DQM.EcalMonitorTasks.RecoSummaryTask_cfi import ecalRecoSummaryTask
from DQM.EcalMonitorTasks.SelectiveReadoutTask_cfi import ecalSelectiveReadoutTask
from DQM.EcalMonitorTasks.TimingTask_cfi import ecalTimingTask
from DQM.EcalMonitorTasks.TrigPrimTask_cfi import ecalTrigPrimTask

from DQM.EcalMonitorClient.IntegrityClient_cfi import ecalIntegrityClient
from DQM.EcalMonitorClient.OccupancyClient_cfi import ecalOccupancyClient
from DQM.EcalMonitorClient.PresampleClient_cfi import ecalPresampleClient
from DQM.EcalMonitorClient.RawDataClient_cfi import ecalRawDataClient
from DQM.EcalMonitorClient.SelectiveReadoutClient_cfi import ecalSelectiveReadoutClient
from DQM.EcalMonitorClient.TimingClient_cfi import ecalTimingClient
from DQM.EcalMonitorClient.TrigPrimClient_cfi import ecalTrigPrimClient
from DQM.EcalMonitorClient.SummaryClient_cfi import ecalSummaryClient

ecalMEFormatter = DQMEDHarvester("EcalMEFormatter",
    MEs = cms.untracked.PSet(),
    verbosity = cms.untracked.int32(0)
)

def insertIntoMEFormatterMEs(ecalModule, moduleName):
    for name in ecalModule.MEs.parameterNames_():
        setattr(ecalMEFormatter.MEs, moduleName + name, getattr(ecalModule.MEs, name))

insertIntoMEFormatterMEs(ecalClusterTask, 'ClusterTask')
insertIntoMEFormatterMEs(ecalEnergyTask, 'EnergyTask')
insertIntoMEFormatterMEs(ecalIntegrityTask, 'IntegrityTask')
insertIntoMEFormatterMEs(ecalOccupancyTask, 'OccupancyTask')
insertIntoMEFormatterMEs(ecalPresampleTask, 'PresampleTask')
insertIntoMEFormatterMEs(ecalRawDataTask, 'RawDataTask')
insertIntoMEFormatterMEs(ecalRecoSummaryTask, 'RecoSummaryTask')
insertIntoMEFormatterMEs(ecalTrigPrimTask, 'TrigPrimTask')

insertIntoMEFormatterMEs(ecalIntegrityClient, 'IntegrityClient')
insertIntoMEFormatterMEs(ecalOccupancyClient, 'OccupancyClient')
insertIntoMEFormatterMEs(ecalPresampleClient, 'PresampleClient')
insertIntoMEFormatterMEs(ecalRawDataClient, 'RawDataClient')
insertIntoMEFormatterMEs(ecalSummaryClient, 'SummaryClient')

delattr(ecalMEFormatter.MEs, 'TrigPrimTaskEtMaxEmul')
delattr(ecalMEFormatter.MEs, 'TrigPrimTaskEmulMaxIndex')
delattr(ecalMEFormatter.MEs, 'TrigPrimTaskMatchedIndex')
delattr(ecalMEFormatter.MEs, 'TrigPrimTaskEtEmulError')
delattr(ecalMEFormatter.MEs, 'TrigPrimTaskFGEmulError')