ATLAS Offline Software
Classes | Functions
python.PyAthenaEventLoopMgr Namespace Reference

Classes

class  PyAthenaEventLoopMgr
 

Functions

def enable_seeking (silent=False)
 
def _setupEvtSelForSeekOps ()
 

Function Documentation

◆ _setupEvtSelForSeekOps()

def python.PyAthenaEventLoopMgr._setupEvtSelForSeekOps ( )
private

Definition at line 59 of file PyAthenaEventLoopMgr.py.

60  from AthenaConfiguration.ComponentFactory import isComponentAccumulatorCfg
62  return
63  else:
64  return enable_seeking(silent=True)
65 

◆ enable_seeking()

def python.PyAthenaEventLoopMgr.enable_seeking (   silent = False)
try to install seek-stuff on the EventSelector side.
if `silent` is True, only an attempt at installing the seeking is performed.
otherwise an exception is raised if the seeking could not be installed.

Definition at line 15 of file PyAthenaEventLoopMgr.py.

15 def enable_seeking(silent=False):
16  """ try to install seek-stuff on the EventSelector side.
17  if `silent` is True, only an attempt at installing the seeking is performed.
18  otherwise an exception is raised if the seeking could not be installed.
19  """
20 
21  import sys
22  from AthenaCommon.Logging import log as msg
23  if 'AthenaPoolCnvSvc.ReadAthenaPool' not in sys.modules:
24  if silent:
25  _msg = msg.debug
26  else:
27  _msg = msg.info
28  # user did not import that module so we give up
29  _msg( "Cannot enable 'seeking' b/c module "
30  "[AthenaPoolCnvSvc.ReadAthenaPool] hasn't been imported..." )
31  _msg( "Modify your jobOptions to import that module "+ \
32  "(or just ignore this message)" )
33 
34  if not silent:
35  raise RuntimeError("configuration-logic error")
36 
37  return
38 
39  from AthenaCommon.AppMgr import ServiceMgr as svcMgr
40  from AthenaCommon.Configurable import Configurable
41  collectionType = svcMgr.EventSelector.properties()["CollectionType"]
42 
43  if collectionType in ( "ImplicitROOT", Configurable.propertyNoValue, ):
44  msg.info ( "=> Seeking enabled." )
45 
46  else:
47  msg.warning( "Input seeking is not compatible with collection type of %s",
48  svcMgr.EventSelector.properties()["CollectionType"] )
49  msg.warning( "=> Seeking disabled." )
50  if not silent:
51  raise RuntimeError("could not install seeking")
52 
53  from AthenaCommon.AppMgr import theApp
54  if theApp.state() != theApp.State.OFFLINE:
55  # do not bring up the whole C++ kaboodle too early in the game
56  svcMgr.EventSelector.setup()
57  return
58 
python.PyAthenaEventLoopMgr._setupEvtSelForSeekOps
def _setupEvtSelForSeekOps()
Definition: PyAthenaEventLoopMgr.py:59
athena._msg
_msg
Definition: athena.py:189
python.PyAthenaEventLoopMgr.enable_seeking
def enable_seeking(silent=False)
Definition: PyAthenaEventLoopMgr.py:15
Configurable
athena/gaudi ----------------------------------------------------------—
python.JetAnalysisCommon.isComponentAccumulatorCfg
isComponentAccumulatorCfg
Definition: JetAnalysisCommon.py:263