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< QCoincidence > | fCoincidences |
Private Member Functions | |
void | RemoveDuplicates () |
remove possible duplicate events from the event list | |
Private Attributes | |
std::list< QCoincidentEvent > | fEvents |
unsigned long long | fTimeWindow |
bool | fValid |
bool | fDuplicatesRemoved |
QCoincidenceFiller::QCoincidenceFiller | ( | const std::string & | name | ) |
default constructor
name | name of the specific filler |
References fCoincidences, and fEvents.
QCoincidenceFiller::QCoincidenceFiller | ( | unsigned long long | timeWindow, | |
const std::string & | name | |||
) |
constructor with time window
timeWindow | coincidence time window in ns | |
name | name of the specific filler |
References fCoincidences, and fEvents.
void QCoincidenceFiller::SetTimeWindow | ( | unsigned long long | timeWindow | ) |
set coincidence time window
timeWindow | coincidence time window in ns |
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().
std::list<QCoincidence> QCoincidenceFiller::fCoincidences [protected] |
time sorted list of already processed coincidences
Referenced by QCFStaticWindow::AddtoCluster(), QCFVariableWindow::BuildCoincidences(), QCFStaticWindow::BuildCoincidences(), GetCoincidences(), ProcessCoincidences(), and QCoincidenceFiller().
std::list<QCoincidentEvent> QCoincidenceFiller::fEvents [private] |
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().
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
Referenced by AddEvent(), AddEventList(), IsValid(), ProcessCoincidences(), and SetTimeWindow().
bool QCoincidenceFiller::fDuplicatesRemoved [private] |
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().