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

JobCInputModule.h

Go to the documentation of this file.
00001 
00002 // $Id: JobCInputModule.h,v 1.15 2009/01/05 06:10:20 schubert Exp $
00003 //
00004 // Define the interface for an input module
00005 //
00006 // messier@huhepl.harvard.edu
00008 #ifndef JOBCINPUTMODULE_H
00009 #define JOBCINPUTMODULE_H
00010 #ifndef JOBCMODULE_H
00011 #include "JobControl/JobCModule.h"
00012 #endif
00013 #ifndef PER_H
00014 #include "Persistency/Per.h"
00015 #endif
00016 
00017 class MomNavigator;
00018 class VldContext;
00019 
00020 class JobCInputModule : public JobCModule
00021 {
00022 public:
00023   JobCInputModule();
00024   virtual ~JobCInputModule();
00025 
00026   // Read in event at current position in input stream
00027   virtual JobCResult Get();
00028   
00029   // Methods to set the position in the record stream
00030   virtual JobCResult Next(int n=1);
00031   virtual JobCResult Prev(int n=1);
00032   virtual JobCResult GoTo(int runNumber, int snarlNumber, int searchDir=0);
00033   virtual JobCResult GoTo(const VldContext& vld);
00034 
00035   // Methods to manage the list of attached files
00036   virtual void List(const char* streamlist = "*") const;
00037   virtual void AddFile(const char* filename, const char* streamlist = "*",
00038                                              int at = -1);
00039   virtual void RemoveFile(const char* filename, const char* streamlist = "*");
00040   virtual void Select(const char* stream, const char* cut, bool isrequired = false);
00041   virtual void SetSequenceMode(const char* stream, 
00042                                Per::ESequenceMode seqmode = Per::kKey);
00043   virtual void SetTestMode(const char* stream,bool testmode);
00044   virtual void SetPerOwnedDisabled(const char* stream,
00045                                    bool perowneddisabled = true);
00046   virtual void SetWindow(const char* stream, double lower, double upper);
00047   virtual void DefineStream(const char* stream, const char* tree);
00048 
00049   virtual void SetMaxFileRepeat(const char* stream, int numRepeat = 0);
00050   virtual void SetMeanMom(const char* stream, double mean = 0.);
00051   virtual void SetPushRandom(const char* stream, bool setRandom = true);
00052   virtual void SetRandomSeed(int rSeed = 0);
00053   
00054   // Methods to set the position in the file list
00055   virtual JobCResult NextFile(int n=1, const char* streamlist = "*");
00056   virtual JobCResult PrevFile(int n=1, const char* streamlist = "*");
00057   virtual JobCResult GoToFile(int i, const char* streamlist = "*");
00058   virtual JobCResult GoToFile(const char* filename,const char* streamlist="*");
00059   
00060   // Methods which are not normally needed for interactive use
00061   void          SetMom(MomNavigator* mom);
00062   MomNavigator* GetMom() const;
00063 
00064   // Query methods
00065   virtual Int_t GetCurrentRun() const;
00066   virtual Int_t GetLastRun() const;
00067   virtual const char* GetCurrentFile(const char* streamname = "*") const;
00068   virtual const char* GetLastFile(const char* streamname = "*") const;
00069   virtual Int_t GetCurrentSnarl() const;
00070 
00071 private:
00072   // this base class method is hidden by public arg-less version
00073   virtual JobCResult Get(MomNavigator* mom);
00074 
00075   MomNavigator* fMom; // *Not* owned
00076 };
00077 
00078 #endif
00079 

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