QCoincidenceFiller Class Reference

Inheritance diagram for QCoincidenceFiller:

QCFStaticWindow QCFVariableWindow List of all members.

Detailed Description

build list of QCoincidence from a list of QCoincidentEvent. This class is pure virtual and only defines a common interface that is to be implemented by specific coincidence fillers inheriting from it.

Author:
Sergio Di Domizio


Public Member Functions

 QCoincidenceFiller (const std::string &name)
 default constructor
 QCoincidenceFiller (unsigned long long timeWindow, const std::string &name)
 constructor with time window
virtual ~QCoincidenceFiller ()
 destructor
const std::list< QCoincidence > & GetCoincidences () const
 get the list of coincidences
void SetTimeWindow (unsigned long long timeWindow)
 set coincidence time window
unsigned long long GetTimeWindow () const
 get coincidence time window in ns
void AddEventList (const std::list< QCoincidentEvent > &evList)
 add a list of QCoincidentEvent to the list of events to be used to build the coincidence list
bool IsValid () const
 check whether the current coincidence list is valid
void AddEvent (const QCoincidentEvent &ev)
 add QCoincidentEvent to the list of events to be used to build coincidence list
void ProcessCoincidences ()
 perform time sorting on event list and call BuildCoincidences()

Protected Member Functions

virtual bool BuildCoincidences ()=0
 process the list of events to build coincidences
const std::list< QCoincidentEvent > & GetEvents () const
 get the event list used to build coincidences

Protected Attributes

std::list< QCoincidencefCoincidences

Private Member Functions

void RemoveDuplicates ()
 remove possible duplicate events from the event list

Private Attributes

std::list< QCoincidentEventfEvents
unsigned long long fTimeWindow
bool fValid
bool fDuplicatesRemoved


Constructor & Destructor Documentation

QCoincidenceFiller::QCoincidenceFiller ( const std::string &  name  ) 

default constructor

Parameters:
name name of the specific filler

QCoincidenceFiller::QCoincidenceFiller ( unsigned long long  timeWindow,
const std::string &  name 
)

constructor with time window

Parameters:
timeWindow coincidence time window in ns
name name of the specific filler


Member Function Documentation

void QCoincidenceFiller::SetTimeWindow ( unsigned long long  timeWindow  ) 

set coincidence time window

Parameters:
timeWindow coincidence time window in ns
Modifying coincidence time window will invalidate current list of coincidences

void QCoincidenceFiller::AddEventList ( const std::list< QCoincidentEvent > &  evList  ) 

add a list of QCoincidentEvent to the list of events to be used to build the coincidence list

Calling this method will invalidate current list of coincidences

void QCoincidenceFiller::AddEvent ( const QCoincidentEvent ev  ) 

add QCoincidentEvent to the list of events to be used to build coincidence list

Calling this method will invalidate current list of coincidences

virtual bool QCoincidenceFiller::BuildCoincidences (  )  [protected, pure virtual]

process the list of events to build coincidences

In the implementation of this method it can be assumed that the list of events that is used to build the coincidences is time ordered.

Implemented in QCFStaticWindow, and QCFVariableWindow.

void QCoincidenceFiller::RemoveDuplicates (  )  [private]

remove possible duplicate events from the event list

Compares each event in the event list with the previous one and eliminate it if they are equal. This method assumes that events are sorted by ascending time


Member Data Documentation

std::list<QCoincidence> QCoincidenceFiller::fCoincidences [protected]

time sorted list of already processed coincidences

std::list<QCoincidentEvent> QCoincidenceFiller::fEvents [private]

time sorted list of not processed QCoincidentEvents

unsigned long long QCoincidenceFiller::fTimeWindow [private]

coincidence time window in ns

bool QCoincidenceFiller::fValid [private]

set to true when the coincidence list is built and to false whenever the event list or the time window is modified

bool QCoincidenceFiller::fDuplicatesRemoved [private]

whether or not RemoveDuplicates() has been called since last time that a new event was added to the event list


The documentation for this class was generated from the following files:
Generated on Fri Mar 6 13:40:42 2009 for CUORE Software by  doxygen 1.5.1