Public Member Functions | |
def | __init__ |
def | initialize |
def | execute |
Public Attributes | |
gp | |
should_fail | |
css | |
ExecuteOnce |
Definition at line 88 of file TestCoordSysSvc.py.
def DetHelpers::TestCoordSysSvc::TesterAlg2::__init__ | ( | self, | ||
myname, | ||||
global_points, | ||||
should_fail = False | ||||
) |
Definition at line 90 of file TestCoordSysSvc.py.
00090 : 00091 GaudiAlgo.__init__(self,myname) 00092 self.gp = global_points 00093 self.should_fail = should_fail 00094 return 00095 def initialize(self):
def DetHelpers::TestCoordSysSvc::TesterAlg2::initialize | ( | self | ) |
Definition at line 96 of file TestCoordSysSvc.py.
00096 : 00097 sc = GaudiAlgo.initialize(self) 00098 if sc.isFailure(): 00099 print 'Failed to initialize GaudiAlgo base class' 00100 return sc 00101 self.css = self.svc('ICoordSysSvc','CoordSysSvc') 00102 if not self.css: 00103 print 'Failed to get CoordSysSvc' 00104 return FAILURE 00105 self.ExecuteOnce = True 00106 return sc; 00107 def execute(self):
def DetHelpers::TestCoordSysSvc::TesterAlg2::execute | ( | self | ) |
Definition at line 108 of file TestCoordSysSvc.py.
00108 : 00109 00110 import PyCintex 00111 Gaudi = PyCintex.makeNamespace('Gaudi') 00112 gpoint = Gaudi.XYZPoint(self.gp[0],self.gp[1],self.gp[2]) 00113 00114 print 'Checking %f,%f,%f'%(self.gp[0],self.gp[1],self.gp[2]) 00115 btde = self.css.belongsToDE(gpoint) 00116 print 'Found belong to DE: %s'%btde.name() 00117 lpoint = btde.geometry().toLocal(gpoint) 00118 print 'Local point in belongs to DE: %f,%f,%f'%(lpoint.x(),lpoint.y(),lpoint.z()) 00119 00120 # Find coord system 00121 csde = self.css.coordSysDE(gpoint) 00122 if csde: 00123 print 'Found coord sys DE: %s'%csde.name() 00124 if self.should_fail: 00125 print '\tbut, I should not have.' 00126 return FAILURE 00127 return SUCCESS 00128 print 'Failed to find coord sys DE for point' 00129 if self.should_fail: 00130 print '\twhich is as expected' 00131 return SUCCESS 00132 return FAILURE 00133 def configure():
Definition at line 92 of file TestCoordSysSvc.py.
Definition at line 93 of file TestCoordSysSvc.py.
Definition at line 101 of file TestCoordSysSvc.py.
Definition at line 105 of file TestCoordSysSvc.py.