Template file option added.
This commit is contained in:
@ -1,6 +1,6 @@
|
|||||||
# Form implementation generated from reading ui file 'QmuSRSim.ui'
|
# Form implementation generated from reading ui file 'QmuSRSim.ui'
|
||||||
#
|
#
|
||||||
# Created: Fri Apr 27 23:28:06 2012
|
# Created: Wed May 2 16:04:06 2012
|
||||||
# by: The PerlQt User Interface Compiler (puic)
|
# by: The PerlQt User Interface Compiler (puic)
|
||||||
#
|
#
|
||||||
# WARNING! All changes made in this file will be lost!
|
# WARNING! All changes made in this file will be lost!
|
||||||
@ -35,6 +35,11 @@ use Qt::slots
|
|||||||
CheckSim => [],
|
CheckSim => [],
|
||||||
plotBeamSpot => [];
|
plotBeamSpot => [];
|
||||||
use Qt::attributes qw(
|
use Qt::attributes qw(
|
||||||
|
textLabel1
|
||||||
|
MAC
|
||||||
|
textLabel1_2
|
||||||
|
NMuon
|
||||||
|
Start
|
||||||
Tabs
|
Tabs
|
||||||
SpinRotator
|
SpinRotator
|
||||||
frame5
|
frame5
|
||||||
@ -93,20 +98,18 @@ use Qt::attributes qw(
|
|||||||
L3_2
|
L3_2
|
||||||
BFIELD_2
|
BFIELD_2
|
||||||
tab150778240
|
tab150778240
|
||||||
ROOTSYS
|
|
||||||
Geant4Button
|
|
||||||
musrSim
|
|
||||||
textLabel2_2_4
|
|
||||||
Geant4
|
Geant4
|
||||||
|
TEMPL
|
||||||
musrSimButton
|
musrSimButton
|
||||||
textLabel2_2_6
|
musrSim
|
||||||
textLabel2_2
|
textLabel2_2
|
||||||
|
textLabel2_2_6
|
||||||
|
Geant4Button
|
||||||
|
textLabel2_2_4_2
|
||||||
ROOTSYSButton
|
ROOTSYSButton
|
||||||
textLabel1
|
TEMPLButton
|
||||||
MAC
|
ROOTSYS
|
||||||
textLabel1_2
|
textLabel2_2_4
|
||||||
NMuon
|
|
||||||
Start
|
|
||||||
MenuBar
|
MenuBar
|
||||||
fileMenu
|
fileMenu
|
||||||
Plot
|
Plot
|
||||||
@ -17887,6 +17890,29 @@ sub NEW
|
|||||||
setCentralWidget(Qt::Widget(this, "qt_central_widget"));
|
setCentralWidget(Qt::Widget(this, "qt_central_widget"));
|
||||||
my $QmuSRSimLayout = Qt::GridLayout(centralWidget(), 1, 1, 11, 6, '$QmuSRSimLayout');
|
my $QmuSRSimLayout = Qt::GridLayout(centralWidget(), 1, 1, 11, 6, '$QmuSRSimLayout');
|
||||||
|
|
||||||
|
my $layout14 = Qt::HBoxLayout(undef, 0, 6, '$layout14');
|
||||||
|
|
||||||
|
textLabel1 = Qt::Label(centralWidget(), "textLabel1");
|
||||||
|
$layout14->addWidget(textLabel1);
|
||||||
|
|
||||||
|
MAC = Qt::LineEdit(centralWidget(), "MAC");
|
||||||
|
$layout14->addWidget(MAC);
|
||||||
|
|
||||||
|
textLabel1_2 = Qt::Label(centralWidget(), "textLabel1_2");
|
||||||
|
$layout14->addWidget(textLabel1_2);
|
||||||
|
|
||||||
|
NMuon = Qt::LineEdit(centralWidget(), "NMuon");
|
||||||
|
$layout14->addWidget(NMuon);
|
||||||
|
|
||||||
|
Start = Qt::PushButton(centralWidget(), "Start");
|
||||||
|
Start->setSizePolicy( Qt::SizePolicy(1, 0, 0, 1, Start->sizePolicy()->hasHeightForWidth()) );
|
||||||
|
Start->setMinimumSize( Qt::Size(0, 25) );
|
||||||
|
$layout14->addWidget(Start);
|
||||||
|
my $spacer = Qt::SpacerItem(330, 20, &Qt::SizePolicy::Expanding, &Qt::SizePolicy::Minimum);
|
||||||
|
$layout14->addItem($spacer);
|
||||||
|
|
||||||
|
$QmuSRSimLayout->addLayout($layout14, 1, 0);
|
||||||
|
|
||||||
Tabs = Qt::TabWidget(centralWidget(), "Tabs");
|
Tabs = Qt::TabWidget(centralWidget(), "Tabs");
|
||||||
Tabs->setEnabled( 1 );
|
Tabs->setEnabled( 1 );
|
||||||
Tabs->setBackgroundOrigin( &Qt::TabWidget::WidgetOrigin() );
|
Tabs->setBackgroundOrigin( &Qt::TabWidget::WidgetOrigin() );
|
||||||
@ -17940,22 +17966,22 @@ sub NEW
|
|||||||
|
|
||||||
my $LayoutWidget_3 = Qt::Widget(frame5, '$LayoutWidget_3');
|
my $LayoutWidget_3 = Qt::Widget(frame5, '$LayoutWidget_3');
|
||||||
$LayoutWidget_3->setGeometry( Qt::Rect(453, 230, 90, 26) );
|
$LayoutWidget_3->setGeometry( Qt::Rect(453, 230, 90, 26) );
|
||||||
my $layout14 = Qt::HBoxLayout($LayoutWidget_3, 0, 0, '$layout14');
|
my $layout14_2 = Qt::HBoxLayout($LayoutWidget_3, 0, 0, '$layout14_2');
|
||||||
|
|
||||||
textLabel2_2_2 = Qt::Label($LayoutWidget_3, "textLabel2_2_2");
|
textLabel2_2_2 = Qt::Label($LayoutWidget_3, "textLabel2_2_2");
|
||||||
textLabel2_2_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
textLabel2_2_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||||
textLabel2_2_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
textLabel2_2_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||||
textLabel2_2_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
textLabel2_2_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||||
$layout14->addWidget(textLabel2_2_2);
|
$layout14_2->addWidget(textLabel2_2_2);
|
||||||
|
|
||||||
TL = Qt::LineEdit($LayoutWidget_3, "TL");
|
TL = Qt::LineEdit($LayoutWidget_3, "TL");
|
||||||
$layout14->addWidget(TL);
|
$layout14_2->addWidget(TL);
|
||||||
|
|
||||||
textLabel2_2_2_2_3_2_2_2_2 = Qt::Label($LayoutWidget_3, "textLabel2_2_2_2_3_2_2_2_2");
|
textLabel2_2_2_2_3_2_2_2_2 = Qt::Label($LayoutWidget_3, "textLabel2_2_2_2_3_2_2_2_2");
|
||||||
textLabel2_2_2_2_3_2_2_2_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
textLabel2_2_2_2_3_2_2_2_2->setBackgroundMode( &Qt::Label::PaletteBackground() );
|
||||||
textLabel2_2_2_2_3_2_2_2_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
textLabel2_2_2_2_3_2_2_2_2->setPaletteForegroundColor( Qt::Color(0, 0, 0) );
|
||||||
textLabel2_2_2_2_3_2_2_2_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
textLabel2_2_2_2_3_2_2_2_2->setPaletteBackgroundColor( Qt::Color(255, 255, 255) );
|
||||||
$layout14->addWidget(textLabel2_2_2_2_3_2_2_2_2);
|
$layout14_2->addWidget(textLabel2_2_2_2_3_2_2_2_2);
|
||||||
|
|
||||||
my $LayoutWidget_4 = Qt::Widget(frame5, '$LayoutWidget_4');
|
my $LayoutWidget_4 = Qt::Widget(frame5, '$LayoutWidget_4');
|
||||||
$LayoutWidget_4->setGeometry( Qt::Rect(313, 230, 110, 26) );
|
$LayoutWidget_4->setGeometry( Qt::Rect(313, 230, 110, 26) );
|
||||||
@ -18283,71 +18309,60 @@ sub NEW
|
|||||||
tab150778240 = Qt::Widget(Tabs, "tab150778240");
|
tab150778240 = Qt::Widget(Tabs, "tab150778240");
|
||||||
|
|
||||||
my $LayoutWidget_10 = Qt::Widget(tab150778240, '$LayoutWidget_10');
|
my $LayoutWidget_10 = Qt::Widget(tab150778240, '$LayoutWidget_10');
|
||||||
$LayoutWidget_10->setGeometry( Qt::Rect(12, 11, 770, 140) );
|
$LayoutWidget_10->setGeometry( Qt::Rect(14, 32, 770, 180) );
|
||||||
my $layout12 = Qt::GridLayout($LayoutWidget_10, 1, 1, 11, 6, '$layout12');
|
my $layout19 = Qt::GridLayout($LayoutWidget_10, 1, 1, 11, 6, '$layout19');
|
||||||
|
|
||||||
ROOTSYS = Qt::LineEdit($LayoutWidget_10, "ROOTSYS");
|
|
||||||
|
|
||||||
$layout12->addWidget(ROOTSYS, 2, 1);
|
|
||||||
|
|
||||||
Geant4Button = Qt::PushButton($LayoutWidget_10, "Geant4Button");
|
|
||||||
|
|
||||||
$layout12->addWidget(Geant4Button, 1, 2);
|
|
||||||
|
|
||||||
musrSim = Qt::LineEdit($LayoutWidget_10, "musrSim");
|
|
||||||
|
|
||||||
$layout12->addWidget(musrSim, 0, 1);
|
|
||||||
|
|
||||||
textLabel2_2_4 = Qt::Label($LayoutWidget_10, "textLabel2_2_4");
|
|
||||||
|
|
||||||
$layout12->addWidget(textLabel2_2_4, 2, 0);
|
|
||||||
|
|
||||||
Geant4 = Qt::LineEdit($LayoutWidget_10, "Geant4");
|
Geant4 = Qt::LineEdit($LayoutWidget_10, "Geant4");
|
||||||
|
|
||||||
$layout12->addWidget(Geant4, 1, 1);
|
$layout19->addWidget(Geant4, 1, 1);
|
||||||
|
|
||||||
|
TEMPL = Qt::LineEdit($LayoutWidget_10, "TEMPL");
|
||||||
|
|
||||||
|
$layout19->addWidget(TEMPL, 3, 1);
|
||||||
|
|
||||||
musrSimButton = Qt::PushButton($LayoutWidget_10, "musrSimButton");
|
musrSimButton = Qt::PushButton($LayoutWidget_10, "musrSimButton");
|
||||||
|
|
||||||
$layout12->addWidget(musrSimButton, 0, 2);
|
$layout19->addWidget(musrSimButton, 0, 2);
|
||||||
|
|
||||||
textLabel2_2_6 = Qt::Label($LayoutWidget_10, "textLabel2_2_6");
|
musrSim = Qt::LineEdit($LayoutWidget_10, "musrSim");
|
||||||
|
|
||||||
$layout12->addWidget(textLabel2_2_6, 1, 0);
|
$layout19->addWidget(musrSim, 0, 1);
|
||||||
|
|
||||||
textLabel2_2 = Qt::Label($LayoutWidget_10, "textLabel2_2");
|
textLabel2_2 = Qt::Label($LayoutWidget_10, "textLabel2_2");
|
||||||
|
|
||||||
$layout12->addWidget(textLabel2_2, 0, 0);
|
$layout19->addWidget(textLabel2_2, 0, 0);
|
||||||
|
|
||||||
|
textLabel2_2_6 = Qt::Label($LayoutWidget_10, "textLabel2_2_6");
|
||||||
|
|
||||||
|
$layout19->addWidget(textLabel2_2_6, 1, 0);
|
||||||
|
|
||||||
|
Geant4Button = Qt::PushButton($LayoutWidget_10, "Geant4Button");
|
||||||
|
|
||||||
|
$layout19->addWidget(Geant4Button, 1, 2);
|
||||||
|
|
||||||
|
textLabel2_2_4_2 = Qt::Label($LayoutWidget_10, "textLabel2_2_4_2");
|
||||||
|
|
||||||
|
$layout19->addWidget(textLabel2_2_4_2, 3, 0);
|
||||||
|
|
||||||
ROOTSYSButton = Qt::PushButton($LayoutWidget_10, "ROOTSYSButton");
|
ROOTSYSButton = Qt::PushButton($LayoutWidget_10, "ROOTSYSButton");
|
||||||
|
|
||||||
$layout12->addWidget(ROOTSYSButton, 2, 2);
|
$layout19->addWidget(ROOTSYSButton, 2, 2);
|
||||||
|
|
||||||
|
TEMPLButton = Qt::PushButton($LayoutWidget_10, "TEMPLButton");
|
||||||
|
|
||||||
|
$layout19->addWidget(TEMPLButton, 3, 2);
|
||||||
|
|
||||||
|
ROOTSYS = Qt::LineEdit($LayoutWidget_10, "ROOTSYS");
|
||||||
|
|
||||||
|
$layout19->addWidget(ROOTSYS, 2, 1);
|
||||||
|
|
||||||
|
textLabel2_2_4 = Qt::Label($LayoutWidget_10, "textLabel2_2_4");
|
||||||
|
|
||||||
|
$layout19->addWidget(textLabel2_2_4, 2, 0);
|
||||||
Tabs->insertTab( tab150778240, "" );
|
Tabs->insertTab( tab150778240, "" );
|
||||||
|
|
||||||
$QmuSRSimLayout->addWidget(Tabs, 0, 0);
|
$QmuSRSimLayout->addWidget(Tabs, 0, 0);
|
||||||
|
|
||||||
my $layout14_2 = Qt::HBoxLayout(undef, 0, 6, '$layout14_2');
|
|
||||||
|
|
||||||
textLabel1 = Qt::Label(centralWidget(), "textLabel1");
|
|
||||||
$layout14_2->addWidget(textLabel1);
|
|
||||||
|
|
||||||
MAC = Qt::LineEdit(centralWidget(), "MAC");
|
|
||||||
$layout14_2->addWidget(MAC);
|
|
||||||
|
|
||||||
textLabel1_2 = Qt::Label(centralWidget(), "textLabel1_2");
|
|
||||||
$layout14_2->addWidget(textLabel1_2);
|
|
||||||
|
|
||||||
NMuon = Qt::LineEdit(centralWidget(), "NMuon");
|
|
||||||
$layout14_2->addWidget(NMuon);
|
|
||||||
|
|
||||||
Start = Qt::PushButton(centralWidget(), "Start");
|
|
||||||
Start->setSizePolicy( Qt::SizePolicy(1, 0, 0, 1, Start->sizePolicy()->hasHeightForWidth()) );
|
|
||||||
Start->setMinimumSize( Qt::Size(0, 25) );
|
|
||||||
$layout14_2->addWidget(Start);
|
|
||||||
my $spacer = Qt::SpacerItem(330, 20, &Qt::SizePolicy::Expanding, &Qt::SizePolicy::Minimum);
|
|
||||||
$layout14_2->addItem($spacer);
|
|
||||||
|
|
||||||
$QmuSRSimLayout->addLayout($layout14_2, 1, 0);
|
|
||||||
|
|
||||||
fileNewAction= Qt::Action(this, "fileNewAction");
|
fileNewAction= Qt::Action(this, "fileNewAction");
|
||||||
fileNewAction->setIconSet( Qt::IconSet($image2) );
|
fileNewAction->setIconSet( Qt::IconSet($image2) );
|
||||||
fileOpenAction= Qt::Action(this, "fileOpenAction");
|
fileOpenAction= Qt::Action(this, "fileOpenAction");
|
||||||
@ -18431,6 +18446,7 @@ sub NEW
|
|||||||
Qt::Object::connect(musrSimButton, SIGNAL "clicked()", this, SLOT "GetPATH()");
|
Qt::Object::connect(musrSimButton, SIGNAL "clicked()", this, SLOT "GetPATH()");
|
||||||
Qt::Object::connect(Geant4Button, SIGNAL "clicked()", this, SLOT "GetPATH()");
|
Qt::Object::connect(Geant4Button, SIGNAL "clicked()", this, SLOT "GetPATH()");
|
||||||
Qt::Object::connect(plotBeamSpot_Action, SIGNAL "activated()", this, SLOT "plotBeamSpot()");
|
Qt::Object::connect(plotBeamSpot_Action, SIGNAL "activated()", this, SLOT "plotBeamSpot()");
|
||||||
|
Qt::Object::connect(TEMPLButton, SIGNAL "clicked()", this, SLOT "GetPATH()");
|
||||||
|
|
||||||
setTabOrder(ENERGY, L1);
|
setTabOrder(ENERGY, L1);
|
||||||
setTabOrder(L1, SR_B);
|
setTabOrder(L1, SR_B);
|
||||||
@ -18466,6 +18482,11 @@ sub NEW
|
|||||||
sub languageChange
|
sub languageChange
|
||||||
{
|
{
|
||||||
setCaption(trUtf8("QmuSRSim") );
|
setCaption(trUtf8("QmuSRSim") );
|
||||||
|
textLabel1->setText( trUtf8("MAC File Number") );
|
||||||
|
MAC->setText( trUtf8("1000") );
|
||||||
|
textLabel1_2->setText( trUtf8("Number of Muons") );
|
||||||
|
NMuon->setText( trUtf8("1000") );
|
||||||
|
Start->setText( trUtf8("Start") );
|
||||||
textLabel2_3_2_2_2->setText( trUtf8("<b><font size=\"+1\">Energy</font></b>") );
|
textLabel2_3_2_2_2->setText( trUtf8("<b><font size=\"+1\">Energy</font></b>") );
|
||||||
ENERGY->setText( trUtf8("15.0") );
|
ENERGY->setText( trUtf8("15.0") );
|
||||||
textLabel2_3_2_2_2_2->setText( trUtf8("keV") );
|
textLabel2_3_2_2_2_2->setText( trUtf8("keV") );
|
||||||
@ -18520,21 +18541,19 @@ sub languageChange
|
|||||||
L3_2->setText( trUtf8("8.35") );
|
L3_2->setText( trUtf8("8.35") );
|
||||||
BFIELD_2->setText( trUtf8("0") );
|
BFIELD_2->setText( trUtf8("0") );
|
||||||
Tabs->changeTab( Old, trUtf8("Old") );
|
Tabs->changeTab( Old, trUtf8("Old") );
|
||||||
ROOTSYS->setText( undef );
|
|
||||||
Geant4Button->setText( trUtf8("Browse") );
|
|
||||||
musrSim->setText( trUtf8("/home/l_salman/LEM/simulation/geant4/musrSim/") );
|
|
||||||
textLabel2_2_4->setText( trUtf8("ROOTSYS Path") );
|
|
||||||
Geant4->setText( trUtf8("/usr/local/geant4/4.9.3") );
|
Geant4->setText( trUtf8("/usr/local/geant4/4.9.3") );
|
||||||
|
TEMPL->setText( undef );
|
||||||
musrSimButton->setText( trUtf8("Browse") );
|
musrSimButton->setText( trUtf8("Browse") );
|
||||||
textLabel2_2_6->setText( trUtf8("Geant4 Path") );
|
musrSim->setText( trUtf8("/home/l_salman/LEM/simulation/geant4/musrSim/") );
|
||||||
textLabel2_2->setText( trUtf8("musrSim Path") );
|
textLabel2_2->setText( trUtf8("musrSim Path") );
|
||||||
|
textLabel2_2_6->setText( trUtf8("Geant4 Path") );
|
||||||
|
Geant4Button->setText( trUtf8("Browse") );
|
||||||
|
textLabel2_2_4_2->setText( trUtf8("Template File") );
|
||||||
ROOTSYSButton->setText( trUtf8("Browse") );
|
ROOTSYSButton->setText( trUtf8("Browse") );
|
||||||
|
TEMPLButton->setText( trUtf8("Browse") );
|
||||||
|
ROOTSYS->setText( undef );
|
||||||
|
textLabel2_2_4->setText( trUtf8("ROOTSYS Path") );
|
||||||
Tabs->changeTab( tab150778240, trUtf8("Options") );
|
Tabs->changeTab( tab150778240, trUtf8("Options") );
|
||||||
textLabel1->setText( trUtf8("MAC File Number") );
|
|
||||||
MAC->setText( trUtf8("1000") );
|
|
||||||
textLabel1_2->setText( trUtf8("Number of Muons") );
|
|
||||||
NMuon->setText( trUtf8("1000") );
|
|
||||||
Start->setText( trUtf8("Start") );
|
|
||||||
fileNewAction->setText( trUtf8("New") );
|
fileNewAction->setText( trUtf8("New") );
|
||||||
fileNewAction->setMenuText( trUtf8("&New") );
|
fileNewAction->setMenuText( trUtf8("&New") );
|
||||||
fileNewAction->setAccel( Qt::KeySequence( trUtf8("Ctrl+N") ) );
|
fileNewAction->setAccel( Qt::KeySequence( trUtf8("Ctrl+N") ) );
|
||||||
@ -18757,7 +18776,7 @@ sub CreateAllInput
|
|||||||
my %All=();
|
my %All=();
|
||||||
my @AllParams= ("L1","L3","TL","BFIELD","RA_T","RA_B","RA_R","RA_L","SR_B","SR_E","ENERGY","NMuon",
|
my @AllParams= ("L1","L3","TL","BFIELD","RA_T","RA_B","RA_R","RA_L","SR_B","SR_E","ENERGY","NMuon",
|
||||||
"L1_2","L2_2","L3_2","BFIELD_2","RA_T_2","RA_B_2","RA_R_2","RA_L_2","ENERGY_2",
|
"L1_2","L2_2","L3_2","BFIELD_2","RA_T_2","RA_B_2","RA_R_2","RA_L_2","ENERGY_2",
|
||||||
"MAC","musrSim","Geant4","ROOTSYS");
|
"MAC","musrSim","Geant4","ROOTSYS","TEMPL");
|
||||||
foreach my $Param (@AllParams) {
|
foreach my $Param (@AllParams) {
|
||||||
my $Child = child($Param);
|
my $Child = child($Param);
|
||||||
my $Value = $Child->text;
|
my $Value = $Child->text;
|
||||||
@ -18799,8 +18818,8 @@ sub StartCalc
|
|||||||
my $Page = Tabs->currentPageIndex;
|
my $Page = Tabs->currentPageIndex;
|
||||||
my %ToReplace=();
|
my %ToReplace=();
|
||||||
my @SpaceHolder=();
|
my @SpaceHolder=();
|
||||||
# my $FName="SRBeamLine.mac";
|
my $FName= $All{"TEMPL"};
|
||||||
my $FName="SRBeamLine_Bend.mac";
|
|
||||||
# 0 for spin rotator and 1 for current.
|
# 0 for spin rotator and 1 for current.
|
||||||
if ($Page == 0) {
|
if ($Page == 0) {
|
||||||
%ToReplace= (
|
%ToReplace= (
|
||||||
@ -18818,8 +18837,8 @@ sub StartCalc
|
|||||||
"ENERGY"=>"ENERGY",
|
"ENERGY"=>"ENERGY",
|
||||||
"MIRRFIELD"=>"MIRRFIELD"
|
"MIRRFIELD"=>"MIRRFIELD"
|
||||||
);
|
);
|
||||||
# Use the following template
|
# Use the default template
|
||||||
$FName="SRBeamLine_Bend.mac";
|
if ($FName eq "") {$FName="SRBeamLine_Bend.mac";}
|
||||||
} elsif ($Page == 1) {
|
} elsif ($Page == 1) {
|
||||||
%ToReplace= (
|
%ToReplace= (
|
||||||
"L1_2"=>"L1VOLTAGE",
|
"L1_2"=>"L1VOLTAGE",
|
||||||
@ -18834,8 +18853,8 @@ sub StartCalc
|
|||||||
"ENERGY_2"=>"ENERGY",
|
"ENERGY_2"=>"ENERGY",
|
||||||
"MIRRFIELD_2"=>"MIRRFIELD"
|
"MIRRFIELD_2"=>"MIRRFIELD"
|
||||||
);
|
);
|
||||||
# Use the following template
|
# Use the default template
|
||||||
$FName="CBeamLine.mac";
|
if ($FName eq "") {$FName="CBeamLine.mac";}
|
||||||
}
|
}
|
||||||
|
|
||||||
open(MACF,"$FName");
|
open(MACF,"$FName");
|
||||||
@ -18874,9 +18893,20 @@ sub GetPATH
|
|||||||
my $name = $sender->name();
|
my $name = $sender->name();
|
||||||
$name =~ s/Button//g;
|
$name =~ s/Button//g;
|
||||||
|
|
||||||
|
my $RETVAL = "";
|
||||||
|
if ($name eq "TEMPL") {
|
||||||
|
# Get template file name
|
||||||
|
$RETVAL = Qt::FileDialog::getOpenFileName(
|
||||||
|
"./",
|
||||||
|
"MAC file (*.mac)",
|
||||||
|
this,
|
||||||
|
"Select template file dialog",
|
||||||
|
"Choose a template file");
|
||||||
|
} else {
|
||||||
# Get the requested path
|
# Get the requested path
|
||||||
my $RETVAL = Qt::FileDialog::getExistingDirectory("./",this,"get existing directory","Choose a directory",1);
|
$RETVAL = Qt::FileDialog::getExistingDirectory("./",this,"get existing directory","Choose a directory",1);
|
||||||
# Now submit the path into the lineEdit
|
}
|
||||||
|
# Now submit the path or file name into the lineEdit
|
||||||
if ($RETVAL ne "") {
|
if ($RETVAL ne "") {
|
||||||
child($name)->setText($RETVAL);
|
child($name)->setText($RETVAL);
|
||||||
}
|
}
|
||||||
|
@ -27,6 +27,87 @@
|
|||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>unnamed</cstring>
|
<cstring>unnamed</cstring>
|
||||||
</property>
|
</property>
|
||||||
|
<widget class="QLayoutWidget" row="1" column="0">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>layout14</cstring>
|
||||||
|
</property>
|
||||||
|
<hbox>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>unnamed</cstring>
|
||||||
|
</property>
|
||||||
|
<widget class="QLabel">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>textLabel1</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>MAC File Number</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>MAC</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>1000</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>textLabel1_2</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Number of Muons</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>NMuon</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>1000</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QPushButton">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>Start</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="sizePolicy">
|
||||||
|
<sizepolicy>
|
||||||
|
<hsizetype>1</hsizetype>
|
||||||
|
<vsizetype>0</vsizetype>
|
||||||
|
<horstretch>0</horstretch>
|
||||||
|
<verstretch>1</verstretch>
|
||||||
|
</sizepolicy>
|
||||||
|
</property>
|
||||||
|
<property name="minimumSize">
|
||||||
|
<size>
|
||||||
|
<width>0</width>
|
||||||
|
<height>25</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Start</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<spacer>
|
||||||
|
<property name="name">
|
||||||
|
<cstring>spacer3</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="orientation">
|
||||||
|
<enum>Horizontal</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeType">
|
||||||
|
<enum>Expanding</enum>
|
||||||
|
</property>
|
||||||
|
<property name="sizeHint">
|
||||||
|
<size>
|
||||||
|
<width>330</width>
|
||||||
|
<height>20</height>
|
||||||
|
</size>
|
||||||
|
</property>
|
||||||
|
</spacer>
|
||||||
|
</hbox>
|
||||||
|
</widget>
|
||||||
<widget class="QTabWidget" row="0" column="0">
|
<widget class="QTabWidget" row="0" column="0">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>Tabs</cstring>
|
<cstring>Tabs</cstring>
|
||||||
@ -1608,31 +1689,39 @@
|
|||||||
</attribute>
|
</attribute>
|
||||||
<widget class="QLayoutWidget">
|
<widget class="QLayoutWidget">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>layout12</cstring>
|
<cstring>layout19</cstring>
|
||||||
</property>
|
</property>
|
||||||
<property name="geometry">
|
<property name="geometry">
|
||||||
<rect>
|
<rect>
|
||||||
<x>12</x>
|
<x>14</x>
|
||||||
<y>11</y>
|
<y>32</y>
|
||||||
<width>770</width>
|
<width>770</width>
|
||||||
<height>140</height>
|
<height>180</height>
|
||||||
</rect>
|
</rect>
|
||||||
</property>
|
</property>
|
||||||
<grid>
|
<grid>
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>unnamed</cstring>
|
<cstring>unnamed</cstring>
|
||||||
</property>
|
</property>
|
||||||
<widget class="QLineEdit" row="2" column="1">
|
<widget class="QLineEdit" row="1" column="1">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>ROOTSYS</cstring>
|
<cstring>Geant4</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>/usr/local/geant4/4.9.3</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" row="3" column="1">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>TEMPL</cstring>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string></string>
|
<string></string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton" row="1" column="2">
|
<widget class="QPushButton" row="0" column="2">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>Geant4Button</cstring>
|
<cstring>musrSimButton</cstring>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>Browse</string>
|
<string>Browse</string>
|
||||||
@ -1646,28 +1735,12 @@
|
|||||||
<string>/home/l_salman/LEM/simulation/geant4/musrSim/</string>
|
<string>/home/l_salman/LEM/simulation/geant4/musrSim/</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QLabel" row="2" column="0">
|
<widget class="QLabel" row="0" column="0">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>textLabel2_2_4</cstring>
|
<cstring>textLabel2_2</cstring>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>ROOTSYS Path</string>
|
<string>musrSim Path</string>
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QLineEdit" row="1" column="1">
|
|
||||||
<property name="name">
|
|
||||||
<cstring>Geant4</cstring>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>/usr/local/geant4/4.9.3</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QPushButton" row="0" column="2">
|
|
||||||
<property name="name">
|
|
||||||
<cstring>musrSimButton</cstring>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Browse</string>
|
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QLabel" row="1" column="0">
|
<widget class="QLabel" row="1" column="0">
|
||||||
@ -1678,12 +1751,20 @@
|
|||||||
<string>Geant4 Path</string>
|
<string>Geant4 Path</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QLabel" row="0" column="0">
|
<widget class="QPushButton" row="1" column="2">
|
||||||
<property name="name">
|
<property name="name">
|
||||||
<cstring>textLabel2_2</cstring>
|
<cstring>Geant4Button</cstring>
|
||||||
</property>
|
</property>
|
||||||
<property name="text">
|
<property name="text">
|
||||||
<string>musrSim Path</string>
|
<string>Browse</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" row="3" column="0">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>textLabel2_2_4_2</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Template File</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QPushButton" row="2" column="2">
|
<widget class="QPushButton" row="2" column="2">
|
||||||
@ -1694,91 +1775,34 @@
|
|||||||
<string>Browse</string>
|
<string>Browse</string>
|
||||||
</property>
|
</property>
|
||||||
</widget>
|
</widget>
|
||||||
|
<widget class="QPushButton" row="3" column="2">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>TEMPLButton</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>Browse</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLineEdit" row="2" column="1">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>ROOTSYS</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string></string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
|
<widget class="QLabel" row="2" column="0">
|
||||||
|
<property name="name">
|
||||||
|
<cstring>textLabel2_2_4</cstring>
|
||||||
|
</property>
|
||||||
|
<property name="text">
|
||||||
|
<string>ROOTSYS Path</string>
|
||||||
|
</property>
|
||||||
|
</widget>
|
||||||
</grid>
|
</grid>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
</widget>
|
</widget>
|
||||||
<widget class="QLayoutWidget" row="1" column="0">
|
|
||||||
<property name="name">
|
|
||||||
<cstring>layout14</cstring>
|
|
||||||
</property>
|
|
||||||
<hbox>
|
|
||||||
<property name="name">
|
|
||||||
<cstring>unnamed</cstring>
|
|
||||||
</property>
|
|
||||||
<widget class="QLabel">
|
|
||||||
<property name="name">
|
|
||||||
<cstring>textLabel1</cstring>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>MAC File Number</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QLineEdit">
|
|
||||||
<property name="name">
|
|
||||||
<cstring>MAC</cstring>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>1000</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QLabel">
|
|
||||||
<property name="name">
|
|
||||||
<cstring>textLabel1_2</cstring>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Number of Muons</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QLineEdit">
|
|
||||||
<property name="name">
|
|
||||||
<cstring>NMuon</cstring>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>1000</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<widget class="QPushButton">
|
|
||||||
<property name="name">
|
|
||||||
<cstring>Start</cstring>
|
|
||||||
</property>
|
|
||||||
<property name="sizePolicy">
|
|
||||||
<sizepolicy>
|
|
||||||
<hsizetype>1</hsizetype>
|
|
||||||
<vsizetype>0</vsizetype>
|
|
||||||
<horstretch>0</horstretch>
|
|
||||||
<verstretch>1</verstretch>
|
|
||||||
</sizepolicy>
|
|
||||||
</property>
|
|
||||||
<property name="minimumSize">
|
|
||||||
<size>
|
|
||||||
<width>0</width>
|
|
||||||
<height>25</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
<property name="text">
|
|
||||||
<string>Start</string>
|
|
||||||
</property>
|
|
||||||
</widget>
|
|
||||||
<spacer>
|
|
||||||
<property name="name">
|
|
||||||
<cstring>spacer3</cstring>
|
|
||||||
</property>
|
|
||||||
<property name="orientation">
|
|
||||||
<enum>Horizontal</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeType">
|
|
||||||
<enum>Expanding</enum>
|
|
||||||
</property>
|
|
||||||
<property name="sizeHint">
|
|
||||||
<size>
|
|
||||||
<width>330</width>
|
|
||||||
<height>20</height>
|
|
||||||
</size>
|
|
||||||
</property>
|
|
||||||
</spacer>
|
|
||||||
</hbox>
|
|
||||||
</widget>
|
|
||||||
</grid>
|
</grid>
|
||||||
</widget>
|
</widget>
|
||||||
<menubar>
|
<menubar>
|
||||||
@ -2233,6 +2257,12 @@
|
|||||||
<receiver>QmuSRSim</receiver>
|
<receiver>QmuSRSim</receiver>
|
||||||
<slot>plotBeamSpot()</slot>
|
<slot>plotBeamSpot()</slot>
|
||||||
</connection>
|
</connection>
|
||||||
|
<connection>
|
||||||
|
<sender>TEMPLButton</sender>
|
||||||
|
<signal>clicked()</signal>
|
||||||
|
<receiver>QmuSRSim</receiver>
|
||||||
|
<slot>GetPATH()</slot>
|
||||||
|
</connection>
|
||||||
</connections>
|
</connections>
|
||||||
<tabstops>
|
<tabstops>
|
||||||
<tabstop>ENERGY</tabstop>
|
<tabstop>ENERGY</tabstop>
|
||||||
|
@ -181,7 +181,7 @@ void QmuSRSim::CreateAllInput()
|
|||||||
my %All=();
|
my %All=();
|
||||||
my @AllParams= ("L1","L3","TL","BFIELD","RA_T","RA_B","RA_R","RA_L","SR_B","SR_E","ENERGY","NMuon",
|
my @AllParams= ("L1","L3","TL","BFIELD","RA_T","RA_B","RA_R","RA_L","SR_B","SR_E","ENERGY","NMuon",
|
||||||
"L1_2","L2_2","L3_2","BFIELD_2","RA_T_2","RA_B_2","RA_R_2","RA_L_2","ENERGY_2",
|
"L1_2","L2_2","L3_2","BFIELD_2","RA_T_2","RA_B_2","RA_R_2","RA_L_2","ENERGY_2",
|
||||||
"MAC","musrSim","Geant4","ROOTSYS");
|
"MAC","musrSim","Geant4","ROOTSYS","TEMPL");
|
||||||
foreach my $Param (@AllParams) {
|
foreach my $Param (@AllParams) {
|
||||||
my $Child = child($Param);
|
my $Child = child($Param);
|
||||||
my $Value = $Child->text;
|
my $Value = $Child->text;
|
||||||
@ -223,8 +223,8 @@ void QmuSRSim::StartCalc()
|
|||||||
my $Page = Tabs->currentPageIndex;
|
my $Page = Tabs->currentPageIndex;
|
||||||
my %ToReplace=();
|
my %ToReplace=();
|
||||||
my @SpaceHolder=();
|
my @SpaceHolder=();
|
||||||
# my $FName="SRBeamLine.mac";
|
my $FName= $All{"TEMPL"};
|
||||||
my $FName="SRBeamLine_Bend.mac";
|
|
||||||
# 0 for spin rotator and 1 for current.
|
# 0 for spin rotator and 1 for current.
|
||||||
if ($Page == 0) {
|
if ($Page == 0) {
|
||||||
%ToReplace= (
|
%ToReplace= (
|
||||||
@ -242,8 +242,8 @@ void QmuSRSim::StartCalc()
|
|||||||
"ENERGY"=>"ENERGY",
|
"ENERGY"=>"ENERGY",
|
||||||
"MIRRFIELD"=>"MIRRFIELD"
|
"MIRRFIELD"=>"MIRRFIELD"
|
||||||
);
|
);
|
||||||
# Use the following template
|
# Use the default template
|
||||||
$FName="SRBeamLine_Bend.mac";
|
if ($FName eq "") {$FName="SRBeamLine_Bend.mac";}
|
||||||
} elsif ($Page == 1) {
|
} elsif ($Page == 1) {
|
||||||
%ToReplace= (
|
%ToReplace= (
|
||||||
"L1_2"=>"L1VOLTAGE",
|
"L1_2"=>"L1VOLTAGE",
|
||||||
@ -258,8 +258,8 @@ void QmuSRSim::StartCalc()
|
|||||||
"ENERGY_2"=>"ENERGY",
|
"ENERGY_2"=>"ENERGY",
|
||||||
"MIRRFIELD_2"=>"MIRRFIELD"
|
"MIRRFIELD_2"=>"MIRRFIELD"
|
||||||
);
|
);
|
||||||
# Use the following template
|
# Use the default template
|
||||||
$FName="CBeamLine.mac";
|
if ($FName eq "") {$FName="CBeamLine.mac";}
|
||||||
}
|
}
|
||||||
|
|
||||||
open(MACF,"$FName");
|
open(MACF,"$FName");
|
||||||
@ -298,9 +298,20 @@ void QmuSRSim::GetPATH()
|
|||||||
my $name = $sender->name();
|
my $name = $sender->name();
|
||||||
$name =~ s/Button//g;
|
$name =~ s/Button//g;
|
||||||
|
|
||||||
|
my $RETVAL = "";
|
||||||
|
if ($name eq "TEMPL") {
|
||||||
|
# Get template file name
|
||||||
|
$RETVAL = Qt::FileDialog::getOpenFileName(
|
||||||
|
"./",
|
||||||
|
"MAC file (*.mac)",
|
||||||
|
this,
|
||||||
|
"Select template file dialog",
|
||||||
|
"Choose a template file");
|
||||||
|
} else {
|
||||||
# Get the requested path
|
# Get the requested path
|
||||||
my $RETVAL = Qt::FileDialog::getExistingDirectory("./",this,"get existing directory","Choose a directory",1);
|
$RETVAL = Qt::FileDialog::getExistingDirectory("./",this,"get existing directory","Choose a directory",1);
|
||||||
# Now submit the path into the lineEdit
|
}
|
||||||
|
# Now submit the path or file name into the lineEdit
|
||||||
if ($RETVAL ne "") {
|
if ($RETVAL ne "") {
|
||||||
child($name)->setText($RETVAL);
|
child($name)->setText($RETVAL);
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user