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

List of all members.

Public Member Functions

def __init__
def initialize
def execute
def finalize

Public Attributes

 cableSvc
 pmtGeomSvc

Detailed Description

Definition at line 16 of file ExamplePmtId.py.


Constructor & Destructor Documentation

def ExamplePmtId::ExampleAlg::__init__ (   self,
  name 
)

Definition at line 18 of file ExamplePmtId.py.

00019                            :
00020         DybPythonAlg.__init__(self,name)
00021         return


Member Function Documentation

def ExamplePmtId::ExampleAlg::initialize (   self)

Definition at line 22 of file ExamplePmtId.py.

00023                         :
00024         status = DybPythonAlg.initialize(self)
00025         if status.isFailure(): return status
00026         self.info("initializing")
00027 
00028         self.cableSvc = self.svc('ICableSvc','CableSvc')
00029         self.pmtGeomSvc = self.svc('IPmtGeomInfoSvc','PmtGeomInfoSvc')
00030 
00031         return SUCCESS

def ExamplePmtId::ExampleAlg::execute (   self)

Definition at line 32 of file ExamplePmtId.py.

00033                      :
00034         self.info("executing")
00035 
00036         # Get the Triggered Readout of the detector        
00037         evt = self.evtSvc()
00038         readoutHdr = evt["/Event/Readout/ReadoutHeader"]
00039         readout = readoutHdr.readout()
00040         if readout == None:
00041             self.info("No Triggered Readout for this event")
00042             return SUCCESS
00043 
00044         # Get the service mode
00045         svcMode = ServiceMode( readoutHdr.context(), 0 )
00046 
00047         # Look at data from each channel
00048         for channelPair in readout.channelReadout():
00049             channel = channelPair.second
00050 
00051             # See #319
00052             adc = channel.adc()
00053 
00054             channelId = channel.channelId()
00055             print "==================================="
00056             print "VME board= ", channelId.board()
00057             print "connector= ", channelId.connector()
00058             
00059             # Find the PMT ID connected this electronics channel
00060             pmtId = self.cableSvc.adPmtSensor( channelId, svcMode )
00061             print "pmt ring=", pmtId.ring()
00062             print "pmt column=", pmtId.column()
00063             
00064             # Get the physical PMT number for this PMT,
00065             # to compare with the PMT Test bench
00066             pmtHardwareId = self.cableSvc.pmtHardwareId( pmtId, svcMode )
00067             
00068             # Get the PMT position
00069             pmtGeomInfo = self.pmtGeomSvc.get( pmtId.fullPackedData() )
00070             pmtPosition = pmtGeomInfo.localPosition()
00071             # position relative to AD center
00072             print "pmt x= ", pmtPosition.x()
00073             print "pmt y= ", pmtPosition.y()
00074             print "pmt z= ", pmtPosition.z()
00075             print "=================================="
00076 
00077         return SUCCESS
        
def ExamplePmtId::ExampleAlg::finalize (   self)

Definition at line 78 of file ExamplePmtId.py.

00079                       :
00080         self.info("finalizing")
00081         status = DybPythonAlg.finalize(self)
00082         return status
00083 


Member Data Documentation

Definition at line 22 of file ExamplePmtId.py.

Definition at line 22 of file ExamplePmtId.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:49:50 for DivingIn by doxygen 1.7.4