SpecTcl DDAS Unpackers Guide. | ||
---|---|---|
Prev |
#include <CCalibratedFileDrivenParameterMapper.h> class CCalibratedFileDrivenParameterMapper : public DAQ::DDAS::CParameterMapper { CCalibratedFileDrivenParameterMapper(const char* filename); virtual void mapToParameters( const std::vector<DAQ::DDAS::DDASHit>& hits, CEvent& rEvent ); };
Provices a parameter mapper for DDAS unpacking. The mapper
produces both a raw energy parameter and a calibrated energy
for each hit. The mapping is defined by an external
configuration file whose path is provided by the
filename
parameter at
construction time.
The configuration file is a text file. Each line can consist of one of the following:
An empty line with no characters. Empty lines are ignored
A line whose first character is a # these lines are treated as comment lines, and ignored.
A hit map description line.
Hit map description lines contain, in order, the following whitespace separated fields:
These are three unsigned integer fields that, in order, provide the crate, slot and device channel ids of a DDAS input channel
This is an unsigned integer that provides the number of bits of resolution the hit's energy has (usually 16).
This is the name of the parameter into which the raw energy from the pulse processing firmware will be unpacked. If necessary, the code will create a new tree parameter with this name.
These are three fields. In order these are the constant, the linear, and the quadratic coefficients.
Each field is either a constant double precision floating point number of the name of the treevariable that will hold the coefficient at run time. Note that if needed a tree variable will be created. The variables created are unitless.
The next five fields describe the calibrated parameter. The first three fields are numeric and are, in order, the low and high limits anticipated for the parameter values and the recommended binning.
The next field is textual and is the parameter's unit of measure (e.g. MeV). If the parameter is unitless you can use the string "".
Finally, the last field is textual and is the name assigned to the calibrated parameter. This name and the previouisl four fields are used to construct a new tree parameter.