From c65ab80c43792d92306cc2b77794fce4c33cfec7 Mon Sep 17 00:00:00 2001 From: Walter Lampl <walter.lampl@cern.ch> Date: Wed, 28 Mar 2018 19:11:32 +0000 Subject: [PATCH] LArCellConditions.py for master --- Control/AthenaCommon/python/AppMgr.py | 4 +-- .../python/LArCellConditionsAlg.py | 32 ------------------- .../share/LArCellConditions.py | 13 +------- 3 files changed, 3 insertions(+), 46 deletions(-) diff --git a/Control/AthenaCommon/python/AppMgr.py b/Control/AthenaCommon/python/AppMgr.py index 33ae6d0ba62..55bcdb2f003 100755 --- a/Control/AthenaCommon/python/AppMgr.py +++ b/Control/AthenaCommon/python/AppMgr.py @@ -656,7 +656,7 @@ class AthAppMgr( AppMgr ): def reinitialize( self ): # since we're going to run python again, may have to re-enable to profiler - if self._opts.profile_python: + if self._opts and self._opts.profile_python: import cProfile cProfile._athena_python_profiler.enable() @@ -846,7 +846,7 @@ class AthAppMgr( AppMgr ): shutil.copy2("MP_PoolFileCatalog.xml", "PoolFileCatalog.xml") def __report_python_profile( self ): - if self._opts.profile_python: + if self._opts and self._opts.profile_python: import cProfile, pstats cProfile._athena_python_profiler.disable() stats = pstats.Stats(cProfile._athena_python_profiler, diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py index 221b3aa7e72..7e8959269a6 100644 --- a/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py +++ b/LArCalorimeter/LArExample/LArConditionsCommon/python/LArCellConditionsAlg.py @@ -55,38 +55,6 @@ class LArCellConditionsAlg(PyAthena.Alg): ## and that the PyAthena.Alg base class has already initialized ## it for us - # ----------------------------------------------------------- - # Store gate service - self.msg.info('initializing [%s]...',self.name()) - self.msg.debug('retrieve StoreGateSvc pointer...') - self.sg = PyAthena.py_svc('StoreGateSvc') - if self.sg is None: - self.msg.error('Problem retrieving StoreGateSvc pointer !') - return StatusCode.Failure - else: - self.msg.info('retrieved [%s]', self.sg.name()) - - # ----------------------------------------------------------- - # Detector store service - self.msg.debug('retrieve DetectorStoreSvc pointer...') - self.det = PyAthena.py_svc('DetDescrCnvSvc') - if self.det is None: - self.msg.error('Problem retrieving DetectorStoreSvc pointer !') - return StatusCode.Failure - else: - self.msg.info('retrieved [%s]', self.det.name()) - - # ----------------------------------------------------------- - # Message service - self.msg.info('initializing [%s]...',self.name()) - self.msg.debug('retrieve MessageSvc pointer...') - self.msgSvc = PyAthena.py_svc('MessageSvc') - if self.msgSvc is None: - self.msg.error('Problem retrieving MessageSvc pointer !') - return StatusCode.Failure - else: - self.msg.info('retrieved [%s]', self.msgSvc.name()) - # Get DetectorStore... from StoreGateBindings.Bindings import StoreGate self._detStore = StoreGate.pointer("DetectorStore") diff --git a/LArCalorimeter/LArExample/LArConditionsCommon/share/LArCellConditions.py b/LArCalorimeter/LArExample/LArConditionsCommon/share/LArCellConditions.py index 66d46b5de09..52a32b791e7 100755 --- a/LArCalorimeter/LArExample/LArConditionsCommon/share/LArCellConditions.py +++ b/LArCalorimeter/LArExample/LArConditionsCommon/share/LArCellConditions.py @@ -44,7 +44,7 @@ tag=None sv=True geo=False dspth=False -detdescrtag="ATLAS-GEO-20-00-00" +detdescrtag="ATLAS-R2-2016-01-00-01" detdescrset=False sqlite="" @@ -202,17 +202,6 @@ theLArCellConditionsAlg=LArCellConditionsAlg("LArCellConditions", printDSPTh=dspth) job+= theLArCellConditionsAlg -#print ServiceMgr.IOVDbSvc.Folders - -try: - svcMgr.PoolSvc.WriteCatalog="" - #svcMgr.PoolSvc.ReadCatalog.remove('apcfile:poolcond/PoolFileCatalog.xml') -except: - pass - -print svcMgr.PoolSvc.ReadCatalog -print svcMgr.PoolSvc.WriteCatalog - theApp.initialize() import readline -- GitLab