Go to the documentation of this file.
32 void allocate(
int version_to_create = 0);
61 const unsigned short** daq_last,
62 const unsigned short** tp_first,
63 const unsigned short** tp_last)
const;
72 void unpack(
unsigned char* daq_lengths,
73 unsigned short* daq_samples,
74 unsigned char* tp_lengths,
75 unsigned short* tp_samples)
const;
84 bool unpackHistogram(
int fiber,
int fiberchan,
int capid,
unsigned short* histogram)
const;
100 void pack(
unsigned char* daq_lengths,
101 unsigned short* daq_samples,
102 unsigned char* tp_lengths,
103 unsigned short* tp_samples,
104 bool do_capid =
false);
114 int firmwareFlav = 0);
unsigned int getSubmodule() const
Get the HTR submodule number.
unsigned int getExtHdr4() const
unsigned int readoutVMECrateId() const
HcalElectronicsId-style VME crate number.
const unsigned short * m_rawConst
unsigned int getExtHdr3() const
unsigned int getExtHdr7() const
bool unpackHistogram(int fiber, int fiberchan, int capid, unsigned short *histogram) const
Unpack special histogramming mode data.
const int getRawLength() const
Get the length of the raw data.
bool isHistogramEvent() const
Is this event a histogram event? (do not call standard unpack in this case!!!!!)
uint32_t zsBunchMask() const
ZS Bunch Mask (if available)
unsigned int getFib7OrbMsgBCN() const
static const int MAXIMUM_SAMPLES_PER_CHANNEL
bool isUnsuppressed() const
Is this event an unsuppresed event?
unsigned int getExtHdr2() const
void determineStaticLengths(int &headerWords, int &trailerWords) const
unsigned int getExtHdr5() const
const unsigned short * getRawData() const
Get a pointer to the raw data.
bool wasMarkAndPassZS(int fiber, int fiberchan) const
Was this channel passed as part of Mark&Pass ZS?
bool wasHistogramError(int ifiber) const
Was there an error on the given fiber for this event (only in histogram mode!)
int getNTP() const
Get the number of trigger data samples when not zero-suppressed (not available after FW 4)
unsigned int getFib6OrbMsgBCN() const
HcalHTRData & operator=(const HcalHTRData &)
unsigned int htrSlot() const
HcalElectronicsId-style HTR slot.
bool isOverflowWarning() const
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.
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.
static int slb(const HcalTriggerPrimitiveSample &theSample)
unsigned int getFib5OrbMsgBCN() const
bool isCalibrationStream() const
Is this event a calibration-stream event?
bool wasMarkAndPassZSTP(int slb, int slbchan) const
Was this channel passed as part of Mark&Pass ZS?
static const int CHANNELS_PER_SPIGOT
unsigned int getBunchNumber() const
Get the HTR bunch number.
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)
int getNPrecisionWords() const
Get the total number of precision data 16-bit words.
unsigned int getExtHdr8() const
unsigned int getPipelineLength() const
Get the pipeline length used for this event.
unsigned int getDLLunlock() const
Get DLLunlock bits.
int getNPS() const
Get the number of presamples in daq data.
int getFirmwareFlavor() const
Get the HTR firmware flavor.
static bool is_channel_header(unsigned short value)
check top bit to see if this is a compact format channel header word
unsigned int getFib3OrbMsgBCN() const
unsigned int htrTopBottom() const
HcalElectronicsId-style HTR top/bottom (1=top/0=bottom)
void determineSectionLengths(int &tpWords, int &daqWords, int &headerWords, int &trailerWords) const
void allocate(int version_to_create=0)
int getFormatVersion() const
Get the version number of this event.
unsigned int getExtHdr1() const
Get the HTR Ext Header words.
unsigned int getTTCready() const
Get TTCready bit.
unsigned int getFib1OrbMsgBCN() const
Get the BCN of the Fiber Orbit Messages.
int getNDD() const
Get the number of daq data samples per channel when not zero-suppressed.
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 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.
bool isPatternRAMEvent() const
Is this event a pattern-ram event?
unsigned int getFib2OrbMsgBCN() const
void adoptData(const unsigned short *data, int length)
unsigned int getFib8OrbMsgBCN() const
unsigned int getL1ANumber() const
Get the HTR event number.
unsigned int getFibOrbMsgBCN(int fiber) const
Get the BCN of the Fiber Orbit Messages.
bool isEmptyEvent() 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.
char data[epos_bytes_allocation]
unsigned int getFirmwareRevision() const
Get the HTR firmware version.
static const int FORMAT_VERSION_COMPACT_DATA
unsigned int getFib4OrbMsgBCN() const
unsigned int getErrorsWord() const
Get the errors word.
unsigned short * m_ownData
unsigned int getExtHdr6() const
void packUnsuppressed(const bool *mp)
pack trailer with Mark and Pass bits
bool check() const
Check for a good event Requires a minimum length, matching wordcount and length, not an empty event.