Public Member Functions | List of all members
dq::DAQEventUnpack Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/DataQuality/DAQHeader/DAQEventUnpack.h"

Public Member Functions

 DAQEventUnpack ()
 
 ~DAQEventUnpack ()
 
void UnpackRawEvent (daqdataformats::RawEvent &rawevt, dq::DAQEventSummary *daqsum)
 
void UnpackDataBlock (daqdataformats::RawEvent &rawevt, unsigned int idata, dq::DAQEventSummary *daqsum)
 
void UnpackMicroSlice (daqdataformats::RawDataBlock &datablock, unsigned int imicro, dq::DAQEventSummary *daqsum)
 
void UnpackNanoSlice (daqdataformats::RawMicroSlice &microslice, unsigned int inano, dq::DAQEventSummary *daqsum)
 

Detailed Description

Definition at line 12 of file DAQEventUnpack.h.

Constructor & Destructor Documentation

dq::DAQEventUnpack::DAQEventUnpack ( )

Definition at line 29 of file DAQEventUnpack.cxx.

29 { }
dq::DAQEventUnpack::~DAQEventUnpack ( )

Definition at line 33 of file DAQEventUnpack.cxx.

33 { }

Member Function Documentation

void dq::DAQEventUnpack::UnpackDataBlock ( daqdataformats::RawEvent raw,
unsigned int  idata,
dq::DAQEventSummary daqsum 
)

Extract raw information at datablock level and unpack contained microblocks

Parameters
raw: Raw event
idata: Data block number
daqsum: DAQEventSummary object

Definition at line 62 of file DAQEventUnpack.cxx.

References dq::DAQEventSummary::fNdataBlockMissingData, dq::DAQEventSummary::fNemptyDataBlock, dq::DAQEventSummary::fNmicroBlocks, daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::SummaryBlock_Marker, and UnpackMicroSlice().

Referenced by UnpackRawEvent().

65  {
66  raw.setFloatingDataBlock(idata);
67  daqdataformats::RawDataBlock& datablock = (*raw.getFloatingDataBlock());
68 
69  // Bail if this is the DAQ status block
70  if (datablock.getHeader()->getMarker() == daqdataformats::datablockheader::SummaryBlock_Marker){
71  if (datablock.getHeader()->checkMarker()) {
72  return;
73  }
74  }
75 
76  if (datablock.isMissingData()) ++daqsum->fNdataBlockMissingData;
77 
78  unsigned int nMicroBlock = datablock.getNumMicroBlocks();
79  daqsum->fNmicroBlocks = nMicroBlock;
80 
81  if (nMicroBlock == 0) ++daqsum->fNemptyDataBlock;
82 
83  // Now unpack the associated micro slices
84  unsigned int imicro;
85  for (imicro = 0; imicro < nMicroBlock; ++imicro) {
86  this->UnpackMicroSlice(datablock, imicro, daqsum);
87  }
88  }
int fNdataBlockMissingData
of occurances of isMissingData
int fNmicroBlocks
How many microblocks?
void UnpackMicroSlice(daqdataformats::RawDataBlock &datablock, unsigned int imicro, dq::DAQEventSummary *daqsum)
int fNemptyDataBlock
How many empty data blocks?
void dq::DAQEventUnpack::UnpackMicroSlice ( daqdataformats::RawDataBlock datablock,
unsigned int  imicro,
dq::DAQEventSummary daqsum 
)

Extract raw information at microblock level and unpack contained nanoslices

Parameters
datablock: Datablock
imicro: Microblock number
daqsum: DAQEventSummary object

Definition at line 96 of file DAQEventUnpack.cxx.

References dq::DAQEventSummary::fDiblocks, dq::DAQEventSummary::fNemptyMicroSlice, dq::DAQEventSummary::fNmicroSliceDataNotPresent, dq::DAQEventSummary::fNtotalNanoSlices, daqdataformats::RawMicroSlice::getDataPresent(), daqdataformats::RawMicroSlice::getNumNanoSlices(), and UnpackNanoSlice().

Referenced by UnpackDataBlock().

99  {
100  datablock.setFloatingMicroBlock(imicro);
101 
103  microblock = (*datablock.getFloatingMicroBlock());
104 
106  microblock_header = (*microblock.getHeader());
107 
108  // Get diblock number from microblock header
109  daqsum->fDiblocks.push_back(microblock_header.getDiblockId());
110 
111  daqdataformats::RawMicroSlice& microslice = (*microblock.getMicroSlice());
112  if (!microslice.getDataPresent()) ++daqsum->fNmicroSliceDataNotPresent;
113 
114  unsigned int nNanoSlice = microslice.getNumNanoSlices();
115  if (nNanoSlice == 0) ++daqsum->fNemptyMicroSlice;
116  daqsum->fNtotalNanoSlices += nNanoSlice;
117 
118  // Now unpack all the associated nano slices
119  unsigned int inano;
120  for (inano = 0; inano < nNanoSlice; ++inano) {
121  this->UnpackNanoSlice(microslice, inano, daqsum);
122  }
123  }
uint32_t getNumNanoSlices() const
Get current Hit Probability (for a microslice generation)
int fNemptyMicroSlice
How many empty micro slices?
std::list< int > fDiblocks
List of diblocks.
int fNmicroSliceDataNotPresent
of microslices with !DataPresent
Class to hold the MicroSlice data.
Definition: RawMicroSlice.h:48
void UnpackNanoSlice(daqdataformats::RawMicroSlice &microslice, unsigned int inano, dq::DAQEventSummary *daqsum)
int fNtotalNanoSlices
of nano slices in the event
bool getDataPresent() const
Get Floating NanoSlice.
void dq::DAQEventUnpack::UnpackNanoSlice ( daqdataformats::RawMicroSlice microslice,
unsigned int  inano,
dq::DAQEventSummary daqsum 
)

Extract raw information at nanoslice level

Parameters
microslice: Microslice
inano: Nanoslice number
daqsum: DAQEventSummary object

Definition at line 131 of file DAQEventUnpack.cxx.

References dq::DAQEventSummary::fNanoSliceADCError, dq::DAQEventSummary::fNanoSliceBufferEmpty, dq::DAQEventSummary::fNanoSliceBufferFull, dq::DAQEventSummary::fNanoSliceCommError, dq::DAQEventSummary::fNanoSliceDataNotPresent, dq::DAQEventSummary::fNanoSliceNoLinkStatus, dq::DAQEventSummary::fNanoSliceOverflowError, dq::DAQEventSummary::fNanoSlicePacketError, daqdataformats::RawMicroSlice::getFloatingNanoSlice(), daqdataformats::RawNanoSlice::getHeader(), if(), and daqdataformats::RawMicroSlice::setFloatingNanoSlice().

Referenced by UnpackMicroSlice().

134  {
135  microslice.setFloatingNanoSlice(inano);
136 
137  daqdataformats::RawNanoSlice& nanoslice = (*microslice.getFloatingNanoSlice());
138  daqdataformats::RawNanoSliceHeader& nanoslicehdr = (*nanoslice.getHeader());
139 
140  if (!nanoslicehdr.getDataPresent()) ++daqsum->fNanoSliceDataNotPresent;
141  if (!nanoslicehdr.getLinkStatus()) ++daqsum->fNanoSliceNoLinkStatus;
142  if ( nanoslicehdr.getBufferEmpty()) ++daqsum->fNanoSliceBufferEmpty;
143  if ( nanoslicehdr.getBufferFull()) ++daqsum->fNanoSliceBufferFull;
144  if ( nanoslicehdr.getCommError()) ++daqsum->fNanoSliceCommError;
145  if ( nanoslicehdr.getPacketError()) ++daqsum->fNanoSlicePacketError;
146  if ( nanoslicehdr.getOverflowError()) ++daqsum->fNanoSliceOverflowError;
147  if ( nanoslicehdr.getADCError()) ++daqsum->fNanoSliceADCError;
148  }
IMPLEMENT_MAIN_STANDARD IMPLEMENT_MAIN_setBufferSource daqdataformats::RawNanoSliceHeader * getHeader() const
Get the NanoSlice header pointer.
Definition: RawNanoSlice.h:57
int fNanoSliceADCError
of nanoslices reporting ADCError
int fNanoSliceCommError
of nanoslices reporting CommError
bool setFloatingNanoSlice(const uint32_t inano) const
Set the SIM flag.
int fNanoSliceNoLinkStatus
of nanoslices reporting !LinkPresent
if(dump)
int fNanoSliceDataNotPresent
of nanoslices reporting !DataPresent
int fNanoSliceOverflowError
of nanoslices reporting OverflowError
int fNanoSliceBufferFull
of nanoslices reporting BufferFull
int fNanoSlicePacketError
of nanoslices reporting PacketError
int fNanoSliceBufferEmpty
of nanoslices reporting BufferEmpty
daqdataformats::RawNanoSlice * getFloatingNanoSlice() const
Get the MicroSlice Timing Marker.
void dq::DAQEventUnpack::UnpackRawEvent ( daqdataformats::RawEvent raw,
dq::DAQEventSummary daqsum 
)

Extract raw information at event level and unpack conatined datablocks

Parameters
raw: Raw event
daqsum: DAQEventSummary object

Definition at line 40 of file DAQEventUnpack.cxx.

References dq::DAQEventSummary::fEventIncomplete, dq::DAQEventSummary::fEventNumber, and UnpackDataBlock().

Referenced by dq::DAQHeaderSummary::produce().

42  {
43  if (raw.getHeader()->isEventIncomplete()) daqsum->fEventIncomplete = true;
44  unsigned int nDataBlock = raw.getDataBlockNumber();
45  unsigned int eventNumber = raw.getEventNumber();
46 
47  daqsum->fEventNumber = eventNumber;
48 
49  // Now unpack the associated data blocks
50  unsigned int idata;
51  for (idata = 0; idata < nDataBlock; ++idata) {
52  this->UnpackDataBlock(raw, idata, daqsum);
53  }
54  }
void UnpackDataBlock(daqdataformats::RawEvent &rawevt, unsigned int idata, dq::DAQEventSummary *daqsum)
int fEventNumber
Event number (diagnostic)
bool fEventIncomplete
Is the event incomplete?

The documentation for this class was generated from the following files: