ATLAS Offline Software
Loading...
Searching...
No Matches
JetMonitoringConfig.JetMonAlgSpec Class Reference
Inheritance diagram for JetMonitoringConfig.JetMonAlgSpec:
Collaboration diagram for JetMonitoringConfig.JetMonAlgSpec:

Public Member Functions

 __init__ (self, name, defaultPath='standardHistos/', TriggerChain='', **args)
 appendHistos (self, *hfillers)
 toAlg (self, monhelper)
 __getattr__ (self, attr)
 __setattr__ (self, attr, value)
 __setitem__ (self, attr, value)
 clone (self, **kwargs)
 dump (self, out=None)

Public Attributes

 name = name
list FillerTools = []

Protected Member Functions

 _dump (self, writeFunc)

Detailed Description

A dictionary specialized to contain a JetMonitoringAlg specification

Definition at line 520 of file JetMonitoringConfig.py.

Constructor & Destructor Documentation

◆ __init__()

JetMonitoringConfig.JetMonAlgSpec.__init__ ( self,
name,
defaultPath = 'standardHistos/',
TriggerChain = '',
** args )

Definition at line 523 of file JetMonitoringConfig.py.

523 def __init__(self, name , defaultPath='standardHistos/', TriggerChain='' ,**args):
524
525 self.name = name
526 args.setdefault('FillerTools',[])
527 args.setdefault('topLevelDir', 'Jets/')
528 args.setdefault('bottomLevelDir', '')
529 args.setdefault('failureOnMissingContainer', True)
530 args.setdefault('onlyPassingJets', True)
531 args.setdefault('eventFiresAnyJetChain',False)
532 args.setdefault('isExpressStreamJob', False)
533 ConfigDict.__init__(self, defaultPath=defaultPath, TriggerChain=TriggerChain, **args)
534 tmpL = self.FillerTools
535 self.FillerTools = []
536 self.appendHistos(*tmpL)
537

Member Function Documentation

◆ __getattr__()

JetMonitoringConfig.ConfigDict.__getattr__ ( self,
attr )
inherited

Definition at line 47 of file JetMonitoringConfig.py.

47 def __getattr__(self, attr):
48 try:
49 return self[attr]
50 except KeyError:
51 dict.__getattribute__(self,attr)
52 #raise AttributeError(attr)
53

◆ __setattr__()

JetMonitoringConfig.ConfigDict.__setattr__ ( self,
attr,
value )
inherited

Definition at line 54 of file JetMonitoringConfig.py.

54 def __setattr__(self, attr, value):
55 if attr in ['keys', 'clear', 'update', 'pop', 'iteritems', 'values','setdefault','get','has_key','copy']:
56 print('ConfigDict ERROR can not assign attribute ', attr)
57 return
58 dict.__setitem__(self, attr, value)
59 dict.__setattr__(self, attr, value)
void print(char *figname, TCanvas *c1)

◆ __setitem__()

JetMonitoringConfig.ConfigDict.__setitem__ ( self,
attr,
value )
inherited

Definition at line 60 of file JetMonitoringConfig.py.

60 def __setitem__(self, attr, value):
61 if attr in ['keys', 'clear', 'update', 'pop', 'iteritems', 'values','setdefault','get','has_key','copy']:
62 print('ConfigDict ERROR can not assign attribute ', attr)
63 return
64 dict.__setitem__(self, attr, value)
65 dict.__setattr__(self, attr, value)
66
67

◆ _dump()

JetMonitoringConfig.JetMonAlgSpec._dump ( self,
writeFunc )
protected

Reimplemented from JetMonitoringConfig.ConfigDict.

Definition at line 562 of file JetMonitoringConfig.py.

562 def _dump(self, writeFunc):
563 def write(s,e='\n'): writeFunc(' '+s,e)
564 def write2(s,e='\n'): writeFunc(' '+s,e)
565 writeFunc(self.__class__.__name__+'(')
566 for k,v in sorted(self.items()):
567 if k == 'FillerTools':
568 write('FillerTools = [')
569 for hspec in v:
570 #print ' uuuu ', hspec
571 hspec._dump(write2)
572 write('')
573 write(']')
574 else:
575 write(k+' = '+str(v))
576 writeFunc(')')
577
578
579# **************************************
580

◆ appendHistos()

JetMonitoringConfig.JetMonAlgSpec.appendHistos ( self,
* hfillers )

Definition at line 538 of file JetMonitoringConfig.py.

538 def appendHistos(self, *hfillers):
539 tmpL = [retrieveHistoToolConf(hspec) for hspec in hfillers]
540 self.FillerTools += tmpL
541

◆ clone()

JetMonitoringConfig.ConfigDict.clone ( self,
** kwargs )
inherited

Reimplemented in JetMonitoringConfig.HistoSpec, and JetMonitoringConfig.ToolSpec.

Definition at line 68 of file JetMonitoringConfig.py.

68 def clone(self, **kwargs):
69 from copy import deepcopy
70 c = deepcopy(self)
71 for k,v in kwargs.items():
72 setattr(c,k,v)
73 return c
74
75

◆ dump()

JetMonitoringConfig.ConfigDict.dump ( self,
out = None )
inherited
prints the content of this dict on stdout (default) or in the file 'out' 

Definition at line 76 of file JetMonitoringConfig.py.

76 def dump(self, out=None):
77 """ prints the content of this dict on stdout (default) or in the file 'out' """
78 if out is None :
79 from sys import stdout
80 out = stdout
81 _write = out.write
82 def write(s, e='\n'): _write(s+e)
83 self._dump(write)
84
-event-from-file

◆ toAlg()

JetMonitoringConfig.JetMonAlgSpec.toAlg ( self,
monhelper )

Definition at line 542 of file JetMonitoringConfig.py.

542 def toAlg(self, monhelper):
543 from AthenaConfiguration.ComponentFactory import CompFactory
544 alg = monhelper.addAlgorithm(CompFactory.JetMonitoringAlg, self.name)
545 alg.TriggerChain = self.TriggerChain
546 alg.JetContainerName = self.JetContainerName
547 alg.FailureOnMissingContainer = self.failureOnMissingContainer
548 alg.OnlyPassingJets = self.onlyPassingJets
549 alg.EventFiresAnyJetChain = self.eventFiresAnyJetChain
550 alg.EnforceExpressTriggers = self.isExpressStreamJob
551
552 path = self.defaultPath
553 tools = []
554 for tconf in self.FillerTools:
555 tconf.topLevelDir = self.topLevelDir
556 tconf.bottomLevelDir = self.bottomLevelDir
557 tools.append( tconf.toTool( ))
558 tconf.defineHisto(alg, monhelper, path)
559 alg.FillerTools = tools
560 return alg
561

Member Data Documentation

◆ FillerTools

list JetMonitoringConfig.JetMonAlgSpec.FillerTools = []

Definition at line 535 of file JetMonitoringConfig.py.

◆ name

JetMonitoringConfig.JetMonAlgSpec.name = name

Definition at line 525 of file JetMonitoringConfig.py.


The documentation for this class was generated from the following file: