9 # ------------------------------------------------------------------------------------------ 
   11 #                         Utility script to test JSlewingK40. 
   13 # ------------------------------------------------------------------------------------------ 
   16 if [ -z $JPP_DIR ]; 
then 
   17     echo "Variable JPP_DIR undefined." 
   22 source $JPP_DIR/setenv.sh $JPP_DIR
 
   31     usage "$script [working directory]" 
   42 set_variable  numberOfSlices  10000
 
   56         -@numberOfLines=$numberOfLines         \
 
   57         -@numberOfFloors=$numberOfFloors       \
 
   65     if [ -
f "$WORKDIR/timeslice.root" ]; 
then 
   69     if [ ! -
f "$WORKDIR/timeslice.root" ]; 
then 
   71         JRandomTimesliceWriter \
 
   85     echo "Monitoring data." 
   86     echo "Detector: $DETECTOR" 
  102         -
F "1.0/GetEntries"                        \
 
  113         -
F "[0] * exp(-0.5 * (x-[1])*(x-[1]) / ([2]*[2])) + [3]"  \
 
  114         -
@"p0 = GetMaximum"                        \
 
  116         -
@"p2 = 0.5*GetRMS"                        \
 
  117         -
@"p3 = GetMinimum"                        \
 
  123         -\^ 
"number of hits [au]"                  \
 
  124         -
o resolution.$FORMAT                      $BATCH
 
  132         -\> 
"time over threshold [ns]"             \
 
  133         -\^ 
"number of hits [au]"                  \
 
  134         -
o tot.$FORMAT                             $BATCH
 
  143         -
F "[0]*exp([1]*sqrt(x) + [2]*x) + [3]"     \
 
  144         -
@"p0 = GetMaximum"                         \
 
  147         -
@"p3 = GetMinimum"                         \
 
remove to overwrite exit fi JDetector D $ID detectorType
 
o $QUALITY_ROOT d $DEBUG!JPlot1D f
 
then for HISTOGRAM in h0 h1
 
V(JDAQEvent-JTriggerReprocessor)*1.0/(JDAQEvent+1.0e-10)
 
then echo Variable JPP_DIR undefined exit fi source $JPP_DIR setenv sh $JPP_DIR &dev null set_variable
 
then $JPP_DIR examples JDetector JSlewing P slewing
 
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 JFileTuna f $INPUT_FILE
 
&set_variable OUTPUT_FILE
 
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
 
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
 
then echo Launching message logger in new window xterm geometry e JGetMessage H $HOST T $TAG d3
 
then usage $script< input_file >< detector_file > fi set_variable OUTPUT_DIR set_variable SELECTOR JDAQTimesliceL1 set_variable DEBUG case set_variable DEBUG
 
do set_variable DETECTOR_TXT $WORKDIR detector
 
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
 
do echo Generating $dir eval D
 
void scale(vector< double > &v, double c)
scale vector content