|
|
Go to the documentation of this file.
18 if (
end >= 0 && end <= CastorDataFrame::MAXSAMPLES - 1 && end >= beg) {
29 if (raw.
size() < 16) {
53 edm::LogWarning(
"Invalid Data") <<
"Invalid COR data (data beyond payload size) observed on spigot " << spigot
54 <<
" of CTDC with source id " << ctdcHeader->
getSourceId();
55 report.countSpigotFormatError();
61 edm::LogWarning(
"Invalid Data") <<
"Invalid COR data observed on spigot " << spigot <<
" of CTDC with source id "
63 report.countSpigotFormatError();
67 edm::LogWarning(
"Invalid Data") <<
"Histogram data passed to non-histogram unpacker on spigot " << spigot
68 <<
" of CTDC with source id " << ctdcHeader->
getSourceId();
76 cor.
unpack(&(preclen[0]), &(precdata[0]), &(triglen[0]), &(trigdata[0]));
81 if (preclen[ichan] == 0 || preclen[ichan] & 0xc0)
83 int fiber = ichan / 3;
84 int fiberchan = ichan % 3;
106 report.countUnmappedDigi();
108 edm::LogWarning(
"CASTOR") <<
"CastorCtdcUnpacker: No match found for electronics partialEid :" << partialEid;
CastorCtdcUnpacker(int sourceIdOffset, int beg, int end)
for normal data
void setSample(int i, const HcalQIESample &sam)
void unpack(unsigned char *daq_lengths, unsigned short *daq_samples, unsigned char *tp_lengths, unsigned short *tp_samples) const
Obtain the starting and ending pointers for external unpacking of the data.
bool isHistogramEvent() const
Is this event a histogram event? (do not call standard unpack in this case!!!!!)
int getNPS() const
Get the number of presamples in daq data.
Readout chain identification for Castor Bits for the readout chain : some names need change!...
void unpack(const FEDRawData &raw, const CastorElectronicsMap &emap, CastorRawCollections &conts, HcalUnpackerReport &report)
Log< level::Warning, false > LogWarning
int endSample_
last sample from fed raw data to copy (if present)
const unsigned char * data() const
Return a const pointer to the beginning of the data buffer.
int startSample_
first sample from fed raw data to copy
std::vector< CastorDataFrame > * castorCont
size_t size() const
Lenght of the data buffer in bytes.
int sourceIdOffset_
number to subtract from the source id to get the dcc id
static const int CHANNELS_PER_SPIGOT
void setPresamples(int ps)
static const int MAXIMUM_SAMPLES_PER_CHANNEL
const DetId lookup(CastorElectronicsId fId) const
lookup the logical detid associated with the given electronics id
bool check() const
Check for a good event Requires a minimum length, matching wordcount and length, not an empty event.
std::set< CastorElectronicsId > unknownIds_
static const int MAXSAMPLES