CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
TFileService.cc
Go to the documentation of this file.
2 #include "TFile.h"
3 #include "TROOT.h"
4 
5 namespace fwlite {
6 
8  TFileDirectory("", "", TFile::Open(fileName.c_str() , "RECREATE"), ""),
9  file_(TFileDirectory::file_),
10  fileName_(fileName)
11 {
12 }
13 
14 
16  TFileDirectory("", "", aFile, ""),
17  file_(TFileDirectory::file_),
18  fileName_(aFile->GetName())
19 {
20 }
21 
23  file_->Write();
24  file_->Close();
25  delete file_;
26 }
27 
28 }
~TFileService()
destructor
Definition: TFileService.cc:22
TFile * file_
pointer to opened TFile
Definition: TFileService.h:28
TFileService(const std::string &fileName)
constructor
Definition: TFileService.cc:7