/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
DetHelpers::test::MyAlg Class Reference
Inheritance diagram for DetHelpers::test::MyAlg:
Inheritance graph
[legend]
Collaboration diagram for DetHelpers::test::MyAlg:
Collaboration graph
[legend]

List of all members.

Public Member Functions

def __init__
def initialize
def spin
def execute

Public Attributes

 pgis

Detailed Description

Definition at line 22 of file test.py.


Constructor & Destructor Documentation

def DetHelpers::test::MyAlg::__init__ (   self,
  name 
)

Definition at line 23 of file test.py.

00024                            :
00025         GaudiAlgo.__init__(self,name)
00026         print "Making MyAlg",name


Member Function Documentation

def DetHelpers::test::MyAlg::initialize (   self)

Definition at line 27 of file test.py.

00028                         :
00029         status = GaudiAlgo.initialize(self)
00030         print "Init MyAlg",self.name
00031         if status.isFailure(): return status
00032         app = AppMgr()
00033         app.DLLs += [ "DetHelpersLib", 'DetHelpers', 'DetHelpersDict' ]
00034         self.pgis = self.svc('IPmtGeomInfoSvc','PmtGeomInfoSvc')
00035         print self.pgis
00036         return self.spin()

def DetHelpers::test::MyAlg::spin (   self)

Definition at line 37 of file test.py.

00038                   :
00039         # check all AD pmts
00040         import time
00041         start = time.time()
00042         count = 0
00043         for site,nads in [(0x01,2),(0x02,2),(0x04,4)]:
00044             print "Site:",site,
00045             for iad in range(0,nads):
00046                 iad += 1
00047                 print "[",iad,"]",
00048                 for icol in range(0,24):
00049                     icol +=1
00050                     for iring in range(0,8):
00051                         iring += 1
00052                         pmtid = (site<<24)|(iad<<16)|(iring<<8)|icol
00053 
00054                         pgi = self.pgis.get(pmtid)
00055                         if not pgi:
00056                             print "PmtGeomInfoSvc returned None"
00057                             return FAILURE
00058                         if pmtid != pgi.pmtid():
00059                             print "Ask for PMT ID %d, got %d"%(pmtid,pgi.pmtid())
00060                             return FAILURE
00061                         count += 1
00062                         continue
00063                     continue
00064                 continue
00065             print "\n",
00066             continue
00067         stop = time.time()
00068         print "Found %d PMTs in %f seconds"%(count,stop-start)
00069         
00070 
00071         return SUCCESS

def DetHelpers::test::MyAlg::execute (   self)

Definition at line 72 of file test.py.

00073                      :
00074         for r in range(0,10): self.spin()


Member Data Documentation

Definition at line 27 of file test.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:27 for DetHelpers by doxygen 1.7.4