OnlineUnpack.cxx
Go to the documentation of this file.
1 ////////////////////////////////////////////////////////////////////////
2 /// \file OnlineUnpack.cxx
3 /// \brief Unpack the online data to offline format
4 ///
5 /// \version $Id: OnlineUnpack.cxx,v 1.26 2012-11-09 17:22:59 jpaley Exp $
6 /// \author brebel@fnal.gov
7 ////////////////////////////////////////////////////////////////////////
9 
10 #include "DAQDataFormats/RawTrigger.h"
11 #include "DAQDataFormats/RawTriggerHeader.h"
12 #include "DAQDataFormats/RawTriggerTime.h"
13 #include "DAQDataFormats/RawTriggerMask.h"
14 #include "DAQDataFormats/RawTriggerTimingMarker.h"
15 #include "DAQDataFormats/RawDataBlock.h"
16 #include "DAQDataFormats/RawMicroBlock.h"
17 #include "RawFileParser/RawFileParser.h"
18 #include "DAQChannelMap/DAQChannelMap.h"
20 #include "RawData/DAQHeader.h"
21 #include "RawData/RawTrigger.h"
22 #include "RawData/FlatDAQData.h"
23 #include "RawData/RawSumDropMB.h"
24 #include "RawData/RawSumDCM.h"
25 #include "NovaDAQConventions/DAQConventions.h"
26 
30 
31 #include <iostream>
32 #include <boost/algorithm/string.hpp>
33 
34 #include "TH1F.h"
35 
36 
37 namespace daq2raw{
38 
39 //-----------------------------------------------------------------------------
40 //Constructor
41 OnlineUnpack::OnlineUnpack(TH1F *pulseHeightVals, TH1F *timeStampVals, TH1F *triggerVals, const std::string* file_name) :
42  fFilterCorruptedNanoslices (false)
43  ,fDetId (novadaq::cnv::kUNKNOWN_DET)
44  ,fNumberOfNonemptyMicroblocks(0)
45  ,fPulseHeight_values (pulseHeightVals)
46  ,fTimeStamp_values (timeStampVals)
47  ,fTrigger_values (triggerVals)
48  ,fTDC_values (nullptr)
49  ,fHitNumber (0)
50  ,fCurrentFileName (file_name)
51 {
52 }
53 
54 //-----------------------------------------------------------------------------
55 //Destructor
57 {
58 }
59 
60 //-----------------------------------------------------------------------------
62  std::vector<rawdata::RawDigit>* digits,
63  rawdata::RawTrigger* raw_trigger,
64  rawdata::RawSumDropMB* raw_sumDropMB,
65  rawdata::RawSumDCM* raw_sumDCM,
66  rawdata::FlatDAQData* flat_daq_data,
67  rawdata::DAQHeader* daq_header){
68 
69  // First set the pointer to the raw Buffer.
70  fRawEvent.setBufferSource(buffer);
71 
72  return ProcessRawEvent_(digits, raw_trigger, raw_sumDropMB, raw_sumDCM, flat_daq_data, daq_header);
73 }
74 
75 //-----------------------------------------------------------------------------
77  std::vector<rawdata::RawDigit>* digits,
78  rawdata::RawTrigger* raw_trigger,
79  rawdata::RawSumDropMB* raw_sumDropMB,
80  rawdata::RawSumDCM* raw_sumDCM,
81  rawdata::FlatDAQData* flat_daq_data,
82  rawdata::DAQHeader* daq_header){
83  errno = 0; // Currently our only way of distinguishing EOF from read failure.
84  const bool result = parser.getEvent(fRawEvent);
85  if (errno) {
87  << "Read error attempting to obtain next raw event:"
88  << strerror(errno) << ".\n";
89  }
90  return result?ProcessRawEvent_(digits, raw_trigger, raw_sumDropMB, raw_sumDCM, flat_daq_data, daq_header):false;
91 }
92 
93 //-----------------------------------------------------------------------------
94 bool OnlineUnpack::ProcessRawEvent_(std::vector<rawdata::RawDigit>* digits,
95  rawdata::RawTrigger* raw_trigger,
96  rawdata::RawSumDropMB* raw_sumDropMB,
97  rawdata::RawSumDCM* raw_sumDCM,
98  rawdata::FlatDAQData* flat_daq_data,
99  rawdata::DAQHeader* daq_header){
100 
101 
102  /// Variable that is saying whether there was at least one Microblock
103  /// We are getting detector ID from microblocks. If there is none, we'll take it from Configuration Block
105  /// Resizing the size of the FlatDAQData buffer to the size of the event
106  /// fRawEvent.sizeofdata() returns the size in words, so we need to multiply by 4
107  flat_daq_data->fRawBuffer.resize(fRawEvent.sizeofdata() * 4);
108 
109  /// Now, fill FlatDAQData object with the event
110  fRawEvent.writeData(flat_daq_data->getRawBufferPointer());
111 
112 #ifdef RUNCHECKS
113  std::cout << "Checks = " <<
114  qc.checkEvent(fRawEvent) << std::endl;
115 #endif
116 
117  /// Checking for the markers
118  if ( fRawEvent.getHeaderMarkerLeft() != daqdataformats::raweventhdr::Marker_value[0]
119  || fRawEvent.getHeaderMarkerRight() != daqdataformats::raweventhdr::Marker_value[1]){
120  std::cout<<"Event Header markers are wrong\n";
121 
122  return false;
123  }
124 
125  /// Trigger pointer
126  daqdataformats::RawTrigger* trigger = fRawEvent.getTrigger();
127 
128  /// Checking Trigger markers
129 #ifdef DAQDATAFORMATS_VERSIONING_IS_IMPLEMENTED
130  if ( trigger->getTriggerHeader()->getDelimiter() != daqdataformats::triggerheader::TriggerHeaderDelimiter ){
131 #else
132  if ( trigger->getTriggerHeader()->getDelimiter() != daqdataformats::TriggerHeaderDelimiter ){
133 #endif
134 
135  std::cout<<"Trigger Header markers are wrong\n";
136  return false;
137  }
138  // Now the unpacking...
139 
140  /// Filling Trigger stuff
141  fUnpackedEventParameters.fTriggerHeader_Source = trigger->getTriggerHeader()->getSource();
142  fUnpackedEventParameters.fTriggerHeader_SourceID = trigger->getTriggerHeader()->getSourceID();
143  fUnpackedEventParameters.fTriggerHeader_SourceSubID = trigger->getTriggerHeader()->getSourceSubID();
144  fUnpackedEventParameters.fTriggerHeader_TriggerNumber = trigger->getTriggerHeader()->getTriggerNumber();
145  fUnpackedEventParameters.fTriggerHeader_MasterTriggerNumber = trigger->getTriggerHeader()->getMasterTriggerNumber();
146  fUnpackedEventParameters.fTriggerTime_GenTime = trigger->getTriggerTime()->getTriggerTimeStamp();
147  fUnpackedEventParameters.fTriggerTime_ClockSource = trigger->getTriggerTime()->getClockSource();
148  fUnpackedEventParameters.fTriggerTimingMarker_TimeStart = trigger->getTriggerTimingMarker()->getTriggerStart_baseClock();
149  fUnpackedEventParameters.fTriggerTimingMarker_ExtractionStart = trigger->getTriggerTimingMarker()->getTriggerStart_833kHz();
150  fUnpackedEventParameters.fTriggerRange_TriggerLength = trigger->getTriggerRange()->getTriggerLength();
151  fUnpackedEventParameters.fTriggerMask_MCBit = trigger->getTriggerMask()->getMonteCarloFlag();
152  fUnpackedEventParameters.fTriggerMask_TMod = trigger->getTriggerMask()->getTrigMod();
153  fUnpackedEventParameters.fTriggerMask_TriggerTypesLow = trigger->getTriggerMask()->getTrigMask_Low();
154  fUnpackedEventParameters.fTriggerMask_TriggerTypesHigh = trigger->getTriggerMask()->getTrigMask_High();
155  fUnpackedEventParameters.fTriggerMask_TriggerTypesHigh2 = trigger->getTriggerMask()->getTrigMask_High2();
156  fUnpackedEventParameters.fTriggerMask_Prescale = trigger->getTriggerMask()->getPrescale();
157 
169  raw_trigger->fTriggerMask_TriggerType = trigger->getTriggerMask()->getTriggerMask();
172  else raw_trigger->fTriggerMask_MCBit = false;
173 
175 
177 
178  /// Loop over DataBlocks
179  const uint32_t n_datablocks = fRawEvent.getDataBlockNumber();
180 
181  bool isSummaryEvent = false;
182 
183  /// Counter for total number of microslices in the event
184  uint32_t total_microslices=0;
185 
186  for(uint32_t idatablock = 0; idatablock < n_datablocks; ++idatablock){
187 
188  // Set the datablock
189  fRawEvent.setFloatingDataBlock(idatablock);
190  daqdataformats::RawDataBlock* datablock = fRawEvent.getFloatingDataBlock();
191 
192  /// Checking DataBlock markers
193 #ifdef DAQDATAFORMATS_VERSIONING_IS_IMPLEMENTED
194  if ( datablock->getHeader()->getMarker() == daqdataformats::datablockheader::SummaryBlock_Marker ){
195 
196  if(datablock->getHeader()->checkMarker()) {
197  isSummaryEvent = true;
198  }
199  }
200  else if ( datablock->getHeader()->getMarker() != daqdataformats::datablockheader::DataBlock_Marker ){
201 #else
202  if ( datablock->getHeader()->getMarker() != daqdataformats::datablock::DataBlock_Marker ){
203 #endif
204  std::cout<<"DataBlock Header markers are wrong\n";
205  return false;
206  }// end of checking DataBlock markers
207 
208  if(isSummaryEvent) {
210 
211  raw_sumDropMB->fSumTrig_NumDroppedMicroblocks =
212  rsdm->getNumDroppedMicroblocks();
213  raw_sumDropMB->fSumTrig_TimeStamp = rsdm->getTimeStamp();
214  raw_sumDropMB->fSumTrig_TimeStampLow = rsdm->getTimeStampLow();
215  raw_sumDropMB->fSumTrig_TimeStampHigh = rsdm->getTimeStampHigh();
216  raw_sumDropMB->fSumTrig_BuffId = datablock->getBuffId();
217 
218  daqdataformats::RawSummaryDCMData* summaryDCMData = (daqdataformats::RawSummaryDCMData*)datablock->getDCMData();
220 
221  for(uint32_t ient = 0; ient < summaryDCMData->getHeader()->getNumEntries(); ++ient) {
222  thePoint = summaryDCMData->getDataPoint(ient);
223  if(!thePoint) continue;
224 
225  uint8_t dib = thePoint->getDCMID();
226  uint8_t dcm = (thePoint->getDCMID() >> 8) & 0x1F;
227  uint8_t det = (thePoint->getDCMID() >> 13);
228 
230  aPoint.fSumTrig_DCM_dib = dib;
231  aPoint.fSumTrig_DCM_dcm = dcm;
232  aPoint.fSumTrig_DCM_det = det;
233  aPoint.fSumTrig_DCM_Type = (rawdata::RawSumDCMType)thePoint->getDataType();
234  aPoint.fSumTrig_DCM_TimeStampLow = thePoint->getTimeStampLow();
235  aPoint.fSumTrig_DCM_TimeStampHigh = thePoint->getTimeStampHigh();
236 
237  raw_sumDCM->_points.push_back(aPoint);
238  }
239  continue;
240  }
241 
242  /// Loop over the MicroBlocks
243  const uint32_t n_microblocks = datablock->getNumMicroBlocks();
244 
245  for(uint32_t imicro = 0; imicro < n_microblocks; ++imicro){
246 
247  /// Set the microblock
248  datablock->setFloatingMicroBlock(imicro);
249 
250  daqdataformats::RawMicroBlock* microblock = (daqdataformats::RawMicroBlock*)datablock->getFloatingMicroBlock();
251  daqdataformats::RawMicroSlice* microslice = (daqdataformats::RawMicroSlice*)microblock->getMicroSlice();
252 
253  /// Doing various checks
254  /// 1. Cannot be less than 8
255  if(microslice->getHeader()->getByteCount() < 8) return false;
256 
257 #ifndef DAQDATAFORMATS_VERSIONING_IS_IMPLEMENTED
258  /// 2. Has to be dividable by 4 if nanoslice is version 0
259  if(microslice->getHeader()->getByteCount() % 4) return false;
260 #endif
261  /// 3. Cannot be empty
262  if(!microslice->getHeader()->getDataPresent() && microslice->getHeader()->getByteCount()!= 8) return false;
263 
264  /// Increment the total number of valid microslices in the event
265  total_microslices++;
266 
267  /// Inform everyone of the detector ID.
268  fDetId = (int)microblock->getHeader()->getDetId();
271 
273 
274  /// Increment fNumberOfNonemptyMicroblocks
276 
277  /// Diblock number
278  const uint32_t diblock = microblock->getHeader()->getDiblockId();
279  /// DCM number in the diblock
280  const uint32_t dcmid = microblock->getHeader()->getDCMId();
281 
283 
284  /// Loop over NanoSlices
285  const uint32_t n_nanoslices = microslice->getNumNanoSlices();
286  for(uint32_t inano = 0; inano < n_nanoslices; ++inano){
287 
288  /// Set the nanoslice
289  microslice->setFloatingNanoSlice(inano);
290 
293 
294 #ifdef DAQDATAFORMATS_VERSIONING_IS_IMPLEMENTED
295  const uint32_t nanoslice_version = nanoslice_header->getVersion();
296 #else
297  const uint32_t nanoslice_version = 0;
298 #endif
299 
300  /// See if we need to filter the nanoslice
302  /// NanoSlice has to have DataPresent Flag
303  if(!nanoslice_header->getDataPresent()) continue;
304  /// NanoSlice version 0 has to have Reserved field set to 0xCAFE
305  if(nanoslice_version == 0 && !nanoslice->checkReservedForCafe()) continue;
306  }// end of filtering
307 
308 
309  /// DCM link number for the FEB
310  const uint32_t dcm_link = nanoslice_header->getFEBId();
311  /// Pixel number
312  const uint32_t pixel = nanoslice_header->getPixelAddr();
313  /// Get the daq channel for the hit
314  const daqchannelmap::dchan daq_channel = cmap->encodeDChan(fDetId,
315  diblock,
316  dcmid,
317  dcm_link,
318  pixel);
319 
320  try{
321  // DAQChannelMap is fixed to correctly map DAQ to the Offline, at least
322  // for the first 4 blocks of any detector!! A further fix is being done
323  // for the AA DiBlock interfaces that are present beyond this.
324  cmap->getDetector(daq_channel);
325  cmap->getDiBlock(daq_channel);
326  cmap->getDCM(daq_channel);
327  cmap->getFEB(daq_channel);
328  cmap->getPixel(daq_channel);
329  cmap->getView(daq_channel);
330  }
331  catch(...){
332  mf::LogError("BadDAQChannel") << "we have a bad DAQChannel " << daq_channel
333  << " don't make a digit from it";
334  continue;
335  }
336 
337  /// get local channel from the DAQ channel
338  const uint32_t local_channel = cmap->encodeLChan(daq_channel);
339 
340  /// Event time
341 #ifdef SUBTRACT_EVENT_TIME_FROM_HIT
342  const Long64_t nanoslice_time = nanoslice->getTimeStamp();
343  const Long64_t tdc_time = raw_trigger->TDCT0();
344  const Long64_t time_difference = nanoslice_time - tdc_time;
345  const int32_t TDC = time_difference;
346 #else
347  const uint32_t TDC = nanoslice->getTimeStamp();
348 #endif
349 
350 
351  if(fTDC_values) fTDC_values->Fill(TDC);
352  if(fTimeStamp_values)fTimeStamp_values->Fill(nanoslice->getTimeStamp());
353 
354  fDigit.SetDaqChannel(daq_channel);
355  fDigit.SetChannel(local_channel);
356  fDigit.SetTDC(TDC);
357 
358  fDigit.fFrameSequenceNumber = (uint8_t)nanoslice_header->getSequence();
359  fDigit.fFEBStatus = nanoslice_header->getFEBStatus();
360  fDigit.fDebugMode = nanoslice_header->getDebugMode();
361  fDigit.fDataPresent = nanoslice_header->getDataPresent();
362  fDigit.fLinkStatus = nanoslice_header->getLinkStatus();
363 
364  fDigit.fVersion = (uint8_t)nanoslice_version;
365 
366  if (nanoslice_version == 0){
367  const int32_t ADC = nanoslice->getPulseHeight();
369  fDigit.SetADC(0, ADC);
370  fDigit.fReserved = nanoslice->getReserved();
371  }
372 #ifdef DAQDATAFORMATS_VERSIONING_IS_IMPLEMENTED
373  else if(nanoslice_version >= 1){
374 
375  const int nsamples = nanoslice->getNSamples();
376 
377  if(nsamples == 0){
378  mf::LogError("NSamples") << "NSamples cannot be zero\n";
379  assert(false);
380  }
381 
382  const uint32_t sample0 = nanoslice->getValue(0);
383  if(fPulseHeight_values) fPulseHeight_values->Fill(sample0);
384  fDigit.SetADC(0, sample0);
385 
386 
387  for(int i=1; i<nsamples; ++i){
388  fDigit.SetADC(i, nanoslice->getValue(i));
389  //std::cout<<" ADC"<<i<<":"<<nanoslice->getValue(i);
390  }
391 
392  //nanoslice->print();
393 
394 
395  }// end of cases for nanoslice_version
396  else{
397  mf::LogError("Version") << "Unknown nanoslice version" << nanoslice_version<<"\n";
398  assert(false);
399  }
400 #endif
401 
402  /// Push Raw Digit
403  digits->push_back(fDigit);
404 
405  /// Advance the hit number
406  ++fHitNumber;
407  }// end of loop over nanoslices
408 
409  //std::cout<<"end micro "<<imicro<<"\n";
410  }// end of loop over microblocks
411  }// end of loop over datablocks
412 
413  /// Bug in Datalogger that has detector ID in Configuration block different than in Microblocks
414  /// Try to figure out the detector from the file name
417  std::cout<<"From "<<__PRETTY_FUNCTION__<<":"<<__LINE__;
418  std::cout<<" Warning!!! Could not get the detector ID.";
419  std::cout<<" The empty event "<<fRawEvent.getEventNumber();
420  std::cout<<" will be marked to have DetectorID="<<fDetId;
421  std::cout<<"("<<novadaq::cnv::DetInfo::GetName(fDetId)<<")\n";
422  }
423  }// end of trying to figure out the detector
424 
425  /// Now filling DAQHeader
426  daq_header->SetDetId(fDetId);
427  daq_header->SetTotalMicroSlices(total_microslices);
428 
429  return true;
430 }// end of ProcessRawEvent_
431 
432 
433 //------------------------------------------------------------------------------
434 // Try to get Detector ID from the file name
436 
437  if(!file_name) return false;
438 
439  if (boost::find_first(*file_name, "ndos") || boost::find_first(*file_name, "NDOS")){
441  }
442  else if(boost::find_first(*file_name, "fardet") || boost::find_first(*file_name, "FarDet")){
444  }
445  else if(boost::find_first(*file_name, "neardet") || boost::find_first(*file_name, "NearDet")){
447  }
448  else if(boost::find_first(*file_name, "testbeam") || boost::find_first(*file_name, "TestBeam")){
450  }
451  // If file_name exists but no matching detector string found, return false.
452  else return false;
453 
454  return true;
455 }
456 
457 
458 }//end namespace
459 
int fNumberOfDigits
! Detector type
Definition: OnlineUnpack.h:62
static std::string GetName(int id)
uint32_t fTriggerMask_TriggerTypesHigh2
Definition: OnlineUnpack.h:58
int getDetector(uint32_t anychan) const
uint32_t fTriggerMask_Prescale
Definition: RawTrigger.h:44
void SetDetId(int i)
Definition: DAQHeader.h:30
void SetDetector(novadaq::cnv::DetId det)
Call this if you have definitive special knowledge (ie you&#39;re the Geometry service) ...
diblock
print "ROW IS " print row
Definition: geo2elec.py:31
uint32_t fTriggerHeader_SourceID
! Trigger source (see DAQDataFormats/TriggerDefines.h)
Definition: OnlineUnpack.h:44
IMPLEMENT_MAIN_STANDARD IMPLEMENT_MAIN_setBufferSource daqdataformats::RawNanoSliceHeader * getHeader() const
Get the NanoSlice header pointer.
Definition: RawNanoSlice.h:57
RawSumDCMType fSumTrig_DCM_Type
Definition: RawSumDCM.h:41
void SetTDC(int32_t iTDC)
Definition: RawDigit.cxx:116
uint32_t fNumberOfNonemptyMicroblocks
Definition: OnlineUnpack.h:101
uint32_t fTriggerHeader_SourceSubID
Definition: RawTrigger.h:33
virtual DetView_TYPE getView(dchan daqchan) const =0
Which view (X or Y) does this daq channel readout?
uint8_t fTriggerHeader_Source
Definition: RawTrigger.h:31
uint32_t fSumTrig_NumDroppedMicroblocks
Definition: RawSumDropMB.h:25
uint32_t getNumNanoSlices() const
Get current Hit Probability (for a microslice generation)
uint16_t fReserved
Should be 0xCAFE.
Definition: RawDigit.h:47
~OnlineUnpack()
Destructor.
void SetChannel(uint32_t iChan)
Definition: RawDigit.h:99
bool fFilterCorruptedNanoslices
Do we need to filter out Corrupted NanoSlices?
Definition: OnlineUnpack.h:96
MaybeLogger_< ELseverityLevel::ELsev_error, false > LogError
void * getRawBufferPointer() const
Definition: FlatDAQData.h:21
uint32_t fSumTrig_DCM_TimeStampLow
Definition: RawSumDCM.h:42
lchan encodeLChan(int detId, plane_t plane, cell_t cell) const
std::vector< RawSumDCMPoint > _points
Definition: RawSumDCM.h:27
::xsd::cxx::tree::buffer< char > buffer
Definition: Database.h:179
Class to hold the data from the global trigger in the correct format.
Definition: RawTrigger.h:40
uint8_t fTriggerTime_ClockSource
Definition: RawTrigger.h:37
int fDetId
Detector ID reading from Microblocks.
Definition: OnlineUnpack.h:100
uint8_t fTriggerMask_TriggerType
Definition: RawTrigger.h:43
uint32_t fTriggerMask_TriggerTypesLow
Definition: OnlineUnpack.h:56
void SetADC(uint32_t i, int16_t iADC)
Definition: RawDigit.cxx:108
uint8_t fTriggerMask_TMod
Definition: RawTrigger.h:42
unsigned long long fTriggerHeader_MasterTriggerNumber
Definition: RawTrigger.h:35
Far Detector at Ash River, MN.
bool setFloatingNanoSlice(const uint32_t inano) const
Set the SIM flag.
unsigned long long fTriggerTimingMarker_ExtractionStart
Definition: RawTrigger.h:39
const std::string * fCurrentFileName
Current file name.
Definition: OnlineUnpack.h:116
uint32_t fTriggerHeader_Source
Definition: OnlineUnpack.h:43
uint8_t fVersion
NanoSlice version.
Definition: RawDigit.h:52
daqdataformats::RawEvent fRawEvent
Flat DAQ RawEvent.
Definition: OnlineUnpack.h:103
uint32_t fTriggerTime_ClockSource
Definition: OnlineUnpack.h:49
uint32_t fTriggerRange_TriggerLength
Definition: OnlineUnpack.h:53
static DAQChannelMap * getInstance(int detID)
uint8_t fFrameSequenceNumber
Definition: RawDigit.h:39
bool ProcessRawEvent_(std::vector< rawdata::RawDigit > *, rawdata::RawTrigger *, rawdata::RawSumDropMB *, rawdata::RawSumDCM *, rawdata::FlatDAQData *, rawdata::DAQHeader *)
daqdataformats::RawMicroSliceHeader * getHeader() const
Prototype Near Detector on the surface at FNAL.
unsigned long long fTriggerTimingMarker_TimeStart
Definition: OnlineUnpack.h:50
Near Detector in the NuMI cavern.
unsigned long long fTriggerTime_GenTime
Definition: OnlineUnpack.h:48
void SetDaqChannel(uint32_t iChan)
Definition: RawDigit.h:100
rawdata::RawDigit fDigit
Instance of RawDigit class.
Definition: OnlineUnpack.h:105
unsigned long long fTriggerTime_GenTime
Definition: RawTrigger.h:36
uint32_t fTriggerMask_Prescale
Definition: OnlineUnpack.h:59
A module to produce rawdata::RawDigits from NOvADDT DAQHits.
uint16_t fTriggerHeader_SourceID
Definition: RawTrigger.h:32
A very simple service to remember what detector we&#39;re working in.
OStream cout
Definition: OStream.cxx:6
uint64_t fSumTrig_TimeStamp
Definition: RawSumDropMB.h:26
cet::coded_exception< errors::ErrorCodes, ExceptionDetail::translate > Exception
Definition: Exception.h:66
pixel_t getPixel(dchan daqchan) const
Decode the pixel id from a dchan.
::xsd::cxx::tree::string< char, simple_type > string
Definition: Database.h:154
uint32_t fTriggerMask_TriggerTypesHigh
Definition: OnlineUnpack.h:57
Class to hold the MicroSlice data.
Definition: RawMicroSlice.h:48
uint32_t fSumTrig_TimeStampLow
Definition: RawSumDropMB.h:27
RawSumDCMType
Definition: RawSumDCM.h:13
unsigned long long fTriggerHeader_TriggerNumber
Definition: RawTrigger.h:34
unsigned long long fTriggerTimingMarker_TimeStart
Definition: RawTrigger.h:38
bool getDetIDFromFileName(const std::string *)
Try to get Detector ID from the file name.
unsigned long long fTriggerTimingMarker_ExtractionStart
Definition: OnlineUnpack.h:51
assert(nhit_max >=nhit_nbins)
unsigned long long fTriggerHeader_TriggerNumber
! Identifier of the subsystem or channel on source device
Definition: OnlineUnpack.h:46
cmap::CMap class source code
Definition: CMap.cxx:17
uint32_t fTriggerRange_TriggerLength
Definition: RawTrigger.h:40
dcm_id_t getDCM(dchan daqchan) const
Decode the dcm ID from a dchan.
int getEvent(daqdataformats::RawEvent &theEvent)
Retrieve the next event from the file.
void SetTotalMicroSlices(int i)
Definition: DAQHeader.h:31
dchan encodeDChan(int detID, diblock_t diblock, dcm_id_t dcm, feb_t feb, pixel_t pixel) const
uint32_t fSumTrig_DCM_TimeStampHigh
Definition: RawSumDCM.h:43
uint32_t dchan
< DAQ Channel Map Package
unsigned long long TDCT0() const
Return just the lower 32 bits of the timing marker. This is the reference "t0" for the RawDigit TDC c...
Definition: RawTrigger.cxx:44
std::vector< char > fRawBuffer
Flat event data.
Definition: FlatDAQData.h:23
uint32_t fSumTrig_TimeStampHigh
Definition: RawSumDropMB.h:28
bool ProcessRawEvent(void *rawevent_buffer, std::vector< rawdata::RawDigit > *, rawdata::RawTrigger *, rawdata::RawSumDropMB *, rawdata::RawSumDCM *, rawdata::FlatDAQData *, rawdata::DAQHeader *)
Unpack the RawEvent.
UnpackedEvent fUnpackedEventParameters
Definition: OnlineUnpack.h:107
diblock_t getDiBlock(dchan daqchan) const
Decode the diblock ID from a dchan.
int errno
Definition: errno.cpp:12
unsigned long long fTriggerHeader_MasterTriggerNumber
! Universal trigger number
Definition: OnlineUnpack.h:47
uint32_t fTriggerHeader_SourceSubID
! Identifier of the source system
Definition: OnlineUnpack.h:45
feb_t getFEB(dchan daqchan) const
Decode the feb id from a dchan.
uint8_t fFEBStatus
Definition: RawDigit.h:43
daqdataformats::RawNanoSlice * getFloatingNanoSlice() const
Get the MicroSlice Timing Marker.
OnlineUnpack(TH1F *pulseHeightVals, TH1F *timeStampVals, TH1F *triggerVals, const std::string *file_name=nullptr)
Constructor.