Skip to content

Commit 5021f06

Browse files
fapfap69Antonio Franco
andauthored
Update hmp-pedestals-processing.sh (#523)
* V1 FIrst version * Update hmp-pedestals-processing.sh fix the "source getCommonArgs.sh" * Update hmp-pedestals-processing.sh fix path Co-authored-by: Antonio Franco <antonio.franco@cern.ch>
1 parent 6302830 commit 5021f06

File tree

2 files changed

+89
-0
lines changed

2 files changed

+89
-0
lines changed
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
#!/bin/bash
2+
3+
# ------------------------------------------------------------------------
4+
# ALICE HMPID detector
5+
# Workflow to calculate pedestals v.0.2 = 2/03/2022
6+
#
7+
# Extra Env Variables:
8+
# HMP_SIGMACUT : The value of sigams for the threshold cut [=4]
9+
# HMP_CCDB_REC : True if we want the recording into ALICE CCDB
10+
# HMP_PED_TAG : A string that tags the pedestals [=Latest]
11+
#
12+
#
13+
#
14+
# Auth. A.Franco - INFN Sez.BARI - ITALY
15+
# ------------------------------------------------------------------------
16+
17+
source common/setenv.sh
18+
# env > /tmp/hmpid_pedestal_env_dump.txt
19+
20+
# Set general arguments
21+
source common/getCommonArgs.sh
22+
23+
# Define the Input/Output streams
24+
PROXY_INSPEC="A:HMP/RAWDATA;dd:FLP/DISTSUBTIMEFRAME/0"
25+
PROXY_OUTSPEC="A:HMP/RAWDATA;dd:FLP/DISTSUBTIMEFRAME/0"
26+
27+
# assign the HMP extra Env Vars.
28+
if [ -z ${HMP_SIGMACUT+x} ];
29+
then
30+
HMP_SIGMACUT="4"
31+
fi
32+
if [ -z ${HMP_NODCSCCDB_REC+x} ];
33+
then
34+
HMP_NODCSCCDB_REC="false"
35+
else
36+
HMP_NODCSCCDB_REC="true"
37+
fi
38+
if [ -z ${HMP_CCDB_REC+x} ];
39+
then
40+
HMP_CCDB_REC="false"
41+
else
42+
HMP_CCDB_REC="true"
43+
fi
44+
if [ -z ${HMP_FILES_REC+x} ];
45+
then
46+
HMP_FILES_REC="false"
47+
else
48+
HMP_FILES_REC="true"
49+
fi
50+
if [ -z ${HMP_PED_TAG+x} ];
51+
then
52+
HMP_PED_TAG="Latest"
53+
fi
54+
55+
# Here we compose the workflow
56+
WORKFLOW="o2-dpl-raw-proxy $ARGS_ALL --dataspec \"$PROXY_INSPEC\" --channel-config \"name=readout-proxy,type=pull,"
57+
WORKFLOW+="method=connect,address=ipc://@$INRAWCHANNAME,rateLogging=1,transport=shmem\" | "
58+
59+
WORKFLOW+="o2-hmpid-raw-to-pedestals-workflow ${ARGS_ALL} --configKeyValues \"$ARGS_ALL_CONFIG\" --fast-decode "
60+
61+
if [ $HMP_NODCSCCDB_REC == 'false' ];
62+
then
63+
WORKFLOW+="--use-dcsccdb --dcsccdb-uri 'http://alio2-cr1-flp199.cern.ch:8083' --dcsccdb-alivehours 3 "
64+
fi
65+
if [ $HMP_CCDB_REC == 'true' ];
66+
then
67+
WORKFLOW+="--use-ccdb --ccdb-uri 'http://alice-ccdb.cern.ch' "
68+
fi
69+
if [ $HMP_FILES_REC == 'true' ];
70+
then
71+
WORKFLOW+="--use-files "
72+
fi
73+
74+
WORKFLOW+="--files-basepath 'HMP/Calib/Pedestals' "
75+
WORKFLOW+="--pedestals-tag ${HMP_PED_TAG} --sigmacut ${HMP_SIGMACUT} | "
76+
77+
WORKFLOW+="o2-dpl-run ${ARGS_ALL} "
78+
79+
if [ $WORKFLOWMODE == "print" ]; then
80+
echo "HMPID Pedestals Calculation (v.0.1) Workflow command:"
81+
echo $WORKFLOW | sed "s/| */|\n/g"
82+
else
83+
# Execute the command we have assembled
84+
WORKFLOW+=" --$WORKFLOWMODE"
85+
eval $WORKFLOW
86+
fi

DATA/production/standalone-calibration.desc

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,3 +23,6 @@ MID-calib-workflow: "O2PDPSuite" reco,1,1,"production/calib/mid-badchannels.sh"
2323
PHS-pedestal-calibration: "O2PDPSuite" reco,1,1," production/calib/phs-pedestal.sh"
2424

2525
PHS-led-calibration: "O2PDPSuite" reco,1,1," production/calib/phs-led.sh"
26+
27+
HMP-pedestals: "O2PDPSuite" reco,1,1," production/calib/hmp-pedestals-processing.sh"
28+

0 commit comments

Comments
 (0)