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

Module.h

Go to the documentation of this file.
00001 
00002 // $Id: Module.h,v 1.1 2007/02/09 04:44:14 fmwk Exp $
00003 //
00005 //
00006 // messier@indiana.edu
00008 #ifndef JOBC_MODULE_H
00009 #define JOBC_MODULE_H
00010 #include <string>
00011 #ifndef CFG_OBSERVER_H
00012 #include "Config/Observer.h"
00013 #endif
00014 namespace edm { class EventHandle; }
00015 
00016 namespace jobc 
00017 {
00018   typedef int      Result;
00019   static const int kPassed = 1;
00020   static const int kFailed = 0;
00021 
00022   class Module;
00023   typedef Module* (*ModuleMaker_t)(const char* version);  
00024 }
00025 
00026 //......................................................................
00027 
00028 namespace jobc {  
00030   class Module : public cfg::Observer {
00031   public:
00032     Module(const char* name);
00033     virtual ~Module() { }
00034 
00035   public:
00036     // Event processing
00037     virtual Result Reco(edm::EventHandle& evt);
00038     virtual Result Ana(const edm::EventHandle& evt);
00039     
00040     // Start/end of files
00041     virtual void NewFile(const char* filename);
00042     virtual void EndFile(const char* filename);
00043     
00044     // Start/end data runs
00045     virtual void NewRun(int run, int subrun);  
00046     virtual void EndRun(int run, int subrun);  
00047     
00048     // Start/end sub runs
00049     virtual void NewSubrun(int run, int subrun);  
00050     virtual void EndSubrun(int run, int subrun);  
00051     
00052     // Status and reporting
00053     virtual void CheckInit();
00054     virtual void Reset();
00055     virtual void Report();
00056     
00057   public:
00058     const char* Name()    const { return fName.c_str();       }
00059     const char* Version() const { return fCfgVersion.c_str(); }
00060     
00061     void SetCfgVersion(const char* cfgv);
00062     
00063   protected:
00064     std::string  fName;       
00065     std::string  fCfgVersion; 
00066     bool         fIsInit;     
00067   };
00068 }
00069 #endif
00070 

Generated on Thu Sep 4 02:05:27 2008 for NOvA Offline by doxygen 1.3.5