#include <IOfileServer.h>
Inheritance diagram for IOfileServer:
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. | |
IOfileVI* | getIOfile (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 |
IOfileVI* | m_input |
pointer to avoid the search. | |
IOfileVI* | m_output |
IOfileVI* | m_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. |
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".
defioneIOfiles()
method. defineOption()
implementation.
Definition at line 42 of file IOfileServer.h.
|
constructor - execute the pure virtual method defineIOfiles()
.
Definition at line 7 of file IOfileServer.cpp.
|
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.
|
|
close the files in server named "input", "output" and "histo".
Reimplemented from IOfileVI.
Definition at line 114 of file IOfileServer.cpp.
|
the User should declare the IOfiles in this method.
Reimplemented in dataIOROOTServer.
Definition at line 72 of file IOfileServer.h.
|
define the options optionVI.
Reimplemented from optionVI.
Definition at line 138 of file IOfileServer.cpp.
|
|
|
|
|
|
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.
|
open the files in server named "input", "output" and "histo".
Reimplemented from IOfileVI.
Definition at line 43 of file IOfileServer.cpp.
|
virtual method to read the next event - overwrite by the derived class.
Reimplemented from IOfileVI.
Definition at line 91 of file IOfileServer.cpp.
|
returns true is there is a file with that name in server.
Reimplemented from optionVI.
Definition at line 75 of file IOfileServer.h.
|
method to define the names of the input/output IO files.
Reimplemented from optionVI.
Definition at line 148 of file IOfileServer.cpp.
|
virtual method to skip next event - overwrite by the derived class.
Reimplemented from IOfileVI.
Definition at line 106 of file IOfileServer.cpp.
|
virtual method to write an event - overwrite by the derived class.
Reimplemented from IOfileVI.
Definition at line 99 of file IOfileServer.cpp.
|
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.
|
|
|
|
|
Definition at line 109 of file IOfileServer.h.
|
|
|
|
Definition at line 108 of file IOfileServer.h.
|
Definition at line 104 of file IOfileServer.h.