Main Page | Modules | Namespace List | Class Hierarchy | Alphabetical List | Class List | Directories | File List | Namespace Members | Class Members | File Members | Related Pages

DemoInputModule.h

Go to the documentation of this file.
00001 #ifndef DEMOINPUTMODULE_H
00002 #define DEMOINPUTMODULE_H
00003 
00005 // DemoInputModule
00006 //
00007 // Package: Per (Persistency) Demo class.
00008 //
00009 // S. Kasahara  04/2001
00010 //
00011 // Purpose: Simple DemoInputModule class to show use of Persistency
00012 //          input streams.  This is for use with the DemoInput.cc
00013 //          program that comes with the Persistency package.
00014 //
00016 
00017 #include <iosfwd> // ostream forward decl.
00018 #include "Persistency/PerInputStreamManager.h"
00019 
00020 class MomNavigator;
00021 class DemoInputModule;
00022 
00023 std::ostream& operator<< (std::ostream& ms, const DemoInputModule& dm);
00024 
00025 class DemoInputModule {
00026 
00027 public:
00028 
00029   // Constructors and destructors
00030   DemoInputModule() {}
00031   virtual ~DemoInputModule() {}
00032 
00033   // State testing methods
00034   bool IsBegin() const;
00035   bool IsEnd() const;
00036   std::ostream& Print(std::ostream& ms) const;
00037 
00038   // State changing methods
00039   void BeginJob();
00040   void EndJob();
00041   bool BeginFile(std::string streamname,
00042                  std::string fullfilepathname,
00043                  Per::EAccessMode = Per::kRead);
00044   void EndFile(std::string streamname="*");
00045   
00046   Int_t Next(MomNavigator *mom, Int_t advanceby=1);
00047   Int_t Previous(MomNavigator *mom, Int_t rewindby=1);
00048 
00049 private:
00050 
00051   PerInputStreamManager fInputStreamManager; // manager of input streams
00052 
00053 };
00054 
00055 #endif // DEMOINPUMODULE_H
00056 
00057 
00058 
00059 
00060 

Generated on Mon Feb 15 11:06:36 2010 for loon by  doxygen 1.3.9.1