29 void allocate(
int version_to_create=0);
59 const unsigned short** daq_last,
60 const unsigned short** tp_first,
61 const unsigned short** tp_last)
const;
71 void unpack(
unsigned char* daq_lengths,
unsigned short* daq_samples,
72 unsigned char* tp_lengths,
unsigned short* tp_samples)
const;
82 short* histogram)
const;
98 void pack(
unsigned char* daq_lengths,
unsigned short* daq_samples,
99 unsigned char* tp_lengths,
unsigned short* tp_samples,
bool
103 orbitn,
int pipeline,
int ndd,
int nps,
int firmwareRev=0,
250 headerWords,
int& trailerWords)
const;
unsigned short * m_ownData
unsigned int getFib6OrbMsgBCN() const
int getNDD() const
Get the number of daq data samples per channel when not zero-suppressed.
unsigned int getFib1OrbMsgBCN() const
Get the BCN of the Fiber Orbit Messages.
unsigned int getTTCready() const
Get TTCready bit.
bool check() const
Check for a good event Requires a minimum length, matching wordcount and length, not an empty event...
static int slb(const HcalTriggerPrimitiveSample &theSample)
unsigned int htrTopBottom() const
HcalElectronicsId-style HTR top/bottom (1=top/0=bottom)
void packUnsuppressed(const bool *mp)
pack trailer with Mark and Pass bits
unsigned int getExtHdr2() const
unsigned int getExtHdr5() const
unsigned int getExtHdr4() const
bool isPatternRAMEvent() const
Is this event a pattern-ram event?
const unsigned short * m_rawConst
unsigned int getExtHdr6() const
unsigned int getFib8OrbMsgBCN() const
void determineStaticLengths(int &headerWords, int &trailerWords) const
bool wasMarkAndPassZS(int fiber, int fiberchan) const
Was this channel passed as part of Mark&Pass ZS?
unsigned int getFibOrbMsgBCN(int fiber) const
Get the BCN of the Fiber Orbit Messages.
bool wasHistogramError(int ifiber) const
Was there an error on the given fiber for this event (only in histogram mode!)
unsigned int getDLLunlock() const
Get DLLunlock bits.
static const int CHANNELS_PER_SPIGOT
static bool unpack_per_channel_header(unsigned short, int &flav, int &error_flags, int &capid0, int &channelid)
Unpack a per-channel header word (compact format)
static const int MAXIMUM_SAMPLES_PER_CHANNEL
void getHistogramFibers(int &a, int &b) const
Get the fiber numbers for the data present in this event (only in histogram mode!) ...
unsigned int getOrbitNumber() const
Get the HTR orbit number.
int getFormatVersion() const
Get the version number of this event.
HcalHTRData & operator=(const HcalHTRData &)
int getNPrecisionWords() const
Get the total number of precision data 16-bit words.
bool isCalibrationStream() const
Is this event a calibration-stream event?
bool isUnsuppressed() const
Is this event an unsuppresed event?
unsigned int getExtHdr1() const
Get the HTR Ext Header words.
void allocate(int version_to_create=0)
unsigned int getPipelineLength() const
Get the pipeline length used for this event.
bool isOverflowWarning() const
unsigned int htrSlot() const
HcalElectronicsId-style HTR slot.
void unpack(unsigned char *daq_lengths, unsigned short *daq_samples, unsigned char *tp_lengths, unsigned short *tp_samples) const
Unpack the HTR data into TP and DAQ data sorted by channel.
bool unpackHistogram(int fiber, int fiberchan, int capid, unsigned short *histogram) const
Unpack special histogramming mode data.
static bool is_channel_header(unsigned short value)
check top bit to see if this is a compact format channel header word
unsigned int getFib7OrbMsgBCN() const
unsigned int getExtHdr8() const
int getNTP() const
Get the number of trigger data samples when not zero-suppressed (not available after FW 4) ...
bool isEmptyEvent() const
const int getRawLength() const
Get the length of the raw data.
unsigned int getFib3OrbMsgBCN() const
void pack(unsigned char *daq_lengths, unsigned short *daq_samples, unsigned char *tp_lengths, unsigned short *tp_samples, bool do_capid=false)
Unpack the HTR data into TP and DAQ data sorted by channel.
unsigned int getFib5OrbMsgBCN() const
const unsigned short * getRawData() const
Get a pointer to the raw data.
void dataPointers(const unsigned short **daq_first, const unsigned short **daq_last, const unsigned short **tp_first, const unsigned short **tp_last) const
Obtain the starting and ending pointers for external unpacking of the data.
unsigned int getErrorsWord() const
Get the errors word.
unsigned int getExtHdr3() const
unsigned int getExtHdr7() const
int getNPS() const
Get the number of presamples in daq data.
static const int FORMAT_VERSION_COMPACT_DATA
int getFirmwareFlavor() const
Get the HTR firmware flavor.
unsigned int readoutVMECrateId() const
HcalElectronicsId-style VME crate number.
unsigned int getFib4OrbMsgBCN() const
void packHeaderTrailer(int L1Anumber, int bcn, int submodule, int orbitn, int pipeline, int ndd, int nps, int firmwareRev=0, int firmwareFlav=0)
pack header and trailer (call after pack)
void adoptData(const unsigned short *data, int length)
char data[epos_bytes_allocation]
bool wasMarkAndPassZSTP(int slb, int slbchan) const
Was this channel passed as part of Mark&Pass ZS?
unsigned int getBunchNumber() const
Get the HTR bunch number.
unsigned int getFib2OrbMsgBCN() const
uint32_t zsBunchMask() const
ZS Bunch Mask (if available)
unsigned int getSubmodule() const
Get the HTR submodule number.
unsigned int getFirmwareRevision() const
Get the HTR firmware version.
unsigned int getL1ANumber() const
Get the HTR event number.
bool isHistogramEvent() const
Is this event a histogram event? (do not call standard unpack in this case!!!!!)
void determineSectionLengths(int &tpWords, int &daqWords, int &headerWords, int &trailerWords) const