ATLAS Offline Software
Loading...
Searching...
No Matches
PyAlgorithmExample.PyCompositeParticle Class Reference
Inheritance diagram for PyAlgorithmExample.PyCompositeParticle:
Collaboration diagram for PyAlgorithmExample.PyCompositeParticle:

Public Member Functions

 __init__ (self, pdgid=None, charge=None, plist=None)
 add (self, *plist)
 __len__ (self)
 __getitem__ (self, key)
 __iter__ (self)
 __contains__ (self, item)
 append (self, x)
 extend (self, x)
 count (self, x)
 index (self, x, i=0, j=999999999)

Private Attributes

list __l = []

Detailed Description

Definition at line 166 of file PyAlgorithmExample.py.

Constructor & Destructor Documentation

◆ __init__()

PyAlgorithmExample.PyCompositeParticle.__init__ ( self,
pdgid = None,
charge = None,
plist = None )

Definition at line 167 of file PyAlgorithmExample.py.

167 def __init__ (self, pdgid=None, charge=None, plist=None):
168 g.CompositeParticle.__init__ (self)
169 self.__l = []
170 if pdgid != None: self.set_pdgId (pdgid)
171 if charge != None: self.set_charge (charge)
172 if plist != None: self.extend (plist)
173 return

Member Function Documentation

◆ __contains__()

PyAlgorithmExample.PyCompositeParticle.__contains__ ( self,
item )

Definition at line 185 of file PyAlgorithmExample.py.

185 def __contains__ (self, item):
186 return item in self.__l

◆ __getitem__()

PyAlgorithmExample.PyCompositeParticle.__getitem__ ( self,
key )

Definition at line 181 of file PyAlgorithmExample.py.

181 def __getitem__ (self, key):
182 return self.__l[key]

◆ __iter__()

PyAlgorithmExample.PyCompositeParticle.__iter__ ( self)

Definition at line 183 of file PyAlgorithmExample.py.

183 def __iter__ (self):
184 return xxx # Not done yet.

◆ __len__()

PyAlgorithmExample.PyCompositeParticle.__len__ ( self)

Definition at line 179 of file PyAlgorithmExample.py.

179 def __len__ (self):
180 return len (self.__l)

◆ add()

PyAlgorithmExample.PyCompositeParticle.add ( self,
* plist )

Definition at line 174 of file PyAlgorithmExample.py.

174 def add (self, *plist):
175 for p in plist:
176 g.CompositeParticle.add (self, p)
177 self.__l += plist
178 return
bool add(const std::string &hname, TKey *tobj)
Definition fastadd.cxx:55

◆ append()

PyAlgorithmExample.PyCompositeParticle.append ( self,
x )

Definition at line 187 of file PyAlgorithmExample.py.

187 def append (self, x):
188 return self.add (x)

◆ count()

PyAlgorithmExample.PyCompositeParticle.count ( self,
x )

Definition at line 193 of file PyAlgorithmExample.py.

193 def count (self, x):
194 return self.__l.count (x)
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition hcg.cxx:146

◆ extend()

PyAlgorithmExample.PyCompositeParticle.extend ( self,
x )

Definition at line 189 of file PyAlgorithmExample.py.

189 def extend (self, x):
190 for p in x:
191 self.add (p)
192 return

◆ index()

PyAlgorithmExample.PyCompositeParticle.index ( self,
x,
i = 0,
j = 999999999 )

Definition at line 195 of file PyAlgorithmExample.py.

195 def index (self, x, i=0, j=999999999):
196 return self.__l.ndex (i, j)
197
198
199#
200# A Z-like composite particle.
201#
Definition index.py:1

Member Data Documentation

◆ __l

PyAlgorithmExample.PyCompositeParticle.__l = []
private

Definition at line 169 of file PyAlgorithmExample.py.


The documentation for this class was generated from the following file: