ATLAS Offline Software
TRTCalib_calib_tf.py
Go to the documentation of this file.
1 #!/usr/bin/env python
2 
3 # Copyright (C) 2002-2024 CERN for the benefit of the ATLAS collaboration
4 
5 __doc__ = """JobTransform to run TRT R-t Calibration jobs"""
6 
7 
8 import sys
9 from PyJobTransforms.transform import transform
10 from PyJobTransforms.trfExe import athenaExecutor
11 from PyJobTransforms.trfArgs import addAthenaArguments, addDetectorArguments
12 import PyJobTransforms.trfArgClasses as trfArgClasses
13 
14 if __name__ == '__main__':
15 
16  executorSet = set()
17  executorSet.add(athenaExecutor(name = 'TRTCalibCalib',
18  skeletonCA='TRT_CalibAlgs.TRTCalib_calib_Skeleton',inData = ['TAR'], outData = ['TAR_CALIB']))
19 
20  trf = transform(executor = executorSet)
21  addAthenaArguments(trf.parser)
22  addDetectorArguments(trf.parser)
23 
24  # Use arggroup to get these arguments in their own sub-section (of --help)
25  trf.parser.defineArgGroup('TRTCalib_calib_tf', 'TRT r-t calibrator transform')
26 
27  # Input file!
28  trf.parser.add_argument('--inputTARFile',
29  type=trfArgClasses.argFactory(trfArgClasses.argBZ2File, io='input'),
30  help='Compressed input data from TRTCalibratorMgr', group='TRTCalib_calib_tf')
31 
32  # OutputFile name
33  trf.parser.add_argument('--outputTAR_CALIBFile',
34  type=trfArgClasses.argFactory(trfArgClasses.argBZ2File, io='output'),
35  help='Output TRT calib file', group='TRTCalib_calib_tf')
36 
37  # Add here the Caltag/piecetoken!
38  trf.parser.add_argument('--piecetoken', type=trfArgClasses.argFactory(trfArgClasses.argString),
39  help='Detector part to be calibrated',default=trfArgClasses.argString('') ,group='TRTCalib_calib_tf')
40 
41  trf.parser.add_argument('--project', type=trfArgClasses.argFactory(trfArgClasses.argString),
42  help='project name. E.g.: data24_13p6TeV',default=trfArgClasses.argString('') ,group='TRTCalib_calib_tf')
43 
44  trf.parser.add_argument('--runnr', type=trfArgClasses.argFactory(trfArgClasses.argString),
45  help='run number. E.g.: 00480407',default=trfArgClasses.argString('') ,group='TRTCalib_calib_tf')
46 
47  trf.parser.add_argument('--stream', type=trfArgClasses.argFactory(trfArgClasses.argString),
48  help='stream. E.g.: express_express',default=trfArgClasses.argString('') ,group='TRTCalib_calib_tf')
49 
50  trf.parser.add_argument('--rawfile', type=trfArgClasses.argFactory(trfArgClasses.argString),
51  help='rawfile only used for testing purposes',default=trfArgClasses.argString('') ,group='TRTCalib_calib_tf')
52 
53  trf.parseCmdLineArgs(sys.argv[1:])
54 
55  trf.execute()
56  trf.generateReport()
57  sys.exit(trf.exitCode)
58 
59 
python.trfArgs.addDetectorArguments
def addDetectorArguments(parser)
Options related to the setup of the ATLAS detector (used in simulation and digitisation as well as re...
Definition: trfArgs.py:229
PyJobTransforms.trfArgClasses
Transform argument class definitions.
python.trfArgs.addAthenaArguments
def addAthenaArguments(parser, maxEventsDefaultSubstep='first', addValgrind=True, addPerfMon=True, addVTune=True)
Options related to running athena in general TODO: Some way to mask certain options (perExec,...
Definition: trfArgs.py:59
Amg::transform
Amg::Vector3D transform(Amg::Vector3D &v, Amg::Transform3D &tr)
Transform a point from a Trasformation3D.
Definition: GeoPrimitivesHelpers.h:156
CxxUtils::set
constexpr std::enable_if_t< is_bitmask_v< E >, E & > set(E &lhs, E rhs)
Convenience function to set bits in a class enum bitmask.
Definition: bitmask.h:232
PyJobTransforms.trfExe
Transform execution functions.
PyJobTransforms.transform
Main package for new style ATLAS job transforms.