Skip to content
Snippets Groups Projects
Commit 5e85572d authored by Frank Winklmeier's avatar Frank Winklmeier
Browse files

TrigBphysMonitoring+TrigEgammaMonitoring: remove usage of DQMonFlags

Replace legacy `DQMonFlags` with `flags.DQ.DataType` (ATR-27972).
parent 9f0c1583
No related branches found
No related tags found
2 merge requests!64541Daily merge of 23.0 into main,!64477TrigBphysMonitoring+TrigEgammaMonitoring: remove usage of DQMonFlags
......@@ -3,9 +3,8 @@
#
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaMonitoring.DQConfigFlags import DQDataType
if 'DQMonFlags' not in dir():
from AthenaMonitoring.DQMonFlags import DQMonFlags as dqflags
class TrigBphysMonAlgBuilder:
......@@ -91,17 +90,18 @@ class TrigBphysMonAlgBuilder:
def get_monitoring_mode(self):
self.__logger.info("TrigBphysMonToolBuilder.get_monitoring_mode()")
self.data_type = dqflags.monManDataType()
if self.data_type == 'monteCarlo':
self.data_type = self.helper.flags.DQ.DataType
if self.data_type is DQDataType.MC:
self.mc_mode = True
return True
elif self.data_type == 'collisions':
elif self.data_type is DQDataType.Collisions:
self.pp_mode = True
return True
elif self.data_type == 'heavyioncollisions':
elif self.data_type is DQDataType.HeavyIon:
self.hi_mode = True
return True
elif self.data_type == 'cosmics':
elif self.data_type is DQDataType.Cosmics:
self.cosmic_mode = True
return True
else:
......
......@@ -12,13 +12,9 @@ import functools
from AthenaConfiguration.ComponentFactory import CompFactory
from AthenaConfiguration.ComponentFactory import CompFactory as CfgMgr
from AthenaMonitoring.DQConfigFlags import DQDataType
if 'DQMonFlags' not in dir():
from AthenaMonitoring.DQMonFlags import DQMonFlags as dqflags
#
def treat_list_of_chains_by_name( list_of_chains, part_name=None):
if part_name:
final_list = []
......@@ -122,18 +118,19 @@ class TrigEgammaMonAlgBuilder:
def get_monitoring_mode(self):
self.__logger.info("TrigEgammaMonAlgBuilder.get_monitoring_mode()")
self.data_type = dqflags.monManDataType()
if self.data_type == 'monteCarlo':
self.data_type = self.helper.flags.DQ.DataType
if self.data_type is DQDataType.MC:
self.mc_mode = True
return True
elif self.data_type == 'collisions':
elif self.data_type is DQDataType.Collisions:
self.pp_mode = True
return True
elif self.data_type == 'heavyioncollisions':
elif self.data_type is DQDataType.HeavyIon:
self.HI_mode = True
self.pPb_mode = True
return True
elif self.data_type == 'cosmics':
elif self.data_type is DQDataType.Cosmics:
self.cosmic_mode = True
return True
else:
......@@ -1196,4 +1193,4 @@ class TrigEgammaMonAlgBuilder:
return TrigEgammaInfo(trigger)
\ No newline at end of file
return TrigEgammaInfo(trigger)
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment