ATLAS Offline Software
MenuComponentsNaming.py
Go to the documentation of this file.
1 # Copyright (C) 2002-2019 CERN for the benefit of the ATLAS collaboration
2 
3 
4 
5 class CFNaming(object):
6  """Static Class to collect all string manipulations on CF object names """
7 
8  RECO_POSTFIX = "_reco"
9  CONTENT_POSTFIX = "_content"
10  FILTER_POSTFIX = "_filter"
11 
12  @staticmethod
13  def stepName(nstep):
14  return "Step%i"%(nstep+1)
15 
16  @staticmethod
17  def menuSequenceName(Hypo):
18  return "S" + Hypo
19 
20  @staticmethod
21  def filterName(ChainStepName):
22  return "F" + ChainStepName
23 
24  @staticmethod
25  def simplifyOutName(suffix, name):
26  """Removes all HLT_decisions except the front one + additiona cleaning of common words"""
27  return suffix + name.replace("HLTNav_", "").replace("Trig", "").replace("Alg", "")
28 
29 
30  @staticmethod
31  def filterOutName(filter_name, filterIn):
32  return CFNaming.simplifyOutName("HLTNav_", "HLTNav_" + filter_name + "__" + filterIn)
33 
34  @staticmethod
35  def inputMakerOutName(IMname):
36  return CFNaming.simplifyOutName("_HLTNav_", "HLTNav_" + IMname)
37 
38  @staticmethod
39  def hypoAlgOutName(HypoName):
40  return CFNaming.simplifyOutName("_HLTNav_", "HLTNav_" + HypoName)
41 
42  @staticmethod
43  def comboHypoName(HypoName):
44  return "ComboHypo_" + HypoName
45 
46  @staticmethod
47  def comboSequenceCopyName(SequenceName, ncopy, StepName):
48  if type(SequenceName) is list:
49  sequence = []
50  for sq in SequenceName:
51  sequence.append("%s%d_for_%s"%(sq, ncopy, StepName))
52  return sequence
53  else:
54  return "%s%d_for_%s"%(SequenceName, ncopy, StepName)
55 
56  @staticmethod
57  def comboHypoCopyName(HypoName,ncopy,StepName):
58  return "%s%d_for_%s"%(HypoName,ncopy,StepName)
59 
60  @staticmethod
61  def comboHypoOutputName(comboName, inputName):
62  return CFNaming.simplifyOutName("_HLTNav_", "HLTNav_" + comboName+"_"+ str(inputName))
63 
64  @staticmethod
65  def stepRecoNodeName(HLTNodeName, StepCFName):
66  return HLTNodeName + "_" + StepCFName
67 
68  @staticmethod
69  def stepSummaryName(StepCFName):
70  return "TriggerSummary" + StepCFName
71 
72  @staticmethod
73  def stepRecoName(stepName):
74  return stepName + CFNaming.RECO_POSTFIX
75 
76  @staticmethod
77  def stepContentName(stepName):
78  return stepName + CFNaming.CONTENT_POSTFIX
replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition: hcg.cxx:307
MenuComponentsNaming.CFNaming.stepRecoNodeName
def stepRecoNodeName(HLTNodeName, StepCFName)
Definition: MenuComponentsNaming.py:65
MenuComponentsNaming.CFNaming.comboHypoOutputName
def comboHypoOutputName(comboName, inputName)
Definition: MenuComponentsNaming.py:61
MenuComponentsNaming.CFNaming.simplifyOutName
def simplifyOutName(suffix, name)
Definition: MenuComponentsNaming.py:25
MenuComponentsNaming.CFNaming
Definition: MenuComponentsNaming.py:5
MenuComponentsNaming.CFNaming.hypoAlgOutName
def hypoAlgOutName(HypoName)
Definition: MenuComponentsNaming.py:39
MenuComponentsNaming.CFNaming.filterName
def filterName(ChainStepName)
Definition: MenuComponentsNaming.py:21
MenuComponentsNaming.CFNaming.comboSequenceCopyName
def comboSequenceCopyName(SequenceName, ncopy, StepName)
Definition: MenuComponentsNaming.py:47
MenuComponentsNaming.CFNaming.stepSummaryName
def stepSummaryName(StepCFName)
Definition: MenuComponentsNaming.py:69
MenuComponentsNaming.CFNaming.menuSequenceName
def menuSequenceName(Hypo)
Definition: MenuComponentsNaming.py:17
MenuComponentsNaming.CFNaming.filterOutName
def filterOutName(filter_name, filterIn)
Definition: MenuComponentsNaming.py:31
MenuComponentsNaming.CFNaming.stepContentName
def stepContentName(stepName)
Definition: MenuComponentsNaming.py:77
MenuComponentsNaming.CFNaming.stepRecoName
def stepRecoName(stepName)
Definition: MenuComponentsNaming.py:73
MenuComponentsNaming.CFNaming.comboHypoName
def comboHypoName(HypoName)
Definition: MenuComponentsNaming.py:43
MenuComponentsNaming.CFNaming.stepName
def stepName(nstep)
Definition: MenuComponentsNaming.py:13
MenuComponentsNaming.CFNaming.inputMakerOutName
def inputMakerOutName(IMname)
Definition: MenuComponentsNaming.py:35
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
MenuComponentsNaming.CFNaming.comboHypoCopyName
def comboHypoCopyName(HypoName, ncopy, StepName)
Definition: MenuComponentsNaming.py:57
pickleTool.object
object
Definition: pickleTool.py:30
str
Definition: BTagTrackIpAccessor.cxx:11