ATLAS Offline Software
Loading...
Searching...
No Matches
TileRawDataReadTestConfig Namespace Reference

Classes

class  Finalizer

Functions

 findAbsPath (path)
 getRefPath (directory)
 getRefAndDumpDirectories (flags, directory)
 getInputFile (fileName)
 TileDigitsReadTestCfg (flags, refDirectory, dumpDirectory, **kwargs)
 TileRawChannelReadTestCfg (flags, refDirectory, dumpDirectory, **kwargs)
 TileLaserObjectReadTestCfg (flags, refDirectory, dumpDirectory, **kwargs)
 TileL2ReadTestCfg (flags, refDirectory, dumpDirectory, **kwargs)
 TileBeamElemReadTestCfg (flags, refDirectory, dumpDirectory, **kwargs)
 TileMuRcvReadTestCfg (flags, refDirectory, dumpDirectory, **kwargs)

Variables

 flags = initConfigFlags()
 parser = flags.getArgumentParser()
 tests_group = parser.add_argument_group('Test of reading Tile raw data from BS')
 tests = tests_group.add_mutually_exclusive_group()
 action
 help
 dest
 args
 _
 Files
 AtlasVersion
 MaxEvents
 RunType
 DatabaseInstance
 cfg = MainServicesCfg(flags)
 dumpDirectory = None
 refDirectory
 withDetails
 sc = cfg.run()

Function Documentation

◆ findAbsPath()

TileRawDataReadTestConfig.findAbsPath ( path)

Definition at line 13 of file TileRawDataReadTestConfig.py.

13def findAbsPath(path):
14 refPaths = [os.environ.get('ATLAS_REFERENCE_DATA', None),
15 '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art',
16 '/afs/cern.ch/atlas/maxidisk/d33/referencefiles']
17 for refPath in refPaths:
18 if refPath:
19 absPath = os.path.join(refPath, path)
20 if os.path.exists(absPath):
21 return absPath
22
23 from AthenaCommon.Logging import logging
24 msg = logging.getLogger('findAbsPath')
25 msg.error(f'Cannot find abs path: {path}')
26
27 return None
28
29

◆ getInputFile()

TileRawDataReadTestConfig.getInputFile ( fileName)
Find input file. 

Definition at line 48 of file TileRawDataReadTestConfig.py.

48def getInputFile(fileName):
49 """ Find input file. """
50 filePath = os.environ.get('ATLAS_REFERENCE_DATA',
51 '/cvmfs/atlas-nightlies.cern.ch/repo/data/data-art/Tier0ChainTests')
52 inputFile = os.path.join(filePath, fileName)
53 if not os.path.exists(inputFile):
54 inputFile = getRefPath(fileName)
55 return inputFile
56
57

◆ getRefAndDumpDirectories()

TileRawDataReadTestConfig.getRefAndDumpDirectories ( flags,
directory )

Definition at line 42 of file TileRawDataReadTestConfig.py.

42def getRefAndDumpDirectories(flags, directory):
43 refDirectory = getRefPath(f'{directory}')
44 dumpDirectory = f'{directory}-{flags.Concurrency.NumThreads}'
45 return refDirectory, dumpDirectory
46
47

◆ getRefPath()

TileRawDataReadTestConfig.getRefPath ( directory)
Find reference directory.

Definition at line 30 of file TileRawDataReadTestConfig.py.

30def getRefPath(directory):
31 """ Find reference directory."""
32 referenceTag = os.environ.get('ATLAS_REFERENCE_TAG', 'TileByteStream-02-00-00')
33 directoryPath = find_datafile(os.path.join('TileByteStream', referenceTag))
34 refDirectory = None
35 if directoryPath:
36 refDirectory = os.path.join(directoryPath, directory)
37 if not refDirectory or not os.path.exists(refDirectory):
38 refDirectory = findAbsPath(os.path.join('TileByteStream', referenceTag, directory))
39 return refDirectory
40
41

◆ TileBeamElemReadTestCfg()

TileRawDataReadTestConfig.TileBeamElemReadTestCfg ( flags,
refDirectory,
dumpDirectory,
** kwargs )
Configure test of reading the Tile beam elements container from  BS 

Definition at line 144 of file TileRawDataReadTestConfig.py.

144def TileBeamElemReadTestCfg(flags, refDirectory, dumpDirectory, **kwargs):
145 """ Configure test of reading the Tile beam elements container from BS """
146
147 from TileByteStream.TileByteStreamConfig import TileRawDataReadingCfg
148 cfg = TileRawDataReadingCfg(flags, readDigits=False, readRawChannel=False, readMuRcv=False, readBeamElem=True)
149
150 TileBeamElemDumper = CompFactory.TileBeamElemDumper
151 cfg.addEventAlgo(TileBeamElemDumper('TileBeamElemCntDumper',
152 TileBeamElemContainer='TileBeamElemCnt',
153 Prefix=f'{dumpDirectory}/'))
154
155 cfg.addEventAlgo(Finalizer('TileBeamElemCompareAlg', refDirectory=refDirectory, dumpDirectory=dumpDirectory))
156 return cfg
157
158
Dump a TileBeamElemContainer to a text file.

◆ TileDigitsReadTestCfg()

TileRawDataReadTestConfig.TileDigitsReadTestCfg ( flags,
refDirectory,
dumpDirectory,
** kwargs )
Configure test of reading the Tile digits container from  BS 

Definition at line 76 of file TileRawDataReadTestConfig.py.

76def TileDigitsReadTestCfg(flags, refDirectory, dumpDirectory, **kwargs):
77 """ Configure test of reading the Tile digits container from BS """
78
79 from TileByteStream.TileByteStreamConfig import TileRawDataReadingCfg
80 cfg = TileRawDataReadingCfg(flags, readDigits=True, readRawChannel=False, readMuRcv=False, readMuRcvDigits=True)
81
82 TileDigitsDumper = CompFactory.TileDigitsDumper
83 cfg.addEventAlgo(TileDigitsDumper('TileDigitsCntDumper',
84 TileDigitsContainer='TileDigitsCnt',
85 Prefix=f'{dumpDirectory}/'))
86
87 cfg.addEventAlgo(TileDigitsDumper('MuRcvDigitsCntDumper',
88 TileDigitsContainer='MuRcvDigitsCnt',
89 Prefix=f'{dumpDirectory}/'))
90
91 cfg.addEventAlgo(Finalizer('TileDigitsCompareAlg', refDirectory=refDirectory, dumpDirectory=dumpDirectory))
92 return cfg
93
94
Dump a TileDigitsContainer to a text file.

◆ TileL2ReadTestCfg()

TileRawDataReadTestConfig.TileL2ReadTestCfg ( flags,
refDirectory,
dumpDirectory,
** kwargs )
Configure test of reading the Tile L2 container from  BS 

Definition at line 129 of file TileRawDataReadTestConfig.py.

129def TileL2ReadTestCfg(flags, refDirectory, dumpDirectory, **kwargs):
130 """ Configure test of reading the Tile L2 container from BS """
131
132 from TileByteStream.TileByteStreamConfig import TileRawDataReadingCfg
133 cfg = TileRawDataReadingCfg(flags, readDigits=False, readRawChannel=False, readMuRcv=False, readL2=True)
134
135 TileL2Dumper = CompFactory.TileL2Dumper
136 cfg.addEventAlgo(TileL2Dumper('TileL2CntDumper',
137 TileL2Container='TileL2Cnt',
138 Prefix=f'{dumpDirectory}/'))
139
140 cfg.addEventAlgo(Finalizer('TileL2CompareAlg', refDirectory=refDirectory, dumpDirectory=dumpDirectory))
141 return cfg
142
143
Dump a TileL2Container to a text file.

◆ TileLaserObjectReadTestCfg()

TileRawDataReadTestConfig.TileLaserObjectReadTestCfg ( flags,
refDirectory,
dumpDirectory,
** kwargs )
Configure test of reading the Tile laser object from  BS 

Definition at line 114 of file TileRawDataReadTestConfig.py.

114def TileLaserObjectReadTestCfg(flags, refDirectory, dumpDirectory, **kwargs):
115 """ Configure test of reading the Tile laser object from BS """
116
117 from TileByteStream.TileByteStreamConfig import TileRawDataReadingCfg
118 cfg = TileRawDataReadingCfg(flags, readDigits=False, readRawChannel=False, readMuRcv=False, readLaserObj=True)
119
120 TileLaserObjectDumper = CompFactory.TileLaserObjectDumper
121 cfg.addEventAlgo(TileLaserObjectDumper('TileLaserObjectDumper',
122 TileLaserObject='TileLaserObj',
123 Prefix=f'{dumpDirectory}/'))
124
125 cfg.addEventAlgo(Finalizer('TileLaserObjCompareAlg', refDirectory=refDirectory, dumpDirectory=dumpDirectory))
126 return cfg
127
128
Dump a TileLaserObject to a text file.

◆ TileMuRcvReadTestCfg()

TileRawDataReadTestConfig.TileMuRcvReadTestCfg ( flags,
refDirectory,
dumpDirectory,
** kwargs )
Configure test of reading the Tile muon receiver container from  BS 

Definition at line 159 of file TileRawDataReadTestConfig.py.

159def TileMuRcvReadTestCfg(flags, refDirectory, dumpDirectory, **kwargs):
160 """ Configure test of reading the Tile muon receiver container from BS """
161
162 from TileByteStream.TileByteStreamConfig import TileRawDataReadingCfg
163 cfg = TileRawDataReadingCfg(flags, readDigits=False, readRawChannel=False, readMuRcv=True)
164
165 TileMuonReceiverDumper = CompFactory.TileMuonReceiverDumper
166 cfg.addEventAlgo(TileMuonReceiverDumper('TileMuonReceiverDumper',
167 TileMuonReceiverContainer='TileMuRcvCnt',
168 Prefix=f'{dumpDirectory}/'))
169
170 cfg.addEventAlgo(Finalizer('TileMuRcvCompareAlg', refDirectory=refDirectory, dumpDirectory=dumpDirectory))
171 return cfg
172
173
Dump a TileMuonReceiverContainer to a text file.

◆ TileRawChannelReadTestCfg()

TileRawDataReadTestConfig.TileRawChannelReadTestCfg ( flags,
refDirectory,
dumpDirectory,
** kwargs )
Configure test of reading the Tile raw channel container from  BS 

Definition at line 95 of file TileRawDataReadTestConfig.py.

95def TileRawChannelReadTestCfg(flags, refDirectory, dumpDirectory, **kwargs):
96 """ Configure test of reading the Tile raw channel container from BS """
97
98 from TileByteStream.TileByteStreamConfig import TileRawDataReadingCfg
99 cfg = TileRawDataReadingCfg(flags, readDigits=False, readRawChannel=True, readMuRcv=False, readMuRcvRawCh=True)
100
101 TileRawChannelDumper = CompFactory.TileRawChannelDumper
102 cfg.addEventAlgo(TileRawChannelDumper('TileRawChannelCntDumper',
103 TileRawChannelContainer='TileRawChannelCnt',
104 Prefix=f'{dumpDirectory}/'))
105
106 cfg.addEventAlgo(TileRawChannelDumper('MuRcvRawChannelCntDumper',
107 TileRawChannelContainer='MuRcvRawChCnt',
108 Prefix=f'{dumpDirectory}/'))
109
110 cfg.addEventAlgo(Finalizer('TileRawChannelCompareAlg', refDirectory=refDirectory, dumpDirectory=dumpDirectory))
111 return cfg
112
113
Dump a TileRawChannelContainer to a text file.

Variable Documentation

◆ _

TileRawDataReadTestConfig._
protected

Definition at line 194 of file TileRawDataReadTestConfig.py.

◆ action

TileRawDataReadTestConfig.action

Definition at line 188 of file TileRawDataReadTestConfig.py.

◆ args

TileRawDataReadTestConfig.args

Definition at line 194 of file TileRawDataReadTestConfig.py.

◆ AtlasVersion

TileRawDataReadTestConfig.AtlasVersion

Definition at line 202 of file TileRawDataReadTestConfig.py.

◆ cfg

TileRawDataReadTestConfig.cfg = MainServicesCfg(flags)

Definition at line 215 of file TileRawDataReadTestConfig.py.

◆ DatabaseInstance

TileRawDataReadTestConfig.DatabaseInstance

Definition at line 209 of file TileRawDataReadTestConfig.py.

◆ dest

TileRawDataReadTestConfig.dest

Definition at line 191 of file TileRawDataReadTestConfig.py.

◆ dumpDirectory

TileRawDataReadTestConfig.dumpDirectory = None

Definition at line 217 of file TileRawDataReadTestConfig.py.

◆ Files

TileRawDataReadTestConfig.Files

Definition at line 201 of file TileRawDataReadTestConfig.py.

◆ flags

TileRawDataReadTestConfig.flags = initConfigFlags()

Definition at line 184 of file TileRawDataReadTestConfig.py.

◆ help

TileRawDataReadTestConfig.help

Definition at line 188 of file TileRawDataReadTestConfig.py.

◆ MaxEvents

TileRawDataReadTestConfig.MaxEvents

Definition at line 207 of file TileRawDataReadTestConfig.py.

◆ parser

TileRawDataReadTestConfig.parser = flags.getArgumentParser()

Definition at line 185 of file TileRawDataReadTestConfig.py.

◆ refDirectory

TileRawDataReadTestConfig.refDirectory

Definition at line 219 of file TileRawDataReadTestConfig.py.

◆ RunType

TileRawDataReadTestConfig.RunType

Definition at line 208 of file TileRawDataReadTestConfig.py.

◆ sc

TileRawDataReadTestConfig.sc = cfg.run()

Definition at line 243 of file TileRawDataReadTestConfig.py.

◆ tests

TileRawDataReadTestConfig.tests = tests_group.add_mutually_exclusive_group()

Definition at line 187 of file TileRawDataReadTestConfig.py.

◆ tests_group

TileRawDataReadTestConfig.tests_group = parser.add_argument_group('Test of reading Tile raw data from BS')

Definition at line 186 of file TileRawDataReadTestConfig.py.

◆ withDetails

TileRawDataReadTestConfig.withDetails

Definition at line 237 of file TileRawDataReadTestConfig.py.