void KVIDGUITelescopeChooserDialog::HighlightSelectedTelescopes()
{
	// Modify widgets to reflect the ID telescopes selected in the list fSelection
	
	// Get 'type' of first telescope
	KVIDTelescope * id = (KVIDTelescope*)fSelection->At(0);
	if(!id) return;
	// look for 'type' in list of types
	TGLBEntry * lbe = fComboBox994->FindEntry( id->GetLabel() );
	if(!lbe){
		cout << "<KVIDGUITelescopeChooserDialog::HighlightSelectedTelescopes()> : Type "
				<< id->GetLabel() << " not found in combo box" << endl;
		return;
	}
	// make 'type' be selected entry
	fComboBox994->Select( lbe->EntryId() );
	FillTelescopeListWithType( id->GetLabel() );
	// now 'select' telescopes
	TIter next_tel(fSelection); int first_tel = -1;
	while( (id = (KVIDTelescope*)next_tel()) ){
		lbe = fListBox980->FindEntry( id->GetName() );
		if( lbe ){
			if(first_tel<0) first_tel = lbe->EntryId();
			fListBox980->Select( lbe->EntryId() );
		}
	}
	// scroll down to first selected telescope
	fListBox980->SetTopEntry(first_tel);
}
Ejemplo n.º 2
0
//______________________________________________________________________________
void ButtonWindow::StartModule()
{
    // Start the selected module.

    // get the selected module
    Int_t module = fCBox_Module->GetSelected();

    // get the selected runsets
    TList set_list;
    fLB_RunSet->GetSelectedEntries(&set_list);

    // fill sets
    Int_t nSet = set_list.GetSize();
    Int_t set[999];     
    for (Int_t i = 0; i < nSet; i++)
    {
        TGLBEntry* e = (TGLBEntry*) set_list.At(i);
        set[i] = e->EntryId();
    }

    // get the calibration module
    gCurrentModule = (TCCalib*) gCaLibModules->At(module);
    
    // get the selected calibration
    TObjString* calibration = (TObjString*) gCalibrations->At(fCBox_Calibration->GetSelected());
    
    // start the module
    ((TCCalib*)gCurrentModule)->Start(calibration->GetString().Data(), nSet, set);
}
void KVIDGUITelescopeChooserDialog::GetSelection()
{
	// fill fSelection list with telescopes selected by user
	// set cancel_pressed to kFALSE
	
	fSelection->Clear();
	TList lbentries;
	fListBox980->GetSelectedEntries( &lbentries );
	TIter next_lbe( &lbentries ); TGLBEntry *lbe;
	while( ( lbe = (TGLBEntry*)next_lbe() ) ){
		fSelection->Add( fMultiDet->GetIDTelescope( lbe->GetTitle() ) );
	}
	*fCancelPress = kFALSE;
	DoClose();
}