$Id: faq.html,v 1.4 2002/11/12 22:38:07 tl Exp $
echo "zapall" > GSSort.command ; pkill -HUP GSSortThe above command will write the command 'zapall' in the GSSort command file 'GSSort.command'. The you signal GSSort with the 'pkill -HUP GSSort'. When the program is signaled, it will realize that the command file is there, execute the 'zapall' command, update the shared memory (or disk file) and continue the sort.
You can do all this from inside rootn.exe by typing 'zapall()'. There is also a 'zap("h1")' function to zap just one spectrum.
{
gate("ehi_ehi","g539",539,2,0.6);
gate("ehi_ehi","g967",967,4,0.6);
gate("ehi_ehi","g148",148,2,0.6);
gate("ehi_ehi","g220",220,2,0.6);
gate("ehi_ehi","g402",402,3,0.6);
del("sum");
add1("sum","g539");
add1("sum","g967");
add1("sum","g148");
add1("sum","g220");
add1("sum","g402");
d1("sum");
}
in it. We here generate four gates, clear a summed spectrum, and
add the gates up. Finally we display the sum. NOTICE THAT YOU
MUST ENCLOSE THE COMMANDS WITH THE {} BRACKET!!
To execute the command file type
.x sndgates.rcfin rootn.exe
.! lpr -P fwhp4550 c1.ps
root [5] d2("gamtof");
: created default TCanvas with name c1
Error in : BadAccess (attempt to access private resource denied) (XID: 0)
Error in : BadAlloc (insufficient resources for operation) (XID: 0)
What do I do?
To fix this, try to kill as many X11 utilities as you can - especially netscape. This may not effectively free up all the X11 resources that rootn.exe needs - in which case you should be able to resolve the problem by logging out and then log in again.
The snipped from a chat file below shows how you could make and HK matrix that even tries to approximately take into account the effect of longlived isomer in a thin target experiment.
#------------------------------ # make an hk 2D plot # # First add ge and bgo energies to proper total energy. # If we assume that the calibration of the germanium # summed energy is: 16 Kev/ch and the summed bgo energy # calculated in the EFFs is: 10 keV/ch (as the # GS WWW documantation claims) and we want # 500 kev/ch for the total energy, HH, then # we should generate HH as: # mkpev HH modpev addpev HH 0.0320 sumge modpev addpev HH 0.0200 sumbgo # # (sumge and sumbgo are calculated in the EFFs!) # This nucleus has an isomer, and we do not observe # energyes below the isomer, so we add this level # energy (5088 keV, or 10.18 ch or). The sum efficency # might be something like 65% (total ge+BGO), so add 6.2 # modpev addconst HH 6.2 # # total multiplicity is already available in the # pev 'lentotal'. But the isomer hides some transitions. # Of the ~8 transitions below the isomer, we would # should see a multiplicity of perhaps 0.73*8~6 # so, to get an estimate of the true multiplicity # we make KK as # mkpev KK modpev addpev KK 1.0 lentotal modpev addconst KK 6 # # For the HHxKK matrix, let us bin multiplicity up # 30 and HH up to 50 MeV in 50 channels. # binpev2d KK 40 0 39 HH 50 0 100 #
#!/bin/csh
#
#-------------------------------------------
set INDRIVE = /dev/rmt/1mbn
foreach tape ( 2 3 4 5 6 7 8 )
#-------------------------------------------
echo "`which GSSort`"
echo "-----------------------------------------------------"
echo "------- --------"
echo "-----------------------------------------------------"
date
# ... test if new tape is ready
echo "test for input tape..."
mt -f $INDRIVE status
set st = $status
if ( $st != 0) then
echo "input tape NOT ready - quitting..."
exit
endif
# ... do Sort
echo "-----> sorting tape $tape"
GSSort -chat mychat.chat >! GSSort_{$tape}.log
set st = $status
echo "__done skimming, status is: $st"
# ... where are we on input tape?
echo "status of input tape>>"
mt -f $INDRIVE status
# ... kick the old tape out of the stacker drive
if ( $st == 0) then
echo "popping the input tape..."
mt -f $INDRIVE rewoffl
endif
# ... wait for stacker to put new tape in
echo "waiting for stacker..."
sleep 300
end
# send an Email message that the sort is done
echo "... sorting seems to be done"
echo "GSSort done on `date` in `\pwd`" | mailx me@phy.anl.gov
exit
Here we assume you have sorted tape 1 already and now we
want to sort tapes 2-8, which you have loaded up in the
stacker. It is also assumed that you have started the
stacker sequence so that tape 2 is in the stacker tape
drive (ususally with a 'reset' 'enter' command).
The script will then sort the tapes and write a logfile for each tape it sorted. The command "mt -f $INDRIVE rewoffl" will eject the tape and the stacker will put the next tape in. This takes some time, so the script will wait 300 seconds before it will start sorting the next tape.
Please Note: Your chatscript better contain the line:
rootfileoption UPDATEor the root file will be RECREATE (== overwritten) every time a new tape is sorted. Also, use a rootfile, not shared memory when you sort tapes. Shared memory is only for online use.
mt -f /dev/rmt/1mbn status(or 0mbn or 2mbn) if the name isn't written on the drive.
Then, if the tape is new, do
cd DirectoryOfInterest tar -cvf /dev/rmt/1mbn .Else if you already have saved to the tape and you want to add another backup:
cd DirectoryOfInterest mt -f /dev/rmt/1mbn eom tar -cvf /dev/rmt/1mbn ."mt -f /dev/rmt/1mbn eom" will position the tape at the end of the last tar backup you did (eom=End Of Medium). Please note: if you forget this repositioning step, you will overwrite the old tar backups you did!