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 specificCustomize
 

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

83 
84  def __init__(self, configuration):
85  self.config = configuration
86  self.data = None
87  self.source = []
88  self.parent = []
89 
90  self.options = {
91  'essources' : [],
92  'esmodules' : [],
93  'modules' : [],
94  'sequences' : [],
95  'services' : [],
96  'paths' : [],
97  'psets' : [],
98  'blocks' : [],
99  }
101  self.labels = {}
102  if self.config.fragment:
103  self.labels['process'] = 'fragment.'
104  self.labels['dict'] = 'fragment.__dict__'
105  else:
106  self.labels['process'] = 'process.'
107  self.labels['dict'] = 'process.__dict__'
108 
109  if self.config.online:
110  self.labels['connect'] = 'frontier://(proxyurl=http://localhost:3128)(serverurl=http://localhost:8000/FrontierOnProd)(serverurl=http://localhost:8000/FrontierOnProd)(retrieve-ziplevel=0)'
111  else:
112  self.labels['connect'] = 'frontier://FrontierProd'
113 
114  if self.config.prescale and (self.config.prescale.lower() != 'none'):
115  self.labels['prescale'] = self.config.prescale
116 
117  # get the configuration from ConfdB
118  from confdbOfflineConverter import OfflineConverter
119  self.converter = OfflineConverter(database = self.config.menu.db)
120  self.buildPathList()
121  self.buildOptions()
123  self.customize()
124 
def getRawConfigurationFromDB
Definition: confdb.py:125

Member Function Documentation

def confdb.HLTProcess.consolidateNegativeList (   elements)
static

Definition at line 188 of file confdb.py.

189  def consolidateNegativeList(elements):
190  # consolidate a list of path exclusions and re-inclusions
191  # the result is the list of paths to be removed from the dump
192  result = set()
193  for element in elements:
194  if element[0] == '-':
195  result.add( element )
196  else:
197  result.discard( '-' + element )
198  return sorted( element for element in result )
def consolidateNegativeList
Definition: confdb.py:188
def confdb.HLTProcess.consolidatePositiveList (   elements)
static

Definition at line 200 of file confdb.py.

201  def consolidatePositiveList(elements):
202  # consolidate a list of path selection and re-exclusions
203  # the result is the list of paths to be included in the dump
204  result = set()
205  for element in elements:
206  if element[0] == '-':
207  result.discard( element[1:] )
208  else:
209  result.add( element )
210  return sorted( element for element in result )
211 
def consolidatePositiveList
Definition: confdb.py:200
def confdb.HLTProcess.customize (   self)

Definition at line 258 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, cond::IOVProxyData.data, QGLikelihoodSystematicsObject.data, GeometryComparisonPlotter.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, @563.data, EcalShowerContainmentCorrections::Coefficients.data, confdb.HLTProcess.data, cscdqm::Cache.data, DQMNet::Bucket.data, python.DBCopy.DBCopy.data, conddblib.Payload.data, and confdb.HLTProcess.specificCustomize().

259  def customize(self):
260 
261  # adapt the source to the current scenario
262  if not self.config.fragment:
263  self.build_source()
264 
265  # manual override some parameters
266  if self.config.type in ('HIon', ):
267  if self.config.data:
268  if not self.config.fragment:
269  self._fix_parameter( type = 'InputTag', value = 'rawDataCollector', replace = 'rawDataRepacker')
270 
271 # if self.config.type in ('HIon', ):
# self.data += """
def confdb.HLTProcess.dump (   self)

Definition at line 213 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, cond::IOVProxyData.data, QGLikelihoodSystematicsObject.data, GeometryComparisonPlotter.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, @563.data, EcalShowerContainmentCorrections::Coefficients.data, confdb.HLTProcess.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.

214  def dump(self):
215  self.data = self.data % self.labels
216  if self.config.fragment:
217  self.data = re.sub( r'\bprocess\b', 'fragment', self.data )
218  self.data = re.sub( r'\bProcess\b', 'ProcessFragment', self.data )
219  return self.data
220 
def confdb.HLTProcess.expandWildcards (   globs,
  collection 
)
static

Definition at line 172 of file confdb.py.

References python.rootplot.root2matplotlib.replace().

173  def expandWildcards(globs, collection):
174  # expand a list of unix-style wildcards matching a given collection
175  # wildcards with no matches are silently discarded
176  matches = []
177  for glob in globs:
178  negate = ''
179  if glob[0] == '-':
180  negate = '-'
181  glob = glob[1:]
182  # translate a unix-style glob expression into a regular expression
183  filter = re.compile(r'^' + glob.replace('?', '.').replace('*', '.*').replace('[!', '[^') + r'$')
184  matches.extend( negate + element for element in collection if filter.match(element) )
185  return matches
186 
def expandWildcards
Definition: confdb.py:172
def confdb.HLTProcess.getPathList (   self)

Definition at line 145 of file confdb.py.

146  def getPathList(self):
147  if self.config.menu.run:
148  args = ['--runNumber', self.config.menu.run]
149  else:
150  args = ['--configName', self.config.menu.name]
151  args.extend( (
152  '--cff',
153  '--noedsources',
154  '--noes',
155  '--noservices',
156  '--nosequences',
157  '--nomodules'
158  ) )
159 
160  data, err = self.converter.query( *args )
161  if 'ERROR' in err or 'Exhausted Resultset' in err or 'CONFIG_NOT_FOUND' in err:
162  print "%s: error while retriving the list of paths from the HLT menu" % os.path.basename(sys.argv[0])
163  print
164  print err
165  print
166  sys.exit(1)
167  filter = re.compile(r' *= *cms.(End)?Path.*')
168  paths = [ filter.sub('', line) for line in data.splitlines() if filter.search(line) ]
169  return paths
170 
def confdb.HLTProcess.getRawConfigurationFromDB (   self)

Definition at line 125 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, cond::IOVProxyData.data, QGLikelihoodSystematicsObject.data, GeometryComparisonPlotter.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, @563.data, EcalShowerContainmentCorrections::Coefficients.data, confdb.HLTProcess.data, cscdqm::Cache.data, DQMNet::Bucket.data, python.DBCopy.DBCopy.data, conddblib.Payload.data, and join().

126  def getRawConfigurationFromDB(self):
127  if self.config.menu.run:
128  args = ['--runNumber', self.config.menu.run]
129  else:
130  args = ['--configName', self.config.menu.name ]
131  args.append('--noedsources')
132  for key, vals in self.options.iteritems():
133  if vals:
134  args.extend(('--'+key, ','.join(vals)))
135 
136  data, err = self.converter.query( *args )
137  if 'ERROR' in err or 'Exhausted Resultset' in err or 'CONFIG_NOT_FOUND' in err:
138  print "%s: error while retriving the HLT menu" % os.path.basename(sys.argv[0])
139  print
140  print err
141  print
142  sys.exit(1)
143  self.data = data
144 
static std::string join(char **cmd)
Definition: RemoteFile.cc:18
def getRawConfigurationFromDB
Definition: confdb.py:125
def confdb.HLTProcess.specificCustomize (   self)

Definition at line 222 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, cond::IOVProxyData.data, QGLikelihoodSystematicsObject.data, GeometryComparisonPlotter.data, TkLasBeam.data, EcalGlobalShowerContainmentCorrectionsVsEta::Coefficients.data, edm::MapOfVectors< K, T >::Iter.data, edm::DetSet< T >.data, @563.data, EcalShowerContainmentCorrections::Coefficients.data, confdb.HLTProcess.data, cscdqm::Cache.data, DQMNet::Bucket.data, python.DBCopy.DBCopy.data, conddblib.Payload.data, lhef::XMLDocument.source, confdb.HLTProcess.source, DQMNet::Peer.source, Config.Process.source, gen::Hydjet2Hadronizer.source, condformats_serialization_generate.SerializationCodeGenerator.source, and BeautifulSoup.ResultSet.source.

Referenced by confdb.HLTProcess.customize().

223  def specificCustomize(self):
224  # specific customizations now live in HLTrigger.Configuration.customizeHLTforALL.customizeHLTforAll(.,.)
225  if self.config.fragment:
226  self.data += """
227 # add specific customizations
228 from HLTrigger.Configuration.customizeHLTforALL import customizeHLTforAll
229 fragment = customizeHLTforAll(fragment)
230 """
231  else:
232  if self.config.type=="Fake":
233  prefix = "run1"
234  else:
235  prefix = "run2"
236  _gtData = "auto:"+prefix+"_hlt_"+self.config.type
237  _gtMc = "auto:"+prefix+"_mc_" +self.config.type
238  self.data += """
239 # add specific customizations
240 _customInfo = {}
241 _customInfo['menuType' ]= "%s"
242 _customInfo['globalTags']= {}
243 _customInfo['globalTags'][True ] = "%s"
244 _customInfo['globalTags'][False] = "%s"
245 _customInfo['inputFiles']={}
246 _customInfo['inputFiles'][True] = "file:RelVal_Raw_%s_DATA.root"
247 _customInfo['inputFiles'][False] = "file:RelVal_Raw_%s_MC.root"
248 _customInfo['maxEvents' ]= %s
249 _customInfo['globalTag' ]= "%s"
250 _customInfo['inputFile' ]= %s
251 _customInfo['realData' ]= %s
252 _customInfo['fastSim' ]= %s
253 from HLTrigger.Configuration.customizeHLTforALL import customizeHLTforAll
254 process = customizeHLTforAll(process,_customInfo)
255 """ % (self.config.type,_gtData,_gtMc,self.config.type,self.config.type,self.config.events,self.config.globaltag,self.source,self.config.data,self.config.fastsim)
256 
def specificCustomize
Definition: confdb.py:222

Member Data Documentation

confdb.HLTProcess.config

Definition at line 84 of file confdb.py.

confdb.HLTProcess.converter

Definition at line 118 of file confdb.py.

confdb.HLTProcess.data

Definition at line 85 of file confdb.py.

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

tuple confdb.HLTProcess.fastsimUnsupportedPaths
static

Definition at line 23 of file confdb.py.

confdb.HLTProcess.labels

Definition at line 100 of file confdb.py.

Referenced by confdb.HLTProcess.dump().

confdb.HLTProcess.options

Definition at line 89 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 87 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 86 of file confdb.py.

Referenced by confdb.HLTProcess.specificCustomize().