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

Public Member Functions

def __init__ (self, name='MyCanvas', size='default', xdivs=1, ydivs=1, saveAsList=None, autoSaveOnExit=None)
 
def __del__ (self)
 
def save (self)
 

Public Attributes

 name
 
 saveAsList
 
 autoSaveOnExit
 
 autoName
 

Static Public Attributes

list saveAsList = [ '.gif' ]
 
bool autoSaveOnExit = False
 
string autoName = '%s.autosave%s'
 

Detailed Description

Class MyCanvas is a ROOT TCanvas that allows choosing one of
   several typically used canvas sizes. It can automatically save
   the canvas in different formats upon destruction provided the
   user makes sure that all histograms still exist.

Definition at line 37 of file python/ROOTUtils.py.

Constructor & Destructor Documentation

◆ __init__()

def python.ROOTUtils.MyCanvas.__init__ (   self,
  name = 'MyCanvas',
  size = 'default',
  xdivs = 1,
  ydivs = 1,
  saveAsList = None,
  autoSaveOnExit = None 
)

Definition at line 48 of file python/ROOTUtils.py.

48  def __init__(self,name='MyCanvas', size='default', xdivs=1, ydivs=1, saveAsList=None, autoSaveOnExit=None):
49  super(MyCanvas,self).__init__(name)
50  self.name = name
51  if saveAsList is not None:
52  self.saveAsList = saveAsList
53  else:
54  self.saveAsList = MyCanvas.saveAsList
55  if autoSaveOnExit is not None:
56  self.autoSaveOnExit = autoSaveOnExit
57  else:
58  self.autoSaveOnExit = MyCanvas.autoSaveOnExit
59  self.autoName = MyCanvas.autoName
60  self.Divide(xdivs,ydivs)
61 

◆ __del__()

def python.ROOTUtils.MyCanvas.__del__ (   self)

Definition at line 62 of file python/ROOTUtils.py.

62  def __del__(self):
63  if self.autoSaveOnExit:
64  self.save()
65 

Member Function Documentation

◆ save()

def python.ROOTUtils.MyCanvas.save (   self)

Definition at line 66 of file python/ROOTUtils.py.

66  def save(self):
67  for o in self.saveAsList:
68  if o[0]=='.':
69  self.SaveAs(self.autoName % (self.name,o))
70  else:
71  self.SaveAs(o)
72 
73 

Member Data Documentation

◆ autoName [1/2]

string python.ROOTUtils.MyCanvas.autoName = '%s.autosave%s'
static

Definition at line 46 of file python/ROOTUtils.py.

◆ autoName [2/2]

python.ROOTUtils.MyCanvas.autoName

Definition at line 59 of file python/ROOTUtils.py.

◆ autoSaveOnExit [1/2]

bool python.ROOTUtils.MyCanvas.autoSaveOnExit = False
static

Definition at line 45 of file python/ROOTUtils.py.

◆ autoSaveOnExit [2/2]

python.ROOTUtils.MyCanvas.autoSaveOnExit

Definition at line 56 of file python/ROOTUtils.py.

◆ name

python.ROOTUtils.MyCanvas.name

Definition at line 50 of file python/ROOTUtils.py.

◆ saveAsList [1/2]

list python.ROOTUtils.MyCanvas.saveAsList = [ '.gif' ]
static

Definition at line 44 of file python/ROOTUtils.py.

◆ saveAsList [2/2]

python.ROOTUtils.MyCanvas.saveAsList

Definition at line 52 of file python/ROOTUtils.py.


The documentation for this class was generated from the following file:
checkTP.save
def save(self, fileName="./columbo.out")
Definition: checkTP.py:178
python.processes.powheg.ZZ.ZZ.__init__
def __init__(self, base_directory, **kwargs)
Constructor: all process options are set here.
Definition: ZZ.py:18
python.AthDsoLogger.__del__
def __del__(self)
Definition: AthDsoLogger.py:82