ATLAS Offline Software
Public Member Functions | Public Attributes | List of all members
python.utils.AtlRunQueryTimer.TimeCount Class Reference
Collaboration diagram for python.utils.AtlRunQueryTimer.TimeCount:

Public Member Functions

def __init__ (self, name)
 
def __repr__ (self)
 
def __str__ (self)
 
def printRecursive (self, lvl)
 

Public Attributes

 name
 
 totaltime
 
 subcounts
 

Detailed Description

Definition at line 7 of file AtlRunQueryTimer.py.

Constructor & Destructor Documentation

◆ __init__()

def python.utils.AtlRunQueryTimer.TimeCount.__init__ (   self,
  name 
)

Definition at line 8 of file AtlRunQueryTimer.py.

8  def __init__(self, name):
9  self.name = name
10  self.totaltime = 0
11  self.subcounts = []
12 

Member Function Documentation

◆ __repr__()

def python.utils.AtlRunQueryTimer.TimeCount.__repr__ (   self)

Definition at line 13 of file AtlRunQueryTimer.py.

13  def __repr__(self):
14  return "%s: %f" % (self.name, self.totaltime)
15 

◆ __str__()

def python.utils.AtlRunQueryTimer.TimeCount.__str__ (   self)

Definition at line 16 of file AtlRunQueryTimer.py.

16  def __str__(self):
17  return "%s: %f" % (self.name, self.totaltime)
18 

◆ printRecursive()

def python.utils.AtlRunQueryTimer.TimeCount.printRecursive (   self,
  lvl 
)

Definition at line 19 of file AtlRunQueryTimer.py.

19  def printRecursive(self, lvl):
20  from operator import attrgetter
21  # print myself
22  if self.subcounts:
23  # sum up sub counts
24  ts = sum([x.totaltime for x in self.subcounts])
25  print ("%s%-70s : %f (sub sum %f)" % (5*lvl*" ", self.name, self.totaltime, ts))
26  else:
27  print ("%s%-70s : %f" % (5*lvl*" ", self.name, self.totaltime))
28  # sort sub counters
29  sortedByTime = sorted(self.subcounts,key=attrgetter('totaltime'),reverse=True)
30  # call print for sub counters
31  for subtc in sortedByTime:
32  subtc.printRecursive(lvl+1)
33 

Member Data Documentation

◆ name

python.utils.AtlRunQueryTimer.TimeCount.name

Definition at line 9 of file AtlRunQueryTimer.py.

◆ subcounts

python.utils.AtlRunQueryTimer.TimeCount.subcounts

Definition at line 11 of file AtlRunQueryTimer.py.

◆ totaltime

python.utils.AtlRunQueryTimer.TimeCount.totaltime

Definition at line 10 of file AtlRunQueryTimer.py.


The documentation for this class was generated from the following file:
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename R::value_type > sorted(const R &r, PROJ proj={})
Helper function to create a sorted vector from an unsorted range.
convertTimingResiduals.sum
sum
Definition: convertTimingResiduals.py:55
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18