Belle II Software  release-06-01-15
PrintDataTemplate.cc
1 /**************************************************************************
2  * basf2 (Belle II Analysis Software Framework) *
3  * Author: The Belle II Collaboration *
4  * *
5  * See git log for contributors and copyright holders. *
6  * This file is licensed under LGPL-3.0, see LICENSE.md. *
7  **************************************************************************/
8 
9 #include <rawdata/modules/PrintDataTemplate.h>
10 //#include <daq/rawdata/modules/DAQConsts.h>
11 #include <rawdata/dataobjects/RawPXD.h>
12 
13 
14 using namespace std;
15 using namespace Belle2;
16 
17 //#define DEBUG
18 
19 //-----------------------------------------------------------------
20 // Register the Module
21 //-----------------------------------------------------------------
22 REG_MODULE(PrintDataTemplate)
23 
24 //-----------------------------------------------------------------
25 // Implementation
26 //-----------------------------------------------------------------
27 
29 {
30  //Set module properties
31  setDescription("Encode DataStore into RingBuffer");
32  n_basf2evt = -1;
33  m_compressionLevel = 0;
34  B2INFO("PrintDataTemplate: Constructor done.");
35  m_ncpr = 0;
36  m_nftsw = 0;
37  m_print_cnt = 0;
38 }
39 
40 
41 
42 PrintDataTemplateModule::~PrintDataTemplateModule()
43 {
44 }
45 
46 void PrintDataTemplateModule::initialize()
47 {
48  B2INFO("PrintDataTemplate: initialize() started.");
49 
50  // StoreArray<RawCOPPER>::registerTransient(s_auxMCParticlesName.c_str());
51  // StoreObjPtr<RawCOPPER>::registerTransient();
52  // Initialize EvtMetaData
53  // m_eventMetaDataPtr.registerAsPersistent();
54  // Create Message Handler
55  B2INFO("PrintDataTemplate: initialize() done.");
56 
57 }
58 
59 
60 
61 //
62 // User defined functions
63 //
64 
65 
66 void PrintDataTemplateModule::printBuffer(int* buf, int nwords)
67 {
68  // printf("%.8x :", 0);
69  for (int j = 0; j < nwords; j++) {
70  printf(" %.8x", buf[ j ]);
71  if ((j + 1) % 8 == 0) {
72  // printf("\n%.8x :", j + 1);
73  printf("\n");
74  }
75  m_print_cnt++;
76  }
77  printf("\n");
78 
79  return;
80 }
81 
82 
83 void PrintDataTemplateModule::printFTSWEvent(RawDataBlock* raw_datablock, int i)
84 {
85 
86  int* buf = raw_datablock->GetBuffer(i);
87  int nwords = raw_datablock->GetBlockNwords(i);
88  printf("*******FTSW data**********: nwords %d\n", nwords);
89  printBuffer(buf, nwords);
90 
91 
92 
93  RawFTSW rawftsw;
94  int delete_flag = 0; // No need to free the buffer
95  int num_event = 1;
96  int num_nodes = 1;
97  rawftsw.SetBuffer(buf, nwords, delete_flag, num_event, num_nodes);
98 
99  timeval tv;
100  int n = i;
101  rawftsw.GetTTTimeVal(n , &tv);
102 
103  timeval tv_pc;
104  rawftsw.GetPCTimeVal(n , &tv_pc);
105 
106  printf("HdrNwords %d nodeID %.8x runsub %.8x run %.4x sub %.4x exp %.4x eve %.8x trl %.8x\n",
107  rawftsw.GetNwordsHeader(n),
108  rawftsw.GetFTSWNodeID(n),
109  rawftsw.GetRunNoSubRunNo(n),
110  rawftsw.GetRunNo(n),
111  rawftsw.GetSubRunNo(n),
112  rawftsw.GetExpNo(n),
113  rawftsw.GetEveNo(n),
114  rawftsw.GetMagicTrailer(n)
115  );
116 
117  printf("ctimetrg %.8x utime %.8x ctime %.8x trg %d TTD(sec %.8x usec %.8x) PC(sec %.8x usec %.8x)\n",
118  rawftsw.GetTTCtimeTRGType(n),
119  rawftsw.GetTTUtime(n),
120  rawftsw.GetTTCtime(n),
121  rawftsw.GetTRGType(n),
122  (unsigned int)(tv.tv_sec),
123  (unsigned int)(tv.tv_usec),
124  (unsigned int)(tv_pc.tv_sec),
125  (unsigned int)(tv_pc.tv_usec));
126  // rawftsw.Get15bitTLUTag(n) );
127 
128  //
129  // Show newly added variables for ver.2 format
130  //
131  printf("IsHER %d TimeLastInj %u TimePrevTrg %u BunchNum %u FrameCnt %u \n",
132  rawftsw.GetIsHER(n),
133  rawftsw.GetTimeSinceLastInjection(n),
134  rawftsw.GetTimeSincePrevTrigger(n),
135  rawftsw.GetBunchNumber(n),
136  rawftsw.GetFrameCount(n)
137  );
138 
139  m_nftsw++;
140  return;
141 }
142 
143 
144 void PrintDataTemplateModule::checkFTSWver2(RawFTSW* rawftsw, int i)
145 {
146  //
147  // Double check by comparing extracted values with ones at https://confluence.desy.de/display/BI/DAQ+TimingDistribution (ver.26)
148  //
149 
150  int* buf = rawftsw->GetBuffer(i);
151 
152 
153  //int nword_header = buf[ 0 ];
154  //unsigned int node_id = buf[ 6 ];
155  int runno_subrunno = buf[ 3 ] & 0x3fffff;
156  int runno = (buf[ 3 ] >> 8) & 0x3fff;
157  int subrunno = buf[ 3 ] & 0xff;
158  int expno = (buf[ 3 ] >> 22) & 0x3ff;
159  unsigned int eveno = (unsigned int)buf[ 4 ];
160  //unsigned int magic_trl = (unsigned int)buf[ 21 ];
161  unsigned int ctime_trgtype = (unsigned int)buf[ 8 ];
162  unsigned int utime = (unsigned int)buf[ 9 ];
163  unsigned int ctime = (unsigned int)(buf[ 8 ] >> 4);
164  int trgtype = buf[ 8 ] & 0xf;
165  int tv_sec = (unsigned int)buf[ 9 ];
166  int tv_usec = (int)(ctime / 127.216);
167 
168  unsigned int frame_cnt = buf[ 11 ];
169  unsigned int time_prevtrg = buf[ 12 ];
170  /* cppcheck-suppress shiftTooManyBitsSigned */
171  int is_her = buf[ 13 ] >> 31;
172  unsigned int time_lastinj = buf[ 13 ] & 0x7fffffff;
173  unsigned int bunch_num = buf[ 14 ] & 0x7ff;
174 
175  timeval tv;
176  rawftsw->GetTTTimeVal(i , &tv);
177 
178  //int err_flag = 0;
179 
180  if (rawftsw->GetBlockNwords(i) != 22) {
181  B2FATAL("Nords " << rawftsw->GetBlockNwords(i));
182  }
183 
184  if (rawftsw->GetFTSWNodeID(i) != 0x54544420) {
185  B2FATAL("ID " << rawftsw->GetFTSWNodeID(i));
186  }
187 
188  if (rawftsw->GetMagicTrailer(i) != 0x7fff0000) {
189  B2FATAL("Magic " << rawftsw->GetMagicTrailer(i));
190  }
191 
192  if (runno_subrunno != rawftsw->GetRunNoSubRunNo(i)) {
193  B2FATAL("Magic " << runno_subrunno << " != " << rawftsw->GetRunNoSubRunNo(i));
194  }
195 
196  if (runno != rawftsw->GetRunNo(i)) {
197  B2FATAL("RunNo " << runno << " != " << rawftsw->GetRunNo(i));
198  }
199 
200  if (subrunno != rawftsw->GetSubRunNo(i)) {
201  B2FATAL("SubRunNo " << subrunno << " != " << rawftsw->GetSubRunNo(i));
202  }
203 
204  if (expno != rawftsw->GetExpNo(i)) {
205  B2FATAL("ExpNo" << expno << " != " << rawftsw->GetExpNo(i));
206  }
207 
208  if (eveno != rawftsw->GetEveNo(i)) {
209  B2FATAL("EveNo " << eveno << " != " << rawftsw->GetEveNo(i));
210  }
211 
212  if (ctime_trgtype != rawftsw->GetTTCtimeTRGType(i)) {
213  B2FATAL("ctime_trg " << ctime_trgtype << " != " << rawftsw->GetTTCtimeTRGType(i));
214  }
215 
216  if (utime != rawftsw->GetTTUtime(i)) {
217  B2FATAL("utime " << utime << " != " << rawftsw->GetTTUtime(i));
218  }
219 
220  if (ctime != (unsigned int)rawftsw->GetTTCtime(i)) {
221  B2FATAL("ctime " << ctime << " != " << rawftsw->GetTTCtime(i));
222  }
223 
224  if (trgtype != rawftsw->GetTRGType(i)) {
225  B2FATAL("trgtype " << trgtype << " != " << rawftsw->GetTRGType(i));
226  }
227 
228  if (tv_sec != (int)(tv.tv_sec)) {
229  B2FATAL("tv_sec " << tv_sec << " != " << (int)(tv.tv_sec));
230  }
231 
232  if (tv_usec != (int)(tv.tv_usec)) {
233  B2FATAL("tv_usec " << tv_usec << " != " << (int)(tv.tv_usec));
234  }
235 
236  if (frame_cnt != rawftsw->GetFrameCount(i)) {
237  B2FATAL("frame_cnt " << frame_cnt << " != " << rawftsw->GetFrameCount(i));
238  }
239 
240  if (time_prevtrg != rawftsw->GetTimeSincePrevTrigger(i)) {
241  B2FATAL("prevtrg " << time_prevtrg << " != " << rawftsw->GetTimeSincePrevTrigger(i));
242  }
243 
244  if (is_her != rawftsw->GetIsHER(i)) {
245  B2FATAL("is_her " << is_her << " != " << rawftsw->GetIsHER(i));
246  }
247 
248  if (time_lastinj != rawftsw->GetTimeSinceLastInjection(i)) {
249  B2FATAL("time_lastinj " << time_lastinj << " != " << rawftsw->GetTimeSinceLastInjection(i));
250  }
251 
252  if (bunch_num != rawftsw->GetBunchNumber(i)) {
253  B2FATAL("bunch_num " << bunch_num << " != " << rawftsw->GetBunchNumber(i));
254  }
255 
256 }
257 
258 
259 void PrintDataTemplateModule::printCOPPEREvent(RawCOPPER* raw_copper, int i)
260 {
261 
262  printf(": Event %8u node 0x%.8x block %d by: sum det %d by : A %d by B %d by C %d by D %d by\n",
263  raw_copper->GetEveNo(i), raw_copper->GetNodeID(i),
264  (int)(sizeof(int) * raw_copper->GetBlockNwords(i)),
265  (int)(sizeof(int) * (raw_copper->GetDetectorNwords(i, 0) + raw_copper->GetDetectorNwords(i, 1) +
266  raw_copper->GetDetectorNwords(i, 2) + raw_copper->GetDetectorNwords(i, 3))),
267  (int)(sizeof(int) * (raw_copper->GetDetectorNwords(i, 0))),
268  (int)(sizeof(int) * (raw_copper->GetDetectorNwords(i, 1))),
269  (int)(sizeof(int) * (raw_copper->GetDetectorNwords(i, 2))),
270  (int)(sizeof(int) * (raw_copper->GetDetectorNwords(i, 3)))
271  );
272  printf("EventMetaData : exp %d run %d subrun %d eve %.8d\n", m_eventMetaDataPtr->getExperiment(),
273  m_eventMetaDataPtr->getRun(), m_eventMetaDataPtr->getSubrun(), m_eventMetaDataPtr->getEvent());
274 
275  if (m_eventMetaDataPtr->getErrorFlag()) {
276  printf("!!!!!!!!! ERROR event !!!!!!!!!! : eve %u errflag %.8x\n", raw_copper->GetEveNo(i), m_eventMetaDataPtr->getErrorFlag());
277  }
278 
279  printBuffer(raw_copper->GetWholeBuffer(), raw_copper->TotalBufNwords());
280  //
281  // Print data from each FINESSE
282  //
283  int max_num_ch = raw_copper->GetMaxNumOfCh(i);
284  for (int j = 0; j < max_num_ch ; j++) {
285  if (raw_copper->GetDetectorNwords(i, j) > 0) {
286  printf("===== Detector Buffer(ch %d) 0x%x words (finesse 0x%x) \n", j
287  , raw_copper->GetDetectorNwords(i, j), raw_copper->GetFINESSENwords(i, j));
288  printBuffer(raw_copper->GetDetectorBuffer(i, j), raw_copper->GetDetectorNwords(i, j));
289  }
290  }
291  m_ncpr++;
292 
293 }
294 
295 void PrintDataTemplateModule::printPXDEvent(RawPXD* raw_pxd)
296 {
297  printf(": block size %d bytes : bebafeca = %04x :\n",
298  (int)raw_pxd->size(), raw_pxd->data()[0]);
299  printf("******* Raw PXD data block (including Detector Buffer) **********\n");
300  printBuffer(raw_pxd->data(), raw_pxd->size());
301 
302  int* temp_buf = raw_pxd->data();
303  vector <int> nframesv;
304  int nframes = ((temp_buf[ 1 ] >> 24) & 0xff) | (((temp_buf[ 1 ] >> 16) & 0xff) << 8) |
305  (((temp_buf[ 1 ] >> 8) & 0xff) << 16) | (((temp_buf[ 1 ] >> 0) & 0xff) << 24);
306  ;
307  for (int i = 0; i < nframes; i++) {
308  int temp_nframes =
309  ((temp_buf[ i + 2 ] >> 24) & 0xff) | (((temp_buf[ i + 2 ] >> 16) & 0xff) << 8) |
310  (((temp_buf[ i + 2 ] >> 8) & 0xff) << 16) | (((temp_buf[ i + 2 ] >> 0) & 0xff) << 24);
311  nframesv.push_back(temp_nframes);
312  }
313 
314  // printf("FRAME %.8x %.8x %.8x\n", nframes, temp_buf[ nframes + 10 ], temp_buf[ nframes + 11 ]);
315  unsigned int onsen_trg = temp_buf[ nframes + 2 ];
316  onsen_trg = ((onsen_trg >> 24) & 0xff) | (((onsen_trg >> 16) & 0xff) << 8) |
317  (((onsen_trg >> 8) & 0xff) << 16) | (((onsen_trg >> 0) & 0xff) << 24);
318  unsigned int hlttrg = ((temp_buf[ nframes + 4 ] >> 24) & 0xff) | (((temp_buf[ nframes + 4 ] >> 16) & 0xff) << 8) |
319  (((temp_buf[ nframes + 4 ] >> 8) & 0xff) << 16) | (((temp_buf[ nframes + 4 ] >> 0) & 0xff) << 24);
320  // unsigned int hlttrg = temp_buf[ nframes + 4 ];
321 
322  int ctime_type = 0;
323  int dhe_time = 0;
324  if (nframes != 0) {
325  int pos = nframesv[ 0 ] / 4 + nframes + 2 ;
326  // printf("nf0 %d\n", nframesv[ 0 ]);
327  for (int i = 1; i < (int)(nframesv.size()); i++) {
328  if ((nframesv[ i ] % 4) != 0) break;
329  int dhh_trg1 = (temp_buf[ pos ] >> 24) & 0xff;
330  int dhh_trg2 = (temp_buf[ pos ] >> 16) & 0xff;
331  int dhh_trg3 = (temp_buf[ pos + 1 ] >> 8) & 0xff;
332  int dhh_trg4 = (temp_buf[ pos + 1 ] >> 0) & 0xff;
333  unsigned int dhh_trg = dhh_trg1 | (dhh_trg2 << 8) | (dhh_trg3 << 16) | (dhh_trg4 << 24);
334 
335  // if (i == 1) {
336  if (((temp_buf[ pos ] >> 4) & 0x7) == 5) {
337  ctime_type = ((temp_buf[ pos + 2 ] & 0xff) << 24) |
338  (((temp_buf[ pos + 2 ] >> 8) & 0xff) << 16) |
339  (((temp_buf[ pos + 1 ] >> 16) & 0xff) << 8) |
340  (((temp_buf[ pos + 1 ] >> 24) & 0xff));
341  }
342 
343  if (((temp_buf[ pos ] >> 4) & 0x7) == 1) {
344  dhe_time = ((temp_buf[ pos + 2 ] & 0xff) << 24) |
345  (((temp_buf[ pos + 2 ] >> 8) & 0xff) << 16) |
346  (((temp_buf[ pos + 1 ] >> 16) & 0xff) << 8) |
347  (((temp_buf[ pos + 1 ] >> 24) & 0xff));
348  }
349 
350 // printf("Event mixing is occured. hlt %.8x dhh %.8x onsen %.8x %.8x %.8x nf %d\n", hlttrg, dhh_trg, onsen_trg,
351 // temp_buf[ nframes + 2 + pos ], temp_buf[ nframes + 3 + pos ], nframesv[ i ] );
352  printf("Event tag(16bits) in PXD data : frame %.2d hlt %.4x onsen %.4x dhh %.4x\n", i + 1, hlttrg & 0xffff, onsen_trg & 0xffff,
353  dhh_trg & 0xffff);
354  if (((dhh_trg & 0xffff) != (hlttrg & 0xffff)) || ((dhh_trg & 0xffff) != (onsen_trg & 0xffff))) {
355  printf("### ERROR !! Event mixing occured. : frame %d hlt %.4x onsen %.4x dhh %.4x\n", i + 1, hlttrg & 0xffff, onsen_trg & 0xffff,
356  dhh_trg & 0xffff);
357  }
358  pos += nframesv[ i ] / 4;
359  }
360  }
361  printf("PXD FTSW %d TRG %u DHE %d\n", ctime_type, hlttrg, dhe_time);
362 
363 
364 }
365 
366 void PrintDataTemplateModule::event()
367 {
368 
369 
370  B2INFO("PrintDataTemplate: event() started.");
371  //
372  // FTSW + COPPER can be combined in the array
373  //
374  StoreArray<RawDataBlock> raw_datablkarray;
375 
376 
377  for (int i = 0; i < raw_datablkarray.getEntries(); i++) {
378  for (int j = 0; j < raw_datablkarray[ i ]->GetNumEntries(); j++) {
379  int* temp_buf = raw_datablkarray[ i ]->GetBuffer(j);
380  int nwords = raw_datablkarray[ i ]->GetBlockNwords(j);
381  int delete_flag = 0;
382  int num_nodes = 1;
383  int num_events = 1;
384  if (raw_datablkarray[ i ]->CheckFTSWID(j)) {
385  // FTSW data block
386  printf("\n===== DataBlock( RawDataBlock(FTSW) ) : Block # %d ", i);
387  RawFTSW temp_raw_ftsw;
388  temp_raw_ftsw.SetBuffer(temp_buf, nwords, delete_flag, num_nodes, num_events);
389  printFTSWEvent(&temp_raw_ftsw, 0);
390  } else if (raw_datablkarray[ i ]->CheckTLUID(j)) {
391  // No operation
392  } else {
393 
394  // COPPER data block
395  printf("\n===== DataBlock( RawDataBlock(COPPER) ) : Block # %d ", i);
396  RawCOPPER temp_raw_copper;
397  temp_raw_copper.SetBuffer(temp_buf, nwords, delete_flag, num_nodes, num_events);
398  printCOPPEREvent(&temp_raw_copper, 0);
399 
400  }
401  }
402  }
403 
404  //
405  // TLU data
406  //
407  StoreArray<RawTLU> raw_tluarray;
408  for (int i = 0; i < raw_tluarray.getEntries(); i++) {
409  for (int j = 0; j < raw_tluarray[ i ]->GetNumEntries(); j++) {
410  printf("\n===== DataBlock(RawTLU) : Block # %d ", i);
411  printFTSWEvent(raw_tluarray[ i ], j);
412  }
413  }
414 
415  //
416  // FTSW data
417  //
418  StoreArray<RawFTSW> raw_ftswarray;
419  for (int i = 0; i < raw_ftswarray.getEntries(); i++) {
420  for (int j = 0; j < raw_ftswarray[ i ]->GetNumEntries(); j++) {
421  printf("\n===== DataBlock(RawFTSW): Block # %d ", i);
422  printFTSWEvent(raw_ftswarray[ i ], j);
423  if (raw_ftswarray[ i ]->m_version == 2) {
424  checkFTSWver2(raw_ftswarray[ i ], j);
425  }
426  }
427  }
428 
429 
430  //
431  // Data from COPPER ( data from any detectors(e.g. CDC, SVD, ... ))
432  //
433  StoreArray<RawCOPPER> rawcprarray;
434  for (int i = 0; i < rawcprarray.getEntries(); i++) {
435  for (int j = 0; j < rawcprarray[ i ]->GetNumEntries(); j++) {
436  printf("\n===== DataBlock(RawCOPPER): Block # %d ", i);
437  printCOPPEREvent(rawcprarray[ i ], j);
438  }
439  }
440 
441 //
442  // Data from COPPER named as RawSVD by software
443  //
444  StoreArray<RawSVD> raw_svdarray;
445  for (int i = 0; i < raw_svdarray.getEntries(); i++) {
446  for (int j = 0; j < raw_svdarray[ i ]->GetNumEntries(); j++) {
447  printf("\n===== DataBlock(RawSVD) : Block # %d ", i);
448  printCOPPEREvent(raw_svdarray[ i ], j);
449  }
450  }
451 
452 
453  //
454  // Data from COPPER named as RawCDC by software
455  //
456  StoreArray<RawCDC> raw_cdcarray;
457  for (int i = 0; i < raw_cdcarray.getEntries(); i++) {
458  for (int j = 0; j < raw_cdcarray[ i ]->GetNumEntries(); j++) {
459  printf("\n===== DataBlock(RawCDC) : Block # %d ", i);
460  printCOPPEREvent(raw_cdcarray[ i ], j);
461  }
462  }
463 
464  //
465  // Data from COPPER named as RawPXD by software
466  //
467  StoreArray<RawPXD> raw_pxdarray;
468  for (int i = 0; i < raw_pxdarray.getEntries(); i++) {
469  printf("\n===== DataBlock(RawPXD) : Block # %d ", i);
470  printPXDEvent(raw_pxdarray[ i ]);
471  }
472 
473  StoreArray<RawTOP> raw_bpidarray;
474  for (int i = 0; i < raw_bpidarray.getEntries(); i++) {
475  for (int j = 0; j < raw_bpidarray[ i ]->GetNumEntries(); j++) {
476  printf("\n===== DataBlock(RawTOP) : Block # %d ", i);
477  printCOPPEREvent(raw_bpidarray[ i ], j);
478  }
479  }
480 
481  StoreArray<RawARICH> raw_epidarray;
482  for (int i = 0; i < raw_epidarray.getEntries(); i++) {
483  for (int j = 0; j < raw_epidarray[ i ]->GetNumEntries(); j++) {
484  printf("\n===== DataBlock(RawARICH) : Block # %d ", i);
485  printCOPPEREvent(raw_epidarray[ i ], j);
486  }
487  }
488 
489  StoreArray<RawKLM> raw_klmarray;
490  for (int i = 0; i < raw_klmarray.getEntries(); i++) {
491  for (int j = 0; j < raw_klmarray[ i ]->GetNumEntries(); j++) {
492  printf("\n===== DataBlock(RawKLM) : Block # %d ", i);
493  printCOPPEREvent(raw_klmarray[ i ], j);
494  }
495  }
496 
497  StoreArray<RawECL> raw_eclarray;
498  for (int i = 0; i < raw_eclarray.getEntries(); i++) {
499  for (int j = 0; j < raw_eclarray[ i ]->GetNumEntries(); j++) {
500  printf("\n===== DataBlock(RawECL) : Block # %d ", i);
501  printCOPPEREvent(raw_eclarray[ i ], j);
502  }
503  }
504 
505 
506  StoreArray<RawTRG> raw_trgarray;
507  for (int i = 0; i < raw_trgarray.getEntries(); i++) {
508  for (int j = 0; j < raw_trgarray[ i ]->GetNumEntries(); j++) {
509  printf("\n===== DataBlock(RawTRg) : Block # %d ", i);
510  printCOPPEREvent(raw_trgarray[ i ], j);
511  }
512  }
513 
514 
515  // printf("loop %d\n", n_basf2evt);
516  n_basf2evt++;
517 
518 }
Base class for Modules.
Definition: Module.h:72
Module to get data from DataStore and send it to another network node.
The Raw COPPER class This class stores data received by COPPER via belle2linkt Data from all detector...
Definition: RawCOPPER.h:52
void SetBuffer(int *bufin, int nwords, int delete_flag, int num_events, int num_nodes) OVERRIDE_CPP17
set buffer ( delete_flag : m_buffer is freeed( = 0 )/ not freeed( = 1 ) in Destructer )
Definition: RawCOPPER.cc:141
The RawDataBlock class Base class for rawdata handling.
Definition: RawDataBlock.h:27
virtual int * GetBuffer(int n)
get nth buffer pointer
Definition: RawDataBlock.h:53
virtual int GetBlockNwords(int n)
get size of a data block
Definition: RawDataBlock.h:94
virtual int TotalBufNwords()
Get total length of m_buffer.
Definition: RawDataBlock.h:39
virtual int * GetWholeBuffer()
get pointer to buffer(m_buffer)
Definition: RawDataBlock.h:60
The Raw FTSW class.
Definition: RawFTSW.h:30
unsigned int GetTTCtimeTRGType(int n)
Get a word containing ctime and trigger type info.
Definition: RawFTSW.h:72
int GetIsHER(int n)
HER injection = 1 or LER injection = 0.
Definition: RawFTSW.h:173
int GetExpNo(int n)
Get Exp #.
Definition: RawFTSW.h:159
void GetPCTimeVal(int n, struct timeval *tv)
Get timeval obtained from gettimeval()
Definition: RawFTSW.h:107
unsigned int GetFTSWNodeID(int n)
Get Node # ( should be "TTD " )
Definition: RawFTSW.h:58
unsigned int GetFrameCount(int n)
Get a frame count.
Definition: RawFTSW.h:201
unsigned int GetTimeSinceLastInjection(int n)
Get time since the last injection.
Definition: RawFTSW.h:180
unsigned int GetEveNo(int n)
Get event #.
Definition: RawFTSW.h:65
unsigned int GetTTUtime(int n)
get unixtime of the trigger
Definition: RawFTSW.h:79
int GetRunNoSubRunNo(int n)
get a word cotaining run # and subrun #
Definition: RawFTSW.h:152
int GetSubRunNo(int n)
Get subrun #.
Definition: RawFTSW.h:145
int GetNwordsHeader(int n)
Get # of words of header.
Definition: RawFTSW.h:51
unsigned int GetMagicTrailer(int n)
Get magic number for data corruption check.
Definition: RawFTSW.h:114
unsigned int GetTimeSincePrevTrigger(int n)
Get time since the previous trigger.
Definition: RawFTSW.h:187
void GetTTTimeVal(int n, struct timeval *tv)
Get timeval from ctime and utime.
Definition: RawFTSW.h:100
int GetTTCtime(int n)
Get ctime of the trigger.
Definition: RawFTSW.h:86
unsigned int GetBunchNumber(int n)
Get a bunch number.
Definition: RawFTSW.h:194
void SetBuffer(int *bufin, int nwords, int delete_flag, int num_events, int num_nodes) OVERRIDE_CPP17
set buffer ( delete_flag : m_buffer is freeed( = 0 )/ not freeed( = 1 ) in Destructer )
Definition: RawFTSW.cc:107
int GetTRGType(int n)
Get trgtype.
Definition: RawFTSW.h:93
int GetRunNo(int n)
Get run #.
Definition: RawFTSW.h:137
The Raw PXD class.
Definition: RawPXD.h:27
virtual int * data(void)
get pointer to data
Definition: RawPXD.cc:81
virtual int size() const
get size of buffer in 32 Bit words
Definition: RawPXD.cc:76
Accessor to arrays stored in the data store.
Definition: StoreArray.h:113
int getEntries() const
Get the number of objects in the array.
Definition: StoreArray.h:216
#define REG_MODULE(moduleName)
Register the given module (without 'Module' suffix) with the framework.
Definition: Module.h:650
unsigned int GetEveNo(int n)
get subrun #(8bit)
Definition: RawCOPPER.h:387
int GetDetectorNwords(int n, int finesse_num)
get Detector buffer length
Definition: RawCOPPER.h:654
int * GetDetectorBuffer(int n, int finesse_num)
get Detector buffer
Definition: RawCOPPER.h:678
int GetFINESSENwords(int n, int finesse)
get data size of FINESSE buffer
Definition: RawCOPPER.h:660
unsigned int GetNodeID(int n)
get node-ID from data
Definition: RawCOPPER.h:394
int GetMaxNumOfCh(int n)
Get the max number of channels in a readout board.
Definition: RawCOPPER.h:747
Abstract base class for different kinds of events.