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

IOfileServer Class Reference

protected server that operates the input and output persistent data files. More...

#include <IOfileServer.h>

Inheritance diagram for IOfileServer:

IOfileVI serviceI messageVI optionVI nameVI nameVI dataIOROOTServer List of all members.

Public Methods

virtual void open ()
 open the files in server named "input", "output" and "histo".

virtual void close ()
 close the files in server named "input", "output" and "histo".

virtual bool nextEvent ()
 virtual method to know if there is one event more in the file. More...

virtual void readEvent ()
 virtual method to read the next event - overwrite by the derived class.

virtual void writeEvent ()
 virtual method to write an event - overwrite by the derived class.

virtual void skipEvent ()
 virtual method to skip next event - overwrite by the derived class.

virtual void writeOut () const
 virtual method to write Out information of this class. More...


Protected Methods

 IOfileServer ()
 constructor - execute the pure virtual method defineIOfiles().

virtual ~IOfileServer ()
 destructor. More...

virtual void defineIOfiles ()
 the User should declare the IOfiles in this method.

bool search (std::string name) const
 returns true is there is a file with that name in server.

virtual void addIOfile (std::string name, IOfileVI* file)
 add a file into the server.

IOfileVIgetIOfile (std::string name) const
 returns the IOfileVI file in server.

std::string getNextInFileName ()
 returns the next input file name to open.

std::string getHistoFileName () const
 returns the histogram file name.

std::string getOutFileName () const
 returns the output file name.

virtual void defineOption ()
 define the options optionVI.

virtual void setOption (std::string par, std::string v)
 method to define the names of the input/output IO files.


Private Methods

bool displayFrequency () const
 display message.


Private Attributes

serverVI<IOfileVI>* m_server
IOfileVIm_input
 pointer to avoid the search.

IOfileVIm_output
IOfileVIm_histo
int m_ifile
 number of the input file currently open.

std::vector<std::string> m_InFileList
 List of input files.

std::string m_InFile
 name of the last input input file.

std::string m_histoFile
 name of the histo file.

std::string m_OutFile
 name of the output file.

int m_displayFreq
 frequency to display a message.


Detailed Description

protected server that operates the input and output persistent data files.

IOfileServer should be a base class of the dataIOPersistentServer class. In our case Persistent is ROOT, and the class is named dataIOROOTServer.
Users can define the input/output file names of the following system defined IOfiles "input", "output" and "histo".

Definition at line 42 of file IOfileServer.h.


Constructor & Destructor Documentation

IOfileServer::IOfileServer ( ) [protected]

constructor - execute the pure virtual method defineIOfiles().

Definition at line 7 of file IOfileServer.cpp.

IOfileServer::~IOfileServer ( ) [inline, protected, virtual]

destructor.

call defineIOfiles, the class where the user should implement the input, output and histo file classes, using the typedef

Definition at line 30 of file IOfileServer.cpp.


Member Function Documentation

void IOfileServer::addIOfile ( std::string name,
IOfileVI * file ) [inline, protected, virtual]

add a file into the server.

Definition at line 78 of file IOfileServer.h.

void IOfileServer::close ( ) [inline, virtual]

close the files in server named "input", "output" and "histo".

Reimplemented from IOfileVI.

Definition at line 114 of file IOfileServer.cpp.

void IOfileServer::defineIOfiles ( ) [inline, protected, virtual]

the User should declare the IOfiles in this method.

Reimplemented in dataIOROOTServer.

Definition at line 72 of file IOfileServer.h.

void IOfileServer::defineOption ( ) [inline, protected, virtual]

define the options optionVI.

Reimplemented from optionVI.

Definition at line 138 of file IOfileServer.cpp.

bool IOfileServer::displayFrequency ( ) const [private]

display message.

Definition at line 123 of file IOfileServer.cpp.

std::string IOfileServer::getHistoFileName ( ) const [inline, protected]

returns the histogram file name.

Definition at line 88 of file IOfileServer.h.

IOfileVI * IOfileServer::getIOfile ( std::string name ) const [protected]

returns the IOfileVI file in server.

Definition at line 35 of file IOfileServer.cpp.

std::string IOfileServer::getNextInFileName ( ) [protected]

returns the next input file name to open.

Definition at line 129 of file IOfileServer.cpp.

std::string IOfileServer::getOutFileName ( ) const [inline, protected]

returns the output file name.

Definition at line 90 of file IOfileServer.h.

bool IOfileServer::nextEvent ( ) [inline, virtual]

virtual method to know if there is one event more in the file.

open the output file

Reimplemented from IOfileVI.

Definition at line 84 of file IOfileServer.cpp.

void IOfileServer::open ( ) [inline, virtual]

open the files in server named "input", "output" and "histo".

Reimplemented from IOfileVI.

Definition at line 43 of file IOfileServer.cpp.

void IOfileServer::readEvent ( ) [inline, virtual]

virtual method to read the next event - overwrite by the derived class.

Reimplemented from IOfileVI.

Definition at line 91 of file IOfileServer.cpp.

bool IOfileServer::search ( std::string name ) const [inline, protected]

returns true is there is a file with that name in server.

Reimplemented from optionVI.

Definition at line 75 of file IOfileServer.h.

void IOfileServer::setOption ( std::string par,
std::string v ) [inline, protected, virtual]

method to define the names of the input/output IO files.

Reimplemented from optionVI.

Definition at line 148 of file IOfileServer.cpp.

void IOfileServer::skipEvent ( ) [inline, virtual]

virtual method to skip next event - overwrite by the derived class.

Reimplemented from IOfileVI.

Definition at line 106 of file IOfileServer.cpp.

void IOfileServer::writeEvent ( ) [inline, virtual]

virtual method to write an event - overwrite by the derived class.

Reimplemented from IOfileVI.

Definition at line 99 of file IOfileServer.cpp.

void IOfileServer::writeOut ( ) const [inline, virtual]

virtual method to write Out information of this class.

if the file is "InFile", it added into the list of input files

Reimplemented from messageVI.

Definition at line 156 of file IOfileServer.cpp.


Member Data Documentation

std::string IOfileServer::m_InFile [private]

name of the last input input file.

Definition at line 116 of file IOfileServer.h.

std::vector<std::string> IOfileServer::m_InFileList [private]

List of input files.

Definition at line 114 of file IOfileServer.h.

std::string IOfileServer::m_OutFile [private]

name of the output file.

Definition at line 120 of file IOfileServer.h.

int IOfileServer::m_displayFreq [private]

frequency to display a message.

Definition at line 123 of file IOfileServer.h.

IOfileVI * IOfileServer::m_histo [private]

Definition at line 109 of file IOfileServer.h.

std::string IOfileServer::m_histoFile [private]

name of the histo file.

Definition at line 118 of file IOfileServer.h.

int IOfileServer::m_ifile [private]

number of the input file currently open.

Definition at line 112 of file IOfileServer.h.

IOfileVI * IOfileServer::m_input [private]

pointer to avoid the search.

Definition at line 107 of file IOfileServer.h.

IOfileVI * IOfileServer::m_output [private]

Definition at line 108 of file IOfileServer.h.

serverVI<IOfileVI>* IOfileServer::m_server [private]

Definition at line 104 of file IOfileServer.h.


The documentation for this class was generated from the following files:
Generated at Fri Aug 18 12:57:40 2000 for centella framework by doxygen 1.1.3 written by Dimitri van Heesch, © 1997-2000