コード例 #1
0
 def __createXCSITInteractions(self):
     self.__ia_data = lpdi.InteractionData()
コード例 #2
0
import libpy_detector_interface as lpdi
import sys

print("Testing InteractionData_ext module")
print("-----------------------------------------------------------------------")

# Create a new instance
print("Instantiating")
o = lpdi.InteractionData()
print(type(o))
print("instance created")
print(" ")

# checking the size of the new instance
print("initial size should be 0")
print("size: " + str(o.size()))
if o.size() != 0:
	print("initial size should be 0")
	sys.exit(1)
print(" ")

# store a first element
print("creating an instance")
ne = o.addEntry()
print("instance of the created obj: " + str(type(ne)))
print("size: " + str(o.size()))
if o.size() != 1:
	print("after one init size should be 1")
	sys.exit(1)
print("setting new instance positions to 4.0 2.0 4.2")
ne.setPositionX(4.0)
コード例 #3
0
    def __createXCSITInteractions(self):

        self.__ia_data = [
            lpdi.InteractionData() for i in self.parameters.patterns
        ]