ATLAS Offline Software
Loading...
Searching...
No Matches
WriteCaloSwCorrections.py
Go to the documentation of this file.
1#!/usr/bin/env athena.py
2# Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration.
3#
4# File: CaloClusterCorrection/python/WriteCaloSwCorrections.py
5# Author: scott snyder <snyder@bnl.gov>
6# Date: May 2024, from old config version
7# Purpose: Write cluster correction constants to pool+cool.
8#
9
10
11CALOCORR_POOLFILE = 'CaloSwCorrections.pool.root'
12CALOCORR_COOLFILE = 'swcool.db'
13CaloSwCorrKeys = ['ele55', 'ele35', 'ele37',
14 'gam55', 'gam35', 'gam37']
15
16
17from AthenaConfiguration.MainServicesConfig import \
18 MainServicesCfg
19from CaloClusterCorrection.WriteCorrectionsConfig import \
20 WriteCorrectionsFlags, WriteCorrectionsCfg
21
22flags = WriteCorrectionsFlags (CALOCORR_COOLFILE)
23cfg = MainServicesCfg (flags)
24
25
26from CaloClusterCorrection.CaloSwCorrections import CaloSwCorrections
27from CaloClusterCorrection.constants import CALOCORR_SW
28(corr_output_list, tag_list, ca) =\
29 CaloSwCorrections.config_for_pool (flags,
30 CaloSwCorrKeys,
31 CALOCORR_SW)
32cfg.merge (ca)
33
34cfg.merge (WriteCorrectionsCfg (flags, CALOCORR_POOLFILE,
35 corr_output_list, tag_list))
36
37
38sc = cfg.run (flags.Exec.MaxEvents)
39import sys
40sys.exit (sc.isFailure())