From 956c323b628b28cc4695e3d23b944fbf5a099bee Mon Sep 17 00:00:00 2001 From: ibelyaev <Ivan.Belyaev@cern.ch> Date: Tue, 7 Nov 2017 10:56:49 +0100 Subject: [PATCH] DaVinci: - Set "CondDB ( Upgdade = True)" for DataType='Upgrade' --- Phys/DaVinci/doc/release.notes | 5 +++++ Phys/DaVinci/python/DaVinci/Configuration.py | 19 ++++++++++++++++++- 2 files changed, 23 insertions(+), 1 deletion(-) diff --git a/Phys/DaVinci/doc/release.notes b/Phys/DaVinci/doc/release.notes index 9626be3c8..9974a11f0 100755 --- a/Phys/DaVinci/doc/release.notes +++ b/Phys/DaVinci/doc/release.notes @@ -8,6 +8,11 @@ ! !----------------------------------------------------------------------------- +! 2017-11-07 - Vanya Belyaev + - DaVinci + - Set "CondDB ( Upgdade = True)" for DataType='Upgrade' + + ! 2017-01-12 - Vanya Belyaev - DaVinci: issue warning message if DDDBtag/CondDBtag are not specified for simulated data diff --git a/Phys/DaVinci/python/DaVinci/Configuration.py b/Phys/DaVinci/python/DaVinci/Configuration.py index 8e3301c98..ec894754a 100644 --- a/Phys/DaVinci/python/DaVinci/Configuration.py +++ b/Phys/DaVinci/python/DaVinci/Configuration.py @@ -555,6 +555,21 @@ class DaVinci(LHCbConfigurableUser) : log.info("Creating Moni Algorithms") self.appendToMoniSequence( self.getProp("MoniSequence") ) + ## Specific action for DataType='Upgrade' + def _upgradeAction ( self ) : + """ Define specific action for DataType='Upgrade' + """ + + if self.getProp('DataType').upper() == 'UPGRADE' : + from Configurables import CondDB + _db = CondDB() + if _db.isPropertySet('Upgrade') : + if not _db.getProp('Upgrade') : + log.warning('Inconsistent configuration: CondDB ( Upgrade = False ) is set explicitely') + else : + log.info ('Define CondDB( Upgrade = True ) ') + _db.Upgrade = True + ################################################################################ # Append to Moni sequence # @@ -581,7 +596,8 @@ class DaVinci(LHCbConfigurableUser) : 'SDST' : 1 } inputType = self.getProp('InputType').upper() IODataManager().setProp('AgeLimit', depthMap.get(inputType, 0)) - + + ################################################################################ # Apply configuration # @@ -625,6 +641,7 @@ class DaVinci(LHCbConfigurableUser) : self._defineEvents() self._defineInput() self._rootFiles() + self._upgradeAction() # Add main sequence to TopAlg self._mainSequence () -- GitLab