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
 
 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 65 of file confdb.py.

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

Member Function Documentation

def confdb.HLTProcess.consolidateNegativeList (   elements)
static

Definition at line 161 of file confdb.py.

162  def consolidateNegativeList(elements):
163  # consolidate a list of path exclusions and re-inclusions
164  # the result is the list of paths to be removed from the dump
165  result = set()
166  for element in elements:
167  if element[0] == '-':
168  result.add( element )
169  else:
170  result.discard( '-' + element )
171  return sorted( element for element in result )
def consolidateNegativeList
Definition: confdb.py:161
def confdb.HLTProcess.consolidatePositiveList (   elements)
static

Definition at line 173 of file confdb.py.

174  def consolidatePositiveList(elements):
175  # consolidate a list of path selection and re-exclusions
176  # the result is the list of paths to be included in the dump
177  result = set()
178  for element in elements:
179  if element[0] == '-':
180  result.discard( element[1:] )
181  else:
182  result.add( element )
183  return sorted( element for element in result )
184 
def consolidatePositiveList
Definition: confdb.py:173
def confdb.HLTProcess.customize (   self)

Definition at line 205 of file confdb.py.

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

206  def customize(self):
207 
208  # adapt the source to the current scenario
209  if not self.config.fragment:
210  self.build_source()
211 
212  # manual override some parameters
213  if self.config.type in ('GRun', ):
214  self.data += """
215 # Enable HF Noise filters in GRun menu
216 if 'hltHfreco' in %(dict)s:
217  %(process)shltHfreco.setNoiseFlags = cms.bool( True )
218 """
219  if self.config.type in ('HIon', ):
220  self.data += """
221 # Disable HF Noise filters in HIon menu
222 if 'hltHfreco' in %(dict)s:
223  %(process)shltHfreco.setNoiseFlags = cms.bool( False )
224 """
225 
# self.data += """
def confdb.HLTProcess.dump (   self)

Definition at line 186 of file confdb.py.

References PackageSplitter.PackageSplitter.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, python.multivaluedict.MyUserList.data, ElectronLikelihoodCalibration.data, ConfigFiles.ConfigFiles.data, CSCTMBScope.data, DOTExport.DotProducer.data, CondIter< DataT >.data, MainPageGenerator.MainPageGenerator.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, comparisonPlots.data, cond::IOVProxyData.data, BaseMETv0.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, confdb.HLTProcess.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, EcalShowerContainmentCorrections::Coefficients.data, @398.data, cscdqm::Cache.data, DQMNet::Bucket.data, python.DBCopy.DBCopy.data, Utilities.InputTagLabelSet.labels, confdb.HLTProcess.labels, and svgfig.Ticks.labels.

187  def dump(self):
188  return self.data % self.labels
189 
def confdb.HLTProcess.expandWildcards (   globs,
  collection 
)
static

Definition at line 145 of file confdb.py.

References python.rootplot.root2matplotlib.replace().

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

Definition at line 120 of file confdb.py.

References SiPixelLorentzAngle_cfi.read.

121  def getPathList(self):
122  url = 'http://j2eeps.cern.ch/cms-project-confdb-hltdev/get.jsp'
123  postdata = {
124  'noedsources': '',
125  'noes': '',
126  'noservices': '',
127  'nosequences': '',
128  'nomodules' : '',
129  'cff': '',
130  }
131  if self.config.menu.run:
132  postdata['runNumber'] = self.config.menu.run
133  else:
134  postdata['dbName'] = self.config.menu.db
135  postdata['configName']= self.config.menu.name
136 
137  data = urllib2.urlopen(url, urllib.urlencode(postdata)).read()
138  if 'Exhausted Resultset' in data or 'CONFIG_NOT_FOUND' in data:
139  raise ImportError('%s is not a valid HLT menu' % self.config.menuConfig.value)
140  filter = re.compile(r' *= *cms.(End)?Path.*')
141  paths = [ filter.sub('', line) for line in data.splitlines() if filter.search(line) ]
142  return paths
143 
def confdb.HLTProcess.getRawConfigurationFromDB (   self)

Definition at line 102 of file confdb.py.

References PackageSplitter.PackageSplitter.data, CombinedSVCalibration.data, CombinedTauTagCalibration.data, TrackProbabilityCalibration.data, python.multivaluedict.MyUserList.data, ElectronLikelihoodCalibration.data, ConfigFiles.ConfigFiles.data, CSCTMBScope.data, DOTExport.DotProducer.data, CondIter< DataT >.data, MainPageGenerator.MainPageGenerator.data, dqmTnP::AbstractFitter.data, LASModuleProfile.data, comparisonPlots.data, cond::IOVProxyData.data, BaseMETv0.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, confdb.HLTProcess.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, EcalShowerContainmentCorrections::Coefficients.data, @398.data, cscdqm::Cache.data, DQMNet::Bucket.data, python.DBCopy.DBCopy.data, python.multivaluedict.dict, join(), and SiPixelLorentzAngle_cfi.read.

103  def getRawConfigurationFromDB(self):
104  url = 'http://j2eeps.cern.ch/cms-project-confdb-hltdev/get.jsp'
105  postdata = dict([ (key, ','.join(vals)) for key, vals in self.options.iteritems() if vals ])
106  postdata['noedsources'] = ''
107  if self.config.fragment:
108  postdata['cff'] = ''
109  if self.config.menu.run:
110  postdata['runNumber'] = self.config.menu.run
111  else:
112  postdata['dbName'] = self.config.menu.db
113  postdata['configName']= self.config.menu.name
114 
115  data = urllib2.urlopen(url, urllib.urlencode(postdata)).read()
116  if 'Exhausted Resultset' in data or 'CONFIG_NOT_FOUND' in data:
117  raise ImportError('%s is not a valid HLT menu' % self.config.menuConfig.value)
118  self.data = data
119 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def getRawConfigurationFromDB
Definition: confdb.py:102
def confdb.HLTProcess.releaseSpecificCustomize (   self)

Definition at line 191 of file confdb.py.

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

Referenced by confdb.HLTProcess.customize().

192  def releaseSpecificCustomize(self):
193  # version specific customizations
194  self.data += """
195 # CMSSW version specific customizations
196 import os
197 cmsswVersion = os.environ['CMSSW_VERSION']
198 
199 # customization for 6_2_X
200 
201 # none for now
202 
203 """
def releaseSpecificCustomize
Definition: confdb.py:191

Member Data Documentation

confdb.HLTProcess.config

Definition at line 66 of file confdb.py.

confdb.HLTProcess.data

Definition at line 67 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 82 of file confdb.py.

Referenced by confdb.HLTProcess.dump().

confdb.HLTProcess.options

Definition at line 71 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 69 of file confdb.py.

Referenced by argparse.HelpFormatter._Section.__init__(), 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 68 of file confdb.py.