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 8 of file AtlRunQueryTimer.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 9 of file AtlRunQueryTimer.py.

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

Member Function Documentation

◆ __repr__()

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

Definition at line 14 of file AtlRunQueryTimer.py.

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

◆ __str__()

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

Definition at line 17 of file AtlRunQueryTimer.py.

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

◆ printRecursive()

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

Definition at line 20 of file AtlRunQueryTimer.py.

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

Member Data Documentation

◆ name

python.utils.AtlRunQueryTimer.TimeCount.name

Definition at line 10 of file AtlRunQueryTimer.py.

◆ subcounts

python.utils.AtlRunQueryTimer.TimeCount.subcounts

Definition at line 12 of file AtlRunQueryTimer.py.

◆ totaltime

python.utils.AtlRunQueryTimer.TimeCount.totaltime

Definition at line 11 of file AtlRunQueryTimer.py.


The documentation for this class was generated from the following file:
convertTimingResiduals.sum
sum
Definition: convertTimingResiduals.py:55
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename T::value_type > sorted(T begin, T end)
Helper function to create a sorted vector from an unsorted one.
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18