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

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

Member Function Documentation

def confdb.HLTProcess.consolidateNegativeList (   elements)
static

Definition at line 153 of file confdb.py.

154  def consolidateNegativeList(elements):
155  # consolidate a list of path exclusions and re-inclusions
156  # the result is the list of paths to be removed from the dump
157  result = set()
158  for element in elements:
159  if element[0] == '-':
160  result.add( element )
161  else:
162  result.discard( '-' + element )
163  return sorted( element for element in result )
def consolidateNegativeList
Definition: confdb.py:153
def confdb.HLTProcess.consolidatePositiveList (   elements)
static

Definition at line 165 of file confdb.py.

166  def consolidatePositiveList(elements):
167  # consolidate a list of path selection and re-exclusions
168  # the result is the list of paths to be included in the dump
169  result = set()
170  for element in elements:
171  if element[0] == '-':
172  result.discard( element[1:] )
173  else:
174  result.add( element )
175  return sorted( element for element in result )
176 
def consolidatePositiveList
Definition: confdb.py:165
def confdb.HLTProcess.customize (   self)

Definition at line 197 of file confdb.py.

References PackageSplitter.PackageSplitter.data, python.multivaluedict.MyUserList.data, CombinedTauTagCalibration.data, ConfigFiles.ConfigFiles.data, CombinedSVCalibration.data, CSCTMBScope.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CondIter< DataT >.data, QGLikelihoodObject.data, MainPageGenerator.MainPageGenerator.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, @394.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, python.DBCopy.DBCopy.data, conddblib.Payload.data, and confdb.HLTProcess.releaseSpecificCustomize().

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

Definition at line 178 of file confdb.py.

References PackageSplitter.PackageSplitter.data, python.multivaluedict.MyUserList.data, CombinedTauTagCalibration.data, ConfigFiles.ConfigFiles.data, CombinedSVCalibration.data, CSCTMBScope.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CondIter< DataT >.data, QGLikelihoodObject.data, MainPageGenerator.MainPageGenerator.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, @394.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, python.DBCopy.DBCopy.data, conddblib.Payload.data, Utilities.InputTagLabelSet.labels, confdb.HLTProcess.labels, ecaldqm::binning::AxisSpecs.labels, and svgfig.Ticks.labels.

179  def dump(self):
180  return self.data % self.labels
181 
def confdb.HLTProcess.expandWildcards (   globs,
  collection 
)
static

Definition at line 137 of file confdb.py.

References python.rootplot.root2matplotlib.replace().

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

Definition at line 112 of file confdb.py.

References SiPixelLorentzAngle_cfi.read.

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

Definition at line 94 of file confdb.py.

References PackageSplitter.PackageSplitter.data, python.multivaluedict.MyUserList.data, CombinedSVCalibration.data, ConfigFiles.ConfigFiles.data, CombinedTauTagCalibration.data, CSCTMBScope.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CondIter< DataT >.data, QGLikelihoodObject.data, MainPageGenerator.MainPageGenerator.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, @394.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, python.DBCopy.DBCopy.data, conddblib.Payload.data, python.multivaluedict.dict, join(), and SiPixelLorentzAngle_cfi.read.

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

Definition at line 183 of file confdb.py.

References PackageSplitter.PackageSplitter.data, python.multivaluedict.MyUserList.data, CombinedTauTagCalibration.data, ConfigFiles.ConfigFiles.data, CombinedSVCalibration.data, CSCTMBScope.data, DOTExport.DotProducer.data, TrackProbabilityCalibration.data, ElectronLikelihoodCalibration.data, CondIter< DataT >.data, QGLikelihoodObject.data, MainPageGenerator.MainPageGenerator.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, @394.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, python.DBCopy.DBCopy.data, and conddblib.Payload.data.

Referenced by confdb.HLTProcess.customize().

184  def releaseSpecificCustomize(self):
185  # version specific customizations
186  self.data += """
187 # CMSSW version specific customizations
188 import os
189 cmsswVersion = os.environ['CMSSW_VERSION']
190 
191 # customization for 6_2_X
192 
193 # none for now
194 
195 """
def releaseSpecificCustomize
Definition: confdb.py:183

Member Data Documentation

confdb.HLTProcess.config

Definition at line 55 of file confdb.py.

confdb.HLTProcess.data

Definition at line 56 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
Initial value:
1 = (
2 
3  # paths for which a recovery is not foreseen/possible
4  "AlCa_*_v*",
5  "DQM_*_v*",
6  "HLT_*Calibration_v*",
7  "HLT_DTErrors_v*",
8  "HLT_Random_v*",
9  "HLT_HcalNZS_v*",
10  "HLT_HcalPhiSym_v*",
11  "HLT_Activity_Ecal*_v*",
12  "HLT_IsoTrackHB_v*",
13  "HLT_IsoTrackHE_v*",
14  "HLT_L1SingleMuOpen_AntiBPTX_v*",
15  "HLT_JetE*_NoBPTX*_v*",
16  "HLT_L2Mu*_NoVertex_NoBPTX*_v*",
17  "HLT_L2Mu20_NoVertex_2Cha_NoBPTX3BX_NoHalo_v*",
18  "HLT_L2Mu30_NoVertex_2Cha_NoBPTX3BX_NoHalo_v*",
19  "HLT_PixelTracks_Multiplicity70_v*",
20  "HLT_PixelTracks_Multiplicity80_v*",
21  "HLT_PixelTracks_Multiplicity90_v*",
22  "HLT_Beam*_v*",
23 # "HLT_L1Tech_*_v*",
24  "HLT_GlobalRunHPDNoise_v*",
25  "HLT_L1TrackerCosmics_v*",
26  "HLT_HcalUTCA_v*",
27 
28 # TODO: paths not supported by FastSim, but for which a recovery should be attempted
29 
30  )

Definition at line 23 of file confdb.py.

confdb.HLTProcess.labels

Definition at line 71 of file confdb.py.

Referenced by confdb.HLTProcess.dump().

confdb.HLTProcess.options

Definition at line 60 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 58 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 57 of file confdb.py.