| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

gen::NearPoolPmts Class Reference

List of all members.

Public Member Functions

def __init__
def pmtid
def fill
def write

Public Attributes

 site
 siteid
 poolcount
 wallcount

Static Public Attributes

string lvname = "/dd/Geometry/PMT/lvPmtHemiFrame"
list siteids = [0x01,0x02,0x04]
list poolnums = [(5<<1)|1, (6<<1)|1, 6<<1]
list poolcounts = ['InnFin','OutFin','OutFout']
list wallcounts = [9, 9, 8]
list nearInFin = [10,8,24,8,10,8,24,8,21]
list nearOutFin = [8,8,16,8,8,8,16,8,23]
list nearOutFout = [4,8,12,8,4,8,12,8]
string npath = ''
string support = ''

Detailed Description

Definition at line 947 of file gen.py.


Member Function Documentation

def gen::NearPoolPmts::__init__ (   self,
  site,
  siteid,
  poolcount,
  wallcount 
)

Definition at line 960 of file gen.py.

00960                                                       :
00961         self.site = site
00962         self.siteid = siteid
00963         self.poolcount = poolcount
00964         self.wallcount = wallcount
00965         pass
00966 
00967     # this must match what Conventions/Detectors does
    def pmtid(self,site,pooln,iid,iwall):

def gen::NearPoolPmts::pmtid (   self,
  site,
  pooln,
  iid,
  iwall 
)

Definition at line 968 of file gen.py.

00968                                         :
00969         # shift up pooln by only 15 since it was shifted one bit already
00970         inward = 0
00971         if pooln == 11 or pooln == 13:
00972             inward = 1
00973         return (site<<24)|(pooln&0xffe)<<15|inward<<12|(iwall<<8)|iid
00974 
    def fill(self,data):

def gen::NearPoolPmts::fill (   self,
  data 
)

Definition at line 975 of file gen.py.

00975                        :
00976         if data["poolnum"] == 11:
00977             NearPoolPmts.npath="pvVetoPmtNearInn/pvNearInnWall%(wallnum)d/pvNearInnWall%(wallnum)d:%(idnum)d/pvVetoPmtUnit"%data
00978             NearPoolPmts.support="/dd/Structure/Pool/%(site)s-iws"%data
00979         elif data["poolnum"] == 12:
00980             NearPoolPmts.npath="pvVetoPmtNearOutFaceout/pvNearOutFaceoutWall%(wallnum)d/pvNearOutFaceoutWall%(wallnum)d:%(idnum)d/pvVetoPmtUnit"%data
00981             NearPoolPmts.support="/dd/Structure/Pool/%(site)s-ows"%data
00982         elif data["poolnum"] == 13:
00983             NearPoolPmts.npath="pvVetoPmtNearOutFacein/pvNearOutFaceinWall%(wallnum)d/pvNearOutFaceinWall%(wallnum)d:%(idnum)d/pvVetoPmtUnit"%data
00984             NearPoolPmts.support="/dd/Structure/Pool/%(site)s-ows"%data
00985         return
00986     
    def write(self,outdir):

def gen::NearPoolPmts::write (   self,
  outdir 
)

Definition at line 987 of file gen.py.

00987                           :
00988         from XmlDetDescGen.util import XmlFile, Comment
00989         from XmlDetDescGen.structure import DetElem,UserParameter
00990 
00991         for poolp, pooln, walln in zip(NearPoolPmts.poolcounts,NearPoolPmts.poolnums,NearPoolPmts.wallcounts):
00992 
00993             pmts = []
00994             for iwall in range(0,walln): #max wallcount=9
00995                 iwall += 1
00996                 counts = []
00997                 if pooln == 11:
00998                     counts = NearPoolPmts.nearInFin
00999                 if pooln == 12:
01000                     counts = NearPoolPmts.nearOutFout
01001                 if pooln == 13:
01002                     counts = NearPoolPmts.nearOutFin
01003                 for iid in range(0, counts[iwall-1]): #pmt number in that wall
01004                     iid += 1
01005                     
01006                     pmtid = self.pmtid(siteid,pooln,iid,iwall)
01007                     
01008                     data = { 'site':site,'siteid':siteid,'poolpv':poolp,'poolnum':pooln,'wallnum':iwall,'idnum':iid,'pmtid':pmtid}
01009 
01010                     self.fill(data)
01011 
01012                     de = DetElem('%(site)s-%(poolpv)s-Wall%(wallnum)d-No%(idnum)d'%data,
01013                                  self.lvname, NearPoolPmts.npath, NearPoolPmts.support)
01014                     
01015                     de.refs = [UserParameter("PmtID","int",['0x%x'%pmtid],desc="Packed PMT ID")]
01016                     
01017                     pmts.append(de)
01018                     continue
01019                 continue
01020 
01021             file = XmlFile()
01022             file.objects = pmts
01023             file.write(outdir+"/%s%s.xml"%(self.site,poolp))
01024             continue
01025 #-----------------------------------------------------
01026                              
if '__main__' == __name__:


Member Data Documentation

string gen::NearPoolPmts::lvname = "/dd/Geometry/PMT/lvPmtHemiFrame" [static]

Definition at line 949 of file gen.py.

list gen::NearPoolPmts::siteids = [0x01,0x02,0x04] [static]

Definition at line 950 of file gen.py.

list gen::NearPoolPmts::poolnums = [(5<<1)|1, (6<<1)|1, 6<<1] [static]

Definition at line 951 of file gen.py.

list gen::NearPoolPmts::poolcounts = ['InnFin','OutFin','OutFout'] [static]

Definition at line 952 of file gen.py.

list gen::NearPoolPmts::wallcounts = [9, 9, 8] [static]

Definition at line 953 of file gen.py.

list gen::NearPoolPmts::nearInFin = [10,8,24,8,10,8,24,8,21] [static]

Definition at line 954 of file gen.py.

list gen::NearPoolPmts::nearOutFin = [8,8,16,8,8,8,16,8,23] [static]

Definition at line 955 of file gen.py.

list gen::NearPoolPmts::nearOutFout = [4,8,12,8,4,8,12,8] [static]

Definition at line 956 of file gen.py.

string gen::NearPoolPmts::npath = '' [static]

Definition at line 957 of file gen.py.

string gen::NearPoolPmts::support = '' [static]

Definition at line 958 of file gen.py.

gen::NearPoolPmts::site

Definition at line 961 of file gen.py.

gen::NearPoolPmts::siteid

Definition at line 962 of file gen.py.

gen::NearPoolPmts::poolcount

Definition at line 963 of file gen.py.

gen::NearPoolPmts::wallcount

Definition at line 964 of file gen.py.


The documentation for this class was generated from the following file:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Mon Apr 11 20:14:02 2011 for XmlDetDesc by doxygen 1.4.7