7 # ------------------------------------------------------------------------------------------
9 # Script to run JTriggerEfficiency in run-by-run mode.
11 # ------------------------------------------------------------------------------------------
13 if [ -
z $JPP_DIR ];
then
14 echo "Variable JPP_DIR undefined."
18 source $JPP_DIR/setenv.sh $JPP_DIR
26 set_variable: SAMPLER TRIGGEREFFICIENCY_SAMPLER
"100 1000"
28 set_variable+ DISABLE_TURBOT TRIGGEREFFICIENCY_DISABLE_TURBOT
Y
31 usage "$script <detector file> <detector file> (input file)+ <output file> <DAQ file> <PMT parameters file>"\
32 "\nAuxiliary script to trigger Monte Carlo events."
35 if (( $# >= 6 ));
then
43 fatal
"Wrong number of arguments."
48 JPrintTree -
f $DAQ_FILE -@
"type = JDAQSummaryslice" -
k number_of_entries |
read N
50 set_variable RUNBYRUN
"file=$DAQ_FILE; sampler=${SAMPLER%% *} $(($N / 2))"
55 JConvertDetectorFormat -
a ${DETECTORA} -
o ${DETECTORA_2}
56 JConvertDetectorFormat -
a ${DETECTORB} -
o ${DETECTORB_2}
59 # Procedure to determine optical modules with out-sync-problem.
60 # The given detector file is accordingly updated.
62 if [[
"$DISABLE_TURBOT" !=
"Y" ]];
then
76 # Procedure to determine Jpp version used during data taking as default handling of UDP packet losses has changed.
77 # The given detector file is accordingly updated.
81 echo ${(s/./)DAQ_VERSION} |
read DAQ_MAJOR DAQ_MINOR DAQ_PATCH
83 if [[
"$DAQ_MAJOR" != [0-9][0-9]* ]] || (( $DAQ_MAJOR <= 12 ));
then # Jpp-
version dependence
85 notice
"Set UDP counter and trailer disable."
89 -
P "-1 -1 set UDP_COUNTER_DISABLE" \
90 -
P "-1 -1 set UDP_TRAILER_DISABLE" \
98 -
f"${INPUT_FILES[*]}" \
104 -B
"$BACKGROUND_HZ" \
then usage $script< detector >< run >< outputfile > fi case set_variable OPTION
then usage $script< detector identifier >< startdate\"YYYY-MM-DDHH:MM:SS\"><finaldate\"YYYY-MM-DDHH:MM:SS\"><QA/QCfile> fi case set_variable QAQC_TXT $argv[4]
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
&set_variable NUMBER_OF_TIMESLICES
std::istream & read(std::istream &in, JTestSummary &summary, const char delimiter= ' ')
Read test summary.
then usage $script[detector file[output file[trigger file[PMT parameters file]]]] fi case set_variable PMT_FILE
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 Wrong number of arguments fi JConvertDetectorFormat a o
then timer_start(JRandomTimesliceWriter-a ${DETECTOR}-o ${PIPE}-n ${NUMBER_OF_SLICES}-P ${PMT_FILE}-d ${DEBUG}-S ${SEED}-B"$BACKGROUND_HZ"-N"$RECYCLING"--!&&for((i=0;$i!=10;++i));do;echo 'EOF' > $PIPE;usleep 100000;done &&rm-f $PIPE)&JTimesliceReprocessor-a $
const JK40Rates & getK40Rates()
Get K40 rates.
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 &dev null set_variable DEBUG set_variable WORKDIR
&set_variable OUTPUT_FILE
&set_variable OUT_FILE set_variable DETECTOR_FILE set_variable DAQ_FILE
then JMuonMCEvt f $INPUT_FILE o $INTERMEDIATE_FILE d
then usage $script[energy[distance[z of PMT]]] fi case set_variable z
then usage $script< input file >[option[primary[working directory]]] nWhere option can be N
then JHobbit a $DETECTOR f
do sput $STRING $FLOOR sget MODULE INPUT_FILES
source $JPP_DIR setenv csh $JPP_DIR &dev null eval JShellParser o a A
then getFile sh $JPP_ARCHIVE $DETECTOR_ID $RUNS[1] $KEY $VERSION $WORKDIR
esac $JPP_BIN JLogger sh $LOGGER until pgrep JGetMessage</dev/null > dev null
#define DEBUG(A)
Message macros.