Exemplo n.º 1
0
	def __init__(self,linac_wizard_document):
		#--- linac_wizard_document the parent document for all controllers
		self.linac_wizard_document = linac_wizard_document	
		#----scl_accSeq is a specific for this controller
		accl = self.linac_wizard_document.accl
		lst = ArrayList()
		for seqName in ["SCLMed","SCLHigh","HEBT1","HEBT2"]:	
			lst.add(accl.getSequence(seqName))
		self.scl_accSeq = AcceleratorSeqCombo("SCL_SEQUENCE", lst)	
		part_tracker = AlgorithmFactory.createParticleTracker(self.scl_accSeq)
		part_probe = ProbeFactory.createParticleProbe(self.scl_accSeq,part_tracker)
		self.mass = part_probe.getSpeciesRestEnergy()
		self.bpm_freq = 402.5e+6
		self.c_light = 2.99792458e+8
		#-------- Ring length 
		self.ring_length = accl.findSequence("Ring").getLength()
		#-------- BPMs and Cavities arrays
		self.bpm_wrappers = []
		self.cav_wrappers = []
		#-------- self.cav0_wrapper is used for all cavities (includind Cav01a) Blanked statistics
		self.cav0_wrapper = null
		self.fillOut_Arrays()	
		#--- the main tabbed pane		
		self.tabbedPane = JTabbedPane()
		#-------- child controllers 
		self.scl_long_tuneup_init_controller = SCL_Long_TuneUp_Init_Controller(self)
		self.scl_long_tuneup_phase_scan_controller = SCL_Long_TuneUp_PhaseScan_Controller(self)
		self.scl_long_tuneup_bpm_offsets_controller = SCL_Long_TuneUp_BPM_Offsets_Controller(self)
		self.scl_long_tuneup_phase_analysis_controller = SCL_Long_TuneUp_PhaseAnalysis_Controller(self)
		self.scl_long_tuneup_rescale_controller = SCL_Long_TuneUp_Rescale_Controller(self)
		self.scl_long_tuneup_energy_meter_controller = SCL_Energy_Meter_Controller(self)	
		self.scl_long_twiss_analysis_controller = SCL_Long_Twiss_Analysis_Controller(self)
		self.scl_long_laser_stripping_controller = SCL_Laser_Stripping_Controller(self)
		#the beamTrigger will be initialized after the user hit "Init" button in SCL_Long_Init_Controller 
		self.beamTrigger = null
		#sets of BPMs for BPM_Batch_Reader will be setup in "Init" button in SCL_Long_Init_Controller 
		self.bpmBatchReader = BPM_Batch_Reader(self)
		#----add all subpanels to the SCL main tab panel
		self.tabbedPane.add("Init",self.scl_long_tuneup_init_controller.getMainPanel())
		self.tabbedPane.add("Phase Scan",self.scl_long_tuneup_phase_scan_controller.getMainPanel())		
		self.tabbedPane.add("BPM Offsets",self.scl_long_tuneup_bpm_offsets_controller.getMainPanel())	
		self.tabbedPane.add("Phase Analysis",self.scl_long_tuneup_phase_analysis_controller.getMainPanel())
		self.tabbedPane.add("Rescale SCL",self.scl_long_tuneup_rescale_controller.getMainPanel())
		self.tabbedPane.add("Energy Meter",self.scl_long_tuneup_energy_meter_controller.getMainPanel())
		self.tabbedPane.add("Long. Twiss",self.scl_long_twiss_analysis_controller.getMainPanel())
		self.tabbedPane.add("Laser Stripping",self.scl_long_laser_stripping_controller.getMainPanel())