Loading [MathJax]/extensions/tex2jax.js
ATLAS Offline Software
All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Modules Pages
Public Member Functions | Public Attributes | List of all members
MenuComponents.InViewRecoCA Class Reference
Inheritance diagram for MenuComponents.InViewRecoCA:
Collaboration diagram for MenuComponents.InViewRecoCA:

Public Member Functions

def __init__ (self, name, viewMaker=None, isProbe=False, **viewMakerArgs)
 
def mergeReco (self, ca)
 
def addRecoAlgo (self, algo)
 
def inputMaker (self)
 

Public Attributes

 name
 
 viewMakerAlg
 
 viewsSeq
 

Detailed Description

Class to handle in-view reco, sets up the View maker if not provided and exposes InputMaker so that more inputs to it can be added in the process of assembling the menu 

Definition at line 874 of file MenuComponents.py.

Constructor & Destructor Documentation

◆ __init__()

def MenuComponents.InViewRecoCA.__init__ (   self,
  name,
  viewMaker = None,
  isProbe = False,
**  viewMakerArgs 
)

Definition at line 876 of file MenuComponents.py.

876  def __init__(self, name, viewMaker=None, isProbe=False, **viewMakerArgs):
877  super( InViewRecoCA, self ).__init__()
878  self.name = name +"_probe" if isProbe else name
879  def updateHandle(baseTool, probeTool, handleName):
880  if hasattr(baseTool, handleName) and getattr(baseTool, handleName).Path!="StoreGateSvc+":
881  setattr(probeTool, handleName, getattr(probeTool, handleName).Path + "_probe")
882 
883  if len(viewMakerArgs) != 0:
884  assert viewMaker is None, "No support for explicitly passed view maker and args for EventViewCreatorAlgorithm"
885 
886  if viewMaker:
887  assert len(viewMakerArgs) == 0, "No support for explicitly passed view maker and args for EventViewCreatorAlgorithm"
888  if isProbe:
889  self.viewMakerAlg = viewMaker.__class__(viewMaker.getName()+'_probe', **viewMaker._properties)
890  self.viewMakerAlg.Views = viewMaker.Views+'_probe'
891  roiTool = self.viewMakerAlg.RoITool.__class.__(self.viewMakerAlg.RoITool.getName()+'_probe', **self.viewMakerAlg.RoITool._properties)
892  log.debug(f"InViewRecoCA: Setting InputCachedViews on {self.viewMaker.getName()} to read decisions from tag leg {viewMaker.getName()}: {viewMaker.InputMakerOutputDecisions}")
893  self.viewMakerAlg.InputCachedViews = viewMaker.InputMakerOutputDecisions
894  updateHandle(viewMakerArgs['RoITool'], roiTool, "RoisWriteHandleKey")
895  if hasattr(viewMakerArgs['RoITool'], "RoiCreator"):
896  updateHandle(viewMakerArgs['RoITool'], roiTool, "ExtraPrefetchRoIsKey")
897  updateHandle(viewMakerArgs['RoITool'].RoiCreator, roiTool.RoiCreator, "RoisWriteHandleKey")
898 
899  self.viewMakerAlg.RoITool = roiTool
900  else:
901  self.viewMakerAlg = viewMaker
902  else:
903  assert 'name' not in viewMakerArgs, "The name of view maker is predefined by the name of sequence"
904  assert 'Views' not in viewMakerArgs, "The Views is predefined by the name of sequence"
905  assert 'ViewsNodeName' not in viewMakerArgs, "The ViewsNodeName is predefined by the name of sequence"
906  if 'RoITool' in viewMakerArgs:
907  roiTool = viewMakerArgs['RoITool']
908  else:
909  roiTool = CompFactory.ViewCreatorInitialROITool()
910 
911 
912  args = {'name': f'IM_{self.name}',
913  'ViewFallThrough' : True,
914  'RoIsLink' : 'initialRoI',
915  'RoITool' : roiTool,
916  'InViewRoIs' : f'{name}RoIs',
917  'Views' : f'{name}Views'+'_probe' if isProbe else f'{name}Views',
918  'ViewNodeName' : f'{name}InViews'+'_probe' if isProbe else f'{name}InViews',
919  'RequireParentView' : False,
920  'mergeUsingFeature' : False }
921  args.update(**viewMakerArgs)
922  self.viewMakerAlg = CompFactory.EventViewCreatorAlgorithm(**args)
923  if isProbe:
924  updateHandle(args['RoITool'], roiTool, "RoisWriteHandleKey")
925  if hasattr(args['RoITool'], "RoiCreator"):
926  updateHandle(args['RoITool'], roiTool, "ExtraPrefetchRoIsKey")
927  updateHandle(args['RoITool'].RoiCreator, roiTool.RoiCreator, "RoisWriteHandleKey")
928  self.viewsSeq = parOR( self.viewMakerAlg.ViewNodeName )
929  self.addSequence( self.viewsSeq )
930 

Member Function Documentation

◆ addRecoAlgo()

def MenuComponents.InViewRecoCA.addRecoAlgo (   self,
  algo 
)
Place algorithm in the correct reconstruction sequence 

Definition at line 936 of file MenuComponents.py.

936  def addRecoAlgo( self, algo ):
937  """ Place algorithm in the correct reconstruction sequence """
938  return self.addEventAlgo( algo, sequenceName=self.viewsSeq.name )
939 
940 

◆ inputMaker()

def MenuComponents.InViewRecoCA.inputMaker (   self)

Definition at line 941 of file MenuComponents.py.

941  def inputMaker( self ):
942  return self.viewMakerAlg
943 
944 

◆ mergeReco()

def MenuComponents.InViewRecoCA.mergeReco (   self,
  ca 
)
Merge CA moving reconstruction algorithms into the right sequence 

Definition at line 931 of file MenuComponents.py.

931  def mergeReco( self, ca ):
932  """ Merge CA moving reconstruction algorithms into the right sequence """
933  return self.merge( ca, sequenceName=self.viewsSeq.name )
934 
935 

Member Data Documentation

◆ name

MenuComponents.InViewRecoCA.name

Definition at line 878 of file MenuComponents.py.

◆ viewMakerAlg

MenuComponents.InViewRecoCA.viewMakerAlg

Definition at line 889 of file MenuComponents.py.

◆ viewsSeq

MenuComponents.InViewRecoCA.viewsSeq

Definition at line 928 of file MenuComponents.py.


The documentation for this class was generated from the following file:
python.JetAnalysisCommon.parOR
parOR
Definition: JetAnalysisCommon.py:271
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18