10 #include "RawAnitaEvent.h" 11 #include "AnitaPacketUtil.h" 34 memcpy(
surfEventId,bdPtr->surfEventId,ACTIVE_SURFS*
sizeof(UInt_t));
36 for(
int chan=0;chan<NUM_DIGITZED_CHANNELS;chan++) {
42 xMin[chan]=bdPtr->channel[chan].xMin;
43 xMax[chan]=bdPtr->channel[chan].xMax;
44 mean[chan]=bdPtr->channel[chan].
mean;
45 rms[chan]=bdPtr->channel[chan].
rms;
47 memcpy(
data[chan],bdPtr->channel[chan].
data,
sizeof(Short_t)*MAX_NUMBER_SAMPLES);
54 bdPtr->gHdr.verId!=11 ||
56 std::cerr <<
"Mismatched packet\n" 58 <<
"\nversion:\t" << bdPtr->gHdr.verId
60 <<
"\nsize:\t" << bdPtr->gHdr.numBytes <<
"\t" 67 memcpy(
surfEventId,bdPtr->surfEventId,ACTIVE_SURFS*
sizeof(UInt_t));
69 for(
int chan=0;chan<NUM_DIGITZED_CHANNELS;chan++) {
75 xMin[chan]=bdPtr->channel[chan].xMin;
76 xMax[chan]=bdPtr->channel[chan].xMax;
77 mean[chan]=bdPtr->channel[chan].
mean;
78 rms[chan]=bdPtr->channel[chan].
rms;
80 memcpy(
data[chan],bdPtr->channel[chan].
data,
sizeof(Short_t)*MAX_NUMBER_SAMPLES);
87 bdPtr->gHdr.verId!=10 ||
89 std::cerr <<
"Mismatched packet\n" 91 <<
"\nversion:\t" << bdPtr->gHdr.verId
93 <<
"\nsize:\t" << bdPtr->gHdr.numBytes <<
"\t" 102 for(
int chan=0;chan<NUM_DIGITZED_CHANNELS;chan++) {
108 xMin[chan]=bdPtr->channel[chan].xMin;
109 xMax[chan]=bdPtr->channel[chan].xMax;
110 mean[chan]=bdPtr->channel[chan].
mean;
111 rms[chan]=bdPtr->channel[chan].
rms;
113 memcpy(
data[chan],bdPtr->channel[chan].
data,
sizeof(Short_t)*MAX_NUMBER_SAMPLES);
122 Int_t earliestSample=0;
124 earliestSample=lastHitBus+1;
129 if(earliestSample==0) earliestSample=1;
130 if(earliestSample<260)
return earliestSample;
139 Int_t latestSample=259;
144 latestSample=lastHitBus-1;
146 if(latestSample>0)
return latestSample;
UInt_t eventNumber
Event number from software.
unsigned int whichPeds
whichPedestals did we subtract
unsigned char chanId
Channel Id.
Pedestal subtracted event format.
UInt_t whichPeds
Timestamp of pedestals used in subtraction.
UChar_t chipIdFlag[12 *9]
chipIdFlag
short data[260]
Pedestal subtracted and 11bit data.
~RawAnitaEvent()
Destructor.
float rms
Filled by pedestalLib.
Int_t getWrappedHitBus(Int_t chanIndex) const
Return the wrapped hitbus flag for the channel. When the HITBUS is wrapped the waveform runs from fir...
RawAnitaEvent()
Default constructor.
Short_t data[12 *9][260]
The pedestal subtracted waveform data. Note that these arrays must be unwrapped and calibrated to bec...
Int_t getLastHitBus(Int_t chanIndex) const
Returns the lastHitbus value for the channel.
Float_t rms[12 *9]
RMS of the waveform.
unsigned char lastHitbus
Last sample of the hitbus.
Short_t xMin[12 *9]
Minimum value in ADCs???
PedSubbedEventBody_t – No too big.
Int_t getFirstHitBus(Int_t chanIndex) const
Returns the firstHitbus value for the channel.
Int_t getEarliestSample(Int_t chanIndex)
Returns the earliest sample in the waveform.
Short_t xMax[12 *9]
Maximum value in ADCs???
unsigned int whichPeds
whichPedestals did we subtract
unsigned char firstHitbus
First sample of the hitbus.
Float_t mean[12 *9]
Mean of the waveform.
UChar_t lastHitbus[12 *9]
Last sample of the hitbus.
UChar_t firstHitbus[12 *9]
First sample of the hitbus.
UInt_t surfEventId[12]
SURF Event Id's.
unsigned char chipIdFlag
chip id bitmask
Int_t getLatestSample(Int_t chanIndex)
Returns the latest sample in the waveform.
int simplePacketCheck(GenericHeader_t *gHdr, PacketCode_t code)
simplePacketCheck – utility function
float mean
Filled by pedestalLib.
RawAnitaEvent – The Raw ANITA Event Data.