12 #include <QtCore/QStringList>
13 #include <QtCore/QString>
25 wireends_t::iterator it (_wireends.begin());
26 for (; it != _wireends.end(); ++it)
27 (*it).second.associate(evt);
33 _wireends[
'1'].loadSettings(s);
36 _wireends[
'2'].loadSettings(s);
42 _newEventAssociated =
true;
45 anodelayers_t::iterator it (_anodelayers.begin());
46 for (; it != _anodelayers.end(); ++it)
48 (*it).second.associate(evt);
50 particles_t::iterator pit (_particles.begin());
51 for (; pit != _particles.end();++pit)
52 (*pit).second.associate(
this);
59 (static_cast<DelaylineType>(s.
value(
"DelaylineType",
Hex).toInt()));
63 switch (delaylinetype)
67 _anodelayers[
'U'].loadSettings(s);
70 _anodelayers[
'V'].loadSettings(s);
73 _anodelayers[
'W'].loadSettings(s);
78 _anodelayers[
'X'].loadSettings(s);
81 _anodelayers[
'Y'].loadSettings(s);
85 throw invalid_argument(
"DelaylineDetector::loadSettings(): delayline type '" +
86 toString(delaylinetype) +
"' does not exist");
91 _analyzer->loadSettings(s, *
this);
95 QStringList::const_iterator pNamesIt (particlesNameList.begin());
96 for (; pNamesIt != particlesNameList.end();++pNamesIt)
99 string particleName (pNamesIt->toStdString());
100 _particles[particleName].loadSettings(s);
109 bool newEventAssociated (_newEventAssociated);
110 _newEventAssociated =
false;
111 return (newEventAssociated)? (*_analyzer)(_hits):_hits;
static shared_pointer instance(const DetectorAnalyzerType &type)
create an instance of the right analyzer type
Event to store all LCLS Data.
void associate(const CASSEvent &evt)
associate the event with this detector
std::vector< detectorHit_t > detectorHits_t
define container for all detector hits
detectorHits_t & hits()
return the detector hits
file contains the classes that describe a delayline detector.
fromStdString(const std::string &str)
DelaylineType
the types of delayline detectors that are available
file contains base class for all detector analyzers.
void associate(const CASSEvent &evt)
associate the event with this anodelayers signal producers
void loadSettings(CASSSettings &s)
load the values from the .ini file
std::string toString(const Type &t)
convert any type to a string
value(const QString &key, const QVariant &defaultValue=QVariant()
virtual void loadSettings(CASSSettings &s)
load the values from the .ini file
file contains specialized class that do the settings for cass
beginGroup(const QString &prefix)