Public Member Functions | |
def | __init__ |
def | initialize |
def | execute |
def | finalize |
Public Attributes | |
cableSvcName | |
cableSvc |
Definition at line 14 of file TestCableSvc.py.
def DataSvc::TestCableSvc::TestAlg::__init__ | ( | self, | ||
name | ||||
) |
Definition at line 15 of file TestCableSvc.py.
00015 : 00016 DybPythonAlg.__init__(self,name) 00017 self.cableSvcName = 'StaticCableSvc' 00018 print "Making TestAlg",name 00019 def initialize(self):
def DataSvc::TestCableSvc::TestAlg::initialize | ( | self | ) |
Definition at line 20 of file TestCableSvc.py.
00020 : 00021 status = DybPythonAlg.initialize(self) 00022 print "Init TestAlg",self.name() 00023 if status.isFailure(): return status 00024 self.cableSvc = self.svc('ICableSvc',self.cableSvcName) 00025 print "===========================================================\n\n" 00026 # Select all sites 00027 context = Context() 00028 context.SetSite(Site.kAll) 00029 # Select all detectors 00030 context.SetDetId(DetectorId.kAll) 00031 svcMode = ServiceMode(context,0) 00032 adPmtSensors = self.cableSvc.adPmtSensors(svcMode) 00033 hrdwTypes = ["kUnknown","kPmt8inch","kPmt2inch","kRpc","kFee","kFec","kRot","kRom","kHighVoltage"] 00034 print " number of sensors =",adPmtSensors.size() 00035 print " Detector \t Ring \t Colmn \t HrdwType PmtHrdwId \t DAQChannel \t ElecHrdwType \t FEEHrdwId FEEHrdwConnector" 00036 for sens in adPmtSensors: 00037 pmtHrdw = self.cableSvc.pmtHardwareId(sens, svcMode) 00038 chan = self.cableSvc.feeChannelId(sens, svcMode) 00039 feeHrdw = self.cableSvc.feeHardwareId(chan, svcMode) 00040 00041 daqIndex = "%2d %2d" % (chan.board(), chan.connector()) 00042 pmtHrdwId = "%4d" % pmtHrdw.id() 00043 print " ",sens.detName(),"\t ",sens.ring(),"\t ",sens.column(),"\t",hrdwTypes[pmtHrdw.type()]," ",pmtHrdwId,"\t ",daqIndex,"\t ",hrdwTypes[feeHrdw.type()],"\t\t ",feeHrdw.boardId(),"\t ",feeHrdw.connector() 00044 00045 print "\n\n===========================================================" 00046 return SUCCESS 00047 def execute(self):
def DataSvc::TestCableSvc::TestAlg::execute | ( | self | ) |
def DataSvc::TestCableSvc::TestAlg::finalize | ( | self | ) |
Definition at line 52 of file TestCableSvc.py.
00052 : 00053 print "Finalizing TestAlg",self.name() 00054 status = DybPythonAlg.finalize(self) 00055 return status 00056 cableSvcName = "StaticCableSvc"
Definition at line 17 of file TestCableSvc.py.
Definition at line 24 of file TestCableSvc.py.