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

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

Member Function Documentation

def confdb.HLTProcess.consolidateNegativeList (   elements)
static

Definition at line 151 of file confdb.py.

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

Definition at line 163 of file confdb.py.

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

Definition at line 195 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, confdb.HLTProcess.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, @402.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, python.DBCopy.DBCopy.data, conddblib.Payload.data, and confdb.HLTProcess.releaseSpecificCustomize().

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

Definition at line 176 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, confdb.HLTProcess.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, @402.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.

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

Definition at line 135 of file confdb.py.

References python.rootplot.root2matplotlib.replace().

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

Definition at line 110 of file confdb.py.

References SiPixelLorentzAngle_cfi.read.

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

Definition at line 92 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, confdb.HLTProcess.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, @402.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.

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

Definition at line 181 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, confdb.HLTProcess.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, @402.data, EcalShowerContainmentCorrections::Coefficients.data, cscdqm::Cache.data, DQMNet::Bucket.data, python.DBCopy.DBCopy.data, and conddblib.Payload.data.

Referenced by confdb.HLTProcess.customize().

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

Member Data Documentation

confdb.HLTProcess.config

Definition at line 53 of file confdb.py.

confdb.HLTProcess.data

Definition at line 54 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*_NoBPTX*_v*",
17  "HLT_PixelTracks_Multiplicity70_v*",
18  "HLT_PixelTracks_Multiplicity80_v*",
19  "HLT_PixelTracks_Multiplicity90_v*",
20  "HLT_Beam*_v*",
21 # "HLT_L1Tech_*_v*",
22  "HLT_GlobalRunHPDNoise_v*",
23  "HLT_L1TrackerCosmics_v*",
24  "HLT_HcalUTCA_v*",
25 
26 # TODO: paths not supported by FastSim, but for which a recovery should be attempted
27 
28  )

Definition at line 23 of file confdb.py.

confdb.HLTProcess.labels

Definition at line 69 of file confdb.py.

Referenced by confdb.HLTProcess.dump().

confdb.HLTProcess.options

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