CMS 3D CMS Logo

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

Public Member Functions

def __contains__ (self, key)
 
def __eq__ (self, other)
 
def __init__ (self, iterable=None)
 
def __iter__ (self)
 
def __len__ (self)
 
def __repr__ (self)
 
def __reversed__ (self)
 
def add (self, key)
 
def discard (self, key)
 
def pop (self, last=True)
 

Public Attributes

 end
 
 map
 

Detailed Description

Definition at line 29 of file OrderedSet.py.

Constructor & Destructor Documentation

◆ __init__()

def OrderedSet.OrderedSet.__init__ (   self,
  iterable = None 
)

Definition at line 31 of file OrderedSet.py.

31  def __init__(self, iterable=None):
32  self.end = end = []
33  end += [None, end, end] # sentinel node for doubly linked list
34  self.map = {} # key --> [key, prev, next]
35  if iterable is not None:
36  self |= iterable
37 
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ __contains__()

def OrderedSet.OrderedSet.__contains__ (   self,
  key 
)

Definition at line 41 of file OrderedSet.py.

References OrderedSet.OrderedSet.map, HcalEmap.map, EMap.map, and cscdqm::Summary.map.

41  def __contains__(self, key):
42  return key in self.map
43 

◆ __eq__()

def OrderedSet.OrderedSet.__eq__ (   self,
  other 
)

Definition at line 82 of file OrderedSet.py.

Referenced by SequenceTypes._UnarySequenceOperator.__ne__().

82  def __eq__(self, other):
83  if isinstance(other, OrderedSet):
84  return len(self) == len(other) and list(self) == list(other)
85  return set(self) == set(other)
86 
87 

◆ __iter__()

def OrderedSet.OrderedSet.__iter__ (   self)

Definition at line 56 of file OrderedSet.py.

References OrderedSet.OrderedSet.end, LumiSectionFilter< T >.end, poly< T >::const_iterator.end, edm::IDVectorMap< ID, C, P >::range.end, theLHCInfoPerLSImpl::LumiSectionFilter.end, cond::RunInfo_t.end, LHCInfoImpl::LumiSectionFilter.end, o2olib.O2ORunMgr.end, esMonitoring.FDOutputListener.end, and svgfig.LineAxis.end.

56  def __iter__(self):
57  end = self.end
58  curr = end[2]
59  while curr is not end:
60  yield curr[0]
61  curr = curr[2]
62 

◆ __len__()

def OrderedSet.OrderedSet.__len__ (   self)

Definition at line 38 of file OrderedSet.py.

References OrderedSet.OrderedSet.map, HcalEmap.map, EMap.map, and cscdqm::Summary.map.

38  def __len__(self):
39  return len(self.map)
40 

◆ __repr__()

def OrderedSet.OrderedSet.__repr__ (   self)

Definition at line 77 of file OrderedSet.py.

References __class__< T >.__class__().

Referenced by datamodel.Object.__str__().

77  def __repr__(self):
78  if not self:
79  return '%s()' % (self.__class__.__name__,)
80  return '%s(%r)' % (self.__class__.__name__, list(self))
81 

◆ __reversed__()

def OrderedSet.OrderedSet.__reversed__ (   self)

Definition at line 63 of file OrderedSet.py.

References OrderedSet.OrderedSet.end, LumiSectionFilter< T >.end, poly< T >::const_iterator.end, edm::IDVectorMap< ID, C, P >::range.end, theLHCInfoPerLSImpl::LumiSectionFilter.end, cond::RunInfo_t.end, LHCInfoImpl::LumiSectionFilter.end, o2olib.O2ORunMgr.end, esMonitoring.FDOutputListener.end, and svgfig.LineAxis.end.

63  def __reversed__(self):
64  end = self.end
65  curr = end[1]
66  while curr is not end:
67  yield curr[0]
68  curr = curr[1]
69 

◆ add()

def OrderedSet.OrderedSet.add (   self,
  key 
)

◆ discard()

def OrderedSet.OrderedSet.discard (   self,
  key 
)

Definition at line 50 of file OrderedSet.py.

References OrderedSet.OrderedSet.map, HcalEmap.map, EMap.map, cscdqm::Summary.map, and OrderedSet.OrderedSet.pop().

Referenced by OrderedSet.OrderedSet.pop().

50  def discard(self, key):
51  if key in self.map:
52  key, prev, next = self.map.pop(key)
53  prev[2] = next
54  next[1] = prev
55 

◆ pop()

def OrderedSet.OrderedSet.pop (   self,
  last = True 
)

Member Data Documentation

◆ end

OrderedSet.OrderedSet.end

◆ map

OrderedSet.OrderedSet.map