ATLAS Offline Software
Public Member Functions | Public Attributes | Static Public Attributes | List of all members
ROOTUtils.MyCanvas Class Reference
Inheritance diagram for ROOTUtils.MyCanvas:
Collaboration diagram for 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 40 of file roofit/ROOTUtils.py.

Constructor & Destructor Documentation

◆ __init__()

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

Definition at line 51 of file roofit/ROOTUtils.py.

51  def __init__(self,name='MyCanvas', size='default', xdivs=1, ydivs=1, saveAsList=None, autoSaveOnExit=None):
52  super(MyCanvas,self).__init__(name,name,myCanvasSizes[size][0],myCanvasSizes[size][1])
53  self.name = name
54  if saveAsList!=None:
55  self.saveAsList = saveAsList
56  else:
57  self.saveAsList = MyCanvas.saveAsList
58  if autoSaveOnExit!=None:
59  self.autoSaveOnExit = autoSaveOnExit
60  else:
61  self.autoSaveOnExit = MyCanvas.autoSaveOnExit
62  self.autoName = MyCanvas.autoName
63  self.Divide(xdivs,ydivs)
64 

◆ __del__()

def ROOTUtils.MyCanvas.__del__ (   self)

Definition at line 65 of file roofit/ROOTUtils.py.

65  def __del__(self):
66  if self.autoSaveOnExit:
67  self.save()
68 

Member Function Documentation

◆ save()

def ROOTUtils.MyCanvas.save (   self)

Definition at line 69 of file roofit/ROOTUtils.py.

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

Member Data Documentation

◆ autoName [1/2]

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

Definition at line 49 of file roofit/ROOTUtils.py.

◆ autoName [2/2]

ROOTUtils.MyCanvas.autoName

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

◆ autoSaveOnExit [1/2]

bool ROOTUtils.MyCanvas.autoSaveOnExit = False
static

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

◆ autoSaveOnExit [2/2]

ROOTUtils.MyCanvas.autoSaveOnExit

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

◆ name

ROOTUtils.MyCanvas.name

Definition at line 53 of file roofit/ROOTUtils.py.

◆ saveAsList [1/2]

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

Definition at line 47 of file roofit/ROOTUtils.py.

◆ saveAsList [2/2]

ROOTUtils.MyCanvas.saveAsList

Definition at line 55 of file roofit/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