CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
fwlite::TFileService Class Reference

#include <TFileService.h>

Inheritance diagram for fwlite::TFileService:
TFileDirectory

Public Member Functions

TFile & file () const
 return opened TFile More...
 
 TFileService (const std::string &fileName)
 constructor More...
 
 TFileService (TFile *aFile)
 constructor with external TFile More...
 
 ~TFileService ()
 destructor More...
 
- Public Member Functions inherited from TFileDirectory
bool cd () const
 
std::string fullPath () const
 return the full path of the stored histograms More...
 
TDirectory * getBareDirectory (const std::string &subdir="") const
 
template<typename T >
TgetObject (const std::string &objname, const std::string &subdir="")
 
template<typename T >
Tmake () const
 make new ROOT object More...
 
template<typename T , typename Arg1 >
Tmake (const Arg1 &a1) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 >
Tmake (const Arg1 &a1, const Arg2 &a2) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3, const Arg4 &a4) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3, const Arg4 &a4, const Arg5 &a5) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3, const Arg4 &a4, const Arg5 &a5, const Arg6 &a6) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3, const Arg4 &a4, const Arg5 &a5, const Arg6 &a6, const Arg7 &a7) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3, const Arg4 &a4, const Arg5 &a5, const Arg6 &a6, const Arg7 &a7, const Arg8 &a8) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3, const Arg4 &a4, const Arg5 &a5, const Arg6 &a6, const Arg7 &a7, const Arg8 &a8, const Arg9 &a9) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9 , typename Arg10 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3, const Arg4 &a4, const Arg5 &a5, const Arg6 &a6, const Arg7 &a7, const Arg8 &a8, const Arg9 &a9, const Arg10 &a10) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9 , typename Arg10 , typename Arg11 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3, const Arg4 &a4, const Arg5 &a5, const Arg6 &a6, const Arg7 &a7, const Arg8 &a8, const Arg9 &a9, const Arg10 &a10, const Arg11 &a11) const
 make new ROOT object More...
 
template<typename T , typename Arg1 , typename Arg2 , typename Arg3 , typename Arg4 , typename Arg5 , typename Arg6 , typename Arg7 , typename Arg8 , typename Arg9 , typename Arg10 , typename Arg11 , typename Arg12 >
Tmake (const Arg1 &a1, const Arg2 &a2, const Arg3 &a3, const Arg4 &a4, const Arg5 &a5, const Arg6 &a6, const Arg7 &a7, const Arg8 &a8, const Arg9 &a9, const Arg10 &a10, const Arg11 &a11, const Arg12 &a12) const
 make new ROOT object More...
 
TFileDirectory mkdir (const std::string &dir, const std::string &descr="")
 create a new subdirectory More...
 
virtual ~TFileDirectory ()
 descructor More...
 

Private Attributes

TFile * file_
 pointer to opened TFile More...
 
std::string fileName_
 

Detailed Description

Definition at line 12 of file TFileService.h.

Constructor & Destructor Documentation

TFileService::TFileService ( const std::string &  fileName)

constructor

Definition at line 7 of file TFileService.cc.

7  :
8  TFileDirectory("", "", TFile::Open(fileName.c_str() , "RECREATE"), ""),
11 {
12 }
TFileDirectory(const std::string &dir, const std::string &descr, TFile *file, const std::string &path)
TFile * file_
pointer to opened TFile
Definition: TFileService.h:28
std::string fileName_
Definition: TFileService.h:29
TFileService::TFileService ( TFile *  aFile)

constructor with external TFile

Definition at line 15 of file TFileService.cc.

15  :
16  TFileDirectory("", "", aFile, ""),
18  fileName_(aFile->GetName())
19 {
20 }
TFileDirectory(const std::string &dir, const std::string &descr, TFile *file, const std::string &path)
TFile * file_
pointer to opened TFile
Definition: TFileService.h:28
std::string fileName_
Definition: TFileService.h:29
TFileService::~TFileService ( )

destructor

Definition at line 22 of file TFileService.cc.

References file_.

22  {
23  file_->Write();
24  file_->Close();
25  delete file_;
26 }
TFile * file_
pointer to opened TFile
Definition: TFileService.h:28

Member Function Documentation

TFile& fwlite::TFileService::file ( ) const
inline

return opened TFile

Definition at line 24 of file TFileService.h.

References file_.

24 { return * file_; }
TFile * file_
pointer to opened TFile
Definition: TFileService.h:28

Member Data Documentation

TFile* fwlite::TFileService::file_
private

pointer to opened TFile

Definition at line 28 of file TFileService.h.

Referenced by file(), and ~TFileService().

std::string fwlite::TFileService::fileName_
private

Definition at line 29 of file TFileService.h.