CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Public Attributes
tfile.TFileService Class Reference
Inheritance diagram for tfile.TFileService:

Public Member Functions

def __init__
 
def stop
 

Public Attributes

 file
 

Detailed Description

TFile service.
The file attribute is a TFile that can be used in several analyzers.
The file is closed when the service stops.

Example configuration:

output_rootfile = cfg.Service(
  TFileService,
  'myhists',
  fname='histograms.root',
  option='recreate'
)

Definition at line 4 of file tfile.py.

Constructor & Destructor Documentation

def tfile.TFileService.__init__ (   self,
  cfg,
  comp,
  outdir 
)

Definition at line 19 of file tfile.py.

References join().

19 
20  def __init__(self, cfg, comp, outdir):
21  fname = '/'.join([outdir, cfg.fname])
22  self.file = TFile(fname, cfg.option)
static std::string join(char **cmd)
Definition: RemoteFile.cc:18

Member Function Documentation

def tfile.TFileService.stop (   self)

Definition at line 23 of file tfile.py.

23 
24  def stop(self):
25  self.file.Write()
26  self.file.Close()

Member Data Documentation

tfile.TFileService.file

Definition at line 21 of file tfile.py.