CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes
confdb.HLTProcess Class Reference
Inheritance diagram for confdb.HLTProcess:

Public Member Functions

def __init__
 
def customize
 
def dump
 
def getPathList
 
def getRawConfigurationFromDB
 
def releaseSpecificCustomize
 

Static Public Member Functions

def consolidateNegativeList
 
def consolidatePositiveList
 
def expandWildcards
 

Public Attributes

 config
 
 converter
 
 data
 
 labels
 
 options
 
 parent
 
 source
 

Static Public Attributes

tuple fastsimUnsupportedPaths
 

Detailed Description

Definition at line 21 of file confdb.py.

Constructor & Destructor Documentation

def confdb.HLTProcess.__init__ (   self,
  configuration 
)

Definition at line 62 of file confdb.py.

62 
63  def __init__(self, configuration):
64  self.config = configuration
65  self.data = None
66  self.source = []
67  self.parent = []
68 
69  self.options = {
70  'essources' : [],
71  'esmodules' : [],
72  'modules' : [],
73  'sequences' : [],
74  'services' : [],
75  'paths' : [],
76  'psets' : [],
77  'blocks' : [],
78  }
79 
80  self.labels = {}
81  if self.config.fragment:
82  self.labels['process'] = ''
83  self.labels['dict'] = 'locals()'
84  else:
85  self.labels['process'] = 'process.'
86  self.labels['dict'] = 'process.__dict__'
87 
88  if self.config.online:
89  self.labels['connect'] = 'frontier://(proxyurl=http://localhost:3128)(serverurl=http://localhost:8000/FrontierOnProd)(serverurl=http://localhost:8000/FrontierOnProd)(retrieve-ziplevel=0)'
90  else:
91  self.labels['connect'] = 'frontier://FrontierProd'
92 
93  if self.config.prescale and (self.config.prescale.lower() != 'none'):
94  self.labels['prescale'] = self.config.prescale
95 
96  # get the configuration from ConfdB
97  from confdbOfflineConverter import OfflineConverter
98  self.converter = OfflineConverter(database = self.config.menu.db)
99  self.buildPathList()
100  self.buildOptions()
102  self.customize()
103 
def getRawConfigurationFromDB
Definition: confdb.py:104

Member Function Documentation

def confdb.HLTProcess.consolidateNegativeList (   elements)
static

Definition at line 169 of file confdb.py.

170  def consolidateNegativeList(elements):
171  # consolidate a list of path exclusions and re-inclusions
172  # the result is the list of paths to be removed from the dump
173  result = set()
174  for element in elements:
175  if element[0] == '-':
176  result.add( element )
177  else:
178  result.discard( '-' + element )
179  return sorted( element for element in result )
def consolidateNegativeList
Definition: confdb.py:169
def confdb.HLTProcess.consolidatePositiveList (   elements)
static

Definition at line 181 of file confdb.py.

182  def consolidatePositiveList(elements):
183  # consolidate a list of path selection and re-exclusions
184  # the result is the list of paths to be included in the dump
185  result = set()
186  for element in elements:
187  if element[0] == '-':
188  result.discard( element[1:] )
189  else:
190  result.add( element )
191  return sorted( element for element in result )
192 
def consolidatePositiveList
Definition: confdb.py:181
def confdb.HLTProcess.customize (   self)

Definition at line 215 of file confdb.py.

References python.multivaluedict.MyUserList.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, CondIter< DataT >.data, QGLikelihoodObject.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, comparisonPlots.data, cond::IOVProxyData.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, confdb.HLTProcess.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, @568.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, python.DBCopy.DBCopy.data, conddblib.Payload.data, and confdb.HLTProcess.releaseSpecificCustomize().

216  def customize(self):
217 
218  # adapt the source to the current scenario
219  if not self.config.fragment:
220  self.build_source()
221 
222  # manual override some parameters
223  if self.config.type in ('HIon', ):
224  if self.config.data:
225  if not self.config.fragment:
226  self._fix_parameter( type = 'InputTag', value = 'rawDataCollector', replace = 'rawDataRepacker')
227 
228 # if self.config.type in ('HIon', ):
# self.data += """
def confdb.HLTProcess.dump (   self)

Definition at line 194 of file confdb.py.

References python.multivaluedict.MyUserList.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, CondIter< DataT >.data, QGLikelihoodObject.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, comparisonPlots.data, cond::IOVProxyData.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, confdb.HLTProcess.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, @568.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, python.DBCopy.DBCopy.data, conddblib.Payload.data, Utilities.InputTagLabelSet.labels, ecaldqm::binning::AxisSpecs.labels, confdb.HLTProcess.labels, and svgfig.Ticks.labels.

195  def dump(self):
196  return self.data % self.labels
197 
def confdb.HLTProcess.expandWildcards (   globs,
  collection 
)
static

Definition at line 153 of file confdb.py.

References python.rootplot.root2matplotlib.replace().

154  def expandWildcards(globs, collection):
155  # expand a list of unix-style wildcards matching a given collection
156  # wildcards with no matches are silently discarded
157  matches = []
158  for glob in globs:
159  negate = ''
160  if glob[0] == '-':
161  negate = '-'
162  glob = glob[1:]
163  # translate a unix-style glob expression into a regular expression
164  filter = re.compile(r'^' + glob.replace('?', '.').replace('*', '.*').replace('[!', '[^') + r'$')
165  matches.extend( negate + element for element in collection if filter.match(element) )
166  return matches
167 
def expandWildcards
Definition: confdb.py:153
def confdb.HLTProcess.getPathList (   self)

Definition at line 126 of file confdb.py.

127  def getPathList(self):
128  if self.config.menu.run:
129  args = ['--runNumber', self.config.menu.run]
130  else:
131  args = ['--configName', self.config.menu.name]
132  args.extend( (
133  '--cff',
134  '--noedsources',
135  '--noes',
136  '--noservices',
137  '--nosequences',
138  '--nomodules'
139  ) )
140 
141  data, err = self.converter.query( *args )
142  if 'ERROR' in err or 'Exhausted Resultset' in err or 'CONFIG_NOT_FOUND' in err:
143  print "%s: error while retriving the list of paths from the HLT menu" % os.path.basename(sys.argv[0])
144  print
145  print err
146  print
147  sys.exit(1)
148  filter = re.compile(r' *= *cms.(End)?Path.*')
149  paths = [ filter.sub('', line) for line in data.splitlines() if filter.search(line) ]
150  return paths
151 
def confdb.HLTProcess.getRawConfigurationFromDB (   self)

Definition at line 104 of file confdb.py.

References python.multivaluedict.MyUserList.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, CondIter< DataT >.data, QGLikelihoodObject.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, comparisonPlots.data, cond::IOVProxyData.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, confdb.HLTProcess.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, @568.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, python.DBCopy.DBCopy.data, conddblib.Payload.data, and join().

105  def getRawConfigurationFromDB(self):
106  if self.config.menu.run:
107  args = ['--runNumber', self.config.menu.run]
108  else:
109  args = ['--configName', self.config.menu.name ]
110  args.append('--noedsources')
111  if self.config.fragment:
112  args.append('--cff')
113  for key, vals in self.options.iteritems():
114  if vals:
115  args.extend(('--'+key, ','.join(vals)))
116 
117  data, err = self.converter.query( *args )
118  if 'ERROR' in err or 'Exhausted Resultset' in err or 'CONFIG_NOT_FOUND' in err:
119  print "%s: error while retriving the HLT menu" % os.path.basename(sys.argv[0])
120  print
121  print err
122  print
123  sys.exit(1)
124  self.data = data
125 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def getRawConfigurationFromDB
Definition: confdb.py:104
def confdb.HLTProcess.releaseSpecificCustomize (   self)

Definition at line 199 of file confdb.py.

References python.multivaluedict.MyUserList.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CSCTMBScope.data, CondIter< DataT >.data, QGLikelihoodObject.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, comparisonPlots.data, cond::IOVProxyData.data, QGLikelihoodSystematicsObject.data, TkLasBeam.data, confdb.HLTProcess.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, @568.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, python.DBCopy.DBCopy.data, and conddblib.Payload.data.

Referenced by confdb.HLTProcess.customize().

200  def releaseSpecificCustomize(self):
201  # version specific customizations
202  self.data += """
203 # CMSSW version specific customizations
204 import os
205 cmsswVersion = os.environ['CMSSW_VERSION']
206 
207 # none for now
208 """
209 
210 # from CMSSW_7_2_0_pre6: Use Legacy Errors in "StripCPEESProducer" for HLT (PRs 5286/5151)
211 #if cmsswVersion >= "CMSSW_7_2":
212 # if 'hltESPStripCPEfromTrackAngle' in %(dict)s:
213 # %(process)shltESPStripCPEfromTrackAngle.useLegacyError = cms.bool(True)
def releaseSpecificCustomize
Definition: confdb.py:199

Member Data Documentation

confdb.HLTProcess.config

Definition at line 63 of file confdb.py.

confdb.HLTProcess.converter

Definition at line 97 of file confdb.py.

confdb.HLTProcess.data

Definition at line 64 of file confdb.py.

Referenced by cuy.FindIssue.__init__(), confdb.HLTProcess.customize(), confdb.HLTProcess.dump(), confdb.HLTProcess.getRawConfigurationFromDB(), and confdb.HLTProcess.releaseSpecificCustomize().

tuple confdb.HLTProcess.fastsimUnsupportedPaths
static

Definition at line 23 of file confdb.py.

confdb.HLTProcess.labels

Definition at line 79 of file confdb.py.

Referenced by confdb.HLTProcess.dump().

confdb.HLTProcess.options

Definition at line 68 of file confdb.py.

Referenced by betterConfigParser.BetterConfigParser.__updateDict(), betterConfigParser.BetterConfigParser.checkInput(), DOTExport.DotExport.export(), and DOTExport.DotExport.write_output().

confdb.HLTProcess.parent

Definition at line 66 of file confdb.py.

Referenced by BeautifulSoup.PageElement._invert(), Vispa.Gui.ConnectableWidget.ConnectableWidget.addMenuEntry(), Vispa.Views.LineDecayView.LineDecayContainer.applyFilter(), Vispa.Views.BoxDecayView.BoxDecayContainer.arrangeUsingRelations(), Vispa.Views.BoxDecayView.BoxDecayContainer.autolayoutAlgorithm(), Vispa.Gui.ZoomableScrollableWidgetOwner.ZoomableScrollableWidgetOwner.autosizeScrollArea(), Vispa.Views.BoxDecayView.BoxDecayContainer.autosizeScrollArea(), Vispa.Gui.PortWidget.PortWidget.connectionPoint(), Vispa.Main.StartupScreen.StartupScreen.createDescriptionWidget(), Vispa.Views.BoxDecayView.BoxDecayContainer.dataAccessor(), Vispa.Views.LineDecayView.LineDecayContainer.dataAccessor(), Vispa.Views.LineDecayView.DecayLine.dataAccessor(), Vispa.Views.LineDecayView.LineDecayContainer.delete(), Vispa.Views.LineDecayView.DecayNode.delete(), Vispa.Views.LineDecayView.DecayLine.delete(), Vispa.Gui.VispaWidget.VispaWidget.delete(), Vispa.Gui.VispaWidget.VispaWidget.dragWidget(), Vispa.Share.ImageExporter.ImageExporter.exportImageDialog(), Vispa.Views.LineDecayView.DecayLine.extendedSize(), argparse.HelpFormatter._Section.format_help(), python.rootplot.argparse.HelpFormatter._Section.format_help(), Vispa.Gui.VispaWidget.VispaWidget.keyPressEvent(), Vispa.Gui.MenuWidget.MenuWidget.leaveEvent(), Vispa.Gui.ConnectableWidget.ConnectableWidget.leaveEvent(), Vispa.Gui.PortWidget.PortWidget.moduleParent(), Vispa.Gui.WidgetContainer.WidgetContainer.mouseDoubleClickEvent(), Vispa.Gui.VispaWidget.VispaWidget.mouseDoubleClickEvent(), Vispa.Gui.PortConnection.PointToPointConnection.mousePressEvent(), Vispa.Gui.VispaWidget.VispaWidget.mousePressEvent(), Vispa.Views.LineDecayView.ParticleWidget.mousePressEvent(), Vispa.Views.LineDecayView.DecayNode.move(), Vispa.Views.LineDecayView.LineDecayContainer.noDecorationsMode(), Vispa.Views.LineDecayView.LineDecayContainer.operationId(), Vispa.Views.LineDecayView.DecayLine.paint(), Vispa.Gui.VispaWidget.VispaWidget.paintEvent(), Vispa.Gui.ConnectableWidget.ConnectableWidget.positionizeMenuWidget(), Vispa.Views.LineDecayView.DecayLine.qtLineStyle(), Vispa.Views.WidgetView.WidgetView.restoreSelection(), Vispa.Views.WidgetView.WidgetView.select(), Vispa.Gui.PortConnection.PointToPointConnection.select(), Vispa.Gui.VispaWidget.VispaWidget.select(), Vispa.Views.LineDecayView.LineDecayContainer.select(), Vispa.Views.LineDecayView.LineDecayContainer.sizeHint(), Vispa.Views.LineDecayView.LineDecayContainer.tabController(), Vispa.Views.BoxDecayView.BoxDecayContainer.toggleCollapsed(), Vispa.Views.LineDecayView.DecayNode.unite(), Vispa.Views.PropertyView.PropertyView.valueChanged(), Vispa.Views.BoxDecayView.BoxDecayContainer.widgetByObject(), Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.widgetDoubleClicked(), and Vispa.Gui.VispaWidgetOwner.VispaWidgetOwner.widgetDragged().

confdb.HLTProcess.source

Definition at line 65 of file confdb.py.