ATLAS Offline Software
Public Member Functions | Static Public Member Functions | Public Attributes | Static Public Attributes | Static Private Attributes | List of all members
python.App.DataSetMgr Class Reference
Inheritance diagram for python.App.DataSetMgr:
Collaboration diagram for python.App.DataSetMgr:

Public Member Functions

def __new__ (cls, *args, **kw)
 
def __init__ (self, name, data, label=None)
 

Static Public Member Functions

def labels (keys=None)
 
def names ()
 
def colorIter ()
 

Public Attributes

 name
 
 data
 
 bins
 
 label
 

Static Public Attributes

dictionary instances = { }
 

Static Private Attributes

dictionary __slots__
 

Detailed Description

Borg-class (python-singleton) to hold the different 'dataset'

Definition at line 483 of file App.py.

Constructor & Destructor Documentation

◆ __init__()

def python.App.DataSetMgr.__init__ (   self,
  name,
  data,
  label = None 
)

Definition at line 539 of file App.py.

539  def __init__(self, name, data, label=None):
540 
541  object.__init__(self)
542  self.name = name
543  if not self.data:
544  self.data = data
545  if not self.bins:
546  self.bins = []
547 
548  if not self.label:
549  self.label = name
550 
551  if label is None:
552  self.label = self.name
553 
554  return
555 
556 

Member Function Documentation

◆ __new__()

def python.App.DataSetMgr.__new__ (   cls,
args,
**  kw 
)

Definition at line 494 of file App.py.

494  def __new__(cls, *args, **kw):
495  if len(args) > 0:
496  kw['name' ] = args[0]
497  if len(args) > 1:
498  kw['data' ] = args[1]
499  if len(args) > 2:
500  kw['label'] = args[2]
501 
502  # already created ?
503  if kw['name'] in cls.instances.keys():
504  return cls.instances[kw['name']]
505 
506  # create new instance
507  obj = object.__new__(cls)
508  object.__init__(obj)
509 
510  for k in cls.__slots__.keys():
511  setattr(obj, k, cls.__slots__[k])
512 
513  # update repository of instances
514  cls.instances[kw['name']] = obj
515 
516  return obj
517 
518 

◆ colorIter()

def python.App.DataSetMgr.colorIter ( )
static

Definition at line 533 of file App.py.

533  def colorIter():
534  import pylab
535  # skip indigo...
536  color = iter(list(pylab.cm.colors.cnames.keys())[1:])
537  return color
538 

◆ labels()

def python.App.DataSetMgr.labels (   keys = None)
static

Definition at line 520 of file App.py.

520  def labels( keys = None ):
521  if keys is None:
522  keys = list(DataSetMgr.instances.keys())
523  keys.sort()
524  return [DataSetMgr.instances[k].label for k in keys]
525 

◆ names()

def python.App.DataSetMgr.names ( )
static

Definition at line 527 of file App.py.

527  def names():
528  keys = list(DataSetMgr.instances.keys())
529  keys.sort()
530  return keys
531 

Member Data Documentation

◆ __slots__

dictionary python.App.DataSetMgr.__slots__
staticprivate
Initial value:
= {
'name' : "",
'data' : None,
'label': None,
'bins' : None,
}

Definition at line 487 of file App.py.

◆ bins

python.App.DataSetMgr.bins

Definition at line 546 of file App.py.

◆ data

python.App.DataSetMgr.data

Definition at line 544 of file App.py.

◆ instances

dictionary python.App.DataSetMgr.instances = { }
static

Definition at line 486 of file App.py.

◆ label

python.App.DataSetMgr.label

Definition at line 549 of file App.py.

◆ name

python.App.DataSetMgr.name

Definition at line 542 of file App.py.


The documentation for this class was generated from the following file:
beamspotnt.labels
list labels
Definition: bin/beamspotnt.py:1447
python.subdetectors.mmg.names
names
Definition: mmg.py:8
histSizes.list
def list(name, path='/')
Definition: histSizes.py:38
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
python.Bindings.keys
keys
Definition: Control/AthenaPython/python/Bindings.py:790