Skip to content

Commit e270ef0

Browse files
committed
Add run type and beam type metadata for async and MC QC
QC-1188, QC-1002 Seeing no available run type in the surrounding scripts, I naively assume that absolutely all runs in async and MC are considered to be of type PHYSICS.
1 parent 73425a3 commit e270ef0

File tree

4 files changed

+10
-6
lines changed

4 files changed

+10
-6
lines changed

DATA/production/configurations/asyncReco/setenv_extra.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -713,7 +713,7 @@ if [[ $ALIEN_JDL_QCOFF != "1" ]]; then
713713
export WORKFLOW_PARAMETERS="QC,${WORKFLOW_PARAMETERS}"
714714
fi
715715

716-
export QC_CONFIG_OVERRIDE+=";qc.config.Activity.number=$RUNNUMBER;qc.config.Activity.passName=$PASS;qc.config.Activity.periodName=$PERIOD;"
716+
export QC_CONFIG_OVERRIDE+=";qc.config.Activity.number=$RUNNUMBER;qc.config.Activity.type=PHYSICS;qc.config.Activity.passName=$PASS;qc.config.Activity.periodName=$PERIOD;qc.config.Activity.beamType=$BEAMTYPE;"
717717

718718
export QC_CONFIG_PARAM+=" --local-batch=QC.root "
719719
export GEN_TOPO_WORKDIR="./"

DATA/production/o2dpg_qc_postproc_workflow.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -69,6 +69,7 @@ def add_QC_postprocessing(taskName, qcConfigPath, needs, runSpecific, periodSpec
6969
task = createTask(name=taskName, needs=needs, cwd=qcdir, lab=["QC"], cpu=1, mem='2000')
7070
overrideValues = '--override-values "'
7171
overrideValues += f'qc.config.database.host={qcdbUrl};'
72+
overrideValues += f'qc.config.Activity.type=PHYSICS;'
7273
overrideValues += f'qc.config.Activity.number={runNumber};' if runSpecific else 'qc.config.Activity.number=0;'
7374
overrideValues += f'qc.config.Activity.periodName={periodName};' if periodSpecific else 'qc.config.Activity.periodName=;'
7475
overrideValues += f'qc.config.Activity.passName={passName};' if passSpecific else 'qc.config.Activity.passName=;'

MC/bin/o2dpg_qc_finalization_workflow.py

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,7 @@ def QC_finalize_name(name):
3333
return name + "_finalize"
3434

3535
qcdir = "QC"
36-
def include_all_QC_finalization(ntimeframes, standalone, run, productionTag, conditionDB, qcdbHost):
36+
def include_all_QC_finalization(ntimeframes, standalone, run, productionTag, conditionDB, qcdbHost, beamType):
3737

3838
stages = []
3939

@@ -49,7 +49,7 @@ def add_QC_finalization(taskName, qcConfigPath, needs=None):
4949

5050
task = createTask(name=QC_finalize_name(taskName), needs=needs, cwd=qcdir, lab=["QC"], cpu=1, mem='2000')
5151
task['cmd'] = f'o2-qc --config {qcConfigPath} --remote-batch {taskName}.root' + \
52-
f' --override-values "qc.config.database.host={qcdbHost};qc.config.Activity.number={run};qc.config.Activity.periodName={productionTag};qc.config.conditionDB.url={conditionDB}"' + \
52+
f' --override-values "qc.config.database.host={qcdbHost};qc.config.Activity.number={run};qc.config.Activity.type=PHYSICS;qc.config.Activity.periodName={productionTag};qc.config.Activity.beamType={beamType};qc.config.conditionDB.url={conditionDB}"' + \
5353
' ' + getDPL_global_options()
5454
stages.append(task)
5555

@@ -66,7 +66,9 @@ def add_QC_postprocessing(taskName, qcConfigPath, needs, runSpecific, prodSpecif
6666
task = createTask(name=taskName, needs=needs, cwd=qcdir, lab=["QC"], cpu=1, mem='2000')
6767
overrideValues = '--override-values "'
6868
overrideValues += f'qc.config.Activity.number={run};' if runSpecific else 'qc.config.Activity.number=0;'
69+
overrideValues += f'qc.config.Activity.type=PHYSICS;'
6970
overrideValues += f'qc.config.Activity.periodName={productionTag};' if prodSpecific else 'qc.config.Activity.periodName=;'
71+
overrideValues += f'qc.config.Activity.beamType={beamType};'
7072
overrideValues += f'qc.config.database.host={qcdbHost};qc.config.conditionDB.url={conditionDB}"'
7173
task['cmd'] = f'o2-qc --config {qcConfigPath} ' + \
7274
overrideValues + ' ' + getDPL_global_options()
@@ -124,6 +126,7 @@ def main() -> int:
124126
parser.add_argument('-productionTag',help="Production tag for this MC", default='unknown')
125127
parser.add_argument('-conditionDB',help="CCDB url for QC workflows", default='http://alice-ccdb.cern.ch')
126128
parser.add_argument('-qcdbHost',help="QCDB url for QC object uploading", default='http://ali-qcdbmc-gpn.cern.ch:8083')
129+
parser.add_argument('-beamType',help="Collision system, e.g. PbPb, pp", default='')
127130
args = parser.parse_args()
128131
print (args)
129132

@@ -145,7 +148,7 @@ def main() -> int:
145148
mkdir(qcdir)
146149

147150
workflow={}
148-
workflow['stages'] = include_all_QC_finalization(ntimeframes=1, standalone=True, run=args.run, productionTag=args.productionTag, conditionDB=args.conditionDB, qcdbHost=args.qcdbHost)
151+
workflow['stages'] = include_all_QC_finalization(ntimeframes=1, standalone=True, run=args.run, productionTag=args.productionTag, conditionDB=args.conditionDB, qcdbHost=args.qcdbHost, beamType=args.beamType)
149152

150153
dump_workflow(workflow["stages"], args.o)
151154

MC/bin/o2dpg_sim_workflow.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1302,7 +1302,7 @@ def addQCPerTF(taskName, needs, readerCommand, configFilePath, objectsFile=''):
13021302
# the --local-batch argument will make QC Tasks store their results in a file and merge with any existing objects
13031303
task['cmd'] = f'{readerCommand} | o2-qc --config {configFilePath}' + \
13041304
f' --local-batch ../{qcdir}/{objectsFile}' + \
1305-
f' --override-values "qc.config.database.host={args.qcdbHost};qc.config.Activity.number={args.run};qc.config.Activity.periodName={args.productionTag};qc.config.Activity.start={args.timestamp};qc.config.conditionDB.url={args.conditionDB}"' + \
1305+
f' --override-values "qc.config.database.host={args.qcdbHost};qc.config.Activity.number={args.run};qc.config.Activity.type=PHYSICS;qc.config.Activity.periodName={args.productionTag};qc.config.Activity.beamType={args.col};qc.config.Activity.start={args.timestamp};qc.config.conditionDB.url={args.conditionDB}"' + \
13061306
' ' + getDPL_global_options(ccdbbackend=False)
13071307
# Prevents this task from being run for multiple TimeFrames at the same time, thus trying to modify the same file.
13081308
task['semaphore'] = objectsFile
@@ -1572,7 +1572,7 @@ def addQCPerTF(taskName, needs, readerCommand, configFilePath, objectsFile=''):
15721572

15731573
job_merging = False
15741574
if includeFullQC:
1575-
workflow['stages'].extend(include_all_QC_finalization(ntimeframes=NTIMEFRAMES, standalone=False, run=args.run, productionTag=args.productionTag, conditionDB=args.conditionDB, qcdbHost=args.qcdbHost))
1575+
workflow['stages'].extend(include_all_QC_finalization(ntimeframes=NTIMEFRAMES, standalone=False, run=args.run, productionTag=args.productionTag, conditionDB=args.conditionDB, qcdbHost=args.qcdbHost, beamType=args.col))
15761576

15771577
if includeAnalysis:
15781578
# include analyses and potentially final QC upload tasks

0 commit comments

Comments
 (0)