10 #ifndef _PIXEL_DETECTOR_HELPER_H_
11 #define _PIXEL_DETECTOR_HELPER_H_
21 #include <QtCore/QMutex>
22 #include <QtCore/QMutexLocker>
31 class AdvancedDetector;
152 iter_type
findId(
const id_type &
id);
159 void release(
const id_type &
id);
detectorList_t _detectorList
list of pairs of id-detectors.
Event to store all LCLS Data.
static QMutex _mutex
Singleton Mutex to lock write operations.
std::map< std::string, shared_pointer > instancesmap_t
typedef describing the instances of the helper
AdvDet_sptr detector(const CASSEvent &evt)
retrieve detector for event
file contains declaration of the CASSEvent
Helper for Advanced Pixel Detector related Postprocessors.
uint64_t id_t
define the id type
void release(const id_type &id)
release the detector element in the list by settings its key (eventid) back to 0
DetectorHelper & operator=(const DetectorHelper &)
prevent assingment
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
std::tr1::shared_ptr< AdvancedDetector > AdvDet_sptr
define a shared pointer of the item to manage
void loadSettings(size_t i=0)
load the settings of the detectors in the detector list
DetectorHelper()
prevent people from constructin other than using instance().
std::pair< id_type, AdvDet_sptr > KeyDetPair_t
defining a key - value pair for the list
std::tr1::shared_ptr< DetectorHelper > shared_pointer
typedef a shared pointer of this
detectorList_t::iterator iter_type
define an iterator for the list
CASSEvent::id_t id_type
define the type of the id used
static void releaseDetector(const id_type &id)
release the detector of all helpers that is blocked for the event
static shared_pointer instance(const instancesmap_t::key_type &detector)
static function creating instance of this.
QMutex _helperMutex
Mutex for each helper.
std::vector< KeyDetPair_t > detectorList_t
typedef defining the list of detectors for more readable code
static instancesmap_t _instances
the helperclass instances.