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

IoInputStreamItr.h

Go to the documentation of this file.
00001 
00002 // $Id: IoInputStreamItr.h,v 1.9 2009/01/05 05:55:13 schubert Exp $
00003 //
00004 // Iterator for input data streams
00005 //
00006 // messier@huhepl.harvard.edu
00008 #ifndef IOINPUTSTREAMITR_H
00009 #define IOINPUTSTREAMITR_H
00010 #ifndef IODATASTREAMITR_H
00011 #include "IoModules/IoDataStreamItr.h"
00012 #endif
00013 #ifndef PERINPUTSTREAMMANAGER_H
00014 #include "Persistency/PerInputStreamManager.h"
00015 #endif
00016 
00017 class MomNavigator;
00018 
00019 class IoInputStreamItr : public IoDataStreamItr
00020 {
00021 public:
00022   IoInputStreamItr(const char* streamlist="");
00023   ~IoInputStreamItr();
00024 
00025   // Must provide these, no default implementation given
00026   bool IsValid() const { return fIsValid; }
00027   const char* GetFormat() const { return "input"; }
00028   int LoadRecords(MomNavigator* m);
00029   int Increment(int n=1, MomNavigator* m=0);
00030   int Decrement(int n=1, MomNavigator* m=0);
00031   JobCResult GoTo(const VldContext& vld, MomNavigator* m=0);
00032 
00033   // Override default implementation
00034   int  GoToEOF();
00035   int  DefineStream(const char* streamname, const char* treename);
00036   int  Streams(const char* streamlist);
00037   int  Select(const char* stream, const char* selection, bool isRequired = false);
00038   int  SetSequenceMode(const char* stream, Per::ESequenceMode sequencemode);
00039   int  SetPerOwnedDisabled(const char* stream, bool perowneddisabled = true);
00040   
00041   int  SetTestMode(const char* stream, bool testmode);
00042   int  SetWindow(const char* stream, double lower, double upper);
00043 
00044   int  SetMaxFileRepeat(const char* stream, int numRepeat);
00045   int  SetMeanMom(const char* stream, double mean);
00046   int  SetPushRandom(const char* stream, bool setRandom);
00047   void SetRandomSeed(int rSeed);
00048 
00049   // Override default file handling
00050   void AddFile(const char* fullfilepathname, int at = -1,
00051                const char* streamlist = "*");
00052   const char* GetCurrentFile(const char* streamname = "*") const;
00053   JobCResult GoToFile(int i, const char* streamlist = "*");
00054   JobCResult GoToFile(const char* fullfilepathname,const char* streamlist="*");
00055   JobCResult NextFile(int n = 1, const char* streamlist = "*");
00056   JobCResult PrevFile(int n = 1, const char* streamlist = "*");
00057   void RemoveFile(const char* fullfilepathname = "*",
00058                   const char* streamlist = "*");
00059   std::ostream& ListFile(std::ostream& os, const char* streamlist = "*") const;
00060 
00061 private:
00062   
00063   PerInputStreamManager fInputStreamManager; // input stream manager
00064   bool fIsValid;  // valid input stream iterator
00065 
00066 };
00067 
00068 #endif
00069 

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