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

IOfileServer.h

Go to the documentation of this file.
00001 #ifndef IOfileServer_h
00002 #define IOfileServer_h
00003 
00004 #include <vector>
00005 #include <string>
00006 
00007 #include "Event/serviceI.h"
00008 #include "Event/serverVI.h"
00009 
00010 #include "Event/IOBase.h"
00011 #include "Event/IOfileVI.h"
00012 
00013 //----------------------------------------------
00015 
00037 //----------------------------------------------
00038 //  J.A Hernando, Santa Cruz, CA 06/15/00
00039 //----------------------------------------------
00040 
00041 //####################################
00042 class IOfileServer : public IOfileVI, public serviceI
00043 //####################################
00044 {
00045 public:
00046 
00048         virtual void open();
00050         virtual void close();
00051 
00053         virtual bool nextEvent();
00055         virtual void readEvent();
00057         virtual void writeEvent();
00059         virtual void skipEvent();
00060 
00062         virtual void writeOut() const;
00063 
00064 protected:
00065 
00067         IOfileServer(); 
00069         virtual ~IOfileServer();   
00070 
00072         virtual void defineIOfiles() {};
00073 
00075         bool search(std::string name) const {return m_server->search(name);}
00076 
00078         virtual void addIOfile(std::string name, IOfileVI* file) {m_server->add(name,file);}
00079         
00081         IOfileVI* getIOfile(std::string name) const;
00082 
00083 protected:
00084 
00086         std::string getNextInFileName();
00088         std::string getHistoFileName() const {return m_histoFile;}
00090         std::string getOutFileName()   const {return m_OutFile;};
00091 
00093         virtual void defineOption();
00095         virtual void setOption(std::string par, std::string v); // overwriten
00096 
00097 private:
00098 
00100         bool displayFrequency() const;
00101 
00102 private:
00103         
00104         serverVI<IOfileVI>* m_server;
00105 
00107         IOfileVI* m_input;
00108         IOfileVI* m_output;
00109         IOfileVI* m_histo;
00110 
00112         int m_ifile;
00114         std::vector<std::string> m_InFileList;
00116         std::string m_InFile;
00118         std::string m_histoFile;
00120         std::string m_OutFile;
00121 
00123         int m_displayFreq;
00124 };
00125 #endif
00126 

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