ATLAS Offline Software
DQTDataFlowMonAlg.py
Go to the documentation of this file.
1 #
2 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
3 #
4 
6  from AthenaMonitoring import AthMonitorCfgHelper
7  from AthenaConfiguration.ComponentFactory import CompFactory
8  from AthenaMonitoring.AtlasReadyFilterConfig import AtlasReadyFilterCfg
9  ReadyFilterCfg=AtlasReadyFilterCfg(flags)
10  helper = AthMonitorCfgHelper(flags, 'DQTDataFlowMonAlgCfg')
11  _DQTDataFlowMonAlgConfigCore(helper, CompFactory.DQTDataFlowMonAlg, flags.Input.isMC, ReadyFilterCfg.popPrivateTools())
12  helper.result().merge(ReadyFilterCfg)
13  return helper.result()
14 
15 
16 def _DQTDataFlowMonAlgConfigCore(helper, algConfObj, isMC, readyFilterTool):
17  from ROOT import EventInfo
18 
19  monAlg = helper.addAlgorithm(algConfObj,'DQTDataFlowMonAlg')
20 
21  # arguments are: algorithm, name of group used to access it from the alg,
22  # the 'top level path' to put outputs in, and the default duration of
23  # associated histograms
24  group = helper.addGroup(monAlg, 'default', 'GLOBAL/DQTDataFlow', 'lowStat')
25 
26  # only make this plot if MC
27  if isMC:
28  group.defineHistogram("LB;m_sumweights",
29  weight='mcweight',
30  title="Sum of MC event weights",
31  xbins=50,
32  xmin=0.5,
33  xmax=50.5,
34  opt='kAddBinsDynamically',
35  duration='run',
36  merge='merge',
37  )
38 
39  group.defineHistogram("detstates_idx,detstates;eventflag_summary_lowStat",
40  title="Event Flag Summary",
41  type='TH2I',
42  xbins=EventInfo.nDets+1,
43  xmin=-0.5,
44  xmax=EventInfo.nDets+0.5,
45  ybins=3,
46  ymin=-0.5,
47  ymax=2.5,
48  xlabels=["Pixel", "SCT", "TRT", "LAr", "Tile",
49  "Muon", "ForwardDet", "Core",
50  "Background", "Lumi", "All"],
51  ylabels=["OK", "Warning", "Error"]
52  )
53 
54  if not isMC:
55  monAlg.ReadyFilterTool = readyFilterTool
56  group.defineHistogram('atlasready',
57  title='Events with AtlasReady',
58  type='TH1I',
59  xbins=2,
60  xlabels=["Not Ready","Ready"],
61  xmin=-0.5,
62  xmax=1.5,
63  )
64 
65  # generate release string
66  import os
67  if 'AtlasProject' in os.environ and 'AtlasVersion' in os.environ:
68  releaseString = '%s-%s' % (os.environ['AtlasProject'],
69  os.environ['AtlasVersion'])
70  else:
71  releaseString = 'Unknown'
72 
73  group.defineHistogram("environment;m_release_stage_lowStat",
74  title="Release - Event Count",
75  type='TH1I',
76  xbins=7,
77  xmin=-0.5,
78  xmax=6.5,
79  xlabels=[_+'-'+releaseString for _ in
80  ["user", "online", "tier0", "tier0Raw",
81  "tier0ESD", "AOD", "altprod"]]
82  )
83 
84  group.defineHistogram("environment;events_lb",
85  title='Event Count',
86  type='TH1I',
87  xbins=7,
88  xmin=-0.5,
89  xmax=6.5,
90  xlabels=["user", "online", "tier0", "tier0Raw",
91  "tier0ESD", "AOD", "altprod"],
92  duration='lb',
93  )
DQTDataFlowMonAlg._DQTDataFlowMonAlgConfigCore
def _DQTDataFlowMonAlgConfigCore(helper, algConfObj, isMC, readyFilterTool)
Definition: DQTDataFlowMonAlg.py:16
python.AtlasReadyFilterConfig.AtlasReadyFilterCfg
def AtlasReadyFilterCfg(flags)
Definition: AtlasReadyFilterConfig.py:10
DQTDataFlowMonAlg.DQTDataFlowMonAlgConfig
def DQTDataFlowMonAlgConfig(flags)
Definition: DQTDataFlowMonAlg.py:5
merge
Definition: merge.py:1