11 template <
class Coll,
class DetIdClass>
16 typename Coll::const_iterator
i =
pt->find(DetIdClass(did));
53 constexpr
int HTRFormatVersion = 3;
57 for (
int spigot = 0; spigot < 15; spigot++) {
58 spigots[spigot].
allocate(HTRFormatVersion);
62 for (
int fiber = 1; fiber <= 8; fiber++)
63 for (
int fiberchan = 0; fiberchan < 3; fiberchan++) {
64 int linear = (fiber - 1) * 3 + fiberchan;
65 HcalQIESample chanSample(0, 0, fiber, fiberchan,
false,
false);
66 unsigned short chanid = chanSample.
raw() & 0xF800;
73 if (!emap.
lookup(partialEid, fullEid, genId))
84 else if (
samples != mysamples) {
85 edm::LogError(
"CASTOR") <<
"Mismatch of samples in a single HTR (unsupported) " << mysamples
93 edm::LogError(
"CASTOR") <<
"Mismatch of presamples in a single HTR (unsupported) " << mypresamples
98 database[
ii] = (database[
ii] & 0x7FF) | chanid;
105 spigots[spigot].
pack(&(preclen[0]), &(precdata[0]), &(triglen[0]), &(trigdata[0]),
false);
106 constexpr
int pipeline = 0x22;
107 constexpr
int firmwareRev = 0;
109 submodule |= (exampleEId.
htrSlot() & 0x1F) << 1;
116 for (
int spigot = 0; spigot < 15; spigot++) {
117 theSize += spigots[spigot].
getRawLength() *
sizeof(
unsigned short);
120 theSize += (8 - (theSize % 8)) % 8;
129 for (
int spigot = 0; spigot < 15; spigot++) {
130 if (spigots[spigot].getRawLength() > 0)