|
Gaudi Framework, version v22r2 |
| Home | Generated: Tue May 10 2011 |

Public Member Functions | |
| def | __init__ |
| def | save |
| def | close |
Public Attributes | |
| file | |
| aida2root | |
| aidaTypes | |
Private Member Functions | |
| def | __convertibleType |
Static Private Attributes | |
| string | __author__ = "Juan Palacios juan.palacios@nikhef.nl" |
Class to write histograms to a ROOT file.
hFile = HistoFile("myFile.root")
myHisto = ...
hFile.save(myHisto)
myHisto0 = ...
myHisto1 = ...
myHisto2 = ...
hFile.save(myHisto0, myHisto1, myHisto2)
histoList = [h0, h1, h2, h3]
hFile.save(histoList)
...
hWriter.close()
Definition at line 814 of file HistoUtils.py.
| def GaudiPython::HistoUtils::HistoFile::__init__ | ( | self, | |
| fileName | |||
| ) |
Definition at line 831 of file HistoUtils.py.
00832 : 00833 self.file = TFile(fileName, "RECREATE") 00834 self.aida2root = gbl.Gaudi.Utils.Aida2ROOT.aida2root 00835 self.aidaTypes = [ gbl.AIDA.IHistogram1D, 00836 gbl.AIDA.IHistogram2D, 00837 gbl.AIDA.IHistogram3D, 00838 gbl.AIDA.IProfile1D, 00839 gbl.AIDA.IProfile2D, 00840 gbl.AIDA.IHistogram ]
| def GaudiPython::HistoUtils::HistoFile::__convertibleType | ( | self, | |
| histo | |||
| ) | [private] |
Definition at line 841 of file HistoUtils.py.
| def GaudiPython::HistoUtils::HistoFile::close | ( | self ) |
Definition at line 862 of file HistoUtils.py.
| def GaudiPython::HistoUtils::HistoFile::save | ( | self, | |
| args | |||
| ) |
This function stores histograms on the file for future saving. It takes an arbitrary number of AIDA or ROOT histograms or a list of them.
Definition at line 847 of file HistoUtils.py.
00848 : 00849 """ 00850 This function stores histograms on the file for future saving. 00851 It takes an arbitrary number of AIDA or ROOT histograms or 00852 a list of them. 00853 """ 00854 if args : 00855 if type(args[0])==list : 00856 histoList = args[0] 00857 else : 00858 histoList = args 00859 for h in histoList : 00860 if self.__convertibleType(h) : h = self.aida2root(h) 00861 h.Write()
string GaudiPython::HistoUtils::HistoFile::__author__ = "Juan Palacios juan.palacios@nikhef.nl" [static, private] |
Definition at line 829 of file HistoUtils.py.
Definition at line 831 of file HistoUtils.py.
Definition at line 831 of file HistoUtils.py.
Definition at line 831 of file HistoUtils.py.