Public Member Functions | |
def | __init__ |
def | initialize |
def | execute |
def | finalize |
Public Attributes | |
cableSvc | |
pmtGeomSvc |
Definition at line 16 of file ExamplePmtId.py.
def ExamplePmtId::ExampleAlg::__init__ | ( | self, | ||
name | ||||
) |
Definition at line 18 of file ExamplePmtId.py.
00018 : 00019 DybPythonAlg.__init__(self,name) 00020 return 00021 def initialize(self):
def ExamplePmtId::ExampleAlg::initialize | ( | self | ) |
Definition at line 22 of file ExamplePmtId.py.
00022 : 00023 status = DybPythonAlg.initialize(self) 00024 if status.isFailure(): return status 00025 self.info("initializing") 00026 00027 self.cableSvc = self.svc('ICableSvc','StaticCableSvc') 00028 self.pmtGeomSvc = self.svc('IPmtGeomInfoSvc','PmtGeomInfoSvc') 00029 00030 return SUCCESS 00031 def execute(self):
def ExamplePmtId::ExampleAlg::execute | ( | self | ) |
Definition at line 32 of file ExamplePmtId.py.
00032 : 00033 self.info("executing") 00034 00035 # Get the Triggered Readout of the detector 00036 evt = self.evtSvc() 00037 readoutHdr = evt["/Event/Readout/ReadoutHeader"] 00038 readout = readoutHdr.readout() 00039 if readout == None: 00040 self.info("No Triggered Readout for this event") 00041 return SUCCESS 00042 00043 # Get the service mode 00044 svcMode = ServiceMode( readoutHdr.context(), 0 ) 00045 00046 # Look at data from each channel 00047 for channelPair in readout.channelReadout(): 00048 channel = channelPair.second 00049 00050 # See #319 00051 adc = channel.adc() 00052 00053 channelId = channel.channelId() 00054 print "===================================" 00055 print "VME board= ", channelId.board() 00056 print "connector= ", channelId.connector() 00057 00058 # Find the PMT ID connected this electronics channel 00059 pmtId = self.cableSvc.adPmtSensor( channelId, svcMode ) 00060 print "pmt ring=", pmtId.ring() 00061 print "pmt column=", pmtId.column() 00062 00063 # Get the physical PMT number for this PMT, 00064 # to compare with the PMT Test bench 00065 pmtHardwareId = self.cableSvc.pmtHardwareId( pmtId, svcMode ) 00066 00067 # Get the PMT position 00068 pmtGeomInfo = self.pmtGeomSvc.get( pmtId.fullPackedData() ) 00069 pmtPosition = pmtGeomInfo.localPosition() 00070 # position relative to AD center 00071 print "pmt x= ", pmtPosition.x() 00072 print "pmt y= ", pmtPosition.y() 00073 print "pmt z= ", pmtPosition.z() 00074 print "==================================" 00075 00076 return SUCCESS 00077 def finalize(self):
def ExamplePmtId::ExampleAlg::finalize | ( | self | ) |
Definition at line 78 of file ExamplePmtId.py.
00078 : 00079 self.info("finalizing") 00080 status = DybPythonAlg.finalize(self) 00081 return status 00082 00083 ##### Job Configuration for nuwa.py ########################################
Definition at line 27 of file ExamplePmtId.py.
Definition at line 28 of file ExamplePmtId.py.