13 uint32_t cdfHeader[4];
28 void HcalTBSlowDataUnpacker::unpackMaps(
const FEDRawData &raw,
29 std::map<std::string, std::string> &
strings,
30 std::map<std::string, double> &numerics)
const {
31 if (raw.
size() < 3 * 8) {
32 throw cms::Exception(
"Missing Data") <<
"No data in the slow data block";
38 cout <<
"#doubles = " <<
sd->n_doubles << endl;
40 cout <<
"#strings = " <<
sd->n_strings << endl;
41 cout <<
"key_length = " <<
sd->key_length << endl;
42 cout <<
"string_value_length = " <<
sd->string_value_length << endl;
47 const char *keyptr = &
sd->start_of_data;
48 const double *valptr = (
const double *)(&
sd->start_of_data +
sd->n_doubles *
sd->key_length);
50 for (
int i = 0;
i <
sd->n_doubles;
i++) {
52 cout << keyptr <<
" = " << *valptr << endl;
54 numerics[keyptr] = *valptr;
55 keyptr +=
sd->key_length;
61 keyptr = (
const char *)valptr;
62 const char *strptr = (keyptr +
sd->n_strings *
sd->key_length);
64 for (
int i = 0;
i <
sd->n_strings;
i++) {
66 cout << keyptr <<
" = " << strptr << endl;
69 keyptr +=
sd->key_length;
70 strptr +=
sd->string_value_length;
75 map<string, double> sd_dblmap;
76 map<string, string> sd_strmap;
78 unpackMaps(raw, sd_strmap, sd_dblmap);
81 htbrd.
setRunData(sd_strmap[
"RunType"].c_str(), sd_strmap[
"Beam.Mode"].c_str(), sd_dblmap[
"Beam.Energy"]);
83 htbep.
setHFtableCoords(sd_dblmap[
"HFTable.X"], sd_dblmap[
"HFTable.Y"], sd_dblmap[
"HFTable.V"]);