/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Public Attributes | Static Public Attributes
XmlDetDescGen::AdPmtStructure::gen::AdPmts Class Reference

List of all members.

Public Member Functions

def __init__
def pmtid
def write

Public Attributes

 site
 siteid
 adcount

Static Public Attributes

string lvname = "/dd/Geometry/PMT/lvPmtHemi"
string lvname2 = "/dd/Geometry/PMT/lvHeadonPmtAssy"
list siteids = [0x01,0x02,0x04]
list adcounts = [ 2, 2, 4]

Detailed Description

Definition at line 54 of file gen.py.


Constructor & Destructor Documentation

def XmlDetDescGen::AdPmtStructure::gen::AdPmts::__init__ (   self,
  site,
  siteid,
  adcount 
)

Definition at line 64 of file gen.py.

00065                                           :
00066         self.site = site
00067         self.siteid = siteid
00068         self.adcount = adcount
00069         pass


Member Function Documentation

def XmlDetDescGen::AdPmtStructure::gen::AdPmts::pmtid (   self,
  site,
  adn,
  icol,
  iring 
)

Definition at line 71 of file gen.py.

00072                                        :
00073         return (site<<24)|(adn<<16)|(iring<<8)|icol
00074 

def XmlDetDescGen::AdPmtStructure::gen::AdPmts::write (   self,
  outdir 
)

Definition at line 75 of file gen.py.

00076                           :
00077 
00078         from XmlDetDescGen.util import XmlFile, Comment
00079         from XmlDetDescGen.structure import DetElem,UserParameter
00080 
00081         for adn in range(0,self.adcount):
00082             adn += 1
00083 
00084             pmts = []
00085 
00086             ipmt = 0
00087             for iring in range(0,8):
00088                 iring += 1
00089                 
00090                 for icol in range(0,24):
00091                     icol += 1
00092                     ipmt = ipmt+1
00093                     pmtid = self.pmtid( self.siteid, adn,icol,iring)
00094                     data = {
00095                         'site':self.site,
00096                         'siteid':self.siteid,
00097                         'adnum':adn,
00098                         'ringnum':iring,
00099                         'columnnum':icol,
00100                         'pmtid':pmtid
00101                         }
00102                     
00103                     de = DetElem('%(site)s-ad%(adnum)d-ring%(ringnum)d-column%(columnnum)d'%data,
00104                                  self.lvname,
00105                                  npath="pvAdPmtArray/pvAdPmtArrayRotated/pvAdPmtRingInCyl:%(ringnum)s/pvAdPmtInRing:%(columnnum)d/pvAdPmtUnit/pvAdPmt"%data,
00106                                  support="/dd/Structure/AD/%(site)s-oil%(adnum)d"%data)
00107                     
00108                     de.refs = [UserParameter("PmtID","int",['0x%x'%pmtid],desc="Packed PMT ID")]
00109                     
00110                     pmts.append(de)
00111                     continue
00112                 continue
00113 
00114             iring = 0      
00115             for icol in range(0,6):
00116                 icol += 1
00117                 ipmt = ipmt+1
00118                 pmtid = self.pmtid( self.siteid, adn,icol,iring)
00119                 data = {
00120                         'site':self.site,
00121                         'siteid':self.siteid,
00122                         'adnum':adn,
00123                         'ringnum':iring,
00124                         'columnnum':icol,
00125                         'pmtid':pmtid
00126                         }
00127                     
00128                 de = DetElem('%(site)s-ad%(adnum)d-ring%(ringnum)d-column%(columnnum)d'%data,
00129                              self.lvname2,
00130                              npath="pvAdPmtArray/pvAd2inPmt:%(columnnum)d/pvHeadonPmtAssy"%data,
00131                              support="/dd/Structure/AD/%(site)s-oil%(adnum)d"%data)
00132                     
00133                 de.refs = [UserParameter("PmtID","int",['0x%x'%pmtid],desc="Packed PMT ID")]
00134                     
00135                 pmts.append(de)
00136                 continue
00137 
00138             file = XmlFile()
00139             file.objects = pmts
00140             file.write(outdir+"/%s%d.xml"%(self.site,adn))
00141             continue


Member Data Documentation

string XmlDetDescGen::AdPmtStructure::gen::AdPmts::lvname = "/dd/Geometry/PMT/lvPmtHemi" [static]

Definition at line 57 of file gen.py.

string XmlDetDescGen::AdPmtStructure::gen::AdPmts::lvname2 = "/dd/Geometry/PMT/lvHeadonPmtAssy" [static]

Definition at line 59 of file gen.py.

list XmlDetDescGen::AdPmtStructure::gen::AdPmts::siteids = [0x01,0x02,0x04] [static]

Definition at line 60 of file gen.py.

Definition at line 61 of file gen.py.

Definition at line 64 of file gen.py.

Definition at line 64 of file gen.py.

Definition at line 64 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 Fri May 16 2014 09:56:07 for XmlDetDesc by doxygen 1.7.4