Main Page   Class Hierarchy   Alphabetical List   Compound List   File List   Compound Members   File Members  

rTFileBase.cpp

Go to the documentation of this file.
00001 #include "Event/rTFileBase.h"
00002 #include "TFile.h"
00003 #include "TROOT.h"
00004 
00005 //#############################################
00006 void rTFileBase::open()
00007 //##############################################
00008 {
00009 
00010         std::string name = getFileName();
00011         if (name == "") return;
00012 
00013         if (getMode() == IOBase::WRITE) {
00014                 m_RFile = new TFile(name.c_str(),"RECREATE"," centella rTFileServer");
00015         } else if (getMode() == IOBase::READ) {
00016                 m_RFile = new TFile(name.c_str());
00017         }
00018 
00019         if (m_RFile != 0) setOpen(true); 
00020 }
00021 //###########################
00022 void rTFileBase::close()
00023 //###########################
00024 {
00025         if (!isOpen()) return;
00026         m_RFile->cd();
00027         if (getMode() == IOBase::WRITE) m_RFile->Write();
00028         m_RFile->Close();
00029         setOpen(false);
00030 }
00031 //########################
00032 void rTFileBase::clear()
00033 //########################
00034 {
00035         IOfileVI::clear();
00036         m_RFile = 0;
00037 }
00038 

Generated at Fri Aug 18 12:57:38 2000 for centella framework by doxygen 1.1.3 written by Dimitri van Heesch, © 1997-2000