9 #include <tr1/functional>
24 using std::tr1::placeholders::_1;
33 if (_instances.find(detector) == _instances.end())
36 " instance of the Acqiris Detector Helper for detector '" + detector +
"'");
45 for (helperinstancesmap_t::iterator it(_instances.begin()); it != _instances.end(); ++it)
46 it->second->release(
id);
65 _lastEntry = _detectorList.begin();
67 "we are responsible for det '" + detname +
"', which is of type " +
toString(_dettype));
72 return (find_if(_detectorList.begin(), _detectorList.end(),
73 std::tr1::bind(equal_to<id_type>(),
id,
74 std::tr1::bind<id_type>(&KeyDetPair_t::first,_1))));
81 if (it != _detectorList.end())
89 if(_detectorList.end() == it)
91 while(_lastEntry->first)
94 if (_lastEntry == _detectorList.end())
95 _lastEntry = _detectorList.begin();
99 it->second->associate(evt);
108 detectorList_t::iterator it(_detectorList.begin());
109 detectorList_t::const_iterator end(_detectorList.end());
110 for (;it != end ;++it)
111 it->second->loadSettings(s);
Event to store all LCLS Data.
detectorList_t::iterator iter_type
define an iterator for the list
file contains declaration of classes that extract information of acqiris detectors.
std::tr1::shared_ptr< HelperAcqirisDetectors > shared_pointer
typedef a shared pointer of this
static shared_pointer instance(const DetectorType &dettype, const std::string &detname)
create an instance of the requested dectortype
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
static void add(Level level, const std::string &line)
add a string to the log
fromStdString(const std::string &str)
contains the base class declaration for all detectors that are attached to an acqiris device...
DetectorType
the types of detectors that are available
HelperAcqirisDetectors()
prevent people from constructin other than using instance().
file contains base class for all detector analyzers.
file contains declaration of classes and functions that help other processors to do their job...
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
std::string toString(const Type &t)
convert any type to a string
value(const QString &key, const QVariant &defaultValue=QVariant()
std::map< std::string, shared_pointer > helperinstancesmap_t
typedef describing the instances of the helper
file contains specialized class that do the settings for cass
const size_t NbrOfWorkers
global variable to set the number of worker threads
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.
contains a logger for cass
beginGroup(const QString &prefix)
static QMutex _mutex
Singleton Mutex to lock write operations.
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