Skip to content
Snippets Groups Projects
Commit cc8a7bc2 authored by Eduardo Rodrigues's avatar Eduardo Rodrigues
Browse files

Merge branch 'eduardo-LHCBPS-1760' into 'master'

Make sure DaVinci().Detectors property is propagated to SimConf

See merge request lhcb/DaVinci!141
parents 2ad7edae fa9c7acd
No related branches found
No related tags found
3 merge requests!1103Draft: Add AnalysisHelpers to DaVinci Stack,!167Remove Phys/KaliCalo,!141Make sure DaVinci().Detectors property is propagated to SimConf
......@@ -31,7 +31,7 @@ class DaVinci(LHCbConfigurableUser) :
"EvtMax" : -1 # Number of events to analyse
, "SkipEvents" : 0 # Number of events to skip at beginning for file
, "PrintFreq" : 1000 # The frequency at which to print event numbers
, "DataType" : '' # Data type, can be ['2008','2009','MC09','2010','2011','2012','2015','2016','2017'] Forwarded to PhysConf, AnalysisConf, DstConf and LHCbApp. MUST be set.
, "DataType" : '' # Data type, can be ['2008','2009','MC09','2010','2011','2012','2015','2016','2017','2018','Upgrade'] Forwarded to PhysConf, AnalysisConf, DstConf and LHCbApp. MUST be set.
, "Simulation" : False # set to True to use SimCond. Forwarded to PhysConf
, "DDDBtag" : "" # Tag for DDDB. Default as set in DDDBConf for DataType
, "CondDBtag" : "" # Tag for CondDB. Default as set in DDDBConf for DataType
......@@ -68,7 +68,7 @@ class DaVinci(LHCbConfigurableUser) :
"EvtMax" : """ Number of events to analyse """
, "SkipEvents" : """ Number of events to skip at beginning for file """
, "PrintFreq" : """ The frequency at which to print event numbers """
, "DataType" : """ Data type, can be ['2008','2009','MC09','2010','2011','2012','2015','2016','2017'] Forwarded to PhysConf, AnalysisConf, DstConf and LHCbApp """
, "DataType" : """ Data type, can be ['2008','2009','MC09','2010','2011','2012','2015','2016','2017','2018','Upgrade'] Forwarded to PhysConf, AnalysisConf, DstConf and LHCbApp """
, "Simulation" : """ set to True to use SimCond. Forwarded to PhysConf """
, "DDDBtag" : """ Tag for DDDB. Default as set in DDDBConf for DataType """
, "CondDBtag" : """ Tag for CondDB. Default as set in DDDBConf for DataType """
......@@ -106,8 +106,10 @@ class DaVinci(LHCbConfigurableUser) :
TurboConf ,
LHCbApp ]
__known_datatypes__ = [ "MC09", "2008", "2009", "2010", "2011", "2012", "2015", "2016", "2017", "Upgrade" ]
__known_datatypes__ = [ "MC09", "2008", "2009", "2010", "2011", "2012", "2015", "2016", "2017", "2018", "Upgrade" ]
__known_prod_types__ = [ "None", "Stripping" ]
__known_default_detectors = ['Velo', 'PuVeto', 'Rich1', 'Rich2', 'TT', 'IT', 'OT', 'Spd', 'Prs', 'Ecal', 'Hcal', 'Muon', 'Magnet', 'Tr']
__known_upgrade_detectors__ = ['VP', 'UT', 'FT', 'Rich1Pmt', 'Rich2Pmt', 'Ecal', 'Hcal', 'Muon', 'Magnet', 'Tr' ]
## Known monitoring sequences run by default
KnownMonitors = []
......@@ -573,7 +575,7 @@ class DaVinci(LHCbConfigurableUser) :
"""
if self.getProp('DataType').upper() == 'UPGRADE' :
from Configurables import CondDB
from Configurables import CondDB
_db = CondDB()
if _db.isPropertySet('Upgrade') :
if not _db.getProp('Upgrade') :
......@@ -581,7 +583,13 @@ class DaVinci(LHCbConfigurableUser) :
else :
log.info ('Define CondDB( Upgrade = True ) ')
_db.Upgrade = True
if not self.isPropertySet('Detectors') or not self.getProp('Detectors') :
upgrade_only_dets = [ d for d in __known_upgrade_detectors__ if d not in __known_default_detectors]
log.warning("It is suspicious that the list of ``Detectors'' is not specified though ``DataType=Upgrade'' ...")
log.warning("Sure that none of the upgrade-only detectors %s are to be specified via ``Detectors''?" % upgrade_only_dets )
from Configurables import SimConf
self.setOtherProps(SimConf(), ["Detectors"])
################################################################################
# Append to Moni sequence
#
......
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