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 = []
 applyLatestCalibration

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 args.setdefault('applyLatestCalibration',False)
534 args.setdefault('JetCalibTool',[])
535 ConfigDict.__init__(self, defaultPath=defaultPath, TriggerChain=TriggerChain, **args)
536 tmpL = self.FillerTools
537 self.FillerTools = []
538 self.appendHistos(*tmpL)
539

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 567 of file JetMonitoringConfig.py.

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

◆ appendHistos()

JetMonitoringConfig.JetMonAlgSpec.appendHistos ( self,
* hfillers )

Definition at line 540 of file JetMonitoringConfig.py.

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

◆ 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 544 of file JetMonitoringConfig.py.

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

Member Data Documentation

◆ applyLatestCalibration

JetMonitoringConfig.JetMonAlgSpec.applyLatestCalibration

Definition at line 554 of file JetMonitoringConfig.py.

◆ FillerTools

list JetMonitoringConfig.JetMonAlgSpec.FillerTools = []

Definition at line 537 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: