Ejemplo n.º 1
0
        def htmlModule(mod):
            mod_label_html = div(elem('a',
                                      data.label(mod),
                                      'title',
                                      name=data.label(mod)),
                                 'module_label ' + data.type(mod),
                                 onClick='return toggleModuleVisible(\'%s\')' %
                                 ('mod_%s' % (data.label(mod))))

            mod_table = elem(
                'table',
                elem('tr',
                     elem('td', 'Type', 'label') + elem('td', data.type(mod)))
                + elem(
                    'tr',
                    elem('td', 'Class', 'label') +
                    elem('td', data.classname(mod))), 'module_table')

            mod_pset = htmlPSet(mod.parameters_())

            mod_content_html = div(mod_table + mod_pset,
                                   'module_area',
                                   id='mod_%s' % data.label(mod))
            return div(mod_label_html + mod_content_html,
                       'module',
                       id='module_' + data.label(mod))
Ejemplo n.º 2
0
def checkMessageLoggerSvc(cfgInstance):
    """
    _checkMessageLogger_

    Check that the message logger is active and provides the default
    job report and event logger settings for production
    
    """

    svcs = cfgInstance.services

    #  //
    # // Check Job report service will write the expected
    #//  FrameworkJobReport.xml file
    if not svcs.has_key('MessageLogger'):
        cfgInstance.add_(CfgModules.Service("MessageLogger"))

    messageLogger = cfgInstance.services['MessageLogger']

    if "fwkJobReports" not in messageLogger.parameterNames_():
        messageLogger.fwkJobReports = CfgTypes.untracked(CfgTypes.vstring())

    if "FrameworkJobReport" not in messageLogger.fwkJobReports:
        messageLogger.fwkJobReports.append("FrameworkJobReport")

    if "FrameworkJobReport" not in messageLogger.parameterNames_():
        messageLogger.FrameworkJobReport = CfgTypes.untracked(CfgTypes.PSet())

    messageLogger.FrameworkJobReport.default = CfgTypes.untracked(
        CfgTypes.PSet(limit=CfgTypes.untracked(CfgTypes.int32(0))))
    messageLogger.FrameworkJobReport.FwkJob = CfgTypes.untracked(
        CfgTypes.PSet(limit=CfgTypes.untracked(CfgTypes.int32(10000000))))

    #  //
    # // Install the per event output
    #//
    if "destinations" not in messageLogger.parameterNames_():
        messageLogger.destinations = CfgTypes.untracked(CfgTypes.vstring())

    if "EventLogger" not in messageLogger.destinations:
        messageLogger.destinations.append("EventLogger")

    if "EventLogger" not in messageLogger.parameterNames_():
        messageLogger.EventLogger = CfgTypes.untracked(CfgTypes.PSet())

    messageLogger.EventLogger.default = CfgTypes.untracked(
        CfgTypes.PSet(limit=CfgTypes.untracked(CfgTypes.int32(0))))

    messageLogger.FrameworkJobReport.FwkReport = CfgTypes.untracked(
        CfgTypes.PSet(limit=CfgTypes.untracked(CfgTypes.int32(10000000)),
                      reportEvery=CfgTypes.untracked(
                          CfgTypes.int32(10000000))))

    return
Ejemplo n.º 3
0
 def htmlModule(mod):
   mod_label_html = div(elem('a',data.label(mod),'title',name=data.label(mod)),'module_label '+data.type(mod),onClick='return toggleModuleVisible(\'%s\')'%('mod_%s'%(data.label(mod))))
   
   mod_table = elem('table',
     elem('tr',elem('td','Type','label')+elem('td',data.type(mod)))
    +elem('tr',elem('td','Class','label')+elem('td',data.classname(mod))),
     'module_table')
     
   mod_pset = htmlPSet(mod.parameters_())
   
   mod_content_html = div(mod_table+mod_pset,'module_area',id='mod_%s'%data.label(mod))
   return div(mod_label_html+mod_content_html,'module',id='module_'+data.label(mod))
Ejemplo n.º 4
0
 def moduledict(mod,prefix,links=False):
   result={}
   result['label']=data.label(mod)
   result['class']=data.classname(mod)
   result['file']=data.pypath(mod)
   result['line']=data.lineNumber(mod)
   result['package']=data.pypackage(mod)
   result['pset']=pset(mod.parameters_())
   result['type']=data.type(mod)
   if links:
     result['uses']=[data.uses(mod)]
     result['usedby']=[data.usedBy(mod)]
   result['id']='%s_%s'%(prefix,data.label(mod))
   return result
Ejemplo n.º 5
0
    def setTFileAdaptorConfig(self, config):
        """
        Give the TFileAdaptor the provided config options
        """
        adaptor = self.data.services.get('AdaptorConfig')
        if adaptor is None:
            self.data.add_(CfgModules.Service('AdaptorConfig'))

        for option in config:
            value = str(config[option])
            # so far only support boolean & string options
            if option in ('enable', 'stats'):
                thisType = CfgTypes.bool._valueFromString
            else:
                thisType = CfgTypes.string

            setattr(self.data.services['AdaptorConfig'], option,
                    CfgTypes.untracked(thisType(value)))