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()

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 for refPath in refPaths:
17 if refPath:
18 absPath = os.path.join(refPath, path)
19 if os.path.exists(absPath):
20 return absPath
21
22 from AthenaCommon.Logging import logging
23 msg = logging.getLogger('findAbsPath')
24 msg.error(f'Cannot find abs path: {path}')
25
26 return None
27
28

◆ getInputFile()

getInputFile ( fileName)
Find input file. 

Definition at line 47 of file TileRawDataReadTestConfig.py.

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

◆ getRefAndDumpDirectories()

getRefAndDumpDirectories ( flags,
directory )

Definition at line 41 of file TileRawDataReadTestConfig.py.

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

◆ getRefPath()

getRefPath ( directory)
Find reference directory.

Definition at line 29 of file TileRawDataReadTestConfig.py.

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

◆ TileBeamElemReadTestCfg()

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

Definition at line 143 of file TileRawDataReadTestConfig.py.

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

◆ TileDigitsReadTestCfg()

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

Definition at line 75 of file TileRawDataReadTestConfig.py.

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

◆ TileL2ReadTestCfg()

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

Definition at line 128 of file TileRawDataReadTestConfig.py.

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

◆ TileLaserObjectReadTestCfg()

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

Definition at line 113 of file TileRawDataReadTestConfig.py.

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

◆ TileMuRcvReadTestCfg()

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

Definition at line 158 of file TileRawDataReadTestConfig.py.

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

◆ TileRawChannelReadTestCfg()

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

Definition at line 94 of file TileRawDataReadTestConfig.py.

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

Variable Documentation

◆ _

TileRawDataReadTestConfig._
protected

Definition at line 193 of file TileRawDataReadTestConfig.py.

◆ action

TileRawDataReadTestConfig.action

Definition at line 187 of file TileRawDataReadTestConfig.py.

◆ args

TileRawDataReadTestConfig.args

Definition at line 193 of file TileRawDataReadTestConfig.py.

◆ AtlasVersion

TileRawDataReadTestConfig.AtlasVersion

Definition at line 201 of file TileRawDataReadTestConfig.py.

◆ cfg

TileRawDataReadTestConfig.cfg = MainServicesCfg(flags)

Definition at line 214 of file TileRawDataReadTestConfig.py.

◆ DatabaseInstance

TileRawDataReadTestConfig.DatabaseInstance

Definition at line 208 of file TileRawDataReadTestConfig.py.

◆ dest

TileRawDataReadTestConfig.dest

Definition at line 190 of file TileRawDataReadTestConfig.py.

◆ dumpDirectory

TileRawDataReadTestConfig.dumpDirectory = None

Definition at line 216 of file TileRawDataReadTestConfig.py.

◆ Files

TileRawDataReadTestConfig.Files

Definition at line 200 of file TileRawDataReadTestConfig.py.

◆ flags

TileRawDataReadTestConfig.flags = initConfigFlags()

Definition at line 183 of file TileRawDataReadTestConfig.py.

◆ help

TileRawDataReadTestConfig.help

Definition at line 187 of file TileRawDataReadTestConfig.py.

◆ MaxEvents

TileRawDataReadTestConfig.MaxEvents

Definition at line 206 of file TileRawDataReadTestConfig.py.

◆ parser

TileRawDataReadTestConfig.parser = flags.getArgumentParser()

Definition at line 184 of file TileRawDataReadTestConfig.py.

◆ refDirectory

TileRawDataReadTestConfig.refDirectory

Definition at line 218 of file TileRawDataReadTestConfig.py.

◆ RunType

TileRawDataReadTestConfig.RunType

Definition at line 207 of file TileRawDataReadTestConfig.py.

◆ sc

TileRawDataReadTestConfig.sc = cfg.run()

Definition at line 242 of file TileRawDataReadTestConfig.py.

◆ tests

TileRawDataReadTestConfig.tests = tests_group.add_mutually_exclusive_group()

Definition at line 186 of file TileRawDataReadTestConfig.py.

◆ tests_group

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

Definition at line 185 of file TileRawDataReadTestConfig.py.

◆ withDetails

TileRawDataReadTestConfig.withDetails

Definition at line 236 of file TileRawDataReadTestConfig.py.