10 #ifndef _DETECTOR_HELPER_H_
11 #define _DETECTOR_HELPER_H_
21 #include <QtCore/QMutex>
22 #include <QtCore/QMutexLocker>
62 typedef std::tr1::shared_ptr<DetectorBackend>
Det_sptr;
86 static shared_pointer
instance(
const helperinstancesmap_t::key_type&
detector);
95 static const helperinstancesmap_t&
instances();
184 iter_type
findId(
const id_type &
id);
191 void release(
const id_type &
id);
Event to store all LCLS Data.
detectorList_t::iterator iter_type
define an iterator for the list
const DetectorBackend & detector() const
retrieve detector
std::tr1::shared_ptr< DetectorBackend > Det_sptr
a shared pointer of the detector backend
file contains declaration of the CASSEvent
DetectorBackend & detector(const CASSEvent &evt)
retrieve detector for event
std::tr1::shared_ptr< HelperAcqirisDetectors > shared_pointer
typedef a shared pointer of this
uint64_t id_t
define the id type
std::vector< KeyDetPair_t > detectorList_t
typedef defining the list of detectors for more readable code
void release(const id_type &id)
release the detector element in the list by settings its key (eventid) back to 0
static helperinstancesmap_t _instances
the helperclass instances.
iter_type findId(const id_type &id)
find an element with a given id in the list
iter_type _lastEntry
the iterator to the last element returned
contains the base class declaration for all detectors that are attached to an acqiris device...
DetectorType detectortype()
retrieve the detector type that the helper is there for
DetectorType
the types of detectors that are available
detectorList_t _detectorList
list of pairs of id-detectors.
HelperAcqirisDetectors()
prevent people from constructin other than using instance().
QMutex _helperMutex
Mutex for each helper.
contains the global definitions for acqiris analysis
static void releaseDetector(const id_type &id)
release the detector of all helpers that is blocked for the event
Helper for Acqiris related Postprocessors.
static const helperinstancesmap_t & instances()
return all known instances fo this
HelperAcqirisDetectors & operator=(const HelperAcqirisDetectors &)
prevent assingment
DetectorType _dettype
the type of detector that the individual helper is there for
std::map< std::string, shared_pointer > helperinstancesmap_t
typedef describing the instances of the helper
Base class for all Detectors attached to an Acqiris Instrument.
static shared_pointer instance(const helperinstancesmap_t::key_type &detector)
static function creating instance of this.
static QMutex _mutex
Singleton Mutex to lock write operations.
std::pair< id_type, Det_sptr > KeyDetPair_t
defining a key - value pair for the list
DetectorBackend & validate(const CASSEvent &evt)
validate that this event has been associated with the detector.
void loadSettings(size_t i=0)
load the settings of the detectors in the detector list
CASSEvent::id_t id_type
define the type of the id used