Skip to content
Snippets Groups Projects
Commit 983efe51 authored by Walter Lampl's avatar Walter Lampl
Browse files

Merge remote-tracking branch 'upstream/24.0' into sweep_24.0_main_2024-04-30

parents 7481282c 67f5450e
No related branches found
No related tags found
No related merge requests found
Showing
with 409 additions and 321 deletions
......@@ -65,9 +65,6 @@ def AthenaMonitoringCfg(flags):
info('Set up HLT monitoring')
if flags.DQ.Environment == 'AOD':
warning("HLT Monitoring enabled on AOD: this might cause issues as not all HLT collections are written to standard AOD!")
if not flags.Input.isMC:
error("HLT monitoring on data AOD input is not allowed - not all HLT collections are recorded to AOD!")
raise ValueError("HLT monitoring enabled on data AOD input.")
from TrigHLTMonitoring.TrigHLTMonitorAlgorithm import TrigHLTMonTopConfig
result.merge(TrigHLTMonTopConfig(flags))
......
......@@ -28,7 +28,7 @@ if( NOT ATLAS_EXTERNAL )
endif()
# Pick up authentication.xml:
set( AtlasAuthentication_native_version "v21" )
set( AtlasAuthentication_native_version "v22" )
set( AtlasAuthentication_home
"${ATLAS_EXTERNAL}/AtlasAuth/${AtlasAuthentication_native_version}" )
if (EXISTS ${AtlasAuthentication_home}/authentication.xml )
......
#!/bin/sh
#
# art-description: MC23-style RUN3 simulation using FullG4MT_QS in AthenaMT
# art-include: 24.0/Athena
# art-include: 24.0/AthSimulation
# art-include: main/Athena
# art-include: main/AthSimulation
# art-type: grid
# art-athena-mt: 8
# art-architecture: '#x86_64-intel'
# art-output: test.*.HITS.pool.root
# art-output: log.*
# art-output: Config*.pkl
export ATHENA_CORE_NUMBER=8
# RUN3 setup
# ATLAS-R3S-2021-03-02-00 and OFLCOND-MC23-SDR-RUN3-01
Sim_tf.py \
--CA \
--multithreaded \
--conditionsTag 'default:OFLCOND-MC23-SDR-RUN3-01' \
--simulator 'FullG4MT_QS' \
--postInclude 'PyJobTransforms.UseFrontier' \
--preInclude 'EVNTtoHITS:Campaigns.MC23aSimulationMultipleIoV' \
--geometryVersion 'default:ATLAS-R3S-2021-03-02-00' \
--inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CampaignInputs/mc21/EVNT/mc21_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.evgen.EVNT.e8453/EVNT.29328277._003902.pool.root.1" \
--outputHITSFile "test.CA.HITS.pool.root" \
--maxEvents 50 \
--jobNumber 1 \
--postExec 'with open("ConfigSimCA.pkl", "wb") as f: cfg.store(f)' \
--imf False
rc=$?
mv log.EVNTtoHITS log.EVNTtoHITS.CA
echo "art-result: $rc simCA"
status=$rc
rc2=-9999
if [ $rc -eq 0 ]
then
ArtPackage=$1
ArtJobName=$2
art.py compare grid --entries 10 ${ArtPackage} ${ArtJobName} --order-trees --mode=semi-detailed --diff-root --file=test.CA.HITS.pool.root
rc2=$?
if [ $status -eq 0 ]
then
status=$rc2
fi
fi
echo "art-result: $rc2 regression"
exit $status
......@@ -14,14 +14,14 @@
export ATHENA_CORE_NUMBER=8
# RUN3 setup
# ATLAS-R3S-2021-03-02-00 and OFLCOND-MC23-SDR-RUN3-01
# ATLAS-R3S-2021-03-02-00 and OFLCOND-MC23-SDR-RUN3-04
Sim_tf.py \
--CA \
--multithreaded \
--conditionsTag 'default:OFLCOND-MC23-SDR-RUN3-01' \
--conditionsTag 'default:OFLCOND-MC23-SDR-RUN3-04' \
--simulator 'ATLFAST3MT_QS' \
--postInclude 'PyJobTransforms.UseFrontier' \
--preInclude 'EVNTtoHITS:Campaigns.MC23aSimulationMultipleIoV' \
--preInclude 'EVNTtoHITS:Campaigns.MC23eSimulationMultipleIoV' \
--geometryVersion 'default:ATLAS-R3S-2021-03-02-00' \
--inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CampaignInputs/mc21/EVNT/mc21_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.evgen.EVNT.e8453/EVNT.29328277._003902.pool.root.1" \
--outputHITSFile "test.CA.HITS.pool.root" \
......
......@@ -13,14 +13,14 @@
export ATHENA_CORE_NUMBER=8
# RUN3 setup
# ATLAS-R3S-2021-03-02-00 and OFLCOND-MC23-SDR-RUN3-01
# ATLAS-R3S-2021-03-02-00 and OFLCOND-MC23-SDR-RUN3-04
Sim_tf.py \
--CA \
--multithreaded \
--conditionsTag 'default:OFLCOND-MC23-SDR-RUN3-01' \
--conditionsTag 'default:OFLCOND-MC23-SDR-RUN3-04' \
--simulator 'ATLFAST3MT' \
--postInclude 'PyJobTransforms.UseFrontier' \
--preInclude 'EVNTtoHITS:Campaigns.MC23aSimulationMultipleIoV' \
--preInclude 'EVNTtoHITS:Campaigns.MC23eSimulationMultipleIoV' \
--geometryVersion 'default:ATLAS-R3S-2021-03-02-00' \
--inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CampaignInputs/mc21/EVNT/mc21_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.evgen.EVNT.e8453/EVNT.29328277._003902.pool.root.1" \
--outputHITSFile "test.CA.HITS.pool.root" \
......
......@@ -23,10 +23,10 @@ Sim_tf.py \
--inputEVNTFile="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ISF_Validation/mc21_13p6TeV.950542.MGPy8EG_DYSpinHalfMonopoles_1gD_1500GeV_valid.merge.EVNT.e8467_e8455.29631249._000005.pool.root.1" \
--maxEvents="100" \
--multithreaded="True" \
--preInclude "EVNTtoHITS:Campaigns.MC23aSimulationMultipleIoV,G4DebuggingTools.DebugMonopole" \
--preInclude "EVNTtoHITS:Campaigns.MC23eSimulationMultipleIoV,G4DebuggingTools.DebugMonopole" \
--skipEvents="0" \
--randomSeed="41" \
--conditionsTag "default:OFLCOND-MC23-SDR-RUN3-01" \
--conditionsTag "default:OFLCOND-MC23-SDR-RUN3-04" \
--geometryVersion="default:ATLAS-R3S-2021-03-02-00" \
--runNumber="950542" \
--AMITag="s3890" \
......
......@@ -17,16 +17,16 @@
export ATHENA_PROC_NUMBER=8
export ATHENA_CORE_NUMBER=8
# RUN3 setup
# ATLAS-R3S-2021-03-02-00 and OFLCOND-MC23-SDR-RUN3-01
# ATLAS-R3S-2021-03-02-00 and OFLCOND-MC23-SDR-RUN3-04
Sim_tf.py \
--CA \
--inputEVNTFile="/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ISF_Validation/mc21_13p6TeV.temp.DisplacedSmuonPairProduction.10events.pool.root" \
--maxEvents="10" \
--multithreaded="True" \
--preInclude "EVNTtoHITS:Campaigns.MC23aSimulationMultipleIoV,G4DebuggingTools.DebugSleptonsLLP" \
--preInclude "EVNTtoHITS:Campaigns.MC23eSimulationMultipleIoV,G4DebuggingTools.DebugSleptonsLLP" \
--skipEvents="0" \
--randomSeed="41" \
--conditionsTag "default:OFLCOND-MC23-SDR-RUN3-01" \
--conditionsTag "default:OFLCOND-MC23-SDR-RUN3-04" \
--geometryVersion="default:ATLAS-R3S-2021-03-02-00" \
--runNumber="950542" \
--AMITag="s3890" \
......
......@@ -18,14 +18,14 @@
export ATHENA_CORE_NUMBER=8
# RUN3 setup
# ATLAS-R3S-2021-03-02-00 and OFLCOND-MC23-SDR-RUN3-01
# ATLAS-R3S-2021-03-02-00 and OFLCOND-MC23-SDR-RUN3-04
Sim_tf.py \
--CA \
--multithreaded \
--conditionsTag 'default:OFLCOND-MC23-SDR-RUN3-01' \
--conditionsTag 'default:OFLCOND-MC23-SDR-RUN3-04' \
--simulator 'FullG4MT_QS' \
--postInclude 'PyJobTransforms.UseFrontier' \
--preInclude 'EVNTtoHITS:Campaigns.MC23aSimulationMultipleIoV' \
--preInclude 'EVNTtoHITS:Campaigns.MC23eSimulationMultipleIoV' \
--geometryVersion 'default:ATLAS-R3S-2021-03-02-00' \
--inputEVNTFile '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/ISF_Validation/mc23_13p6TeV.800030.Py8EG_A14NNPDF23LO_flatpT_Zprime_Extended.evgen.EVNT.e8514.33116368._004446.pool.root.1' \
--outputHITSFile 'test.CA.HITS.pool.root' \
......
#!/bin/sh
#
# art-description: Run MP and ST simulation, reading ttbar events, writing HITS, using MC23a geometry and conditions
# art-description: Run MP and ST simulation, reading ttbar events, writing HITS, using MC23e geometry and conditions
# art-include: 23.0/Athena
# art-include: 23.0/AthSimulation
# art-include: 24.0/Athena
......@@ -24,7 +24,7 @@ Sim_tf.py \
--outputHITSFile "test.MP.HITS.pool.root" \
--maxEvents 50 \
--geometryVersion 'default:ATLAS-R3S-2021-03-02-00' \
--conditionsTag 'default:OFLCOND-MC23-SDR-RUN3-01' \
--conditionsTag 'default:OFLCOND-MC23-SDR-RUN3-04' \
--simulator 'FullG4MT_QS' \
--postInclude 'default:PyJobTransforms.UseFrontier' \
--preInclude 'EVNTtoHITS:Campaigns.MC23SimulationSingleIoV' \
......@@ -44,7 +44,7 @@ Sim_tf.py \
--outputHITSFile "temp.ST.HITS.pool.root" \
--maxEvents 50 \
--geometryVersion 'default:ATLAS-R3S-2021-03-02-00' \
--conditionsTag 'default:OFLCOND-MC23-SDR-RUN3-01' \
--conditionsTag 'default:OFLCOND-MC23-SDR-RUN3-04' \
--simulator 'FullG4MT_QS' \
--postInclude 'default:PyJobTransforms.UseFrontier' \
--preInclude 'EVNTtoHITS:Campaigns.MC23SimulationSingleIoV' \
......
......@@ -17,14 +17,14 @@
export ATHENA_CORE_NUMBER=8
# RUN3 setup
# ATLAS-R3S-2021-03-02-00 and OFLCOND-MC23-SDR-RUN3-01
# ATLAS-R3S-2021-03-02-00 and OFLCOND-MC23-SDR-RUN3-04
Sim_tf.py \
--CA \
--multithreaded \
--conditionsTag 'default:OFLCOND-MC23-SDR-RUN3-01' \
--conditionsTag 'default:OFLCOND-MC23-SDR-RUN3-04' \
--simulator 'FullG4MT_QS' \
--postInclude 'PyJobTransforms.UseFrontier' \
--preInclude 'EVNTtoHITS:Campaigns.MC23aSimulationMultipleIoV' \
--preInclude 'EVNTtoHITS:Campaigns.MC23eSimulationMultipleIoV' \
--geometryVersion 'default:ATLAS-R3S-2021-03-02-00' \
--inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CampaignInputs/mc21/EVNT/mc21_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.evgen.EVNT.e8453/EVNT.29328277._003902.pool.root.1" \
--outputHITSFile "test.CA.HITS.pool.root" \
......
#!/bin/sh
#
# art-description: Run MT and ST simulation, reading ttbar events, writing HITS, using MC23a geometry and conditions
# art-description: Run MT and ST simulation, reading ttbar events, writing HITS, using MC23e geometry and conditions
# art-include: 23.0/Athena
# art-include: 23.0/AthSimulation
# art-include: 24.0/Athena
......@@ -24,10 +24,10 @@ Sim_tf.py \
--outputHITSFile "test.MT.HITS.pool.root" \
--maxEvents 50 \
--geometryVersion 'default:ATLAS-R3S-2021-03-02-00' \
--conditionsTag 'default:OFLCOND-MC23-SDR-RUN3-01' \
--conditionsTag 'default:OFLCOND-MC23-SDR-RUN3-04' \
--simulator 'FullG4MT_QS' \
--postInclude 'default:PyJobTransforms.UseFrontier' \
--preInclude 'EVNTtoHITS:Campaigns.MC23aSimulationMultipleIoV' \
--preInclude 'EVNTtoHITS:Campaigns.MC23eSimulationMultipleIoV' \
--jobNumber 1 \
--postExec 'with open("ConfigSimMT.pkl", "wb") as f: cfg.store(f)' \
--imf False
......@@ -45,10 +45,10 @@ Sim_tf.py \
--outputHITSFile "test.ST.HITS.pool.root" \
--maxEvents 50 \
--geometryVersion 'default:ATLAS-R3S-2021-03-02-00' \
--conditionsTag 'default:OFLCOND-MC23-SDR-RUN3-01' \
--conditionsTag 'default:OFLCOND-MC23-SDR-RUN3-04' \
--simulator 'FullG4MT_QS' \
--postInclude 'default:PyJobTransforms.UseFrontier' \
--preInclude 'EVNTtoHITS:Campaigns.MC23aSimulationMultipleIoV' \
--preInclude 'EVNTtoHITS:Campaigns.MC23eSimulationMultipleIoV' \
--jobNumber 1 \
--postExec 'with open("ConfigSimST.pkl", "wb") as f: cfg.store(f)' \
--imf False
......
......@@ -15,14 +15,14 @@
export ATHENA_CORE_NUMBER=8
# RUN3 setup
# ATLAS-R3S-2021-03-02-00 and OFLCOND-MC23-SDR-RUN3-01
# ATLAS-R3S-2021-03-02-00 and OFLCOND-MC23-SDR-RUN3-04
Sim_tf.py \
--CA \
--multithreaded \
--conditionsTag 'default:OFLCOND-MC23-SDR-RUN3-01' \
--conditionsTag 'default:OFLCOND-MC23-SDR-RUN3-04' \
--simulator 'FullG4MT' \
--postInclude 'PyJobTransforms.UseFrontier' \
--preInclude 'EVNTtoHITS:Campaigns.MC23aSimulationMultipleIoV' \
--preInclude 'EVNTtoHITS:Campaigns.MC23eSimulationMultipleIoV' \
--geometryVersion 'default:ATLAS-R3S-2021-03-02-00' \
--inputEVNTFile "/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/CampaignInputs/mc21/EVNT/mc21_13p6TeV.601229.PhPy8EG_A14_ttbar_hdamp258p75_SingleLep.evgen.EVNT.e8453/EVNT.29328277._003902.pool.root.1" \
--outputHITSFile "test.CA.HITS.pool.root" \
......
# Copyright (C) 2002-2022 CERN for the benefit of the ATLAS collaboration
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
# Declare the package name:
atlas_subdir( TileMonitoring )
......@@ -138,3 +138,8 @@ atlas_add_test( TileTBCellMonitorAlgorithm_test
SCRIPT python -m TileMonitoring.TileTBCellMonitorAlgorithm
PROPERTIES TIMEOUT 600
POST_EXEC_SCRIPT nopost.sh)
atlas_add_test( RunTileTBMonitoring_test
SCRIPT python -m TileMonitoring.RunTileTBMonitoring --use-sqlite ''
PROPERTIES TIMEOUT 600
POST_EXEC_SCRIPT nopost.sh)
#!/usr/bin/env python
#
# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
#
'''
@file RunTileTBMonitoring.py
@brief Script to run Tile TestBeam Reconstrcution/Monitoring
'''
from AthenaConfiguration.ComponentAccumulator import ComponentAccumulator
from AthenaConfiguration.Enums import Format, BeamType
from AthenaConfiguration.AutoConfigFlags import GetFileMD
from TileConfiguration.TileConfigFlags import TileRunType
import os
import sys
def configureFlagsAndArgsFromPartition(flags, args, partition, log):
"""
Configure the flags and args from partition in online
Configure the following flags from partition in online:
run type, run number, beam type, beam energy, project
Configure the following args from partition in online: args.nsamples
"""
from ipc import IPCPartition
from ispy import ISObject
ipcPartition = IPCPartition(partition)
if not ipcPartition.isValid():
log.error('Partition: ' + ipcPartition.name() + ' is not valid')
sys.exit(1)
# Set up default values
runType = 'Physics'
beamType = 'collisions'
beamEnergy = 200 # In TileTB: [GeV]
runNumber = 2400000
project = 'data_H8'
try:
runParams = ISObject(ipcPartition, 'RunParams.SOR_RunParams', 'RunParams')
except Exception:
log.warning(f'No Run Parameters in IS => Set defaults: partition: {partition}, beam type: {beamType}'
+ f', beam energy: {beamEnergy}, run number: {runNumber}, project tag: {project}')
else:
runParams.checkout()
beamType = runParams.beam_type
beamEnergy = runParams.beam_energy
runNumber = runParams.run_number
project = runParams.T0_project_tag
runType = runParams.run_type
log.info(f'RUN CONFIGURATION: run type: {runType}, beam type: {beamType}'
+ f', beam energy: {beamEnergy}, run number: {runNumber}, project: {project}')
try:
cisParams = ISObject(ipcPartition, 'TileParams.cispar', 'TileCISparameters')
except Exception:
log.info('Could not find Tile Parameters in IS')
else:
try:
cisParams.checkout()
except Exception:
log.info("Could not get Tile Parameters from IS")
else:
log.info(f'TILE CONFIGURATION: CISPAR size: {len(cisParams.data)}')
cispar = 'TILE CONFIGURATION: CISPAR: '
for d in cisParams.data:
cispar += ' ' + str(d)
log.info(cispar)
if len(cisParams.data) == 16:
data = cisParams.data
if data[12] == 1:
runType = 'Physics'
elif data[12] == 2:
runType = 'Laser'
elif data[12] == 4:
runType = 'Pedestals'
elif data[12] == 8:
runType = 'CIS'
log.info(f'TILE CONFIGURATION: RunType: {runType}, Mode: {data[0]}, Samples: {data[1]}, Pipeline: {data[2]}'
+ f', I3Delay: {data[3]}, Event: {data[4]}, Phase: {data[5]}, DAC: {data[6]}, Capacity: {data[7]}')
# Try to get number of samples from partition
nSamples = 15 # Default number of samples
try:
dspConfig = ISObject(ipcPartition, 'TileParams.TileCal_DSPConfig', 'TileCal_IS_DSPConfig')
except Exception:
log.info("Could not find Tile DSP Config in IS => set default number of samples to {nSamples}")
else:
try:
dspConfig.checkout()
except Exception:
log.info("Could not get Tile DSP Config from IS => set default number of samples to {nSamples}")
else:
nSamples = dspConfig.samples
log.info("Set number of samples from DSP Config in IS: {nSamples}")
if 'Physics' in runType:
flags.Tile.RunType = TileRunType.PHY
elif 'CIS' in runType:
flags.Tile.RunType = TileRunType.MONOCIS if 'mono' in runType else TileRunType.CIS
elif 'Laser' in runType:
flags.Tile.RunType = TileRunType.LAS
elif 'Pedestals' in runType:
flags.Tile.RunType = TileRunType.PED
flags.Beam.Type = BeamType(beamType)
flags.Beam.Energy = beamEnergy
flags.Input.ProjectName = project
flags.Input.RunNumbers = [runNumber]
args.nsamples = nSamples
def TileTestBeamMonitoringCfg(flags, fragIDs=[0x100, 0x101, 0x200, 0x201, 0x402], **kwargs):
''' Function to configure Tile TestBeam monitoring.'''
acc = ComponentAccumulator()
from TileMonitoring.TileTBBeamMonitorAlgorithm import TileTBBeamMonitoringConfig
acc.merge(TileTBBeamMonitoringConfig(flags, fragIDs=fragIDs))
from TileMonitoring.TileTBMonitorAlgorithm import TileTBMonitoringConfig
acc.merge(TileTBMonitoringConfig(flags, fragIDs=fragIDs))
from TileMonitoring.TileTBPulseMonitorAlgorithm import TileTBPulseMonitoringConfig
acc.merge(TileTBPulseMonitoringConfig(flags, timeRange=[-200, 200], fragIDs=fragIDs))
from TileMonitoring.TileTBCellMonitorAlgorithm import TileTBCellMonitoringConfig
acc.merge(TileTBCellMonitoringConfig(flags, timeRange=[-200, 200], fragIDs=fragIDs))
from TileMonitoring.TileDigitsFlxMonitorAlgorithm import TileDigitsFlxMonitoringConfig
acc.merge(TileDigitsFlxMonitoringConfig(flags, TileDigitsContainerFlx="TileDigitsFlxFiltered"))
from TileMonitoring.TileRawChannelFlxMonitorAlgorithm import TileRawChannelFlxMonitoringConfig
acc.merge(TileRawChannelFlxMonitoringConfig(flags, TileRawChannelContainerFlx="TileRawChannelFlxFit"))
return acc
if __name__ == '__main__':
# Setup logs
from AthenaCommon.Logging import log
from AthenaCommon.Constants import INFO
log.setLevel(INFO)
# Set the Athena configuration flags
from AthenaConfiguration.AllConfigFlags import initConfigFlags
from AthenaConfiguration.TestDefaults import defaultTestFiles
flags = initConfigFlags()
parser = flags.getArgumentParser()
parser.add_argument('--preExec', help='Code to execute before locking configs')
parser.add_argument('--postExec', help='Code to execute after setup')
parser.add_argument('--printConfig', action='store_true', help='Print detailed Athena configuration')
parser.add_argument('--dumpArguments', action='store_true', help='Print arguments and exit')
parser.add_argument('--frag-ids', dest='fragIDs', nargs="*", default=['0x100', '0x101', '0x200', '0x201', '0x402'],
help='Tile Frag IDs of modules to be monitored. Empty=ALL')
parser.add_argument('--demo-cabling', dest='demoCabling', type=int, default=2018, help='Time Demonatrator cabling to be used')
parser.add_argument('--nsamples', type=int, default=15, help='Number of samples')
parser.add_argument('--use-sqlite', dest='useSqlite', default='/afs/cern.ch/user/t/tiledemo/public/efmon/condb/tileSqlite.db',
help='Providing local SQlite file, conditions constants will be used from it')
parser.add_argument('--stateless', action="store_true", help='Run Online Tile TB monitoring in partition')
parser.add_argument('--partition', default="", help='EMON, Partition name, default taken from $TDAQ_PARTITION if not set')
parser.add_argument('--key', type=str, default='ReadoutApplication', help='EMON, Selection key, e.g.: ReadoutApplication (TileTB)')
parser.add_argument('--keyValue', default=['TileREB-ROS'], help='EMON, Key values, e.g.: TileREB-ROS (TileTB)')
parser.add_argument('--keyCount', type=int, default=0, help='EMON, key count, e.g. 5 to get five random SFIs')
parser.add_argument('--publishName', default='TilePT-stateless-tb', help='EMON, Name under which to publish histograms')
parser.add_argument('--include', default="", help='EMON, Regular expression to select histograms to publish')
parser.add_argument('--lvl1Items', default=[], help='EMON, A list of L1 bit numbers, default []')
parser.add_argument('--lvl1Names', default=[], help='EMON, A list of L1 bit names, default []')
parser.add_argument('--lvl1Logic', default='Ignore', choices=['And','Or','Ignore'], help='EMON, default: Ignore')
parser.add_argument('--lvl1Origin', default='TAV', choices=['TBP','TAP','TAV'], help='EMON, default: TAV')
parser.add_argument('--streamType', default='physics', help='EMON, HLT stream type (e.g. physics or calibration)')
parser.add_argument('--streamNames', default=['tile'], help='EMON, List of HLT stream names')
parser.add_argument('--streamLogic', default='Ignore', choices=['And','Or','Ignore'], help='EMON, default: Ignore')
parser.add_argument('--triggerType', type=int, default=256, help='EMON, LVL1 8 bit trigger type, default: 256')
parser.add_argument('--groupName', default="TileTBMon", help='EMON, Name of the monitoring group')
update_group = parser.add_mutually_exclusive_group()
update_group.add_argument('--frequency', type=int, default=0, help='EMON, Frequency (in number of events) of publishing histograms')
update_group.add_argument('--updatePeriod', type=int, default=30, help='EMON, Frequency (in seconds) of publishing histograms')
args, _ = parser.parse_known_args()
if args.dumpArguments:
log.info('=====>>> FINAL ARGUMENTS FOLLOW')
print('{:40} : {}'.format('Argument Name', 'Value'))
for a,v in (vars(args)).items():
print(f'{a:40} : {v}')
sys.exit(0)
fragIDs = [int(fragID, base=16) for fragID in args.fragIDs]
# Initially the following flags are not set up (they must be provided)
flags.Input.Files = []
# Initial configuration flags from command line arguments (to be used to set up defaults)
flags.fillFromArgs(parser=parser)
# =======>>> Set the Athena configuration flags to defaults (can be overriden via comand line)
flags.DQ.useTrigger = False
flags.DQ.enableLumiAccess = False
flags.Exec.MaxEvents = 3
flags.Common.isOnline = True
flags.GeoModel.AtlasVersion = 'ATLAS-R2-2015-04-00-00'
flags.Tile.doFit = True
flags.Tile.useDCS = False
flags.Tile.NoiseFilter = 0
flags.Tile.correctTime = False
flags.Tile.correctTimeJumps = False
flags.Tile.BestPhaseFromCOOL = False
flags.Tile.doOverflowFit = False
flags.Exec.PrintAlgsSequence = True
if args.stateless:
flags.Input.isMC = False
flags.Input.Format = Format.BS
partition = args.partition if args.partition else os.getenv('TDAQ_PARTITION', 'TileTB')
configureFlagsAndArgsFromPartition(flags, args, partition, log)
else:
flags.Tile.RunType = TileRunType.PHY
flags.Beam.Type = BeamType.Collisions
# Get beam energy from meta data (Tile TB setup: [GeV])
flags.Beam.Energy = GetFileMD(flags.Input.Files).get("beam_energy", 100)
if not (args.filesInput or flags.Input.Files):
flags.Input.Files = defaultTestFiles.RAW_RUN2
# =======>>> Override default configuration flags from command line arguments
flags.fillFromArgs(parser=parser)
if not flags.Output.HISTFileName:
runNumber = flags.Input.RunNumbers[0]
flags.Output.HISTFileName = f'tiletbmon_{runNumber}.root'
if args.preExec:
log.info('Executing preExec: %s', args.preExec)
exec(args.preExec)
flags.lock()
log.info('=====>>> FINAL CONFIG FLAGS SETTINGS FOLLOW:')
flags.dump(pattern='Tile.*|Input.*|Exec.*|IOVDb.[D|G].*', evaluate=True)
# =======>>> Initialize configuration object, add accumulator, merge, and run
from AthenaConfiguration.MainServicesConfig import MainServicesCfg
cfg = MainServicesCfg(flags)
# =======>>> Configure Tile raw data (digits) reading
from TileByteStream.TileByteStreamConfig import TileRawDataReadingCfg
cfg.merge( TileRawDataReadingCfg(flags, readMuRcv=False,
readDigits=True,
readRawChannel=True,
readDigitsFlx=True,
readBeamElem=True,
stateless=args.stateless) )
if args.stateless:
bsEmonInputSvc = cfg.getService('ByteStreamInputSvc')
bsEmonInputSvc.Partition = args.partition
bsEmonInputSvc.Key = args.key
bsEmonInputSvc.KeyValue = args.keyValue
bsEmonInputSvc.KeyCount = args.keyCount
bsEmonInputSvc.PublishName = args.publishName
bsEmonInputSvc.ISServer = 'Histogramming'
bsEmonInputSvc.UpdatePeriod = args.updatePeriod
bsEmonInputSvc.Frequency = args.frequency
bsEmonInputSvc.LVL1Items = args.lvl1Items
bsEmonInputSvc.LVL1Names = args.lvl1Names
bsEmonInputSvc.LVL1Logic = args.lvl1Logic
bsEmonInputSvc.LVL1Origin = args.lvl1Origin
bsEmonInputSvc.StreamType = args.streamType
bsEmonInputSvc.StreamNames = args.streamNames
bsEmonInputSvc.StreamLogic = args.streamLogic
bsEmonInputSvc.GroupName = args.groupName
bsEmonInputSvc.ProcessCorruptedEvents = True
bsEmonInputSvc.BufferSize = 2000
# =======>>> Configure reconstruction of Tile TestBeam data
from TileTBRec.TileTestBeamRecoConfig import TileTestBeamRecoCfg
cfg.merge( TileTestBeamRecoCfg(flags, useDemoCabling=args.demoCabling, nsamples=args.nsamples) )
cfg.merge( TileTestBeamRecoCfg(flags, useDemoCabling=args.demoCabling, nsamples=16, useFELIX=True) )
if args.useSqlite:
cfg.getService('IOVDbSvc').overrideTags += [
f'<prefix>/TILE</prefix> <db>sqlite://;schema={args.useSqlite};dbname={flags.IOVDb.DatabaseInstance}</db>',
# ROD folder does not exist in Sqlite file at the moment (should be added)
f'<prefix>/TILE/ONL01/STATUS/ROD</prefix> <db>COOLONL_TILE/{flags.IOVDb.DatabaseInstance}</db>'
]
# =======>>> Configure Tile TestBeam monitoring
cfg.merge(TileTestBeamMonitoringCfg(flags, fragIDs=fragIDs))
# =======>>> Configure ROD to ROB mapping
# Scan first event for all fragments to create proper ROD to ROB map
cfg.getCondAlgo('TileHid2RESrcIDCondAlg').RODStatusProxy = None
# =======>>> Any last things to do?
if args.postExec:
log.info('Executing postExec: %s', args.postExec)
exec(args.postExec)
if args.printConfig:
cfg.printConfig(withDetails=True, summariseProps=True, printDefaults=True)
if args.config_only:
cfg.store(open('TileTestBeamMonitoring.pkl', 'wb'))
else:
sc = cfg.run()
# Success should be 0
sys.exit(not sc.isSuccess())
......@@ -4,6 +4,4 @@
atlas_subdir( Tier0ChainTests )
# Install files from the package:
atlas_install_python_modules( python/*.py POST_BUILD_CMD ${ATLAS_FLAKE8} )
atlas_install_scripts( scripts/tct_*.py scripts/tct_*.sh )
atlas_install_scripts( test/*.sh )
Version 1 - Max Baak, 20090303
Instructions for Tools/Tier0ChainTests package:
-----------------------------------------------
... are found below.
test/ directory:
----------------
Contains the xml files for tct tests defined for specific atlas projects. Eg:
####
# test/Tier0ChainTests_DefaultConfiguration.xml
# test/Tier0ChainTests_devval_AtlasOffline.xml
When installing the Tier0ChainTests package, cmt searches for the file with name:
> echo "test/Tier0ChainTests_`echo $AtlasArea | cut -d "/" -f 8,9 | sed 's/\//_/'`.xml"
(best to give this command a try yourself ;-)
If this file is not found, the fall-back file is:
test/Tier0ChainTests_DefaultConfiguration.xml
scripts/ directory:
-------------------
Contains wrapper run scripts called by the tct xml files.
Just calling a script will print a usage line.
Each script has a dryrun option that can be used for testing purposes. Do:
> tct_script -d arg1 arg2 arg3 etc
When the dryrun option is given, the tct_script wrapper is run, setting up the entire configuration,
but the underlying command is not executed.
####
# scripts/tct_getAmiTag.py
Scripts for getting the latest Recotrf.py configuration from ami.
Usage:
> tct_getAmiTag.py latest ami_recotrf.cmdargs
or eg
> tct_getAmiTag.py f85 myami_recotrf.cmdargs
the runarguments (eg preinclude, etc.) are then stored in the file: ami_recotrf.cmdargs.
This file can then be used by the script: scripts/tct_recotrf.sh
####
# scripts/tct_recotrf.sh
Script that calls the Recotrf.
Usage:
> tct_recotrf.sh 0 IDCosmic 3 500 /castor/cern.ch/grid/atlas/DAQ/2008/91890 ami_recotrf.cmdargs
where:
- 0: is the job id number
- IDCosmic: is the selected trigger stream
- 500: is the number of event to run over
- /castor/cern.ch/grid/atlas/DAQ/2008/91890: is the castor directory to get collections from.
In this example files are taken from: /castor/cern.ch/grid/atlas/DAQ/2008/91890/physics_IDCosmic
Where IDCosmis is the chosen trigstream.
- ami_recotrf.cmdargs: are the command arguments obtained from running tct_getAmiTag.py.
####
# scripts/tct_generate_copyscript.py
Called by scripts/tct_recotrf.sh. This script generates a dynamic script called:
copyscript.sh
which copies a unique set of input collections from castor to local disk.
These are the input collection for Recotrf.
####
# scripts/tct_recotrf_Prod.sh
# scripts/tct_recotrf_Tier0.sh
At date of writing, these are copies of scripts/tct_recotrf.sh
It is foreseen that AtlasTier0 or AtlasProduction may have different Recotrf.py occasionally.
Use these scripts to account for possible differences.
####
# scripts/tct_mergeMonHistograms.sh
Script for merging monitoring histograms:
Usage:
> tct_mergeMonHistograms.sh myMergedMonitoring.root myMergedMonitoring_IDCosmic_0.root myMergedMonitoring_IDCosmic_1.root etc
where:
- myMergedMonitoring.root: is the output file, and
- myMergedMonitoring_IDCosmic_0.root myMergedMonitoring_IDCosmic_1.root etc
are all input files to be merged.
####
# scripts/tct_dqwebdisplay.sh
Scripts for setting up the dq webdisplay. Usage:
> tct_dqwebdisplay.sh myMergedMonitoring.root Tier0ChainTests.TCTDQWebDisplayCosmics cosmics_run.latest.hcfg cosmics_minutes10.latest.hcfg cosmics_minutes30.latest.hcfg
where
- myMergedMonitoring.root : is the output produced by scripts/tct_mergeMonHistograms.sh
- Tier0ChainTests.TCTDQWebDisplayCosmics: is the dqwebdisplay configuration setup, found in the python/ directory.
Default setup is for local running: Tier0ChainTests.LocalDQWebDisplayCosmics
- cosmics_run.latest.hcfg cosmics_minutes10.latest.hcfg cosmics_minutes30.latest.hcfg: are han configuration files.
In case not set, fall-back han files are:
hanconfigfile=/afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/Cosmics/cosmics_run.1.80.hcfg
hanconfigfile=/afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/Cosmics/cosmics_minutes10.1.12.hcfg
hanconfigfile=/afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/Cosmics/cosmics_minutes30.1.9.hcfg
####
# scripts/tct_CreateDB.py
Scripts for setting up a dummy cool db. Used for testing of uploading dq flags.
This script is used inside: scripts/tct_dqwebdisplay.sh
####
# scripts/tct_dqutil.py
Utility script used by: scripts/tct_dqwebdisplay.sh
Specifically, used for interpreting the dqwebdisplay configuration, eg Tier0ChainTests.TCTDQWebDisplayCosmics
####
# scripts/tct_fixhanrootnames.py
Utility script used by: scripts/tct_dqwebdisplay.sh
Specifically, used for renaming produced han root files.
####
# scripts/tct_tagupload.sh
Script for testing of uploading tag files to db.
(In tct, called after AODtoTAG_trf.py command.)
Usage:
tct_tagupload.sh myTag.pool.root
####
# scripts/tct_dqupdatereferences.sh
Script to create new han config files based on old han config files and new han root files.
Usage:
> tct_dqupdatereferences.sh cosmics_minutes30.latest.hcfg run__minutes30_1_han.root new_cosmics_minutes30.latest.hcfg 91890
where :
- cosmics_minutes30.latest.hcfg is input han config file
- run__minutes30_1_han.root is the han root file
- new_cosmics_minutes30.latest.hcfg is the new han config file
- 91890 is the runnumber the han root file corresponds with.
####
# scripts/tct_changehanreferences.py
Utility script called by scripts/tct_dqupdatereferences.sh
Does the actual replacing of histogram references and creates the new han config file.
####
#scripts/tct_finishedMail.py
Send a mail when finished. Usage:
> scripts/tct_finishedMail.py email@cern.ch messagebody
####
# scripts/tct_runAll.sh
Script for runnign the entire tct chain in your shell.
Usage:
> tct_runAll.sh 2 IDCosmic 1 100 /castor/cern.ch/grid/atlas/DAQ/2008/0096544
to run two reco jobs, 1 bs collection each and over 100 events, over
IDCosmic collections from the castor directory
/castor/cern.ch/grid/atlas/DAQ/2008/0096544
python/ directory:
------------------
####
# python/CastorFileTool.py
Utility class used by scripts/tct_generate_copyscript.py
####
# python/LocalDQWebDisplayCosmics.py
# python/TCTDQWebDisplayCosmics.py
Two possible DQ webdisplay configuration settings. Local is the default, used for local running. TCT is run by the rtt.
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
from DataQualityUtils.DQWebDisplayConfig import DQWebDisplayConfig
dqconfig = DQWebDisplayConfig()
dqconfig.config = "TCTYesterdaysHAN"
#dqconfig.config = "TCTDQWebDisplayCosmics"
## /afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/Cosmics/
#dqconfig.hcfg_min30 = "/afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/Cosmics/cosmics_minutes30.1.9.hcfg"
#dqconfig.hcfg = "/afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/Cosmics/cosmics_run.1.80.hcfg"
#dqconfig.hcfg_min10 = "/afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/Cosmics/cosmics_minutes10.1.12.hcfg"
dqconfig.hcfg_min30 = "cosmics_prevminutes30.latest.hcfg"
dqconfig.hcfg = "cosmics_prevrun.latest.hcfg"
dqconfig.hcfg_min10 = "cosmics_prevminutes10.latest.hcfg"
dqconfig.hanResultsDir = "/afs/cern.ch/atlas/offline/external/FullChainTest/tier0/dqm/han_results"
dqconfig.htmlDir = "/afs/cern.ch/atlas/offline/external/FullChainTest/tier0/dqm/wwwtemp"
dqconfig.htmlWeb = "http://atlas-project-fullchaintest.web.cern.ch/atlas-project-FullChainTest/tier0/dqm/wwwtemp"
dqconfig.runlist = "runlist_TCT.xml"
dqconfig.indexFile = "results_TCT.html"
dqconfig.lockFile = ""
dqconfig.dbConnection = "sqlite://;schema=MyCOOL_histo.db;dbname=COMP200"
dqconfig.dqmfOfl = "/GLOBAL/DETSTATUS/DQMFOFL"
dqconfig.dbConnectionHisto = "sqlite://;schema=MyCOOL_histo.db;dbname=COMP200"
dqconfig.dqmfOflHisto = "/GLOBAL/DETSTATUS/DQMFOFLH"
dqconfig.dbTagName = "DetStatusDQMFOFLH-TCT"
dqconfig.doHandi = True
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
from DataQualityUtils.DQWebDisplayConfig import DQWebDisplayConfig
dqconfig = DQWebDisplayConfig()
dqconfig.config = "LocalDQWebDisplayCosmics"
## /afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/Cosmics/
#dqconfig.hcfg_min30 = "/afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/Cosmics/cosmics_minutes30.1.9.hcfg"
#dqconfig.hcfg = "/afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/Cosmics/cosmics_run.1.80.hcfg"
#dqconfig.hcfg_min10 = "/afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/Cosmics/cosmics_minutes10.1.12.hcfg"
dqconfig.hcfg_min30 = "cosmics_minutes30.latest.hcfg"
dqconfig.hcfg = "cosmics_run.latest.hcfg"
dqconfig.hcfg_min10 = "cosmics_minutes10.latest.hcfg"
#dqconfig.hanResultsDir = "/afs/cern.ch/atlas/offline/external/FullChainTest/tier0/dqm/han_results"
#dqconfig.htmlDir = "/afs/cern.ch/atlas/offline/external/FullChainTest/tier0/dqm/wwwtemp"
dqconfig.hanResultsDir = "dqm/han_results"
dqconfig.htmlDir = "dqm/wwwtemp"
dqconfig.htmlWeb = "http://atlas-project-fullchaintest.web.cern.ch/atlas-project-FullChainTest/tier0/dqm/wwwtemp"
dqconfig.runlist = "runlist_TCT.xml"
dqconfig.indexFile = "results_TCT.html"
dqconfig.lockFile = ""
dqconfig.dbConnection = "sqlite://;schema=MyCOOL_histo.db;dbname=COMP200"
dqconfig.dqmfOfl = "/GLOBAL/DETSTATUS/DQMFOFL"
#dqconfig.dbConnectionHisto = "sqlite://;schema=MyCOOL_histo.db;dbname=COMP200"
#dqconfig.dqmfOflHisto = "/GLOBAL/DETSTATUS/DQMFOFLH"
dqconfig.dbTagName = "DetStatusDQMFOFLH-TCT"
dqconfig.doHandi = True
# Copyright (C) 2002-2020 CERN for the benefit of the ATLAS collaboration
from DataQualityConfigurations.data09_900GeV import dqconfig
dqconfig.config = "TCTReleaseHAN"
dqconfig.hcfg = "/afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/tct_reference_run.hcfg"
dqconfig.hcfg_min10 = "/afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/tct_reference_minutes10.hcfg"
dqconfig.hcfg_min30 = "/afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/tct_reference_minutes30.hcfg"
dqconfig.hanResultsDir = "/afs/cern.ch/atlas/offline/external/FullChainTest/tier0/dqm/han_results"
dqconfig.htmlDir = "/afs/cern.ch/atlas/offline/external/FullChainTest/tier0/dqm/wwwtemp"
dqconfig.htmlWeb = "http://atlas-project-fullchaintest.web.cern.ch/atlas-project-FullChainTest/tier0/dqm/wwwtemp"
dqconfig.runlist = "runlist_TCT.xml"
dqconfig.indexFile = "results_TCT.html"
dqconfig.lockFile = ""
dqconfig.dbConnection = "sqlite://;schema=MyCOOL_histo.db;dbname=COMP200"
dqconfig.dqmfOfl = "/GLOBAL/DETSTATUS/DQMFOFL"
dqconfig.dbConnectionHisto = "sqlite://;schema=MyCOOL_histo.db;dbname=COMP200"
dqconfig.dqmfOflHisto = "/GLOBAL/DETSTATUS/DQMFOFLH"
dqconfig.dbTagName = "DetStatusDQMFOFLH-TCT"
dqconfig.doHandi = True
dqconfig.auth = ""
dqconfig.server = ""
dqconfig.histogramCache = ""
dqconfig.webHandoffDir = ""
# Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
from DataQualityUtils.DQWebDisplayConfig import DQWebDisplayConfig
dqconfig = DQWebDisplayConfig()
dqconfig.config = "TCTStaticHAN"
#dqconfig.config = "TCTDQWebDisplayCosmics"
## /afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/Cosmics/
#dqconfig.hcfg_min30 = "/afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/Cosmics/cosmics_minutes30.1.9.hcfg"
#dqconfig.hcfg = "/afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/Cosmics/cosmics_run.1.80.hcfg"
#dqconfig.hcfg_min10 = "/afs/cern.ch/user/a/atlasdqm/dqmdisk/tier0/han_config/Cosmics/cosmics_minutes10.1.12.hcfg"
dqconfig.hcfg_min30 = "cosmics_minutes30.latest.hcfg"
dqconfig.hcfg = "cosmics_run.latest.hcfg"
dqconfig.hcfg_min10 = "cosmics_minutes10.latest.hcfg"
dqconfig.hanResultsDir = "/afs/cern.ch/atlas/offline/external/FullChainTest/tier0/dqm/han_results"
dqconfig.htmlDir = "/afs/cern.ch/atlas/offline/external/FullChainTest/tier0/dqm/wwwtemp"
dqconfig.htmlWeb = "http://atlas-project-fullchaintest.web.cern.ch/atlas-project-FullChainTest/tier0/dqm/wwwtemp"
dqconfig.runlist = "runlist_TCT.xml"
dqconfig.indexFile = "results_TCT.html"
dqconfig.lockFile = ""
dqconfig.dbConnection = "sqlite://;schema=MyCOOL_histo.db;dbname=COMP200"
dqconfig.dqmfOfl = "/GLOBAL/DETSTATUS/DQMFOFL"
dqconfig.dbConnectionHisto = "sqlite://;schema=MyCOOL_histo.db;dbname=COMP200"
dqconfig.dqmfOflHisto = "/GLOBAL/DETSTATUS/DQMFOFLH"
dqconfig.dbTagName = "DetStatusDQMFOFLH-TCT"
dqconfig.doHandi = True
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment