10 #include <QtCore/QString>
37 _varname = s.
value(
"VariableName",
"").toString().toStdString();
51 (dynamic_cast<const Device&>
92 (dynamic_cast<const Device&>
130 Log::add(
Log::INFO,
"Processor '" +
name() +
"' will retrieve the event ID from events. Condition is '" +
137 result.
setValue(evt.
id() & 0x00000000FFFFFFFF);
139 result.
setValue((evt.
id() & 0xFFFFFFFF00000000) >> 32);
174 _specname = s.
value(
"SpectrometerName",
"").toString().toStdString();
176 if (
_specname.find(
"horiz") != string::npos)
178 if (
_specname.find(
"vert") != string::npos)
180 size = s.
value(
"Size",size).toInt();
193 (dynamic_cast<const Device&>
196 Device::spectrometer_t::const_iterator specIt(spectros.find(
_specname));
197 if (specIt == spectros.end())
198 throw InvalidData(
"pp123::process (" +
name() +
"): Spectrometer with name '" +
200 const Device::spectrometer_t::mapped_type &spec(specIt->second);
202 if (result.
size() < spec.size())
203 throw logic_error(
"pp123:process (" +
name() +
205 "'is not large enough to handle spectrometer data with size" +
207 copy(spec.begin(),spec.end(),result.
begin());
234 _varname = settings.
value(
"VariableName",
"").toString().toStdString();
247 (dynamic_cast<const Device&>
250 Device::epicsDataMap_t::const_iterator eit(epics.find(
_varname));
251 result.
setValue(eit == epics.end() ? 0 : eit->second);
281 "'EbeamL3Energy' and 'EbeamPkCurrBC2'." +
" Condition is '" +
289 (dynamic_cast<const Device&>
293 const double ebEnergy
294 (bld.find(
"EbeamL3Energy") == bld.end() ? 0 : bld.find(
"EbeamL3Energy")->second);
295 const double peakCurrent
296 (bld.find(
"EbeamPkCurrBC2") == bld.end() ? 0 : bld.find(
"EbeamPkCurrBC2")->second);
309 const double DL2energyGeV (0.001*ebEnergy);
311 const double LTUwakeLoss (0.0016293*peakCurrent);
313 const double SRlossPerSegment (0.63*DL2energyGeV);
315 const double wakeLossPerSegment (0.0003*peakCurrent);
317 const double energyLossPerSegment (SRlossPerSegment + wakeLossPerSegment);
319 const double energyProfile (DL2energyGeV - 0.001*LTUwakeLoss - 0.0005*energyLossPerSegment);
321 const double photonenergy (44.42*energyProfile*energyProfile);
CachedList::item_type result_t
define the results
Event to store all LCLS Data.
virtual void createHistList(result_t::shared_pointer result)
create result list.
virtual void loadSettings(size_t)
load the settings from cass.ini
virtual void process(const CASSEvent &, result_t &)
copy data from CASS event to histogram storage
virtual void process(const CASSEvent &, result_t &)
calc the photonenergy from the bld
std::string _specname
the name of the spectrometer to retrieve from the machine device
pp230(const name_t &)
constructor
const name_t name() const
retrieve the name of this processor
virtual void process(const CASSEvent &, result_t &)
copy data from CASS event to histogram storage
std::tr1::shared_ptr< self_type > shared_pointer
a shared pointer of this class
int _part
which part of the eventid should be retrieved
size_type size() const
return the raw size of the storage
an axis of a more than 0 dimensional container
things written only at end of run H5Dump ProcessorSummary size
file contains custom exceptions used in cass
virtual void loadSettings(size_t)
load the settings from cass.ini
Exception thrown when there is a problem with the data.
static void add(Level level, const std::string &line)
add a string to the log
virtual void loadSettings(size_t)
load the settings from cass.ini
void setValue(const_reference value)
assign the result container to a value
const_iterator begin() const
retrieve a iterator for read access to beginning
virtual void process(const CASSEvent &, result_t &)
copy data from CASS event to histogram storage
pp130(const name_t &)
constructor
base class for processors.
Container for all Machine related Data.
virtual void process(const CASSEvent &, result_t &)
copy data from CASS event to histogram storage
devices_t & devices()
setters
std::map< std::string, double > epicsDataMap_t
define the epics container
std::string toString(const Type &t)
convert any type to a string
virtual void loadSettings(size_t)
load the settings from cass.ini
pp120(const name_t &)
constructor
value(const QString &key, const QVariant &defaultValue=QVariant()
std::string _varname
name of the variable in the beamline data
std::map< std::string, double > bldMap_t
define the beamline data container
virtual void loadSettings(size_t)
load the settings from cass.ini
virtual void loadSettings(size_t)
load the settings from cass.ini
std::string _varname
name of the variable in the beamline data
void setupGeneral()
general setup of the processor
definitions of a machine device
file contains specialized class that do the settings for cass
pp121(const name_t &)
constructor
std::vector< bool > evrStatus_t
define the evr status container
virtual void process(const CASSEvent &, result_t &)
copy data from CASS event to histogram storage
shared_pointer _condition
pointer to the processor that will contain the condition
pp122(const name_t &)
constructor
std::map< std::string, std::vector< uint32_t > > spectrometer_t
define the spectrometer data
bool setupCondition(bool defaultConditionType=true)
setup the condition.
std::string name_t
define the name type
contains a logger for cass
size_t _eventcode
name of the variable in the beamline data
pp123(const name_t &)
constructor
beginGroup(const QString &prefix)
file contains declaration of processors that extract information from the beamline and epics data...