40 if (buffer[2] != 0xA8) {
41 throw cms::Exception(
"DTTPG") <<
"===> ConfigLUTs constructor : not a LUT string!" << std::endl;
45 short int memory_lut[7];
47 for (
int i = 0;
i < 7;
i++) {
48 memory_lut[
i] = (buffer[
c] << 8) | buffer[c + 1];
54 int btic = memory_lut[0];
59 int wheel = memory_lut[5];
97 std::cout <<
"******************************************************************************" << std::endl;
98 std::cout <<
"* DTTrigger configuration : LUT parameters *" << std::endl;
99 std::cout <<
"******************************************************************************" << std::endl
103 std::cout <<
"d: distance vertex to normal, unit cm. " <<
m_d << std::endl;
104 std::cout <<
"Xcn: distance vertex to normal, unit cm. " <<
m_Xcn << std::endl;
106 std::cout <<
"******************************************************************************" << std::endl;
111 *f = DSPmantissa * (float)
pow(2.0, DSPexp);
117 static_assert(
sizeof(decltype(pl)) >=
sizeof(
float));
124 memcpy(&pl, &f,
sizeof(
float));
126 if ((pl & 0x80000000) != 0)
128 long int lm = (0x800000 | (pl & 0x7FFFFF));
131 DSPexp = ((pl >> 23) & 0xFF) - 126;
132 DSPmantissa = (short)lm;
134 DSPmantissa = -DSPmantissa;
T getUntrackedParameter(std::string const &, T const &) const
const edm::EventSetup & c
void DSPtoIEEE32(short DSPmantissa, short DSPexp, float *f) const
DSP to IEEE32 conversion.
void IEEE32toDSP(float f, short int &DSPmantissa, short int &DSPexp) const
IEEE32 to DSP conversion.
void print() const
Print the setup.
bool debug() const
Debug flag.
~DTConfigLUTs() override
Destructor.
void setDefaults(const edm::ParameterSet &m_ps)
Load pset values into class variables.
float Xcn() const
Xcn: distance vertex to normal, unit cm.
DTConfigLUTs()
Empty Constructor.
Power< A, B >::type pow(const A &a, const B &b)