3 # -------------------------------------------------------------------------------------------- 
    5 # Steering script for the compass calibration procedure of the D_ORCA006 (49) detector. 
    7 # -------------------------------------------------------------------------------------------- 
    9 if [ -z $JPP_DIR ]; 
then 
   10     echo "Variable JPP_DIR undefined." 
   14 source $JPP_DIR/setenv.sh $JPP_DIR >& /dev/
null 
   17 set_array        
RUNS                    8000-8100
 
   20     usage "$script <detector file>" 
   23 if (( $# != 1 )); 
then 
   24     fatal 
"Wrong number of arguments." 
o $QUALITY_ROOT d $DEBUG!JPlot1D f
 
then fatal Wrong number of arguments fi set_variable STRING $argv[1] set_variable DETECTORXY_TXT $WORKDIR $DETECTORXY_TXT tail read X Y CHI2 RMS printf optimum n $X $Y $CHI2 $RMS awk v Y
 
then fatal Detector file should be binary format fi eval JPrintDetector a $DETECTOR O IDENTIFIER typeset a INPUT_FILES for RANGE in $RUNS[*]
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR if do_usage *then usage $script[(input file)+] fi set_variable DEBUG set_variable WORKDIR TMPDIR
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable DEBUG set_variable WORKDIR
 
then JConvertDetectorFormat a $DETECTOR[1] o
 
then set_variable MODULE getModule a $DETECTOR L $STRING $FLOOR JEditDetector a $DETECTOR M $MODULE add $X o $DETECTOR else echo No update of detector $DETECTOR
 
do set_variable DETECTOR_TXT $WORKDIR detector
 
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null