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 AddEventFast (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

References fCoincidences, and fEvents.

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

References fCoincidences, and fEvents.


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

References fTimeWindow, and fValid.

Referenced by MCoincidenceTester::Init(), and MCoincidenceFlagger::Init().

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

References fDuplicatesRemoved, fEvents, and fValid.

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

References fDuplicatesRemoved, fEvents, and fValid.

Referenced by MCoincidenceTester::Do(), and MCoincidenceFlagger::Do().

void QCoincidenceFiller::AddEventFast ( const QCoincidentEvent ev  )  [inline]

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

This method just add the coincidentEvent, without doing any control

References fEvents.

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.

Referenced by ProcessCoincidences().

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

References fDuplicatesRemoved, and fEvents.

Referenced by ProcessCoincidences().


Member Data Documentation

time sorted list of not processed QCoincidentEvents

Referenced by AddEvent(), AddEventFast(), AddEventList(), GetEvents(), ProcessCoincidences(), QCoincidenceFiller(), and RemoveDuplicates().

unsigned long long QCoincidenceFiller::fTimeWindow [private]

coincidence time window in ns

Referenced by GetTimeWindow(), and SetTimeWindow().

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

Referenced by AddEvent(), AddEventList(), IsValid(), ProcessCoincidences(), and SetTimeWindow().

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

Referenced by AddEvent(), AddEventList(), and RemoveDuplicates().


The documentation for this class was generated from the following files:

Generated on Tue Nov 16 10:50:04 2010 for CUORE Software by  doxygen 1.5.6