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 848 of file MenuComponents.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 850 of file MenuComponents.py.

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

Member Function Documentation

◆ addRecoAlgo()

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

Definition at line 910 of file MenuComponents.py.

910  def addRecoAlgo( self, algo ):
911  """ Place algorithm in the correct reconstruction sequence """
912  return self.addEventAlgo( algo, sequenceName=self.viewsSeq.name )
913 
914 

◆ inputMaker()

def MenuComponents.InViewRecoCA.inputMaker (   self)

Definition at line 915 of file MenuComponents.py.

915  def inputMaker( self ):
916  return self.viewMakerAlg
917 
918 

◆ mergeReco()

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

Definition at line 905 of file MenuComponents.py.

905  def mergeReco( self, ca ):
906  """ Merge CA moving reconstruction algorithms into the right sequence """
907  return self.merge( ca, sequenceName=self.viewsSeq.name )
908 
909 

Member Data Documentation

◆ name

MenuComponents.InViewRecoCA.name

Definition at line 852 of file MenuComponents.py.

◆ viewMakerAlg

MenuComponents.InViewRecoCA.viewMakerAlg

Definition at line 863 of file MenuComponents.py.

◆ viewsSeq

MenuComponents.InViewRecoCA.viewsSeq

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