CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Groups Pages
List of all members | Public Member Functions | Private Attributes
edmStreamStallGrapher.RefCountSet Class Reference
Inheritance diagram for edmStreamStallGrapher.RefCountSet:

Public Member Functions

def __init__
 
def add
 
def remove
 

Private Attributes

 __itemsAndCount
 

Detailed Description

Definition at line 601 of file edmStreamStallGrapher.py.

Constructor & Destructor Documentation

def edmStreamStallGrapher.RefCountSet.__init__ (   self)

Member Function Documentation

def edmStreamStallGrapher.RefCountSet.add (   self,
  item 
)

Definition at line 605 of file edmStreamStallGrapher.py.

References edmStreamStallGrapher.RefCountSet.__itemsAndCount.

Referenced by counter.Counter.register(), SequenceTypes.Task.remove(), and SequenceTypes.Task.replace().

606  def add(self, item):
607  v = self.__itemsAndCount.setdefault(item,0)
608  self.__itemsAndCount[item]=v+1
return super().add(item)
def edmStreamStallGrapher.RefCountSet.remove (   self,
  item 
)

Definition at line 609 of file edmStreamStallGrapher.py.

References edmStreamStallGrapher.RefCountSet.__itemsAndCount.

610  def remove(self, item):
611  v = self.__itemsAndCount[item]
612  if v == 1:
613  del self.__itemsAndCount[item]
614  super().remove(item)
615  else:
616  self.__itemsAndCount[item]=v-1
617 

Member Data Documentation

edmStreamStallGrapher.RefCountSet.__itemsAndCount
private

Definition at line 604 of file edmStreamStallGrapher.py.

Referenced by edmStreamStallGrapher.RefCountSet.add(), and edmStreamStallGrapher.RefCountSet.remove().