9#ifndef RAWCOPPERFORMAT_V0_H
10#define RAWCOPPERFORMAT_V0_H
15#include <rawdata/dataobjects/RawCOPPERFormat.h>
16#include <rawdata/dataobjects/RawHeader_v0.h>
17#include <rawdata/dataobjects/RawTrailer_v0.h>
115 unsigned int GetEveNo(
int n) OVERRIDE_CPP17;
129 void AddErrorBitFlag(
int n,
unsigned int error_bit_flag) OVERRIDE_CPP17;
133 unsigned int GetNodeID(
int n) OVERRIDE_CPP17;
211#ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
214 void CheckB2LFEEHeaderVersion(
int n) OVERRIDE_CPP17;
223 unsigned int GetTTUtime(
int n) OVERRIDE_CPP17;
228 unsigned int prev_exprunsubrun_no,
unsigned int* cur_exprunsubrun_no) OVERRIDE_CPP17;
241 unsigned int prev_evenum,
unsigned int* cur_evenum,
242 unsigned int prev_copper_ctr,
unsigned int* cur_copper_ctr,
243 unsigned int prev_exprunsubrun_no,
unsigned int* cur_exprunsubrun_no) OVERRIDE_CPP17;
259 void GetTTTimeVal(
int n,
struct timeval* tv) OVERRIDE_CPP17;
264 int* detector_buf_1st,
int nwords_1st,
265 int* detector_buf_2nd,
int nwords_2nd,
266 int* detector_buf_3rd,
int nwords_3rd,
267 int* detector_buf_4th,
int nwords_4th,
275 DATA_FORMAT_VERSION = 0
283 SIZE_COPPER_DRIVER_HEADER = 7,
284 SIZE_COPPER_DRIVER_TRAILER = 2
291 POS_MAGIC_COPPER_1 = 0,
292 POS_EVE_NUM_COPPER = 1,
293 POS_SUBSYSTEM_ID = 2,
296 POS_MAGIC_COPPER_2 = 7,
298 POS_CH_A_DATA_LENGTH = 9,
299 POS_CH_B_DATA_LENGTH = 10,
300 POS_CH_C_DATA_LENGTH = 11,
301 POS_CH_D_DATA_LENGTH = 12,
303 SIZE_COPPER_HEADER = 13
312 POS_MAGIC_COPPER_3 = 0,
313 POS_CHKSUM_COPPER = 1,
314 POS_MAGIC_COPPER_4 = 2,
316 SIZE_COPPER_TRAILER = 3
323 POS_MAGIC_B2LHSLB = 0,
325 SIZE_B2LHSLB_HEADER = 1
332 POS_CHKSUM_B2LHSLB = 0,
333 SIZE_B2LHSLB_TRAILER = 1
340 POS_TT_CTIME_TYPE = 0,
345 SIZE_B2LFEE_HEADER = 5
353 POS_CHKSUM_B2LFEE = 0,
354 SIZE_B2LFEE_TRAILER = 1
361 COPPER_MAGIC_DRIVER_HEADER = 0x7FFF0008,
362 COPPER_MAGIC_FPGA_HEADER = 0xFFFFFAFA,
363 COPPER_MAGIC_FPGA_TRAILER = 0xFFFFF5F5,
364 COPPER_MAGIC_DRIVER_TRAILER = 0x7FFF0009
396 -
tmp_trailer.RAWTRAILER_NWORDS - SIZE_COPPER_DRIVER_TRAILER;
467 return (
unsigned int)(
m_buffer[ pos_nwords ]);
475#ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
476 CheckB2LFEEHeaderVersion(n);
481 - SIZE_B2LFEE_TRAILER - SIZE_B2LHSLB_TRAILER;
488#ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
489 CheckB2LFEEHeaderVersion(n);
494 SIZE_B2LFEE_HEADER - SIZE_B2LFEE_TRAILER - SIZE_B2LHSLB_TRAILER;
501#ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
502 CheckB2LFEEHeaderVersion(n);
507 SIZE_B2LFEE_HEADER - SIZE_B2LFEE_TRAILER - SIZE_B2LHSLB_TRAILER;
514#ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
515 CheckB2LFEEHeaderVersion(n);
520 SIZE_B2LFEE_HEADER - SIZE_B2LFEE_TRAILER - SIZE_B2LHSLB_TRAILER;
561#ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
562 CheckB2LFEEHeaderVersion(n);
573#ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
574 CheckB2LFEEHeaderVersion(n);
585#ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
586 CheckB2LFEEHeaderVersion(n);
597#ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
598 CheckB2LFEEHeaderVersion(n);
609#ifdef USE_B2LFEE_FORMAT_BOTH_VER1_AND_2
610 CheckB2LFEEHeaderVersion(n);
621 return (
unsigned int)(
m_buffer[ pos_nwords ]);
627 return (
unsigned int)(
m_buffer[ pos_nwords ]);
636 return (
unsigned int)(
m_buffer[ pos_nwords ]);
642 return (
unsigned int)(
m_buffer[ pos_nwords ]);
649 return (
unsigned int)(
m_buffer[ pos_nwords ]);
687 return MAX_COPPER_CH;
struct to contain header information used by RawCOPPERFormat::Packer()
The Raw Trailer class ver.0 ( from August, 2013 to April, 2014 ) This class defines the format of the...
int GetMaxNumOfCh(int n) OVERRIDE_CPP17
Get the max number of channels in a readout board.
int GetTTCtime(int n) OVERRIDE_CPP17
Get ctime.
int Get3rdFINESSENwords(int n) OVERRIDE_CPP17
get data size of FINESSE slot C buffer
unsigned int GetDriverChkSum(int n) OVERRIDE_CPP17
read COPPER driver's checksum value
int GetOffset1stFINESSE(int n) OVERRIDE_CPP17
get # of offset words for FINESSE slot A buffer position
virtual unsigned int GetCOPPERCounter(int n) OVERRIDE_CPP17
get COPPER counter(not event number)
unsigned int GetEveNo()
get restart #(8bit)
unsigned int GetEveNo(int n) OVERRIDE_CPP17
get subrun #(8bit)
unsigned int GetMagicFPGATrailer(int n) OVERRIDE_CPP17
get magic word of COPPER FPGA trailer
int Get1stFINESSENwords(int n) OVERRIDE_CPP17
get data size of FINESSE slot A buffer
int GetTruncMask(int n) OVERRIDE_CPP17
get contents of header
int Get3rdDetectorNwords(int n) OVERRIDE_CPP17
get Detector buffer length of slot C
unsigned int GetErrorBitFlag(int n) OVERRIDE_CPP17
get contents of header
unsigned int GetMagicDriverTrailer(int n) OVERRIDE_CPP17
get magic word of COPPER driver trailer
int GetTRGType(int n) OVERRIDE_CPP17
Get trgtype.
void AddErrorBitFlag(unsigned int error_bit_flag)
Add Detected Error bitflag.
int GetTTCtime()
get contents of header
void GetTTTimeVal(struct timeval *tv)
get contents of header
void GetTTTimeVal(int n, struct timeval *tv) OVERRIDE_CPP17
Get timeval.
int * Get2ndDetectorBuffer(int n) OVERRIDE_CPP17
get Detector Buffer of slot B
int GetSubRunNo()
get run # (14bit)
virtual int GetOffset2ndFINESSE(int n)
get # of offset words for FINESSE slot B buffer position
int GetTrlNwords()
Set magic word.
void AddErrorBitFlag(int n, unsigned int error_bit_flag) OVERRIDE_CPP17
Add Detected Error bitflag.
unsigned int GetExpRunSubrun(int n) OVERRIDE_CPP17
get Experimental # from header
unsigned int GetMagicFPGAHeader(int n) OVERRIDE_CPP17
get magic word of COPPER FPGA header
int GetExpNo(int n) OVERRIDE_CPP17
get Experimental # from header
int GetDataType()
get contents of header
unsigned int GetTTUtime()
get contents of header
unsigned int GetTrailerChksum(int n) OVERRIDE_CPP17
Get checksum in RawTrailer.
int * Get4thDetectorBuffer(int n) OVERRIDE_CPP17
get Detector Buffer of slot D
int Get4thFINESSENwords(int n) OVERRIDE_CPP17
get data size of FINESSE slot D buffer
int GetTRGType()
get TRGType
int GetRunNo(int n) OVERRIDE_CPP17
Exp# (10bit) run# (14bit) restart # (8bit)
unsigned int GetNodeID()
get contents of header
int Get4thDetectorNwords(int n) OVERRIDE_CPP17
get Detector buffer length of slot D
int Get2ndDetectorNwords(int n) OVERRIDE_CPP17
get Detector buffer length of slot B
virtual int GetOffset4thFINESSE(int n)
get # of offset words for FINESSE slot D buffer position
int GetRunNo()
get contents of header
virtual int GetOffset3rdFINESSE(int n)
get # of offset words for FINESSE slot C buffer position
unsigned int GetTTUtime(int n) OVERRIDE_CPP17
Check if COPPER Magic words are correct.
virtual int * GetExpRunSubrunBuf(int n) OVERRIDE_CPP17
get b2l block from "FEE b2link header"
unsigned int GetNodeID(int n) OVERRIDE_CPP17
get node-ID from data
int GetDataType(int n) OVERRIDE_CPP17
get contents of header
virtual int * GetRawTrlBufPtr(int n) OVERRIDE_CPP17
get buffer pointer of rawcopper trailer
int GetTruncMask()
get contents of header
unsigned int GetErrorBitFlag()
get contents of header
unsigned int GetTTCtimeTRGType()
get contents of header
int * Get3rdDetectorBuffer(int n) OVERRIDE_CPP17
get Detector Buffer of slot C
unsigned int GetTTCtimeTRGType(int n) OVERRIDE_CPP17
Check if COPPER Magic words are correct.
unsigned int GetMagicDriverHeader(int n) OVERRIDE_CPP17
get magic word of COPPER driver header
unsigned int GetExpRunSubrun()
get contents of header
int GetExpNo()
get a run/exp number combined word
int * Get1stDetectorBuffer(int n) OVERRIDE_CPP17
get Detector buffer of slot A
int Get1stDetectorNwords(int n) OVERRIDE_CPP17
get Detector buffer length of slot A
int Get2ndFINESSENwords(int n) OVERRIDE_CPP17
get data size of FINESSE slot B buffer
int GetSubRunNo(int n) OVERRIDE_CPP17
get run # (14bit)
Abstract base class for different kinds of events.