Add LEM PPC format

This commit is contained in:
2011-06-11 17:35:51 +00:00
parent 44b156cab7
commit 002953218e
4 changed files with 18 additions and 7 deletions

View File

@ -14,10 +14,10 @@ my %DATADIRS = (
"GPD", "/afs/psi.ch/project/bulkmusr/data/gpd" "GPD", "/afs/psi.ch/project/bulkmusr/data/gpd"
); );
my %BeamLines = ( "LEM", "MUE4", "GPS", "PIM3", "LTF", "PIM3", "Dolly", "PIE1", "GPD", "PIE1" ); my %BeamLines = ( "LEM", "MUE4", "LEM (PPC)", "MUE4", "GPS", "PIM3", "LTF", "PIM3", "Dolly", "PIE1", "GPD", "PIE1" );
my %Def_Format = my %Def_Format =
( "LEM", "ROOT-NPP", "GPS", "PSI-BIN", "LTF", "PSI-BIN", "Dolly", "PSI-BIN" , "GPD", "PSI-BIN"); ( "LEM", "ROOT-NPP", "LEM (PPC)", "ROOT-PPC", "GPS", "PSI-BIN", "LTF", "PSI-BIN", "Dolly", "PSI-BIN" , "GPD", "PSI-BIN");
# Additional information to extract run properties from database # Additional information to extract run properties from database
# For LEM use summary files # For LEM use summary files
@ -1636,7 +1636,7 @@ sub RUNFileNameAuto {
localtime( time() ); localtime( time() );
my $current_year = $year + 1900; my $current_year = $year + 1900;
if ( $BeamLine eq "LEM" ) { if ( $BeamLine eq "LEM" || $BeamLine eq "LEM (PPC)") {
$RUN_File_Name = "lem" . substr( $YEAR, 2 ) . "_his_" . $RUNtmp; $RUN_File_Name = "lem" . substr( $YEAR, 2 ) . "_his_" . $RUNtmp;
$RUNFILE = "$DATADIR/$YEAR/$RUN_File_Name"; $RUNFILE = "$DATADIR/$YEAR/$RUN_File_Name";
} }
@ -1659,7 +1659,6 @@ sub RUNFileNameAuto {
my $RUN_Line = join( $SPACE, my $RUN_Line = join( $SPACE,
"RUN", $RUNFILE, $BeamLines{$BeamLine}, "PSI", "RUN", $RUNFILE, $BeamLines{$BeamLine}, "PSI",
$Def_Format{$BeamLine} ); $Def_Format{$BeamLine} );
return $RUN_Line; return $RUN_Line;
} }

View File

@ -1,6 +1,6 @@
# Form implementation generated from reading ui file 'MuSRFit.ui' # Form implementation generated from reading ui file 'MuSRFit.ui'
# #
# Created: Wed May 4 16:51:35 2011 # Created: Wed May 25 16:46:00 2011
# 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!
@ -3200,6 +3200,7 @@ sub languageChange
BeamLine->insertItem( trUtf8("GPS") ); BeamLine->insertItem( trUtf8("GPS") );
BeamLine->insertItem( trUtf8("Dolly") ); BeamLine->insertItem( trUtf8("Dolly") );
BeamLine->insertItem( trUtf8("LTF") ); BeamLine->insertItem( trUtf8("LTF") );
BeamLine->insertItem( trUtf8("LEM (PPC)") );
BeamLineLabel->setText( trUtf8("On beam line") ); BeamLineLabel->setText( trUtf8("On beam line") );
YEARLabel->setText( trUtf8("Year") ); YEARLabel->setText( trUtf8("Year") );
RUNSMan->setTitle( trUtf8("RUN Files") ); RUNSMan->setTitle( trUtf8("RUN Files") );
@ -3878,6 +3879,9 @@ sub CreateAllInput
# Construct a default filename if empty # Construct a default filename if empty
if ( $All{"FILENAME"} eq "" && !$All{"RUNSType"}) { if ( $All{"FILENAME"} eq "" && !$All{"RUNSType"}) {
$All{"FILENAME"}=$RUNS[0]."_".$All{"BeamLine"}."_".$All{"YEAR"}; $All{"FILENAME"}=$RUNS[0]."_".$All{"BeamLine"}."_".$All{"YEAR"};
if ($All{"BeamLine"} eq "LEM (PPC)") {
$All{"FILENAME"}=$RUNS[0]."_LEM_".$All{"YEAR"};
}
} else { } else {
$All{"FILENAME"}="TMP"; $All{"FILENAME"}="TMP";
} }
@ -4416,9 +4420,9 @@ sub t0UpdateClicked
# First T0s # First T0s
while ($FinHist) { while ($FinHist) {
my $counter=0; my $counter=0;
# (my $tmp,my @SplitT0) = split( /\s+/, $T0s[$counter]); (my $tmp,my @SplitT0) = split( /\s+/, $T0s[$counter]);
(my $tmp,my @SplitBg) = split( /\s+/, $Bgs[$counter]); (my $tmp,my @SplitBg) = split( /\s+/, $Bgs[$counter]);
# (my $tmp,my @SplitData) = split( /\s+/, $Datas[$counter]); (my $tmp,my @SplitData) = split( /\s+/, $Datas[$counter]);
if ($#SplitBg>0) { if ($#SplitBg>0) {
foreach (@SplitBg) { foreach (@SplitBg) {
print $_."\n"; print $_."\n";

View File

@ -161,6 +161,11 @@
<string>LTF</string> <string>LTF</string>
</property> </property>
</item> </item>
<item>
<property name="text">
<string>LEM (PPC)</string>
</property>
</item>
<property name="name"> <property name="name">
<cstring>BeamLine</cstring> <cstring>BeamLine</cstring>
</property> </property>

View File

@ -412,6 +412,9 @@ void MuSRFitform::CreateAllInput()
# Construct a default filename if empty # Construct a default filename if empty
if ( $All{"FILENAME"} eq "" && !$All{"RUNSType"}) { if ( $All{"FILENAME"} eq "" && !$All{"RUNSType"}) {
$All{"FILENAME"}=$RUNS[0]."_".$All{"BeamLine"}."_".$All{"YEAR"}; $All{"FILENAME"}=$RUNS[0]."_".$All{"BeamLine"}."_".$All{"YEAR"};
if ($All{"BeamLine"} eq "LEM (PPC)") {
$All{"FILENAME"}=$RUNS[0]."_LEM_".$All{"YEAR"};
}
} else { } else {
$All{"FILENAME"}="TMP"; $All{"FILENAME"}="TMP";
} }