forked from amcntr/CMS-Pixel-Encoder
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathrun.sh
More file actions
58 lines (44 loc) · 1.28 KB
/
Copy pathrun.sh
File metadata and controls
58 lines (44 loc) · 1.28 KB
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
54
55
56
57
58
#!bin/bash
if [ -z "$1" ]; then
echo
echo Use: run.sh \<name\>
echo
else
NAME=$1
BINARY_LOCATION=BinaryFiles/$NAME
DECODE_LOCATION=DecodedData/Decoded-$NAME.root
if [ ! -d "./DecodedData" ]; then
mkdir DecodedData
fi
if [ ! -d "./BinaryFiles" ]; then
mkdir BinaryFiles
fi
if [ ! -d "./$BINARY_LOCATION" ]; then
mkdir ./$BINARY_LOCATION
fi
echo
echo Pulling pixel data from source files.
echo ================================================================
echo
cd ./MCHitAnalyzer/python
cmsRun Sim-Out-Config.py
echo
echo Moving Decoded Data into $DECODE_LOCATION
echo
mv decodedData.root ../../$DECODE_LOCATION
cd ../../
echo
echo Converting pulled data to binary.
echo ================================================================
echo
./PixelEncoder/PixelEncoder ./$DECODE_LOCATION
for p in SRAMhit0.bin SRAMhit1.bin SRAMhit2.bin SRAMpix0.bin SRAMpix1.bin SRAMpix2.bin histogram_source.pdf histogram_binary.pdf;
do
mv $p ./$BINARY_LOCATION/$p
done
echo
echo
echo Done converting data. Binary files are located in ./$BINARY_LOCATION\/
echo ================================================================
echo
fi