GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — DecodingScripts/run_plot.sh at main · MFTDecoding/DecodingScripts

Expand file tree

/

run_plot.sh

Copy path
More file actions
More file actions

Latest commit

 

History

History
History
executable file
·
53 lines (42 loc) · 1.47 KB
/

run_plot.sh

Copy path

File metadata and controls

executable file
·
53 lines (42 loc) · 1.47 KB
Raw
Copy raw file
Download raw file
Open symbols panel
Edit and raw actions
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
#!/usr/bin/env bash
# Run this script to make 2D histo plots with the coordinates (row, col)
# of the hit pixels read from the digits. It will produce one plot
# per sensor found in the data.
# The script takes 3 arguments:
# - the input digit base file name i.e. without the .root at the end
# - the absolute path of the input digit file
# - the absolute path of the output PDF plots (one per sensor
# found in the data)
args=("$@")
NUMBER_OF_ARGS=3
if [ $# -ne ${NUMBER_OF_ARGS} ]; then
echo "Not enough args ! "
echo "Mandatory: please give DIGIT_FILENAME INPUT_PATH OUTPUT_PATH"
echo "as in the example below :"
echo "./run_plot.sh data-2021_03_10__18_23_15__-20551-4 /home/flp/data/digits /home/flp/plots"
exit 1
fi
DIGIT_FILENAME=${args[0]}
INPUT_PATH=${args[1]}
OUTPUT_PATH=${args[2]}
PATHLOG=${OUTPUT_PATH}/log
if [ ! -d "${PATHLOG}" ]; then
mkdir -p ${PATHLOG}
fi
echo "-----------------------------"
START_TIME=$(date +"%Y/%m/%d %H:%M:%S")
echo "Start "${START_TIME}
timestamp=$(date +"%Y_%m_%d_%H_%M_%S")
log=${PATHLOG}/plotter-${DIGIT_FILENAME}-$timestamp.out
root -l -b -q macro/plot.C\(\"${DIGIT_FILENAME}\",\"${INPUT_PATH}\",\"${OUTPUT_PATH}\"\) > $log
echo "Log in : " $log
echo "Plots in : "
ls -1 ${OUTPUT_PATH}/${DIGIT_FILENAME}/*.pdf
echo
echo "ERROR opening digit file : "
grep "ERROR opening digit file" $log | wc -l
echo
STOP_TIME=$(date +"%Y %m %d %H:%M:%S")
echo "Stop " ${STOP_TIME}
echo "Done !"
echo "-----------------------------"
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.