ATLAS Offline Software
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 854 of file MenuComponents.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 856 of file MenuComponents.py.

856  def __init__(self, name, viewMaker=None, isProbe=False, **viewMakerArgs):
857  super( InViewRecoCA, self ).__init__()
858  self.name = name +"_probe" if isProbe else name
859  def updateHandle(baseTool, probeTool, handleName):
860  if hasattr(baseTool, handleName) and getattr(baseTool, handleName).Path!="StoreGateSvc+":
861  setattr(probeTool, handleName, getattr(probeTool, handleName).Path + "_probe")
862 
863  if len(viewMakerArgs) != 0:
864  assert viewMaker is None, "No support for explicitly passed view maker and args for EventViewCreatorAlgorithm"
865 
866  if viewMaker:
867  assert len(viewMakerArgs) == 0, "No support for explicitly passed view maker and args for EventViewCreatorAlgorithm"
868  if isProbe:
869  self.viewMakerAlg = viewMaker.__class__(viewMaker.getName()+'_probe', **viewMaker._properties)
870  self.viewMakerAlg.Views = viewMaker.Views+'_probe'
871  roiTool = self.viewMakerAlg.RoITool.__class.__(self.viewMakerAlg.RoITool.getName()+'_probe', **self.viewMakerAlg.RoITool._properties)
872  log.debug(f"InViewRecoCA: Setting InputCachedViews on {self.viewMaker.getName()} to read decisions from tag leg {viewMaker.getName()}: {viewMaker.InputMakerOutputDecisions}")
873  self.viewMakerAlg.InputCachedViews = viewMaker.InputMakerOutputDecisions
874  updateHandle(viewMakerArgs['RoITool'], roiTool, "RoisWriteHandleKey")
875  if hasattr(viewMakerArgs['RoITool'], "RoiCreator"):
876  updateHandle(viewMakerArgs['RoITool'], roiTool, "ExtraPrefetchRoIsKey")
877  updateHandle(viewMakerArgs['RoITool'].RoiCreator, roiTool.RoiCreator, "RoisWriteHandleKey")
878 
879  self.viewMakerAlg.RoITool = roiTool
880  else:
881  self.viewMakerAlg = viewMaker
882  else:
883  assert 'name' not in viewMakerArgs, "The name of view maker is predefined by the name of sequence"
884  assert 'Views' not in viewMakerArgs, "The Views is predefined by the name of sequence"
885  assert 'ViewsNodeName' not in viewMakerArgs, "The ViewsNodeName is predefined by the name of sequence"
886  if 'RoITool' in viewMakerArgs:
887  roiTool = viewMakerArgs['RoITool']
888  else:
889  roiTool = CompFactory.ViewCreatorInitialROITool()
890 
891 
892  args = {'name': f'IM_{self.name}',
893  'ViewFallThrough' : True,
894  'RoIsLink' : 'initialRoI',
895  'RoITool' : roiTool,
896  'InViewRoIs' : f'{name}RoIs',
897  'Views' : f'{name}Views'+'_probe' if isProbe else f'{name}Views',
898  'ViewNodeName' : f'{name}InViews'+'_probe' if isProbe else f'{name}InViews',
899  'RequireParentView' : False,
900  'mergeUsingFeature' : False }
901  args.update(**viewMakerArgs)
902  self.viewMakerAlg = CompFactory.EventViewCreatorAlgorithm(**args)
903  if isProbe:
904  updateHandle(args['RoITool'], roiTool, "RoisWriteHandleKey")
905  if hasattr(args['RoITool'], "RoiCreator"):
906  updateHandle(args['RoITool'], roiTool, "ExtraPrefetchRoIsKey")
907  updateHandle(args['RoITool'].RoiCreator, roiTool.RoiCreator, "RoisWriteHandleKey")
908  self.viewsSeq = parOR( self.viewMakerAlg.ViewNodeName )
909  self.addSequence( self.viewsSeq )
910 

Member Function Documentation

◆ addRecoAlgo()

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

Definition at line 916 of file MenuComponents.py.

916  def addRecoAlgo( self, algo ):
917  """ Place algorithm in the correct reconstruction sequence """
918  return self.addEventAlgo( algo, sequenceName=self.viewsSeq.name )
919 
920 

◆ inputMaker()

def MenuComponents.InViewRecoCA.inputMaker (   self)

Definition at line 921 of file MenuComponents.py.

921  def inputMaker( self ):
922  return self.viewMakerAlg
923 
924 

◆ mergeReco()

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

Definition at line 911 of file MenuComponents.py.

911  def mergeReco( self, ca ):
912  """ Merge CA moving reconstruction algorithms into the right sequence """
913  return self.merge( ca, sequenceName=self.viewsSeq.name )
914 
915 

Member Data Documentation

◆ name

MenuComponents.InViewRecoCA.name

Definition at line 858 of file MenuComponents.py.

◆ viewMakerAlg

MenuComponents.InViewRecoCA.viewMakerAlg

Definition at line 869 of file MenuComponents.py.

◆ viewsSeq

MenuComponents.InViewRecoCA.viewsSeq

Definition at line 908 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