QLCTriggerFinder Class Reference

Inheritance diagram for QLCTriggerFinder:

List of all members.


Detailed Description

trigger finder for load curves

Author:
Sergio Di Domizio This trigger finder acts mainly as the trigger finder used in standard measurements, but adds to each event informations on the electronics configuration that was being used when the event was acquired.
This is done by looking for a couple of bits (25 and 26) that are set in the data stream by the object that is in charge of changing the electronics configuration.

Public Member Functions

 QLCTriggerFinder ()
 ctor
virtual ~QLCTriggerFinder ()
 dtor
virtual bool Consolidate ()

Protected Member Functions

virtual void CheckExtraBits (const QBuilderInfo_t &info, const unsigned long long sampleIndex, const long data)
 check for extra bits (25 and 26) used to signal changes in the electronics configuration
virtual void SetAuxData (QEvent *ev)
 associate electronics configuration id to the event by setting the "SlowConfigId" AuxData (int).

Private Member Functions

unsigned int GetConfigId (const unsigned int lg, const long long time) const
 get electronics configuration id associated to a given event

Private Attributes

std::map< unsigned int,
std::map< long long, unsigned
int > > 
fTimeMap
std::map< unsigned int,
unsigned int > 
fLastId

Member Function Documentation

bool QLCTriggerFinder::Consolidate (  )  [virtual]

Call QTriggerFinder::Consolidate() and initialize fLastId map

References fLastId, and fTimeMap.

void QLCTriggerFinder::CheckExtraBits ( const QBuilderInfo_t info,
const unsigned long long  sampleIndex,
const long  data 
) [protected, virtual]

check for extra bits (25 and 26) used to signal changes in the electronics configuration

Parameters:
info object used to access data stream
sampleIndex id of the data sample to be checked
data value of the sample to be checked
If one of the bits 25 and 26 is raised, fTimeMap is updated with a new configuration id: 0 if end of a configuration range is found (bit 25) or ++fLastId[currentChannel] if the beginning of a new configuration is found (bit 26).

References QBuilderInfo_t::buffer, fLastId, fTimeMap, QCrateReceiverBuffer::GetLg(), and QCrateReceiverBuffer::GetTimeOfSample().

unsigned int QLCTriggerFinder::GetConfigId ( const unsigned int  lg,
const long long  time 
) const [private]

get electronics configuration id associated to a given event

Parameters:
lg logical channel of the event
trigger time of the event
Returns:
requested configuration id
In order for a valid id to be returned, all the samples in the time window between time-preTrigger and time+pulseDuration-preTrigger must be associated to the same configuration id (possibily 0, i.e. undefined), otherwise 0 is returned.

References fTimeMap.

Referenced by SetAuxData().


Member Data Documentation

std::map<unsigned int, std::map<long long, unsigned int> > QLCTriggerFinder::fTimeMap [private]

works as fTimeMap[lg][time] = configId, where time is the time of the sample where a configuration change was detected.

Referenced by CheckExtraBits(), Consolidate(), GetConfigId(), and QLCTriggerFinder().

std::map<unsigned int, unsigned int> QLCTriggerFinder::fLastId [private]

key: lg channel, value: last used config id

Referenced by CheckExtraBits(), Consolidate(), and QLCTriggerFinder().


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

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