QCoincidenceFiller.hh

Go to the documentation of this file.
00001 
00002 #ifndef _Q_COINCIDENCE_FILLER_HH_
00003 #define _Q_COINCIDENCE_FILLER_HH_
00004 
00005 class QCoincidence;
00006 class QCoincidentEvent;
00007 
00008 class string;
00009 
00010 #include "QNamed.hh"
00011 
00012 #include <list>
00013 
00022 class QCoincidenceFiller: public QNamed
00023 {
00024 public:
00025 
00030    QCoincidenceFiller(const std::string& name);
00031 
00037    QCoincidenceFiller(unsigned long long timeWindow, const std::string& name);
00038 
00040    virtual ~QCoincidenceFiller();
00041 
00043    const std::list<QCoincidence>& GetCoincidences() const
00044    { return fCoincidences; }
00045 
00053    void SetTimeWindow(unsigned long long timeWindow);
00054 
00056    unsigned long long GetTimeWindow() const { return fTimeWindow; }
00057 
00064    void AddEventList(const std::list<QCoincidentEvent>& evList);
00065 
00067    bool IsValid() const { return fValid; }
00068 
00075    void AddEvent(const QCoincidentEvent& ev);
00076 
00080    void ProcessCoincidences();
00081 
00082 protected:
00083 
00085    std::list<QCoincidence> fCoincidences;
00086    
00093    virtual bool BuildCoincidences() = 0;
00094 
00096    const std::list<QCoincidentEvent>& GetEvents() const { return fEvents; }
00097 
00098 private:
00099 
00101    std::list<QCoincidentEvent> fEvents;
00102 
00104    unsigned long long fTimeWindow;
00105 
00110    bool fValid;
00111 
00116    bool fDuplicatesRemoved;
00117 
00125    void RemoveDuplicates();
00126 };
00127 #endif

Generated on Fri Mar 6 13:40:39 2009 for CUORE Software by  doxygen 1.5.1