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  if self.config.prescale and (self.config.prescale.lower() != 'none'):
97  self.labels['prescale'] = self.config.prescale
98 
99  # get the configuration from ConfdB
100  self.buildPathList()
101  self.buildOptions()
103  self.customize()
104 
def getRawConfigurationFromDB
Definition: confdb.py:105

Member Function Documentation

def confdb.HLTProcess.consolidateNegativeList (   elements)
static

Definition at line 164 of file confdb.py.

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

Definition at line 176 of file confdb.py.

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

Definition at line 208 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().

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

Definition at line 189 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.

190  def dump(self):
191  return self.data % self.labels
192 
def confdb.HLTProcess.expandWildcards (   globs,
  collection 
)
static

Definition at line 148 of file confdb.py.

References python.rootplot.root2matplotlib.replace().

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

Definition at line 123 of file confdb.py.

References SiPixelLorentzAngle_cfi.read.

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

Definition at line 105 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.

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

Definition at line 194 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().

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

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 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.