ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Public Attributes | Static Private Attributes | List of all members
python.L1.Base.CTPCondition.InternalTrigger Class Reference
Inheritance diagram for python.L1.Base.CTPCondition.InternalTrigger:
Collaboration diagram for python.L1.Base.CTPCondition.InternalTrigger:

Public Member Functions

def __init__ (self, name)
 
def __str__ (self)
 
def name (self)
 
def thresholdNames (self, include_bgrp=False)
 
def __or__ (self, x)
 
def __and__ (self, x)
 
def __not__ (self, x)
 
def conditions (self, include_internal=False)
 
def normalize (self)
 

Static Public Member Functions

def Not (x)
 
def stripBunchGroups (theLogic)
 

Public Attributes

 content
 
 logicType
 
 subConditions
 

Static Private Attributes

 __slots__
 

Detailed Description

Definition at line 33 of file CTPCondition.py.

Constructor & Destructor Documentation

◆ __init__()

def python.L1.Base.CTPCondition.InternalTrigger.__init__ (   self,
  name 
)

Definition at line 34 of file CTPCondition.py.

34  def __init__(self, name):
35  super(InternalTrigger, self).__init__( logicType = LogicType.INTERNAL, content = name )
36 

Member Function Documentation

◆ __and__()

def python.L1.Base.Logic.Logic.__and__ (   self,
  x 
)
inherited

Definition at line 82 of file Logic.py.

82  def __and__(self, x):
83  newLogic = Logic( logicType = LogicType.AND )
84 
85  if self.logicType is LogicType.AND:
86  newLogic.subConditions += copy(self.subConditions)
87  else:
88  newLogic.subConditions += [copy(self)]
89 
90  if x.logicType is LogicType.AND:
91  newLogic.subConditions += copy(x.subConditions)
92  else:
93  newLogic.subConditions += [copy(x)]
94 
95  return newLogic
96 

◆ __not__()

def python.L1.Base.Logic.Logic.__not__ (   self,
  x 
)
inherited

Definition at line 97 of file Logic.py.

97  def __not__(self, x):
98  if self.logicType is LogicType.NONE:
99  self.logicType = LogicType.NOT
100  if self.logicType is LogicType.NOT:
101  if len(self.subConditions) == 1:
102  log.debug('not is a unary operator, ignore it')
103  else:
104  self.subConditions.append(x)
105  return self
106 
107 

◆ __or__()

def python.L1.Base.Logic.Logic.__or__ (   self,
  x 
)
inherited

Definition at line 66 of file Logic.py.

66  def __or__(self, x):
67  newLogic = Logic( logicType = LogicType.OR )
68 
69  if self.logicType is LogicType.OR:
70  newLogic.subConditions += copy(self.subConditions)
71  else:
72  newLogic.subConditions += [copy(self)]
73 
74  if x.logicType is LogicType.OR:
75  newLogic.subConditions += copy(x.subConditions)
76  else:
77  newLogic.subConditions += [copy(x)]
78 
79  return newLogic
80 
81 

◆ __str__()

def python.L1.Base.CTPCondition.InternalTrigger.__str__ (   self)

Reimplemented from python.L1.Base.Logic.Logic.

Definition at line 37 of file CTPCondition.py.

37  def __str__(self):
38  return self.name()
39 

◆ conditions()

def python.L1.Base.Logic.Logic.conditions (   self,
  include_internal = False 
)
inherited

Definition at line 151 of file Logic.py.

151  def conditions(self, include_internal=False):
152  cond = set([])
153  if hasattr(self,'condition') and self.condition is not None:
154  from .CTPCondition import InternalTrigger
155  if isinstance(self.condition, InternalTrigger):
156  if include_internal:
157  cond.add(self.condition)
158  else:
159  cond.add( self.condition )
160  else:
161  for sc in self.subConditions:
162  cond.update( sc.conditions(include_internal) )
163  return sorted(list(cond))
164 
165 

◆ name()

def python.L1.Base.CTPCondition.InternalTrigger.name (   self)

Definition at line 40 of file CTPCondition.py.

40  def name(self):
41  return str(self.content)
42 

◆ normalize()

def python.L1.Base.Logic.Logic.normalize (   self)
inherited

Definition at line 166 of file Logic.py.

166  def normalize(self):
167  if self.logicType in (LogicType.AND, LogicType.OR):
168  mylogic = self.logicType
169  newconditions = []
170  for c in self.subConditions:
171  if c.logicType == mylogic: # X&(A&B) or X|(A|B)
172  # expand it to X&A&B or X|A|B
173  c.normalize()
174  newconditions.extend(c.subConditions)
175  else:
176  newconditions.append(c)
177  self.subConditions = newconditions
178 
179 

◆ Not()

def python.L1.Base.Logic.Logic.Not (   x)
staticinherited

Definition at line 33 of file Logic.py.

33  def Not(x):
34  a = Logic()
35  a.logicType = LogicType.NOT
36  a.subConditions.append(x)
37  return a
38 

◆ stripBunchGroups()

def python.L1.Base.Logic.Logic.stripBunchGroups (   theLogic)
staticinherited

Definition at line 40 of file Logic.py.

40  def stripBunchGroups(theLogic):
41  subConds = []
42  bunchGroups = []
43  for sc in theLogic.subConditions:
44  if sc.logicType is LogicType.INTERNAL and sc.name().startswith('BGRP'):
45  bunchGroups.append(sc.name())
46  else:
47  subConds.append( sc )
48 
49  if len(subConds)>1:
50  theLogic.subConditions = subConds
51  return (theLogic, bunchGroups)
52 
53  if len(subConds)==1:
54  return (subConds[0], bunchGroups)
55 
56  raise RuntimeError("Item with logic '%s' has only internal triggers defined" % theLogic)
57 
58 
59 

◆ thresholdNames()

def python.L1.Base.CTPCondition.InternalTrigger.thresholdNames (   self,
  include_bgrp = False 
)

Reimplemented from python.L1.Base.Logic.Logic.

Definition at line 43 of file CTPCondition.py.

43  def thresholdNames(self, include_bgrp=False):
44  if include_bgrp:
45  return [ self.name() ]
46  else:
47  return []
48 

Member Data Documentation

◆ __slots__

python.L1.Base.Logic.Logic.__slots__
staticprivateinherited

Definition at line 30 of file Logic.py.

◆ content

python.L1.Base.Logic.Logic.content
inherited

Definition at line 61 of file Logic.py.

◆ logicType

python.L1.Base.Logic.Logic.logicType
inherited

Definition at line 62 of file Logic.py.

◆ subConditions

python.L1.Base.Logic.Logic.subConditions
inherited

Definition at line 63 of file Logic.py.


The documentation for this class was generated from the following file:
python.L1.Base.Logic.Not
def Not(x)
Definition: Logic.py:180
Logic
@ Logic
Definition: BaseObject.h:11
dumpHVPathFromNtuple.append
bool append
Definition: dumpHVPathFromNtuple.py:91
normalize
Double_t normalize(TF1 *func, Double_t *rampl=NULL, Double_t from=0., Double_t to=0., Double_t step=1.)
Definition: LArPhysWaveHECTool.cxx:825
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
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.
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:224
name
std::string name
Definition: Control/AthContainers/Root/debug.cxx:195
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
str
Definition: BTagTrackIpAccessor.cxx:11
calibdata.copy
bool copy
Definition: calibdata.py:27