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

EventFilter.h

Go to the documentation of this file.
00001 
00002 
00003 
00004 
00005 
00006 
00007 #ifndef IO_EVENTFILTER_H
00008 #define IO_EVENTFILTER_H
00009 #include <map>
00010 #include "IoModules/Filter.h"
00011 #include "EventDataModel/EventHandle.h"
00012 
00013 namespace io {
00014 namespace tst {
00016   class EventFilter : public Filter {
00017   public:
00018     EventFilter();
00019     
00020     void ReadEventFile(const char* filename);
00021     bool operator()(edm::EventHandle& evt);
00022 
00023   private:
00025     class Key {
00026     public:
00027       Key() : fRun(0),fEvent(0) { }
00028       Key(int r, int e) : fRun(r), fEvent(e) { }
00029       bool operator==(const Key& rhs) const { 
00030         if (fRun == rhs.fRun && fEvent == rhs.fEvent) return true;
00031         return false;
00032       }
00033       bool operator<(const Key& rhs) const { 
00034         if (fRun<rhs.fRun) return true;
00035         if (fRun==rhs.fRun && fEvent<rhs.fEvent) return true;
00036         return false;
00037       }
00038       int fRun;   
00039       int fEvent; 
00040     };
00041     typedef std::map<Key, char> EventList_t; 
00042 
00043   private:
00044     int         fMode; 
00045     EventList_t fEventList; 
00046   };
00047 }
00048 }
00049 #endif
00050 

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