ATLAS Offline Software
FPEAndCoreDumpConfig.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
2 
3 from AthenaConfiguration.ComponentFactory import CompFactory
4 
5 from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
6 
7 
8 
9 #Steered by flag
10 
11 def FPEAndCoreDumpCfg(flags):
13  cds=CompFactory.CoreDumpSvc(FastStackTrace=True)
14 
15  #AthGeneration & AthAnalysis don't contain the FPEAuditor
16  if flags.Exec.FPE != -2 and hasattr(CompFactory,"FPEAuditor"):
17  #If we run with FPEAuditor, the CoreDumpSvc should not catch SIGFPE
18  #(but otherwise use the default list of signals)
19  signalsToCatch=[int(i) for i in cds.Signals] # Get the default
20 
21  if flags.Exec.FPE<0:
22  cfg.addService(CompFactory.FPEControlSvc(),create=True)
23  else:
24  cfg.addAuditor(CompFactory.FPEAuditor(NStacktracesOnFPE=flags.Exec.FPE))
25  from signal import SIGFPE
26  signalsToCatch.remove(SIGFPE)
27  cds.Signals=signalsToCatch
28  pass
29 
30  cfg.addService(cds,create=True)
31 
32  return cfg
33 
python.JetAnalysisCommon.ComponentAccumulator
ComponentAccumulator
Definition: JetAnalysisCommon.py:302
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
python.FPEAndCoreDumpConfig.FPEAndCoreDumpCfg
def FPEAndCoreDumpCfg(flags)
Definition: FPEAndCoreDumpConfig.py:11