Beispiel #1
0
    def __buildSpecial(self):
        # build special part of hierarchy for FRSS3
        FRSGeneralTargetHierarchy.build(self)
        #self.lh_builder.create_child_node('TS3ED2V1G/Q_OUT','FRSS3_BEAM/Q')
        self.lh_builder.create_child_node('TS4ED4SG/E_IN', 'FRSS3_BEAM/E')
        self.lh_builder.create_child_node(
            'TS4ED4SG/E_OUT',
            ['FRSS3_BEAM/ELEMENT', 'FRSS3_BEAM/ISOTOPE', 'FRSS3_BEAM/Q'])

        for device in self.devices.main_dipoles + self.devices.main_quadrupoles + self.devices.main_sextupoles:
            bl_parameter = self.reader.find_unique_string(
                device + '/B[0-3]?L$', self.lh_builder.lh.get_parameters())

            #y_prec_I = self.y_prec_parser.findYPrec(device, 'I', 1)
            i_parameter = self.lh_builder.lh.define_physics_parameter(device +
                                                                      '/I',
                                                                      'I',
                                                                      device,
                                                                      y_prec=5)

            self.lh_builder.create_child_node(i_parameter, bl_parameter)

            system = self.devices.devicesystemmap.get(device)

            self.lh_builder.lh.add_parameter_to_system(i_parameter, system)
Beispiel #2
0
    def build(self):

        # build generic part of hierarchy
        GenericTransferlineHierarchy.build(self)

        # build special part of hierarchy
        self.__buildSpecial()
        FRSGeneralTargetHierarchy.generate_linkrules(self)
        GenericTransferlineHierarchy.generate_linkrules(self)
Beispiel #3
0
    def __init__(self):

        self.standalone_acczone = False
        if not hasattr(self, 'lh_builder'):
            self.standalone_acczone = True
            FRSTS_properties = FRSTS_PROPERTIES()
            INIT_LH_BUILDER.__init__(self, FRSTS_properties)

        FRSTS_device_groups = FRSTS_DEVICES()
        GenericTransferlineHierarchy.__init__(self, FRSTS_device_groups)
        FRSGeneralTargetHierarchy.__init__(self, FRSTS_device_groups)
        self.frsts_bp = True
Beispiel #4
0
    def __buildSpecial(self):
        # build special part of hierarchy for FRSS1
        FRSGeneralTargetHierarchy.build(self)
        self.lh_builder.create_child_node('DetSC21/E_IN', 'FRSS2_BEAM/E')
        self.lh_builder.create_child_node('TS3ED7DPG/E_IN', 'DetSC21/E_OUT')
        self.lh_builder.create_child_node('TS3ED7DSG/E_IN', 'TS3ED7DPG/E_OUT')
        self.lh_builder.create_child_node('TS3ED7LSG/E_IN', 'TS3ED7DSG/E_OUT')
        self.lh_builder.create_child_node('TS3ED7OUG/E_IN', 'TS3ED7LSG/E_OUT')
        self.lh_builder.create_child_node('TS3ED7VOG/E_IN', 'TS3ED7OUG/E_OUT')
        self.lh_builder.create_child_node('TS3ET7GSG/E_IN', 'TS3ED7VOG/E_OUT')
        self.lh_builder.create_child_node('TS3DB7LG/E_IN', 'TS3ET7GSG/E_OUT')
        self.lh_builder.create_child_node('TS3ET7RSG/E_IN', 'TS3DB7LG/E_OUT')
        self.lh_builder.create_child_node('TS3ET7LSG/E_IN', 'TS3ET7RSG/E_OUT')
        self.lh_builder.create_child_node('TS3ET7USG/E_IN', 'TS3ET7LSG/E_OUT')
        self.lh_builder.create_child_node('DetSC22/E_IN', 'TS3ET7USG/E_OUT')
        self.lh_builder.create_child_node('DetTPC21/E_IN', 'DetSC22/E_OUT')
        self.lh_builder.create_child_node('DetTPC22/E_IN', 'DetTPC21/E_OUT')

        for device in self.devices.targetladders + self.devices.targets + self.devices.degraders + self.devices.degrader_disks:
            self.lh_builder.create_child_node(
                device + '/E_OUT',
                ['FRSS2_BEAM/ELEMENT', 'FRSS2_BEAM/ISOTOPE', 'FRSS2_BEAM/Q'])

        for device in self.devices.main_dipoles + self.devices.main_quadrupoles + self.devices.main_sextupoles + self.devices.vertical_correctors:
            bl_parameter = self.reader.find_unique_string(
                device + '/B[0-3]?L$', self.lh_builder.lh.get_parameters())

            # y_prec_I = self.y_prec_parser.findYPrec(device, 'I', 1)
            i_parameter = self.lh_builder.lh.define_physics_parameter(device +
                                                                      '/I',
                                                                      'I',
                                                                      device,
                                                                      y_prec=5)

            self.lh_builder.create_child_node(i_parameter, bl_parameter)

            system = self.devices.devicesystemmap.get(device)

            self.lh_builder.lh.add_parameter_to_system(i_parameter, system)