CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
SequenceVisitors.ModuleNamesFromGlobalsVisitor Class Reference
Inheritance diagram for SequenceVisitors.ModuleNamesFromGlobalsVisitor:

Public Member Functions

def __init__ (self, globals_, l)
 
def enter (self, node)
 
def leave (self, node)
 

Private Attributes

 _moduleToName
 
 _names
 

Detailed Description

Fill a list with the names of Event module types in a sequence. The names are determined
by using globals() to lookup the variable names assigned to the modules. This
allows the determination of the labels before the modules have been attached to a Process.

Definition at line 139 of file SequenceVisitors.py.

Constructor & Destructor Documentation

◆ __init__()

def SequenceVisitors.ModuleNamesFromGlobalsVisitor.__init__ (   self,
  globals_,
  l 
)

Definition at line 143 of file SequenceVisitors.py.

143  def __init__(self,globals_,l):
144  self._moduleToName = { v[1]:v[0] for v in globals_.items() if isinstance(v[1],_Module) }
145  self._names =l
def __init__(self, dataset, job_number, job_id, job_name, isDA, isMC, applyBOWS, applyEXTRACOND, extraconditions, runboundary, lumilist, intlumi, maxevents, gt, allFromGT, alignmentDB, alignmentTAG, apeDB, apeTAG, bowDB, bowTAG, vertextype, tracktype, refittertype, ttrhtype, applyruncontrol, ptcut, CMSSW_dir, the_dir)

Member Function Documentation

◆ enter()

def SequenceVisitors.ModuleNamesFromGlobalsVisitor.enter (   self,
  node 
)

Definition at line 146 of file SequenceVisitors.py.

References SequenceVisitors.ModuleNamesFromGlobalsVisitor._moduleToName, SequenceVisitors.ModuleNamesFromGlobalsVisitor._names, and mps_setup.append.

146  def enter(self,node):
147  if isinstance(node,_Module):
148  self._names.append(self._moduleToName[node])

◆ leave()

def SequenceVisitors.ModuleNamesFromGlobalsVisitor.leave (   self,
  node 
)

Definition at line 149 of file SequenceVisitors.py.

149  def leave(self,node):
150  return
151 

Member Data Documentation

◆ _moduleToName

SequenceVisitors.ModuleNamesFromGlobalsVisitor._moduleToName
private

◆ _names

SequenceVisitors.ModuleNamesFromGlobalsVisitor._names
private