ATLAS Offline Software
Classes | Functions | Variables
TestUtils Namespace Reference

Classes

class  makeChainStep
 

Functions

def writeEmulationFiles (data)
 
def makeChain (flags, name, L1Thresholds, ChainSteps, Streams="physics:Main", Groups=["RATE:TestRateGroup", "BW:TestBW"])
 

Variables

 chainsCounter
 

Function Documentation

◆ makeChain()

def TestUtils.makeChain (   flags,
  name,
  L1Thresholds,
  ChainSteps,
  Streams = "physics:Main",
  Groups = ["RATE:TestRateGroup", "BW:TestBW"] 
)
In addition to making the chain object fills the flags that are used to generate MnuCOnfig JSON file

Definition at line 34 of file TestUtils.py.

34 def makeChain( flags, name, L1Thresholds, ChainSteps, Streams="physics:Main", Groups=["RATE:TestRateGroup", "BW:TestBW"]): """
35  In addition to making the chain object fills the flags that are used to generate MnuCOnfig JSON file
36  """
37  prop = ChainProp( name=name, l1SeedThresholds=L1Thresholds, groups=Groups )
38  chainDict = dictFromChainName( flags, prop )
39  global chainsCounter
40  chainDict["chainCounter"] = chainsCounter
41  chainsCounter += 1
42 
43  #set default chain prescale
44  chainDict['prescale'] = 1
45 
46  listOfChainDicts = splitChainDictInLegs(chainDict)
47  L1decisions = [ mapThresholdToL1DecisionCollection(stri) for stri in L1Thresholds]
48  # create the ChainSteps, with the chaindict
49  StepConfig = []
50  for step in ChainSteps:
51  StepConfig+=[ChainStep(step.name,
52  step.seq,
53  multiplicity=step.mult,
54  chainDicts=step.chainDicts if step.chainDicts else listOfChainDicts,
55  comboHypoCfg=step.comboHypoCfg,
56  comboToolConfs=step.comboToolConfs)]
57 
58  chainConfig = Chain( name=name, L1decisions=L1decisions, ChainSteps=StepConfig )
59  HLTMenuConfig.registerChain( chainDict )
60 
61  return chainConfig
62 

◆ writeEmulationFiles()

def TestUtils.writeEmulationFiles (   data)
Writes emulation files. key in the dict is a file name (+.dat), list which is value of each dict el is enetered into the file, one el. per line

Definition at line 12 of file TestUtils.py.

12 def writeEmulationFiles(data):
13  """Writes emulation files. key in the dict is a file name (+.dat), list which is value of each dict el is enetered into the file, one el. per line"""
14  for name, d in data.items():
15  with open(name+".dat", "w") as f:
16  for event in d:
17  f.write(event)
18  f.write("\n")
19 
20 

Variable Documentation

◆ chainsCounter

TestUtils.chainsCounter

Definition at line 32 of file TestUtils.py.

TestUtils.makeChain
def makeChain(flags, name, L1Thresholds, ChainSteps, Streams="physics:Main", Groups=["RATE:TestRateGroup", "BW:TestBW"])
Definition: TestUtils.py:34
ChainDictTools.splitChainDictInLegs
def splitChainDictInLegs(chainDict)
Definition: ChainDictTools.py:112
DictFromChainName.dictFromChainName
def dictFromChainName(flags, chainInfo)
Definition: DictFromChainName.py:626
TestUtils.writeEmulationFiles
def writeEmulationFiles(data)
Definition: TestUtils.py:12
Trk::open
@ open
Definition: BinningType.h:40
HLTSeedingConfig.mapThresholdToL1DecisionCollection
def mapThresholdToL1DecisionCollection(threshold)
Definition: HLTSeedingConfig.py:79