CMS 3D CMS Logo

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 28 of file OrderedSet.py.

Constructor & Destructor Documentation

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

Definition at line 30 of file OrderedSet.py.

30  def __init__(self, iterable=None):
31  self.end = end = []
32  end += [None, end, end] # sentinel node for doubly linked list
33  self.map = {} # key --> [key, prev, next]
34  if iterable is not None:
35  self |= iterable
36 
def __init__(self, iterable=None)
Definition: OrderedSet.py:30

Member Function Documentation

def OrderedSet.OrderedSet.__contains__ (   self,
  key 
)

Definition at line 40 of file OrderedSet.py.

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

40  def __contains__(self, key):
41  return key in self.map
42 
def __contains__(self, key)
Definition: OrderedSet.py:40
def OrderedSet.OrderedSet.__eq__ (   self,
  other 
)

Definition at line 81 of file OrderedSet.py.

References list(), and edm.print().

Referenced by SequenceTypes._UnarySequenceOperator.__ne__().

81  def __eq__(self, other):
82  if isinstance(other, OrderedSet):
83  return len(self) == len(other) and list(self) == list(other)
84  return set(self) == set(other)
85 
86 
def __eq__(self, other)
Definition: OrderedSet.py:81
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
def OrderedSet.OrderedSet.__iter__ (   self)

Definition at line 55 of file OrderedSet.py.

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

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

Definition at line 37 of file OrderedSet.py.

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

37  def __len__(self):
38  return len(self.map)
39 
def OrderedSet.OrderedSet.__repr__ (   self)

Definition at line 76 of file OrderedSet.py.

References list().

76  def __repr__(self):
77  if not self:
78  return '%s()' % (self.__class__.__name__,)
79  return '%s(%r)' % (self.__class__.__name__, list(self))
80 
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
def OrderedSet.OrderedSet.__reversed__ (   self)

Definition at line 62 of file OrderedSet.py.

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

62  def __reversed__(self):
63  end = self.end
64  curr = end[1]
65  while curr is not end:
66  yield curr[0]
67  curr = curr[1]
68 
def __reversed__(self)
Definition: OrderedSet.py:62
def OrderedSet.OrderedSet.add (   self,
  key 
)
def OrderedSet.OrderedSet.discard (   self,
  key 
)

Definition at line 49 of file OrderedSet.py.

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

Referenced by OrderedSet.OrderedSet.pop().

49  def discard(self, key):
50  if key in self.map:
51  key, prev, next = self.map.pop(key)
52  prev[2] = next
53  next[1] = prev
54 
def discard(self, key)
Definition: OrderedSet.py:49
def OrderedSet.OrderedSet.pop (   self,
  last = True 
)

Definition at line 69 of file OrderedSet.py.

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

69  def pop(self, last=True):
70  if not self:
71  raise KeyError('set is empty')
72  key = self.end[1][0] if last else self.end[2][0]
73  self.discard(key)
74  return key
75 
def discard(self, key)
Definition: OrderedSet.py:49
def pop(self, last=True)
Definition: OrderedSet.py:69

Member Data Documentation

OrderedSet.OrderedSet.end
OrderedSet.OrderedSet.map