def DQHistogramMerge(listFileName, outFileName, runPostProcessing, directoryRegularExpression=".*", histogramRegularExpression=".*", isIncremental=False, compressionLevel=1, debugLevel=0): mf = dqutils.MonitoringFile() if directoryRegularExpression != ".*" or histogramRegularExpression != ".*": mf.setDirectoryRegEx(directoryRegularExpression) mf.setHistogramRegEx(histogramRegularExpression) mf.setDebugLevel(debugLevel) mf.setCompressionLevel(compressionLevel) mf.mergeFiles(outFileName, listFileName) mf.mergeLBintervals(outFileName) if runPostProcessing: import DQPostProcessMod DQPostProcessMod.DQPostProcess(outFileName, isIncremental)
def DQHistogramPrintStatistics( inputFileName ): mf = dqutils.MonitoringFile(inputFileName) mf.printStatistics()
#import DataQualityUtils.DQHistogramMergeMod as mod import sys import ROOT from ROOT import gROOT gROOT.SetBatch(True) from ROOT import gSystem gSystem.Load('libDataQualityUtils') from ROOT import dqutils mf = dqutils.MonitoringFile() def rpc_create(dummy): from DataQualityUtils.createRpcFolders import (createRPCDQMFDB, createRPCConditionDB) createRPCDQMFDB() createRPCConditionDB() def mdt_create(dummy): from DataQualityUtils.createMdtFolders import (createMDTConditionDBDead, createMDTConditionDBNoisy) createMDTConditionDBDead() createMDTConditionDBNoisy() ########################################## ##Comment Out Those You do not wish to run
def getHanResults(inputFilePath, *args): of = dqutils.MonitoringFile(inputFilePath) rv = of.getHanResults(*args) return rv
def DQPostProcess(outFileName, isIncremental=False): ## Import the ROOT library for reading han results from ROOT import gSystem gSystem.Load('libDataQualityUtils') from ROOT import dqutils mf = dqutils.MonitoringFile() def rpc_create(dummy, dummy2): from DataQualityUtils.createRpcFolders import (createRPCDQMFDB, createRPCConditionDB) createRPCDQMFDB() createRPCConditionDB() def mdt_create(dummy, isIncremental): # if False and not isIncremental: if not isIncremental: from DataQualityUtils.createMdtFolders import ( createMDTConditionDBDead, createMDTConditionDBNoisy) createMDTConditionDBDead() createMDTConditionDBNoisy() def zlumi(fname, isIncremental): if not isIncremental: from DataQualityUtils.doZLumi import go go(fname) funclist = [ (mf.fitMergedFile_IDPerfMonManager, ['*****@*****.**', '*****@*****.**']), (mf.fitMergedFile_DiMuMonManager, ['*****@*****.**']), (mf.fitMergedFile_IDAlignMonManager, ['*****@*****.**', '*****@*****.**']), (mf.pv_PrimaryVertexMonitoring_calcResoAndEfficiency, ['*****@*****.**']), (mf.VxMon_move, ['*****@*****.**']), (mf.CSCPostProcess, ['*****@*****.**', '*****@*****.**']), (rpc_create, ['*****@*****.**', '*****@*****.**']), (mf.RPCPostProcess, ['*****@*****.**', '*****@*****.**']), (mdt_create, ['*****@*****.**', '*****@*****.**']), (mf.MDTPostProcess, ['*****@*****.**']), (mf.TGCPostProcess, ['*****@*****.**', '*****@*****.**']), (mf.MDTvsTGCPostProcess, ['*****@*****.**', '*****@*****.**']), (mf.HLTMuonPostProcess, [ '*****@*****.**', '*****@*****.**', '*****@*****.**' ]), (mf.HLTEgammaPostProcess, ['*****@*****.**', '*****@*****.**']), (mf.HLTTauPostProcess, [ '*****@*****.**', '*****@*****.**', '*****@*****.**' ]), (mf.HLTMETPostProcess, ['*****@*****.**']), (mf.HLTCaloPostProcess, ['*****@*****.**']), (mf.HLTJetPostProcess, ['*****@*****.**']), (mf.HLTMinBiasMonPostProcess, ['*****@*****.**']), (mf.BJetTaggingPostProcess, ['*****@*****.**']), (mf.L1CaloPostProcess, ['*****@*****.**', '*****@*****.**']), (mf.SCTPostProcess, ['*****@*****.**']), (mf.PixelPostProcess, ['*****@*****.**']), (mf.MuonTrackPostProcess, ['*****@*****.**', '*****@*****.**']), (zlumi, ['*****@*****.**', '*****@*****.**']), ] # first try all at once def go_all(fname, isIncremental): for funcinfo in funclist: funcinfo[0](fname, isIncremental) success = _ProtectPostProcessing((go_all, []), outFileName, isIncremental) if not success: #if True: for funcinfo in funclist: _ProtectPostProcessing(funcinfo, outFileName, isIncremental)