ATLAS Offline Software
Classes | Functions | Variables
python.App Namespace Reference

Classes

class  AnaMgr
 
class  AppMgr
 
class  DataSetMgr
 
class  ExitCodes
 install the logger at py-module import and clean-up More...
 
class  MonitoredComponent
 
class  PdfMgr
 

Functions

def del_mplconfig_dir ()
 
def my_legend (*args, **kwargs)
 
def _monitor (tag)
 
def _installLogger (lvl=logging.INFO)
 

Variables

string __author__ = 'Sebastien Binet'
 
string __version__ = "$Revision: 1.20 $"
 
string __doc__ = "A set of classes and utilities to post-process/analyze a (set of) perfmon tuples."
 
 mplconfig_dir = tempfile.mkdtemp(prefix='matplotlib-%s-' % os.getpid())
 
 _rc = pyplot.rcParams
 
 _pyplot_legend = pyplot.legend
 
 legend
 
bool __do_monitoring = False
 
 type
 monComp.domain = domain(_compsDb[monName]['class'], _compsDb[monName]['module']) More...
 
 dataSet = DataSetMgr(dataSetName, data)
 push the data into the according dataset More...
 
 bins
 

Function Documentation

◆ _installLogger()

def python.App._installLogger (   lvl = logging.INFO)
private

Definition at line 82 of file App.py.

82 def _installLogger( lvl = logging.INFO ):
83  import sys
84  # define a Handler which writes DEBUG messages or higher to the sys.stdout
85  logger = logging.StreamHandler(sys.stdout)
86  logger.setLevel(logging.DEBUG)
87  # set a format which is simpler for console use
88  formatter = logging.Formatter('%(name)-12s: %(levelname)-8s %(message)s')
89  # tell the handler to use this format
90  logger.setFormatter(formatter)
91  # add the handler to the root logger
92  logging.getLogger('').addHandler(logger)
93 
94 
95  log = logging.getLogger("AppMgr")
96  log.setLevel( lvl )
97  for i in range(10):
98  log = logging.getLogger("AnaMgr-" + str(i).zfill(3))
99  log.setLevel( lvl )
100  log = logging.getLogger("Ana-chk")
101  log.setLevel( logging.ERROR )
102  log = logging.getLogger("Ana-ref")
103  log.setLevel( logging.ERROR )
104  log = logging.getLogger("Analyzer")
105  log.setLevel( logging.ERROR )
106  return
107 

◆ _monitor()

def python.App._monitor (   tag)
private

Definition at line 69 of file App.py.

69 def _monitor(tag):
70  global __do_monitoring
71  if __do_monitoring:
72  from resource import RUSAGE_SELF,getrusage
73  cpu = getrusage( RUSAGE_SELF )
74  from time import time
75  start = time() * 1e3
76  print ("===>",tag)
77  print ("cpu: u=",cpu.ru_utime * 1e3)
78  print ("cpu: s=",cpu.ru_stime * 1e3)
79  print ("time: ",start)
80  return
81 

◆ del_mplconfig_dir()

def python.App.del_mplconfig_dir ( )

Definition at line 30 of file App.py.

30 def del_mplconfig_dir():
31  import os
32  if os.system('/bin/rm -rf %s' % mplconfig_dir):
33  print ("** could not remove temporary $MPLCONFIGDIR **")
34  return
35 atexit.register(del_mplconfig_dir)
36 #print ("===>",os.environ['MPLCONFIGDIR'])
37 

◆ my_legend()

def python.App.my_legend ( args,
**  kwargs 
)

Definition at line 56 of file App.py.

56 def my_legend(*args, **kwargs):
57  print ("====>")
58  kwargs['alpha'] = 0.
59  return _pyplot_legend(*args, **kwargs)
60 pyplot.legend = my_legend

Variable Documentation

◆ __author__

string python.App.__author__ = 'Sebastien Binet'
private

Definition at line 14 of file App.py.

◆ __do_monitoring

bool python.App.__do_monitoring = False
private

Definition at line 67 of file App.py.

◆ __doc__

string python.App.__doc__ = "A set of classes and utilities to post-process/analyze a (set of) perfmon tuples."
private

Definition at line 16 of file App.py.

◆ __version__

string python.App.__version__ = "$Revision: 1.20 $"
private

Definition at line 15 of file App.py.

◆ _pyplot_legend

python.App._pyplot_legend = pyplot.legend
private

Definition at line 55 of file App.py.

◆ _rc

python.App._rc = pyplot.rcParams
private

Definition at line 42 of file App.py.

◆ bins

python.App.bins

Definition at line 410 of file App.py.

◆ dataSet

python.App.dataSet = DataSetMgr(dataSetName, data)

push the data into the according dataset

Definition at line 409 of file App.py.

◆ legend

python.App.legend

Definition at line 62 of file App.py.

◆ mplconfig_dir

python.App.mplconfig_dir = tempfile.mkdtemp(prefix='matplotlib-%s-' % os.getpid())

Definition at line 26 of file App.py.

◆ type

python.App.type

monComp.domain = domain(_compsDb[monName]['class'], _compsDb[monName]['module'])

Definition at line 402 of file App.py.

python.App._pyplot_legend
_pyplot_legend
Definition: App.py:55
python.App.my_legend
def my_legend(*args, **kwargs)
Definition: App.py:56
plotBeamSpotVxVal.range
range
Definition: plotBeamSpotVxVal.py:195
python.App._installLogger
def _installLogger(lvl=logging.INFO)
Definition: App.py:82
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
python.App._monitor
def _monitor(tag)
Definition: App.py:69
str
Definition: BTagTrackIpAccessor.cxx:11
python.App.del_mplconfig_dir
def del_mplconfig_dir()
Definition: App.py:30