ATLAS Offline Software
Loading...
Searching...
No Matches
MenuComponents.InViewRecoCA Class Reference
Inheritance diagram for MenuComponents.InViewRecoCA:
Collaboration diagram for MenuComponents.InViewRecoCA:

Public Member Functions

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

Public Attributes

str name = name +"_probe" if isProbe else name
 viewMakerAlg = viewMaker.__class__(viewMaker.getName()+'_probe', **viewMaker._properties)
 viewsSeq = parOR( self.viewMakerAlg.ViewNodeName )

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

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 780 of file MenuComponents.py.

780 def __init__(self, name, viewMaker=None, isProbe=False, **viewMakerArgs):
781 super( InViewRecoCA, self ).__init__()
782 self.name = name +"_probe" if isProbe else name
783 def updateHandle(baseTool, probeTool, handleName):
784 if hasattr(baseTool, handleName) and getattr(baseTool, handleName).Path!="StoreGateSvc+":
785 setattr(probeTool, handleName, getattr(probeTool, handleName).Path + "_probe")
786
787 if len(viewMakerArgs) != 0:
788 assert viewMaker is None, "No support for explicitly passed view maker and args for EventViewCreatorAlgorithm"
789
790 if viewMaker:
791 assert len(viewMakerArgs) == 0, "No support for explicitly passed view maker and args for EventViewCreatorAlgorithm"
792 if isProbe:
793 self.viewMakerAlg = viewMaker.__class__(viewMaker.getName()+'_probe', **viewMaker._properties)
794 self.viewMakerAlg.Views = viewMaker.Views+'_probe'
795 roiTool = self.viewMakerAlg.RoITool.__class.__(self.viewMakerAlg.RoITool.getName()+'_probe', **self.viewMakerAlg.RoITool._properties)
796 log.debug(f"InViewRecoCA: Setting InputCachedViews on {self.viewMaker.getName()} to read decisions from tag leg {viewMaker.getName()}: {viewMaker.InputMakerOutputDecisions}")
797 self.viewMakerAlg.InputCachedViews = viewMaker.InputMakerOutputDecisions
798 updateHandle(viewMakerArgs['RoITool'], roiTool, "RoisWriteHandleKey")
799 if hasattr(viewMakerArgs['RoITool'], "RoiCreator"):
800 updateHandle(viewMakerArgs['RoITool'], roiTool, "ExtraPrefetchRoIsKey")
801 updateHandle(viewMakerArgs['RoITool'].RoiCreator, roiTool.RoiCreator, "RoisWriteHandleKey")
802
803 self.viewMakerAlg.RoITool = roiTool
804 else:
805 self.viewMakerAlg = viewMaker
806 else:
807 assert 'name' not in viewMakerArgs, "The name of view maker is predefined by the name of sequence"
808 assert 'Views' not in viewMakerArgs, "The Views is predefined by the name of sequence"
809 assert 'ViewsNodeName' not in viewMakerArgs, "The ViewsNodeName is predefined by the name of sequence"
810 if 'RoITool' in viewMakerArgs:
811 roiTool = viewMakerArgs['RoITool']
812 else:
813 roiTool = CompFactory.ViewCreatorInitialROITool()
814
815
816 args = {'name': f'IM_{self.name}',
817 'ViewFallThrough' : True,
818 'RoIsLink' : 'initialRoI',
819 'RoITool' : roiTool,
820 'InViewRoIs' : f'{name}RoIs',
821 'Views' : f'{name}Views'+'_probe' if isProbe else f'{name}Views',
822 'ViewNodeName' : f'{name}InViews'+'_probe' if isProbe else f'{name}InViews',
823 'RequireParentView' : False,
824 'mergeUsingFeature' : False }
825 args.update(**viewMakerArgs)
826 self.viewMakerAlg = CompFactory.EventViewCreatorAlgorithm(**args)
827 if isProbe:
828 updateHandle(args['RoITool'], roiTool, "RoisWriteHandleKey")
829 if hasattr(args['RoITool'], "RoiCreator"):
830 updateHandle(args['RoITool'], roiTool, "ExtraPrefetchRoIsKey")
831 updateHandle(args['RoITool'].RoiCreator, roiTool.RoiCreator, "RoisWriteHandleKey")
832 self.viewsSeq = parOR( self.viewMakerAlg.ViewNodeName )
833 self.addSequence( self.viewsSeq )
834

Member Function Documentation

◆ addRecoAlgo()

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

Definition at line 840 of file MenuComponents.py.

840 def addRecoAlgo( self, algo ):
841 """ Place algorithm in the correct reconstruction sequence """
842 return self.addEventAlgo( algo, sequenceName=self.viewsSeq.name )
843
844

◆ inputMaker()

MenuComponents.InViewRecoCA.inputMaker ( self)

Definition at line 845 of file MenuComponents.py.

845 def inputMaker( self ):
846 return self.viewMakerAlg
847
848

◆ mergeReco()

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

Definition at line 835 of file MenuComponents.py.

835 def mergeReco( self, ca ):
836 """ Merge CA moving reconstruction algorithms into the right sequence """
837 return self.merge( ca, sequenceName=self.viewsSeq.name )
838
839

Member Data Documentation

◆ name

str MenuComponents.InViewRecoCA.name = name +"_probe" if isProbe else name

Definition at line 782 of file MenuComponents.py.

◆ viewMakerAlg

MenuComponents.InViewRecoCA.viewMakerAlg = viewMaker.__class__(viewMaker.getName()+'_probe', **viewMaker._properties)

Definition at line 793 of file MenuComponents.py.

◆ viewsSeq

MenuComponents.InViewRecoCA.viewsSeq = parOR( self.viewMakerAlg.ViewNodeName )

Definition at line 832 of file MenuComponents.py.


The documentation for this class was generated from the following file: