Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
om::RawEventUnpacker Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/OnlineMonitoring/producer/RawEventUnpacker.h"

Public Member Functions

void SubscribeToRawEventSummary (SummarySubscriber *s)
 
void SubscribeToDataBlockSummary (SummarySubscriber *s)
 
void SubscribeToMicroSliceSummary (SummarySubscriber *s)
 
void SubscribeToNanoSliceSummary (SummarySubscriber *s)
 
void UnpackRawEvent (daqdataformats::RawEvent &rawevt)
 
void UnpackDataBlock (daqdataformats::RawEvent &rawevt, unsigned int idata, RawEventSummary &evtsum)
 
void UnpackMicroSlice (daqdataformats::RawDataBlock &datablock, unsigned int imicro, RawEventSummary &evtsum, DataBlockSummary &dbsum)
 
void UnpackNanoSlice (daqdataformats::RawMicroSlice &microslice, unsigned int inano, RawEventSummary &evtsum, DataBlockSummary &dbsum, MicroSliceSummary &microsum)
 
void PublishRawEventSummary (const RawEventSummary &s)
 
void PublishDataBlockSummary (const RawEventSummary &res, const DataBlockSummary &dbs)
 
void PublishMicroSliceSummary (const RawEventSummary &res, const DataBlockSummary &dbs, const MicroSliceSummary &mbs)
 
void PublishNanoSliceSummary (const RawEventSummary &res, const DataBlockSummary &dbs, const MicroSliceSummary &mbs, const NanoSliceSummary &s)
 
void SetDebug (bool debug)
 

Static Public Member Functions

static RawEventUnpackerInstance ()
 

Private Member Functions

 RawEventUnpacker ()
 
 ~RawEventUnpacker ()
 

Private Attributes

daqchannelmap::HardwareDisplayfHardwareMapping
 Map pixel address to hardware space. More...
 
std::list< SummarySubscriber * > fRESSubscriber
 Raw event summary subscribers. More...
 
std::list< SummarySubscriber * > fDBSSubscriber
 Data block summary subscribers. More...
 
std::list< SummarySubscriber * > fMSSSubscriber
 Micro slice summary subscribers. More...
 
std::list< SummarySubscriber * > fNSSSubscriber
 Nano slice summary subscribers. More...
 
bool fDebug
 Flag to print debugging statements. More...
 

Detailed Description

Unpack the russian dolls that is an online event and publish results

Definition at line 27 of file RawEventUnpacker.h.

Constructor & Destructor Documentation

RawEventUnpacker::RawEventUnpacker ( )
private

Definition at line 34 of file RawEventUnpacker.cxx.

References fHardwareMapping, om::Settings::Instance(), and daqchannelmap::HardwareDisplay::SetupDet().

34  :
36 {
38 }
daqchannelmap::HardwareDisplay * fHardwareMapping
Map pixel address to hardware space.
static Settings & Instance()
Definition: Settings.cxx:12
RawEventUnpacker::~RawEventUnpacker ( )
private

Definition at line 42 of file RawEventUnpacker.cxx.

References fHardwareMapping.

42  {
44 }
daqchannelmap::HardwareDisplay * fHardwareMapping
Map pixel address to hardware space.

Member Function Documentation

RawEventUnpacker & RawEventUnpacker::Instance ( )
static

Definition at line 26 of file RawEventUnpacker.cxx.

Referenced by om::OnMonProd::analyze(), om::OnMonProd::reconfigure(), and om::SummarySubscriber::SummarySubscriber().

27 {
28  static RawEventUnpacker tupac;
29  return tupac;
30 }
void RawEventUnpacker::PublishDataBlockSummary ( const RawEventSummary res,
const DataBlockSummary dbs 
)

Definition at line 314 of file RawEventUnpacker.cxx.

References e, fDBSSubscriber, and MECModelEnuComparisons::i.

Referenced by UnpackDataBlock().

316 {
317  std::list<SummarySubscriber*>::iterator i(fDBSSubscriber.begin());
318  std::list<SummarySubscriber*>::iterator e(fDBSSubscriber.end());
319  for (;i!=e; ++i) (*i)->GetDataBlockSummary(r,d);
320 }
std::list< SummarySubscriber * > fDBSSubscriber
Data block summary subscribers.
Float_t d
Definition: plot.C:236
TRandom3 r(0)
Float_t e
Definition: plot.C:35
void RawEventUnpacker::PublishMicroSliceSummary ( const RawEventSummary res,
const DataBlockSummary dbs,
const MicroSliceSummary mbs 
)

Definition at line 324 of file RawEventUnpacker.cxx.

References e, fMSSSubscriber, and MECModelEnuComparisons::i.

Referenced by UnpackMicroSlice().

327 {
328  std::list<SummarySubscriber*>::iterator i(fMSSSubscriber.begin());
329  std::list<SummarySubscriber*>::iterator e(fMSSSubscriber.end());
330  for (;i!=e; ++i) (*i)->GetMicroSliceSummary(r,d,m);
331 }
std::list< SummarySubscriber * > fMSSSubscriber
Micro slice summary subscribers.
Float_t d
Definition: plot.C:236
TRandom3 r(0)
Float_t e
Definition: plot.C:35
void RawEventUnpacker::PublishNanoSliceSummary ( const RawEventSummary res,
const DataBlockSummary dbs,
const MicroSliceSummary mbs,
const NanoSliceSummary s 
)

Definition at line 335 of file RawEventUnpacker.cxx.

References e, fNSSSubscriber, and MECModelEnuComparisons::i.

Referenced by UnpackNanoSlice().

339 {
340  std::list<SummarySubscriber*>::iterator i(fNSSSubscriber.begin());
341  std::list<SummarySubscriber*>::iterator e(fNSSSubscriber.end());
342  for (;i!=e; ++i) (*i)->GetNanoSliceSummary(r,d,m,n);
343 }
Float_t d
Definition: plot.C:236
TRandom3 r(0)
Float_t e
Definition: plot.C:35
std::list< SummarySubscriber * > fNSSSubscriber
Nano slice summary subscribers.
void RawEventUnpacker::PublishRawEventSummary ( const RawEventSummary s)

Definition at line 305 of file RawEventUnpacker.cxx.

References e, fRESSubscriber, and MECModelEnuComparisons::i.

Referenced by UnpackRawEvent().

306 {
307  std::list<SummarySubscriber*>::iterator i(fRESSubscriber.begin());
308  std::list<SummarySubscriber*>::iterator e(fRESSubscriber.end());
309  for (;i!=e; ++i) (*i)->GetRawEventSummary(r);
310 }
std::list< SummarySubscriber * > fRESSubscriber
Raw event summary subscribers.
TRandom3 r(0)
Float_t e
Definition: plot.C:35
void RawEventUnpacker::SetDebug ( bool  debug)

Definition at line 48 of file RawEventUnpacker.cxx.

References gen_hdf5record::debug, and fDebug.

Referenced by om::OnMonProd::reconfigure().

48 { fDebug = debug; }
bool fDebug
Flag to print debugging statements.
void RawEventUnpacker::SubscribeToDataBlockSummary ( SummarySubscriber s)

Definition at line 59 of file RawEventUnpacker.cxx.

References fDBSSubscriber.

Referenced by om::SummarySubscriber::SummarySubscriber().

60 {
61  fDBSSubscriber.push_back(s);
62 }
std::list< SummarySubscriber * > fDBSSubscriber
Data block summary subscribers.
void RawEventUnpacker::SubscribeToMicroSliceSummary ( SummarySubscriber s)

Definition at line 66 of file RawEventUnpacker.cxx.

References fMSSSubscriber.

Referenced by om::SummarySubscriber::SummarySubscriber().

67 {
68  fMSSSubscriber.push_back(s);
69 }
std::list< SummarySubscriber * > fMSSSubscriber
Micro slice summary subscribers.
void RawEventUnpacker::SubscribeToNanoSliceSummary ( SummarySubscriber s)

Definition at line 73 of file RawEventUnpacker.cxx.

References fNSSSubscriber.

Referenced by om::SummarySubscriber::SummarySubscriber().

74 {
75  fNSSSubscriber.push_back(s);
76 }
std::list< SummarySubscriber * > fNSSSubscriber
Nano slice summary subscribers.
void RawEventUnpacker::SubscribeToRawEventSummary ( SummarySubscriber s)

Definition at line 52 of file RawEventUnpacker.cxx.

References fRESSubscriber.

Referenced by om::SummarySubscriber::SummarySubscriber().

53 {
54  fRESSubscriber.push_back(s);
55 }
std::list< SummarySubscriber * > fRESSubscriber
Raw event summary subscribers.
void RawEventUnpacker::UnpackDataBlock ( daqdataformats::RawEvent rawevt,
unsigned int  idata,
RawEventSummary evtsum 
)

Definition at line 131 of file RawEventUnpacker.cxx.

References om::cout, fDebug, om::DataBlockSummary::fMissingData, om::DataBlockSummary::fNmicroblock, PublishDataBlockSummary(), daqdataformats::CURRENT_FIELDS_SUB_NAMESPACE::SummaryBlock_Marker, and UnpackMicroSlice().

Referenced by UnpackRawEvent().

134 {
135  rawevt.setFloatingDataBlock(idata);
136  daqdataformats::RawDataBlock& datablock = (*rawevt.getFloatingDataBlock());
137 
138  DataBlockSummary dbsum;
139  dbsum.fNmicroblock = datablock.getNumMicroBlocks();
140  dbsum.fMissingData = datablock.getHeader()->isMissingData();
141 
142  if(fDebug) {
143  std::cout << "\t("
144  << dbsum.fNmicroblock << ", "
145  << dbsum.fMissingData << ")\n";
146  }
147 
148  if (datablock.getHeader()->getMarker() == daqdataformats::datablockheader::SummaryBlock_Marker ){
149  if(datablock.getHeader()->checkMarker()) {
150  return;
151  }
152  }
153 
154 
155  unsigned int imicro;
156  for (imicro=0; imicro<dbsum.fNmicroblock; ++imicro) {
157  this->UnpackMicroSlice(datablock, imicro, evtsum, dbsum);
158  }
159  this->PublishDataBlockSummary(evtsum,dbsum);
160 }
bool fDebug
Flag to print debugging statements.
void PublishDataBlockSummary(const RawEventSummary &res, const DataBlockSummary &dbs)
void UnpackMicroSlice(daqdataformats::RawDataBlock &datablock, unsigned int imicro, RawEventSummary &evtsum, DataBlockSummary &dbsum)
OStream cout
Definition: OStream.cxx:6
bool fMissingData
Is data missing?
unsigned int fNmicroblock
Number of micro blocks.
void RawEventUnpacker::UnpackMicroSlice ( daqdataformats::RawDataBlock datablock,
unsigned int  imicro,
RawEventSummary evtsum,
DataBlockSummary dbsum 
)

Definition at line 164 of file RawEventUnpacker.cxx.

References om::MicroSliceSummary::fByteCount, om::MicroSliceSummary::fDataPresent, om::MicroSliceSummary::fDCM, om::RawEventSummary::fDCMs, om::MicroSliceSummary::fDet, om::MicroSliceSummary::fDiblock, om::RawEventSummary::fDiblocks, om::MicroSliceSummary::fMCflag, om::RawEventSummary::fNmicroSl, om::MicroSliceSummary::fNnanoslice, daqdataformats::RawMicroSlice::getHeader(), daqdataformats::RawMicroSlice::getNumNanoSlices(), PublishMicroSliceSummary(), and UnpackNanoSlice().

Referenced by UnpackDataBlock().

168 {
169  datablock.setFloatingMicroBlock(imicro);
170 
172  microblock = (*datablock.getFloatingMicroBlock());
173 
175  microslice = (*microblock.getMicroSlice());
176 
177  MicroSliceSummary microsum;
178  microsum.fNnanoslice = microslice.getNumNanoSlices();
179 
180  microsum.fDet = microblock.getHeader()->getDetId();
181  microsum.fDiblock = microblock.getHeader()->getDiblockId();
182  microsum.fDCM = microblock.getHeader()->getDCMId();
183  microsum.fDataPresent = microslice.getHeader()->getDataPresent();
184  microsum.fMCflag = microslice.getHeader()->getMonteCarloFlag();
185  microsum.fByteCount = microslice.getHeader()->getByteCount();
186 
187  evtsum.fDiblocks.insert( microsum.fDiblock);
188  evtsum.fDCMs. insert(100*microsum.fDiblock+microsum.fDCM);
189 
190  unsigned int inano;
191  for (inano=0; inano<microsum.fNnanoslice; ++inano) {
192  this->UnpackNanoSlice(microslice, inano, evtsum, dbsum, microsum);
193  }
194 
195  ++evtsum.fNmicroSl;
196 
197  this->PublishMicroSliceSummary(evtsum,dbsum,microsum);
198 }
unsigned int fDCM
DCM ID.
void PublishMicroSliceSummary(const RawEventSummary &res, const DataBlockSummary &dbs, const MicroSliceSummary &mbs)
unsigned int fDiblock
Diblock ID.
uint32_t getNumNanoSlices() const
Get current Hit Probability (for a microslice generation)
bool fMCflag
Monte Carlo flag.
unsigned int fNnanoslice
Number of nano slices.
unsigned int fByteCount
Number of bytes reported by DCM.
unsigned int fNmicroSl
Total number of micro slices.
std::set< unsigned int > fDCMs
The list of DCMs contributing to the event.
daqdataformats::RawMicroSliceHeader * getHeader() const
bool fDataPresent
Data Present flag by DCM.
void UnpackNanoSlice(daqdataformats::RawMicroSlice &microslice, unsigned int inano, RawEventSummary &evtsum, DataBlockSummary &dbsum, MicroSliceSummary &microsum)
Class to hold the MicroSlice data.
Definition: RawMicroSlice.h:48
std::set< unsigned int > fDiblocks
The list of diblocks in event.
unsigned int fDet
Detector ID.
void RawEventUnpacker::UnpackNanoSlice ( daqdataformats::RawMicroSlice microslice,
unsigned int  inano,
RawEventSummary evtsum,
DataBlockSummary dbsum,
MicroSliceSummary microsum 
)

Definition at line 202 of file RawEventUnpacker.cxx.

References om::cout, daqchannelmap::HardwareDisplay::DAQToXY(), daqchannelmap::DAQChannelMap::encodeDChan(), daqchannelmap::DAQChannelMap::encodeLChan(), om::NanoSliceSummary::fADC, om::NanoSliceSummary::fCell, om::NanoSliceSummary::fDataPresent, om::NanoSliceSummary::fDChan, om::MicroSliceSummary::fDCM, fDebug, om::NanoSliceSummary::fDebugMode, om::MicroSliceSummary::fDet, om::MicroSliceSummary::fDiblock, om::NanoSliceSummary::fFEB, om::RawEventSummary::fFEBs, om::NanoSliceSummary::fFEBStatus, fHardwareMapping, om::NanoSliceSummary::fHdwX, om::NanoSliceSummary::fHdwY, om::NanoSliceSummary::fLChan, om::NanoSliceSummary::fLinkStatus, om::RawEventSummary::fNfeberr, om::RawEventSummary::fNhit, om::NanoSliceSummary::fPix, om::NanoSliceSummary::fPlane, om::NanoSliceSummary::fTDC, om::NanoSliceSummary::fUsec, om::NanoSliceSummary::fView, daqchannelmap::DAQChannelMap::getCell(), daqdataformats::RawMicroSlice::getFloatingNanoSlice(), daqdataformats::RawNanoSlice::getHeader(), daqchannelmap::DAQChannelMap::getInstance(), daqchannelmap::DAQChannelMap::getPlane(), daqchannelmap::DAQChannelMap::getView(), kADC_ERROR, kUSEC_PER_TDC, PublishNanoSliceSummary(), and daqdataformats::RawMicroSlice::setFloatingNanoSlice().

Referenced by UnpackMicroSlice().

207 {
208  microslice.setFloatingNanoSlice(inano);
209 
210  daqdataformats::RawNanoSlice& nanoslice = (*microslice.getFloatingNanoSlice());
211  daqdataformats::RawNanoSliceHeader& nanoslicehdr = (*nanoslice.getHeader());
212 
213  NanoSliceSummary nanosum;
214 
215  nanosum.fFEB = nanoslicehdr.getFEBId();
216  nanosum.fPix = nanoslicehdr.getPixelAddr();
217  nanosum.fTDC = nanoslice. getTimeStamp();
218 
219 
220  if(fDebug) {
221  std::cout << "\n(DB/DCM/FEB/Pix): "
222  << "\t" << microsum.fDiblock
223  << "\t" << microsum.fDCM
224  << "\t" << nanosum.fFEB
225  << "\t" << nanosum.fPix;
226  }
227 
228 
229 
230  unsigned int version = nanoslicehdr.getVersion();
231  if(version == 0) {
232  nanosum.fADC = nanoslice.getPulseHeight();
233 
234  if(fDebug) {
235  std::cout << "\nversion: " << version
236  << "\tADC: " << nanosum.fADC;
237  }
238  }
239  if(version > 0) {
240  // This section is basically copied and pasted from DAQ2RawDigit/RawDigit.cxx
241  const unsigned int nSamples = nanoslice.getNSamples();
242  const unsigned int nPretrig = nanoslice.getNPretriggeredSamples();
243  const unsigned int kDCSDistance = 3; // Look back 3 samples (1.5us in the FD)
244 
245  // Check that everything makes sense, otherwise flag the ADC as bad.
246  if((nSamples <= nPretrig) || (nPretrig < kDCSDistance))
247  nanosum.fADC = kADC_ERROR;
248  else
249  nanosum.fADC = nanoslice.getValue(nPretrig) - nanoslice.getValue(nPretrig - kDCSDistance);
250 
251  if(fDebug) {
252  std::cout << "\nversion: " << version
253  << "\t(nSamples/nPretrig):"
254  << " " << nSamples
255  << " " << nPretrig
256  << "\nADC:";
257  for(unsigned int p = 0; p < nSamples; ++p)
258  std::cout << " " << nanoslice.getValue(p);
259  std::cout << "\tcomputed ADC: " << nanosum.fADC << "\n";
260 
261  }
262  }
263 
264 
265  nanosum.fUsec = nanosum.fTDC*kUSEC_PER_TDC;
266 
267  nanosum.fDataPresent = nanoslicehdr.getDataPresent();
268  nanosum.fLinkStatus = nanoslicehdr.getLinkStatus();
269  nanosum.fDebugMode = nanoslicehdr.getDebugMode();
270  nanosum.fFEBStatus = nanoslicehdr.getFEBStatus();
271 
272  // (1<<4) cooresponds to "Enable DAQ" which you want to be set to 1.
273  if (nanosum.fDataPresent == false || nanosum.fLinkStatus == false ||
274  nanosum.fDebugMode == true || nanosum.fFEBStatus != (1<<4)) {
275  ++evtsum.fNfeberr;
276  }
277 
280  nanosum.fDChan = cmap->encodeDChan((novadaq::cnv::DetId)microsum.fDet,
281  microsum.fDiblock,
282  microsum.fDCM,
283  nanosum.fFEB,
284  nanosum.fPix);
285  nanosum.fLChan = cmap->encodeLChan(nanosum.fDChan);
286  nanosum.fPlane = cmap->getPlane(nanosum.fLChan);
287  nanosum.fCell = cmap->getCell(nanosum.fLChan);;
288 
289  nanosum.fView = cmap->getView(nanosum.fDChan);
290 
292  microsum.fDCM,
293  nanosum. fFEB,
294  nanosum. fPix,
295  &nanosum.fHdwX,
296  &nanosum.fHdwY);
297  evtsum.fFEBs.insert(10000*microsum.fDiblock+100*microsum.fDCM+nanosum.fFEB);
298  ++evtsum.fNhit;
299 
300  this->PublishNanoSliceSummary(evtsum,dbsum,microsum,nanosum);
301 }
unsigned short fDebugMode
Debug mode status bit.
unsigned int fDCM
DCM ID.
IMPLEMENT_MAIN_STANDARD IMPLEMENT_MAIN_setBufferSource daqdataformats::RawNanoSliceHeader * getHeader() const
Get the NanoSlice header pointer.
Definition: RawNanoSlice.h:57
daqchannelmap::HardwareDisplay * fHardwareMapping
Map pixel address to hardware space.
unsigned int fHdwX
location of channel in "hardware display" space
bool fDebug
Flag to print debugging statements.
unsigned int fDiblock
Diblock ID.
virtual DetView_TYPE getView(dchan daqchan) const =0
Which view (X or Y) does this daq channel readout?
const char * p
Definition: xmltok.h:285
std::set< unsigned int > fFEBs
The list of FEBs contributing to the event.
static const unsigned int kADC_ERROR
void DAQToXY(unsigned int db, unsigned int dcm, unsigned int feb, unsigned int pix, unsigned int *ix, unsigned int *iy)
unsigned int fPix
Pixel number on FEB.
cell_t getCell(lchan logicalchan) const
Decode the cell number from an lchan.
unsigned int fTDC
Time of hit in TDC units.
lchan encodeLChan(int detId, plane_t plane, cell_t cell) const
unsigned short fLinkStatus
Link status bit.
unsigned int fDChan
DAQ channel id of this hit.
double fUsec
Time of hit relative to start of micro slice.
bool setFloatingNanoSlice(const uint32_t inano) const
Set the SIM flag.
static DAQChannelMap * getInstance(int detID)
unsigned int fCell
cell number of hit
unsigned short fDataPresent
Data present status bit.
OStream cout
Definition: OStream.cxx:6
const XML_Char * version
Definition: expat.h:187
uint32_t fFEBStatus
Status flags.
unsigned int fADC
Charge of hit in TDC units.
daqchannelmap::DetView_TYPE fView
in which view was the hit
unsigned int fDet
Detector ID.
unsigned int fPlane
plane number of hit
unsigned int fNfeberr
Number of FEB errors reported in event.
unsigned int fLChan
Local channel id of this hit.
unsigned int fHdwY
location of channel in "hardware display" space
plane_t getPlane(lchan logicalchan) const
Decode the plane number from an lchan.
unsigned int fFEB
FEB number of nanoslice (aka "hit")
cmap::CMap class source code
Definition: CMap.cxx:17
dchan encodeDChan(int detID, diblock_t diblock, dcm_id_t dcm, feb_t feb, pixel_t pixel) const
static const double kUSEC_PER_TDC
void PublishNanoSliceSummary(const RawEventSummary &res, const DataBlockSummary &dbs, const MicroSliceSummary &mbs, const NanoSliceSummary &s)
unsigned int fNhit
Total number of nanoslices (hits)
daqdataformats::RawNanoSlice * getFloatingNanoSlice() const
Get the MicroSlice Timing Marker.
void RawEventUnpacker::UnpackRawEvent ( daqdataformats::RawEvent rawevt)

Definition at line 80 of file RawEventUnpacker.cxx.

References novadaq::timeutils::convertNovaTimeToUnixTime(), om::cout, fDebug, om::RawEventSummary::fEvent, om::RawEventSummary::fEventIncomplete, om::RawEventSummary::fHour, check_time_usage::float, om::RawEventSummary::fMasterTrigger, om::RawEventSummary::fNdatablock, om::RawEventSummary::fRange, om::RawEventSummary::fRun, om::RawEventSummary::fSubrun, om::RawEventSummary::fT0, om::RawEventSummary::fT0lo32Usec, om::RawEventSummary::fTrigger, febshutoff_auto::hour, kUSEC_PER_TDC, min(), PublishRawEventSummary(), UnpackDataBlock(), and Munits::year.

Referenced by om::OnMonProd::analyze().

81 {
83 
84  evtsum.fRun = rawevt.getRunNumber();
85  evtsum.fSubrun = rawevt.getSubrun();
86  evtsum.fEvent = rawevt.getEventNumber();
87  evtsum.fNdatablock = rawevt.getDataBlockNumber();
88  evtsum.fEventIncomplete = rawevt.getHeader()->isEventIncomplete();
89  evtsum.fTrigger = rawevt.getTrigger()->getTriggerMask()->getTriggerMask();
90  evtsum.fMasterTrigger = rawevt.getTrigger()->getTriggerHeader()->getMasterTriggerNumber();
91  evtsum.fT0 = rawevt.getTrigger()->getTriggerStart();
92  evtsum.fRange = rawevt.getTrigger()->getTriggerRange()->getTriggerLength();
93 
94  // The upper 32 bits of T0 comes from the DCM time. To be able to compare T0
95  // to the TDC time from the nanoslices, we only want the lower 32 bits of T0.
96  const unsigned long int mask32 = 0xFFFFFFFFUL;
97  unsigned long int T0lo = evtsum.fT0 & mask32;
98  evtsum.fT0lo32Usec = T0lo*kUSEC_PER_TDC;
99 
100  uint16_t sec, min, hour, mday, mon;
101  uint32_t year;
103  sec,
104  min,
105  hour,
106  mday,
107  mon,
108  year);
109  evtsum.fHour = hour + (float)min/60.0 + (float)sec/60.0/60.0;
110 
111  if(fDebug) {
112  std::cout << "\n(r/sr/evt): "
113  << evtsum.fRun << " / "
114  << evtsum.fSubrun << " / "
115  << evtsum.fEvent << "\t"
116  << "number of datablocks: "
117  << evtsum.fNdatablock << "\n";
118  std::cout << "\tDatablocks: (N ublocks, isMissingData)\n";
119  }
120 
121  unsigned int idata;
122  for (idata=0; idata<evtsum.fNdatablock; ++idata) {
123 
124  this->UnpackDataBlock(rawevt, idata, evtsum);
125  }
126  this->PublishRawEventSummary(evtsum);
127 }
void UnpackDataBlock(daqdataformats::RawEvent &rawevt, unsigned int idata, RawEventSummary &evtsum)
unsigned long int fT0
Trigger time in nova time units (64 Mhz ticks)
unsigned int fMasterTrigger
Master trigger number.
bool fDebug
Flag to print debugging statements.
bool convertNovaTimeToUnixTime(uint64_t const &inputNovaTime, struct timespec &outputUnixTime)
unsigned int fEvent
Event nunber.
unsigned int fRange
Trigger length in units of 500 nsec.
void PublishRawEventSummary(const RawEventSummary &s)
if(dump)
float fHour
A fractional hour of the day.
unsigned int fRun
Run number.
unsigned int fSubrun
Subrun number.
OStream cout
Definition: OStream.cxx:6
static float min(const float a, const float b, const float c)
Definition: absgeo.cxx:45
Dumps a summary of info about events to the screen.
unsigned int fTrigger
Trigger type.
unsigned int fNdatablock
Number of data blocks.
static const double kUSEC_PER_TDC
double fT0lo32Usec
Just the lower 32 bits of T0 converted to Usec.
bool fEventIncomplete
Is the event incomplete?
static constexpr Double_t year
Definition: Munits.h:185

Member Data Documentation

std::list<SummarySubscriber*> om::RawEventUnpacker::fDBSSubscriber
private

Data block summary subscribers.

Definition at line 76 of file RawEventUnpacker.h.

Referenced by PublishDataBlockSummary(), and SubscribeToDataBlockSummary().

bool om::RawEventUnpacker::fDebug
private

Flag to print debugging statements.

Definition at line 79 of file RawEventUnpacker.h.

Referenced by SetDebug(), UnpackDataBlock(), UnpackNanoSlice(), and UnpackRawEvent().

daqchannelmap::HardwareDisplay* om::RawEventUnpacker::fHardwareMapping
private

Map pixel address to hardware space.

Definition at line 74 of file RawEventUnpacker.h.

Referenced by RawEventUnpacker(), UnpackNanoSlice(), and ~RawEventUnpacker().

std::list<SummarySubscriber*> om::RawEventUnpacker::fMSSSubscriber
private

Micro slice summary subscribers.

Definition at line 77 of file RawEventUnpacker.h.

Referenced by PublishMicroSliceSummary(), and SubscribeToMicroSliceSummary().

std::list<SummarySubscriber*> om::RawEventUnpacker::fNSSSubscriber
private

Nano slice summary subscribers.

Definition at line 78 of file RawEventUnpacker.h.

Referenced by PublishNanoSliceSummary(), and SubscribeToNanoSliceSummary().

std::list<SummarySubscriber*> om::RawEventUnpacker::fRESSubscriber
private

Raw event summary subscribers.

Definition at line 75 of file RawEventUnpacker.h.

Referenced by PublishRawEventSummary(), and SubscribeToRawEventSummary().


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