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 
00083    inline void AddEventFast(const QCoincidentEvent& ev);
00084 
00088    void ProcessCoincidences();
00089 
00090 protected:
00091 
00093    std::list<QCoincidence> fCoincidences;
00094    
00101    virtual bool BuildCoincidences() = 0;
00102 
00104    const std::list<QCoincidentEvent>& GetEvents() const { return fEvents; }
00105 
00106 private:
00107 
00109    std::list<QCoincidentEvent> fEvents;
00110 
00112    unsigned long long fTimeWindow;
00113 
00118    bool fValid;
00119 
00124    bool fDuplicatesRemoved;
00125 
00133    void RemoveDuplicates();
00134 };
00135 #endif

Generated on Tue Nov 16 10:49:55 2010 for CUORE Software by  doxygen 1.5.6