ATLAS Offline Software
Functions
FPGATrackSimMapConfig Namespace Reference

Functions

def findFileWithTest (datapath, filename)
 
def getRegionIndex (map_tag)
 
def getRegionName (map_tag)
 
def getSampleType (map_tag)
 
def getWithPU (map_tag)
 
def getNSubregions (tag)
 

Function Documentation

◆ findFileWithTest()

def FPGATrackSimMapConfig.findFileWithTest (   datapath,
  filename 
)

Definition at line 8 of file FPGATrackSimMapConfig.py.

8 def findFileWithTest(datapath,filename):
9  retv = findFile(datapath,filename)
10  if retv is None:
11  msg.info(datapath)
12  raise OSError(2, "Couldn't find file", filename)
13  return retv
14 

◆ getNSubregions()

def FPGATrackSimMapConfig.getNSubregions (   tag)

Definition at line 34 of file FPGATrackSimMapConfig.py.

34 def getNSubregions(tag):
35  formats = {
36  'region': getRegionIndex(tag),
37  'regionName': getRegionName(tag),
38  }
39 
40  if tag['formatted']:
41  path = tag['subrmap'].format(**formats)
42  else:
43  path = tag['subrmap']
44  path = findFile(os.environ['DATAPATH'], path)
45 
46  with open(path, 'r') as f:
47  fields = f.readline().split()
48  assert(fields[0] == 'towers')
49  return int(fields[1])

◆ getRegionIndex()

def FPGATrackSimMapConfig.getRegionIndex (   map_tag)
Note the region member of the tag is a string

Definition at line 15 of file FPGATrackSimMapConfig.py.

15 def getRegionIndex(map_tag):
16  '''
17  Note the region member of the tag is a string
18  '''
19  try:
20  return int(map_tag['region'])
21  except ValueError:
22  return map_tag['regionNames'].index(map_tag['region'])
23 
24 

◆ getRegionName()

def FPGATrackSimMapConfig.getRegionName (   map_tag)

Definition at line 25 of file FPGATrackSimMapConfig.py.

25 def getRegionName(map_tag):
26  return map_tag['regionNames'][getRegionIndex(map_tag)]
27 

◆ getSampleType()

def FPGATrackSimMapConfig.getSampleType (   map_tag)

Definition at line 28 of file FPGATrackSimMapConfig.py.

28 def getSampleType(map_tag):
29  return map_tag['sampleType']
30 

◆ getWithPU()

def FPGATrackSimMapConfig.getWithPU (   map_tag)

Definition at line 31 of file FPGATrackSimMapConfig.py.

31 def getWithPU(map_tag):
32  return map_tag['withPU']
33 
vtune_athena.format
format
Definition: vtune_athena.py:14
CaloCellPos2Ntuple.int
int
Definition: CaloCellPos2Ntuple.py:24
index
Definition: index.py:1
FPGATrackSimMapConfig.getSampleType
def getSampleType(map_tag)
Definition: FPGATrackSimMapConfig.py:28
FPGATrackSimMapConfig.getRegionName
def getRegionName(map_tag)
Definition: FPGATrackSimMapConfig.py:25
FPGATrackSimMapConfig.getRegionIndex
def getRegionIndex(map_tag)
Definition: FPGATrackSimMapConfig.py:15
FPGATrackSimMapConfig.findFileWithTest
def findFileWithTest(datapath, filename)
Definition: FPGATrackSimMapConfig.py:8
python.trfUtils.findFile
def findFile(pathvar, fname)
Find a named file along a colon separated PATH type variable.
Definition: trfUtils.py:37
Trk::open
@ open
Definition: BinningType.h:40
FPGATrackSimMapConfig.getWithPU
def getWithPU(map_tag)
Definition: FPGATrackSimMapConfig.py:31
Trk::split
@ split
Definition: LayerMaterialProperties.h:38
FPGATrackSimMapConfig.getNSubregions
def getNSubregions(tag)
Definition: FPGATrackSimMapConfig.py:34