ATLAS Offline Software
Public Member Functions | Public Attributes | Private Member Functions | List of all members
JetMonitoringConfig.JetMonAlgSpec Class Reference
Inheritance diagram for JetMonitoringConfig.JetMonAlgSpec:
Collaboration diagram for JetMonitoringConfig.JetMonAlgSpec:

Public Member Functions

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

Public Attributes

 name
 
 FillerTools
 

Private Member Functions

def _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__()

def 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__()

def 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__()

def 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)

◆ __setitem__()

def 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()

def JetMonitoringConfig.JetMonAlgSpec._dump (   self,
  writeFunc 
)
private

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()

def 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()

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

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()

def 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 

◆ toAlg()

def 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

JetMonitoringConfig.JetMonAlgSpec.FillerTools

Definition at line 535 of file JetMonitoringConfig.py.

◆ name

JetMonitoringConfig.JetMonAlgSpec.name

Definition at line 525 of file JetMonitoringConfig.py.


The documentation for this class was generated from the following file:
python.Utilities.clone
clone
Definition: Utilities.py:134
run_Egamma1_LArStrip_Fex.dump
dump
Definition: run_Egamma1_LArStrip_Fex.py:88
python.ByteStreamConfig.write
def write
Definition: Event/ByteStreamCnvSvc/python/ByteStreamConfig.py:247
DerivationFramework::TriggerMatchingUtils::sorted
std::vector< typename T::value_type > sorted(T begin, T end)
Helper function to create a sorted vector from an unsorted one.
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:25
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
JetMonitoringConfig.retrieveHistoToolConf
def retrieveHistoToolConf(alias)
Definition: JetMonitoringConfig.py:615
python.Bindings.__setitem__
__setitem__
Definition: Control/AthenaPython/python/Bindings.py:771
str
Definition: BTagTrackIpAccessor.cxx:11
python.PyAthenaComps.__setattr__
__setattr__
Definition: PyAthenaComps.py:39