BOSS 7.0.5
BESIII Offline Software System
Loading...
Searching...
No Matches
eformat Namespace Reference

Namespaces

namespace  helper
 
namespace  old
 
namespace  write
 

Classes

class  BadVersionIssue
 
class  FullEventFragment
 
class  Header
 
class  Issue
 
class  NoSuchChildIssue
 
class  NotAlignedIssue
 
class  OutOfBoundsIssue
 
class  PagedMemory
 
class  ROBFragment
 
class  ROSFragment
 
class  SizeCheckIssue
 
class  SubDetectorFragment
 
class  TooBigCountIssue
 
class  UnboundSourceIdentifierIssue
 
class  WrongMarkerIssue
 
class  WrongSizeIssue
 

Typedefs

typedef enum HeaderMarker HeaderMarker
 
typedef enum RunType RunType
 
typedef enum SubDetector SubDetector
 
typedef enum GenericStatus GenericStatus
 

Enumerations

enum  HeaderMarker {
  ROD = 0xee1234ee , ROB = 0xdd1234dd , ROS = 0xcc1234cc , SUB_DETECTOR = 0xbb1234bb ,
  FULL_EVENT = 0xaa1234aa , ROD = 0xee1234ee , ROB = 0xdd1234dd , ROS = 0xcc1234cc ,
  SUB_DETECTOR = 0xbb1234bb , FULL_EVENT = 0xaa1234aa
}
 
enum  RunType {
  PHYSICS = 0x00 , CALIBRATION = 0x01 , COSMICS = 0x02 , TEST = 0x0f ,
  PHYSICS = 0x00 , CALIBRATION = 0x01 , COSMICS = 0x02 , TEST = 0x0f
}
 
enum  SubDetector {
  FULL_SD_EVENT = 0x00 , PIXEL_BARREL = 0x11 , PIXEL_FORWARD_A_SIDE = 0x12 , PIXEL_FORWARD_C_SIDE = 0x13 ,
  PIXEL_B_LAYER = 0x14 , SCT_BARREL_A_SIDE = 0x21 , SCT_BARREL_C_SIDE = 0x22 , SCT_ENDCAP_A_SIDE = 0x23 ,
  SCT_ENDCAP_C_SIDE = 0x24 , TRT_ANCILLARY_CRATE = 0x30 , TRT_BARREL_A_SIDE = 0x31 , TRT_BARREL_C_SIDE = 0x32 ,
  TRT_ENDCAP_A_SIDE = 0x33 , TRT_ENDCAP_C_SIDE = 0x34 , LAR_EM_BARREL_A_SIDE = 0x41 , LAR_EM_BARREL_C_SIDE = 0x42 ,
  LAR_EM_ENDCAP_A_SIDE = 0x43 , LAR_EM_ENDCAP_C_SIDE = 0x44 , LAR_HAD_ENDCAP_A_SIDE = 0x45 , LAR_HAD_ENDCAP_C_SIDE = 0x46 ,
  LAR_FCAL_A_SIDE = 0x47 , LAR_FCAL_C_SIDE = 0x48 , TILECAL_LASER_CRATE = 0x50 , TILECAL_BARREL_A_SIDE = 0x51 ,
  TILECAL_BARREL_C_SIDE = 0x52 , TILECAL_EXT_A_SIDE = 0x53 , TILECAL_EXT_C_SIDE = 0x54 , MUON_ANCILLARY_CRATE = 0x60 ,
  MUON_MDT_BARREL_A_SIDE = 0x61 , MUON_MDT_BARREL_C_SIDE = 0x62 , MUON_MDT_ENDCAP_A_SIDE = 0x63 , MUON_MDT_ENDCAP_C_SIDE = 0x64 ,
  MUON_RPC_BARREL_A_SIDE = 0x65 , MUON_RPC_BARREL_C_SIDE = 0x66 , MUON_TGC_ENDCAP_A_SIDE = 0x67 , MUON_TGC_ENDCAP_C_SIDE = 0x68 ,
  MUON_CSC_ENDCAP_A_SIDE = 0x69 , MUON_CSC_ENDCAP_C_SIDE = 0x6A , TDAQ_BEAM_CRATE = 0x70 , TDAQ_CALO_PREPROC = 0x71 ,
  TDAQ_CALO_CLUSTER_PROC_DAQ = 0x72 , TDAQ_CALO_CLUSTER_PROC_ROI = 0x73 , TDAQ_CALO_JET_PROC_DAQ = 0x74 , TDAQ_CALO_JET_PROC_ROI = 0x75 ,
  TDAQ_MUON_CTP_INTERFACE = 0x76 , TDAQ_CTP = 0x77 , TDAQ_L2SV = 0x78 , TDAQ_SFI = 0x79 ,
  TDAQ_SFO = 0x7a , TDAQ_LVL2 = 0x7b , TDAQ_EVENT_FILTER = 0x7c , OTHER = 0x81 ,
  BESIII_MDC = 0xa1 , BESIII_TOF = 0xa2 , BESIII_EMC = 0xa3 , BESIII_MUC = 0xa4 ,
  BESIII_TRG = 0xa5 , FULL_SD_EVENT = 0x00 , PIXEL_BARREL = 0x11 , PIXEL_FORWARD_A_SIDE = 0x12 ,
  PIXEL_FORWARD_C_SIDE = 0x13 , PIXEL_B_LAYER = 0x14 , SCT_BARREL_A_SIDE = 0x21 , SCT_BARREL_C_SIDE = 0x22 ,
  SCT_ENDCAP_A_SIDE = 0x23 , SCT_ENDCAP_C_SIDE = 0x24 , TRT_ANCILLARY_CRATE = 0x30 , TRT_BARREL_A_SIDE = 0x31 ,
  TRT_BARREL_C_SIDE = 0x32 , TRT_ENDCAP_A_SIDE = 0x33 , TRT_ENDCAP_C_SIDE = 0x34 , LAR_EM_BARREL_A_SIDE = 0x41 ,
  LAR_EM_BARREL_C_SIDE = 0x42 , LAR_EM_ENDCAP_A_SIDE = 0x43 , LAR_EM_ENDCAP_C_SIDE = 0x44 , LAR_HAD_ENDCAP_A_SIDE = 0x45 ,
  LAR_HAD_ENDCAP_C_SIDE = 0x46 , LAR_FCAL_A_SIDE = 0x47 , LAR_FCAL_C_SIDE = 0x48 , TILECAL_LASER_CRATE = 0x50 ,
  TILECAL_BARREL_A_SIDE = 0x51 , TILECAL_BARREL_C_SIDE = 0x52 , TILECAL_EXT_A_SIDE = 0x53 , TILECAL_EXT_C_SIDE = 0x54 ,
  MUON_ANCILLARY_CRATE = 0x60 , MUON_MDT_BARREL_A_SIDE = 0x61 , MUON_MDT_BARREL_C_SIDE = 0x62 , MUON_MDT_ENDCAP_A_SIDE = 0x63 ,
  MUON_MDT_ENDCAP_C_SIDE = 0x64 , MUON_RPC_BARREL_A_SIDE = 0x65 , MUON_RPC_BARREL_C_SIDE = 0x66 , MUON_TGC_ENDCAP_A_SIDE = 0x67 ,
  MUON_TGC_ENDCAP_C_SIDE = 0x68 , MUON_CSC_ENDCAP_A_SIDE = 0x69 , MUON_CSC_ENDCAP_C_SIDE = 0x6A , TDAQ_BEAM_CRATE = 0x70 ,
  TDAQ_CALO_PREPROC = 0x71 , TDAQ_CALO_CLUSTER_PROC_DAQ = 0x72 , TDAQ_CALO_CLUSTER_PROC_ROI = 0x73 , TDAQ_CALO_JET_PROC_DAQ = 0x74 ,
  TDAQ_CALO_JET_PROC_ROI = 0x75 , TDAQ_MUON_CTP_INTERFACE = 0x76 , TDAQ_CTP = 0x77 , TDAQ_L2SV = 0x78 ,
  TDAQ_SFI = 0x79 , TDAQ_SFO = 0x7a , TDAQ_LVL2 = 0x7b , TDAQ_EVENT_FILTER = 0x7c ,
  OTHER = 0x81 , BESIII_MDC = 0xa1 , BESIII_TOF = 0xa2 , BESIII_EMC = 0xa3 ,
  BESIII_MUC = 0xa4 , BESIII_TRG = 0xa5
}
 
enum  GenericStatus {
  NO_ERROR = 0x0 , BCID_CHECK_FAIL = 0x1 , LVL1ID_CHECK_FAIL = 0x2 , TIMEOUT = 0x4 ,
  DATA_CORRUPTION = 0x8 , INTERNAL_OVERFLOW = 0x16 , NO_ERROR = 0x0 , BCID_CHECK_FAIL = 0x1 ,
  LVL1ID_CHECK_FAIL = 0x2 , TIMEOUT = 0x4 , DATA_CORRUPTION = 0x8 , INTERNAL_OVERFLOW = 0x16
}
 
enum  HeaderMarker {
  ROD = 0xee1234ee , ROB = 0xdd1234dd , ROS = 0xcc1234cc , SUB_DETECTOR = 0xbb1234bb ,
  FULL_EVENT = 0xaa1234aa , ROD = 0xee1234ee , ROB = 0xdd1234dd , ROS = 0xcc1234cc ,
  SUB_DETECTOR = 0xbb1234bb , FULL_EVENT = 0xaa1234aa
}
 
enum  RunType {
  PHYSICS = 0x00 , CALIBRATION = 0x01 , COSMICS = 0x02 , TEST = 0x0f ,
  PHYSICS = 0x00 , CALIBRATION = 0x01 , COSMICS = 0x02 , TEST = 0x0f
}
 
enum  SubDetector {
  FULL_SD_EVENT = 0x00 , PIXEL_BARREL = 0x11 , PIXEL_FORWARD_A_SIDE = 0x12 , PIXEL_FORWARD_C_SIDE = 0x13 ,
  PIXEL_B_LAYER = 0x14 , SCT_BARREL_A_SIDE = 0x21 , SCT_BARREL_C_SIDE = 0x22 , SCT_ENDCAP_A_SIDE = 0x23 ,
  SCT_ENDCAP_C_SIDE = 0x24 , TRT_ANCILLARY_CRATE = 0x30 , TRT_BARREL_A_SIDE = 0x31 , TRT_BARREL_C_SIDE = 0x32 ,
  TRT_ENDCAP_A_SIDE = 0x33 , TRT_ENDCAP_C_SIDE = 0x34 , LAR_EM_BARREL_A_SIDE = 0x41 , LAR_EM_BARREL_C_SIDE = 0x42 ,
  LAR_EM_ENDCAP_A_SIDE = 0x43 , LAR_EM_ENDCAP_C_SIDE = 0x44 , LAR_HAD_ENDCAP_A_SIDE = 0x45 , LAR_HAD_ENDCAP_C_SIDE = 0x46 ,
  LAR_FCAL_A_SIDE = 0x47 , LAR_FCAL_C_SIDE = 0x48 , TILECAL_LASER_CRATE = 0x50 , TILECAL_BARREL_A_SIDE = 0x51 ,
  TILECAL_BARREL_C_SIDE = 0x52 , TILECAL_EXT_A_SIDE = 0x53 , TILECAL_EXT_C_SIDE = 0x54 , MUON_ANCILLARY_CRATE = 0x60 ,
  MUON_MDT_BARREL_A_SIDE = 0x61 , MUON_MDT_BARREL_C_SIDE = 0x62 , MUON_MDT_ENDCAP_A_SIDE = 0x63 , MUON_MDT_ENDCAP_C_SIDE = 0x64 ,
  MUON_RPC_BARREL_A_SIDE = 0x65 , MUON_RPC_BARREL_C_SIDE = 0x66 , MUON_TGC_ENDCAP_A_SIDE = 0x67 , MUON_TGC_ENDCAP_C_SIDE = 0x68 ,
  MUON_CSC_ENDCAP_A_SIDE = 0x69 , MUON_CSC_ENDCAP_C_SIDE = 0x6A , TDAQ_BEAM_CRATE = 0x70 , TDAQ_CALO_PREPROC = 0x71 ,
  TDAQ_CALO_CLUSTER_PROC_DAQ = 0x72 , TDAQ_CALO_CLUSTER_PROC_ROI = 0x73 , TDAQ_CALO_JET_PROC_DAQ = 0x74 , TDAQ_CALO_JET_PROC_ROI = 0x75 ,
  TDAQ_MUON_CTP_INTERFACE = 0x76 , TDAQ_CTP = 0x77 , TDAQ_L2SV = 0x78 , TDAQ_SFI = 0x79 ,
  TDAQ_SFO = 0x7a , TDAQ_LVL2 = 0x7b , TDAQ_EVENT_FILTER = 0x7c , OTHER = 0x81 ,
  BESIII_MDC = 0xa1 , BESIII_TOF = 0xa2 , BESIII_EMC = 0xa3 , BESIII_MUC = 0xa4 ,
  BESIII_TRG = 0xa5 , FULL_SD_EVENT = 0x00 , PIXEL_BARREL = 0x11 , PIXEL_FORWARD_A_SIDE = 0x12 ,
  PIXEL_FORWARD_C_SIDE = 0x13 , PIXEL_B_LAYER = 0x14 , SCT_BARREL_A_SIDE = 0x21 , SCT_BARREL_C_SIDE = 0x22 ,
  SCT_ENDCAP_A_SIDE = 0x23 , SCT_ENDCAP_C_SIDE = 0x24 , TRT_ANCILLARY_CRATE = 0x30 , TRT_BARREL_A_SIDE = 0x31 ,
  TRT_BARREL_C_SIDE = 0x32 , TRT_ENDCAP_A_SIDE = 0x33 , TRT_ENDCAP_C_SIDE = 0x34 , LAR_EM_BARREL_A_SIDE = 0x41 ,
  LAR_EM_BARREL_C_SIDE = 0x42 , LAR_EM_ENDCAP_A_SIDE = 0x43 , LAR_EM_ENDCAP_C_SIDE = 0x44 , LAR_HAD_ENDCAP_A_SIDE = 0x45 ,
  LAR_HAD_ENDCAP_C_SIDE = 0x46 , LAR_FCAL_A_SIDE = 0x47 , LAR_FCAL_C_SIDE = 0x48 , TILECAL_LASER_CRATE = 0x50 ,
  TILECAL_BARREL_A_SIDE = 0x51 , TILECAL_BARREL_C_SIDE = 0x52 , TILECAL_EXT_A_SIDE = 0x53 , TILECAL_EXT_C_SIDE = 0x54 ,
  MUON_ANCILLARY_CRATE = 0x60 , MUON_MDT_BARREL_A_SIDE = 0x61 , MUON_MDT_BARREL_C_SIDE = 0x62 , MUON_MDT_ENDCAP_A_SIDE = 0x63 ,
  MUON_MDT_ENDCAP_C_SIDE = 0x64 , MUON_RPC_BARREL_A_SIDE = 0x65 , MUON_RPC_BARREL_C_SIDE = 0x66 , MUON_TGC_ENDCAP_A_SIDE = 0x67 ,
  MUON_TGC_ENDCAP_C_SIDE = 0x68 , MUON_CSC_ENDCAP_A_SIDE = 0x69 , MUON_CSC_ENDCAP_C_SIDE = 0x6A , TDAQ_BEAM_CRATE = 0x70 ,
  TDAQ_CALO_PREPROC = 0x71 , TDAQ_CALO_CLUSTER_PROC_DAQ = 0x72 , TDAQ_CALO_CLUSTER_PROC_ROI = 0x73 , TDAQ_CALO_JET_PROC_DAQ = 0x74 ,
  TDAQ_CALO_JET_PROC_ROI = 0x75 , TDAQ_MUON_CTP_INTERFACE = 0x76 , TDAQ_CTP = 0x77 , TDAQ_L2SV = 0x78 ,
  TDAQ_SFI = 0x79 , TDAQ_SFO = 0x7a , TDAQ_LVL2 = 0x7b , TDAQ_EVENT_FILTER = 0x7c ,
  OTHER = 0x81 , BESIII_MDC = 0xa1 , BESIII_TOF = 0xa2 , BESIII_EMC = 0xa3 ,
  BESIII_MUC = 0xa4 , BESIII_TRG = 0xa5
}
 
enum  GenericStatus {
  NO_ERROR = 0x0 , BCID_CHECK_FAIL = 0x1 , LVL1ID_CHECK_FAIL = 0x2 , TIMEOUT = 0x4 ,
  DATA_CORRUPTION = 0x8 , INTERNAL_OVERFLOW = 0x16 , NO_ERROR = 0x0 , BCID_CHECK_FAIL = 0x1 ,
  LVL1ID_CHECK_FAIL = 0x2 , TIMEOUT = 0x4 , DATA_CORRUPTION = 0x8 , INTERNAL_OVERFLOW = 0x16
}
 

Functions

HeaderMarker child_marker (HeaderMarker e)
 
std::string marker2string (const eformat::HeaderMarker &e)
 
std::string marker2string (uint32_t e)
 
uint32_t * next_fragment (std::fstream &fs, uint32_t *addr=0, size_t size=0)
 
size_t find_rods (const uint32_t *block_start, size_t block_size, const uint32_t **rod=0, uint32_t *rod_size=0, size_t max_count=0)
 
template<class TPointer >
size_t find_fragments (eformat::HeaderMarker marker, TPointer block_start, size_t block_size, TPointer *frag=0, size_t max_count=0)
 
size_t get_robs (const uint32_t *fragment, const uint32_t **rob, size_t max_count)
 

Variables

const uint32_t STATUS_FRONT = 0
 status goes in front of data block
 
const uint32_t STATUS_BACK = 1
 status goes after data block
 
const uint32_t DEFAULT_STATUS = NO_ERROR
 
const uint32_t DEFAULT_VERSION = 0x03000000
 
const uint16_t MAJOR_DEFAULT_VERSION = 0x0300
 
const uint16_t MAJOR_OLD_VERSION = 0x0204
 

Typedef Documentation

◆ GenericStatus

◆ HeaderMarker

◆ RunType

typedef enum RunType eformat::RunType

An alias

Definition at line 31 of file Event/eformat/eformat-00-00-04/eformat/RunNumber.h.

◆ SubDetector

Enumeration Type Documentation

◆ GenericStatus [1/2]

Defines possible generic errors for the status words

An alias

Enumerator
NO_ERROR 
BCID_CHECK_FAIL 
LVL1ID_CHECK_FAIL 
TIMEOUT 
DATA_CORRUPTION 
INTERNAL_OVERFLOW 
NO_ERROR 
BCID_CHECK_FAIL 
LVL1ID_CHECK_FAIL 
TIMEOUT 
DATA_CORRUPTION 
INTERNAL_OVERFLOW 

Definition at line 24 of file Event/eformat/eformat-00-00-04/eformat/Status.h.

◆ GenericStatus [2/2]

Defines possible generic errors for the status words

Enumerator
NO_ERROR 
BCID_CHECK_FAIL 
LVL1ID_CHECK_FAIL 
TIMEOUT 
DATA_CORRUPTION 
INTERNAL_OVERFLOW 
NO_ERROR 
BCID_CHECK_FAIL 
LVL1ID_CHECK_FAIL 
TIMEOUT 
DATA_CORRUPTION 
INTERNAL_OVERFLOW 

Definition at line 24 of file InstallArea/include/eformat/eformat/Status.h.

24 {
25 NO_ERROR = 0x0,
26 BCID_CHECK_FAIL = 0x1,
28 TIMEOUT = 0x4,
29 DATA_CORRUPTION = 0x8,
31 };

◆ HeaderMarker [1/2]

The types of header markers available. They are all 32 bit numbers, with 1234 in the middle for the identification of byte ordering (endianness).

An alias

Enumerator
ROD 

The ROD marker.

ROB 

The ROB marker.

ROS 

The ROS marker.

SUB_DETECTOR 

The SubDet. marker.

FULL_EVENT 
ROD 

The ROD marker.

ROB 

The ROB marker.

ROS 

The ROS marker.

SUB_DETECTOR 

The SubDet. marker.

FULL_EVENT 

Definition at line 26 of file Event/eformat/eformat-00-00-04/eformat/HeaderMarker.h.

26 { ROD = 0xee1234ee, ///< The ROD marker
27 ROB = 0xdd1234dd, ///< The ROB marker
28 ROS = 0xcc1234cc, ///< The ROS marker
29 SUB_DETECTOR = 0xbb1234bb, ///< The SubDet. marker
30 FULL_EVENT = 0xaa1234aa}; ///< The event marker

◆ HeaderMarker [2/2]

The types of header markers available. They are all 32 bit numbers, with 1234 in the middle for the identification of byte ordering (endianness).

Enumerator
ROD 

The ROD marker.

ROB 

The ROB marker.

ROS 

The ROS marker.

SUB_DETECTOR 

The SubDet. marker.

FULL_EVENT 
ROD 

The ROD marker.

ROB 

The ROB marker.

ROS 

The ROS marker.

SUB_DETECTOR 

The SubDet. marker.

FULL_EVENT 

Definition at line 26 of file InstallArea/include/eformat/eformat/HeaderMarker.h.

26 { ROD = 0xee1234ee, ///< The ROD marker
27 ROB = 0xdd1234dd, ///< The ROB marker
28 ROS = 0xcc1234cc, ///< The ROS marker
29 SUB_DETECTOR = 0xbb1234bb, ///< The SubDet. marker
30 FULL_EVENT = 0xaa1234aa}; ///< The event marker

◆ RunType [1/2]

enum typedef enum RunType eformat::RunType

Physics Types

An alias

Enumerator
PHYSICS 
CALIBRATION 
COSMICS 
TEST 
PHYSICS 
CALIBRATION 
COSMICS 
TEST 

Definition at line 23 of file Event/eformat/eformat-00-00-04/eformat/RunNumber.h.

◆ RunType [2/2]

Physics Types

Enumerator
PHYSICS 
CALIBRATION 
COSMICS 
TEST 
PHYSICS 
CALIBRATION 
COSMICS 
TEST 

Definition at line 23 of file InstallArea/include/eformat/eformat/RunNumber.h.

23 { PHYSICS = 0x00,
24 CALIBRATION = 0x01,
25 COSMICS = 0x02,
26 TEST = 0x0f};

◆ SubDetector [1/2]

enum typedef enum SubDetector eformat::SubDetector

Sub-detector ID

An alias

Enumerator
FULL_SD_EVENT 
PIXEL_BARREL 
PIXEL_FOR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_SIDE 
PIXEL_FORWARD_C_SIDE 
PIXEL_B_LAYER 
SCT_BARREL_A_SIDE 
SCT_BARREL_C_SIDE 
SCT_ENDCAP_A_SIDE 
SCT_ENDCAP_C_SIDE 
TRT_ANCILLARY_CRATE 
TRT_BARREL_A_SIDE 
TRT_BARREL_C_SIDE 
TRT_ENDCAP_A_SIDE 
TRT_ENDCAP_C_SIDE 
LAR_EM_BARREL_A_SIDE 
LAR_EM_BARREL_C_SIDE 
LAR_EM_ENDCAP_A_SIDE 
LAR_EM_ENDCAP_C_SIDE 
LAR_HAD_ENDCAP_A_SIDE 
LAR_HAD_ENDCAP_C_SIDE 
LAR_FCAL_A_SIDE 
LAR_FCAL_C_SIDE 
TILECAL_LASER_CRATE 
TILECAL_BARREL_A_SIDE 
TILECAL_BARREL_C_SIDE 
TILECAL_EXT_A_SIDE 
TILECAL_EXT_C_SIDE 
MUON_ANCILLARY_CRATE 
MUON_MDT_BARREL_A_SIDE 
MUON_MDT_BARREL_C_SIDE 
MUON_MDT_ENDCAP_A_SIDE 
MUON_MDT_ENDCAP_C_SIDE 
MUON_RPC_BARREL_A_SIDE 
MUON_RPC_BARREL_C_SIDE 
MUON_TGC_ENDCAP_A_SIDE 
MUON_TGC_ENDCAP_C_SIDE 
MUON_CSC_ENDCAP_A_SIDE 
MUON_CSC_ENDCAP_C_SIDE 
TDAQ_BEAM_CRATE 
TDAQ_CALO_PREPROC 
TDAQ_CALO_CLUSTER_PROC_DAQ 
TDAQ_CALO_CLUSTER_PROC_ROI 
TDAQ_CALO_JET_PROC_DAQ 
TDAQ_CALO_JET_PROC_ROI 
TDAQ_MUON_CTP_INTERFACE 
TDAQ_CTP 
TDAQ_L2SV 
TDAQ_SFI 
TDAQ_SFO 
TDAQ_LVL2 
TDAQ_EVENT_FILTER 
OTHER 
BESIII_MDC 
BESIII_TOF 
BESIII_EMC 
BESIII_MUC 
BESIII_TRG 

Definition at line 25 of file Event/eformat/eformat-00-00-04/eformat/SourceIdentifier.h.

25 { FULL_SD_EVENT = 0x00,
26 PIXEL_BARREL = 0x11,
29 PIXEL_B_LAYER = 0x14,
30 SCT_BARREL_A_SIDE = 0x21,
31 SCT_BARREL_C_SIDE = 0x22,
32 SCT_ENDCAP_A_SIDE = 0x23,
33 SCT_ENDCAP_C_SIDE = 0x24,
35 TRT_BARREL_A_SIDE = 0x31,
36 TRT_BARREL_C_SIDE = 0x32,
37 TRT_ENDCAP_A_SIDE = 0x33,
38 TRT_ENDCAP_C_SIDE = 0x34,
45 LAR_FCAL_A_SIDE = 0x47,
46 LAR_FCAL_C_SIDE = 0x48,
50 TILECAL_EXT_A_SIDE = 0x53,
51 TILECAL_EXT_C_SIDE = 0x54,
63 TDAQ_BEAM_CRATE = 0x70,
64 TDAQ_CALO_PREPROC = 0x71,
70 TDAQ_CTP = 0x77,
71 TDAQ_L2SV = 0x78,
72 TDAQ_SFI = 0x79,
73 TDAQ_SFO = 0x7a,
74 TDAQ_LVL2 = 0x7b,
75 TDAQ_EVENT_FILTER = 0x7c,
76 OTHER = 0x81,
77 BESIII_MDC = 0xa1,
78 BESIII_TOF = 0xa2,
79 BESIII_EMC = 0xa3,
80 BESIII_MUC = 0xa4,
81 BESIII_TRG = 0xa5
82 };

◆ SubDetector [2/2]

Sub-detector ID

Enumerator
FULL_SD_EVENT 
PIXEL_BARREL 
PIXEL_FORWARD_A_SIDE 
PIXEL_FORWARD_C_SIDE 
PIXEL_B_LAYER 
SCT_BARREL_A_SIDE 
SCT_BARREL_C_SIDE 
SCT_ENDCAP_A_SIDE 
SCT_ENDCAP_C_SIDE 
TRT_ANCILLARY_CRATE 
TRT_BARREL_A_SIDE 
TRT_BARREL_C_SIDE 
TRT_ENDCAP_A_SIDE 
TRT_ENDCAP_C_SIDE 
LAR_EM_BARREL_A_SIDE 
LAR_EM_BARREL_C_SIDE 
LAR_EM_ENDCAP_A_SIDE 
LAR_EM_ENDCAP_C_SIDE 
LAR_HAD_ENDCAP_A_SIDE 
LAR_HAD_ENDCAP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DE 
LAR_FCAL_A_SIDE 
LAR_FCAL_C_SIDE 
TILECAL_LASER_CRATE 
TILECAL_BARREL_A_SIDE 
TILECAL_BARREL_C_SIDE 
TILECAL_EXT_A_SIDE 
TILECAL_EXT_C_SIDE 
MUON_ANCILLARY_CRATE 
MUON_MDT_BARREL_A_SIDE 
MUON_MDT_BARREL_C_SIDE 
MUON_MDT_ENDCAP_A_SIDE 
MUON_MDT_ENDCAP_C_SIDE 
MUON_RPC_BARREL_A_SIDE 
MUON_RPC_BARREL_C_SIDE 
MUON_TGC_ENDCAP_A_SIDE 
MUON_TGC_ENDCAP_C_SIDE 
MUON_CSC_ENDCAP_A_SIDE 
MUON_CSC_ENDCAP_C_SIDE 
TDAQ_BEAM_CRATE 
TDAQ_CALO_PREPROC 
TDAQ_CALO_CLUSTER_PROC_DAQ 
TDAQ_CALO_CLUSTER_PROC_ROI 
TDAQ_CALO_JET_PROC_DAQ 
TDAQ_CALO_JET_PROC_ROI 
TDAQ_MUON_CTP_INTERFACE 
TDAQ_CTP 
TDAQ_L2SV 
TDAQ_SFI 
TDAQ_SFO 
TDAQ_LVL2 
TDAQ_EVENT_FILTER 
OTHER 
BESIII_MDC 
BESIII_TOF 
BESIII_EMC 
BESIII_MUC 
BESIII_TRG 

Definition at line 25 of file InstallArea/include/eformat/eformat/SourceIdentifier.h.

25 { FULL_SD_EVENT = 0x00,
26 PIXEL_BARREL = 0x11,
29 PIXEL_B_LAYER = 0x14,
30 SCT_BARREL_A_SIDE = 0x21,
31 SCT_BARREL_C_SIDE = 0x22,
32 SCT_ENDCAP_A_SIDE = 0x23,
33 SCT_ENDCAP_C_SIDE = 0x24,
35 TRT_BARREL_A_SIDE = 0x31,
36 TRT_BARREL_C_SIDE = 0x32,
37 TRT_ENDCAP_A_SIDE = 0x33,
38 TRT_ENDCAP_C_SIDE = 0x34,
45 LAR_FCAL_A_SIDE = 0x47,
46 LAR_FCAL_C_SIDE = 0x48,
50 TILECAL_EXT_A_SIDE = 0x53,
51 TILECAL_EXT_C_SIDE = 0x54,
63 TDAQ_BEAM_CRATE = 0x70,
64 TDAQ_CALO_PREPROC = 0x71,
70 TDAQ_CTP = 0x77,
71 TDAQ_L2SV = 0x78,
72 TDAQ_SFI = 0x79,
73 TDAQ_SFO = 0x7a,
74 TDAQ_LVL2 = 0x7b,
75 TDAQ_EVENT_FILTER = 0x7c,
76 OTHER = 0x81,
77 BESIII_MDC = 0xa1,
78 BESIII_TOF = 0xa2,
79 BESIII_EMC = 0xa3,
80 BESIII_MUC = 0xa4,
81 BESIII_TRG = 0xa5
82 };

Function Documentation

◆ child_marker()

HeaderMarker eformat::child_marker ( HeaderMarker  e)

Returns the child marker of a given parent marker

Parameters
eThe marker from which you would like to the get child fragment type from

Definition at line 15 of file HeaderMarker.cxx.

16{
17 using namespace eformat;
18 switch (e) {
19 case FULL_EVENT:
20 return SUB_DETECTOR;
21 case SUB_DETECTOR:
22 return ROS;
23 case ROS:
24 return ROB;
25 case ROB:
26 return ROD;
27 default:
28 break;
29 }
30 return FULL_EVENT;
31}

Referenced by eformat::Header< TPointer >::children().

◆ find_fragments()

template<class TPointer >
size_t eformat::find_fragments ( eformat::HeaderMarker  marker,
TPointer  block_start,
size_t  block_size,
TPointer *  frag = 0,
size_t  max_count = 0 
)

A generic method to find all fragments in a contiguous area of memory. These fragments cannot be RODFragments. For that, use the eformat::find_rods().

Parameters
markerThe marker you are searching for.
block_startA pointer to the block start
block_sizeThe overall size of this block, in 32-bit words
fragA (optional) preallocated set of pointers to hold the found fragments. If frag is NULL, only counts the number of children.
max_countThe maximum number of fragments I'll search for, if frag is not NULL. If frag is NULL, this flag has no meaning.
Returns
The number of fragments the function actually found, irrespective of max_count.

Definition at line 111 of file Event/eformat/eformat-00-00-04/eformat/util.h.

114{
115 uint32_t counter = 0;
116 TPointer next = block_start;
117 TPointer endp = block_start;
118 endp += block_size;
119 while (next < endp) {
120 if (next[0] != marker) throw EFORMAT_WRONG_MARKER(next[0], marker);
121 if (frag && counter < max_count) frag[counter] = next;
122 ++counter;
123 next += next[1];
124 }
125 return counter;
126}
#define EFORMAT_WRONG_MARKER(current, expected)

Referenced by eformat::Header< TPointer >::children().

◆ find_rods()

size_t eformat::find_rods ( const uint32_t *  block_start,
size_t  block_size,
const uint32_t **  rod = 0,
uint32_t *  rod_size = 0,
size_t  max_count = 0 
)

Returns pointers (to words) to the start of each ROD fragment block in a piece of memory. This is primarily intended for LVL2 supervisor usage.

Warning
This will invert the data order, meaning the last ROD will be the first in the vector to appear, due to the way the ROD readout has to happen (back to front of the stream). If that is not satisfactory, you have to sort back the vector yourself.
Parameters
block_startThe start address of the data block you want to dig the ROD pointers from
block_sizeThe size of the block, in 32-bit words
rodA (optional) pointer to set of pre-allocated pointers
rod_sizeA (optional) pointer to set of pre-allocated size_t's, where the size of each ROD, in words, will be stored.
max_countThe maximum number of blocks to dig out from block_start, if rod is not NULL. If rod is NULL, this is meaningless.
Returns
The number of ROD fragments the function actually found on the block, irrespective of max_count.

Definition at line 84 of file util.cxx.

87{
88 const uint32_t* block_end = block_start + block_size;
89 size_t counter = 0;
90 while (block_end > block_start) {
91 uint32_t curr_rod_size = 12; //< base size for a ROD as eformat 2.4
92 curr_rod_size += *(block_end-3) + *(block_end-2); //status and data sizes
93 block_end -= curr_rod_size;
94 if (rod && counter < max_count) {
95 if (block_end[0] != eformat::ROD)
96 throw EFORMAT_WRONG_MARKER(block_end[0], eformat::ROD);
97 rod_size[counter] = curr_rod_size;
98 rod[counter] = block_end;
99 }
100 ++counter;
101 }
102 return counter;
103}

◆ get_robs()

size_t eformat::get_robs ( const uint32_t *  fragment,
const uint32_t **  rob,
size_t  max_count 
)

Gets pointers to all ROB fragments from a fragment of a type which is not known in advance.

Parameters
fragmentThe top level fragment to extract the other ROBFragment's from.
rodA pointer to set of pre-allocated pointers
max_countThe maximum number of blocks to dig out from block_start.
Returns
The number of ROBFragments the function actually found

Definition at line 105 of file util.cxx.

107{
108 using namespace eformat;
109 ERS_DEBUG_1("Getting all ROB's from 0x%x...", fragment[0]);
110
111 size_t counter = 0;
112 switch ((eformat::HeaderMarker)(fragment[0])) {
113 case ROD:
114 return 0;
115 case ROB:
116 {
117 if ( max_count > 0 ) {
118 rob[0] = fragment;
119 ++counter;
120 }
121 else return 0; //not enough space
122 }
123 break;
124 case ROS:
125 {
127 counter += ros.children(rob, max_count);
128 ERS_DEBUG_1("ROS 0x%x contains %d ROB's", ros.source_id(), counter);
129 }
130 break;
131 case SUB_DETECTOR:
132 {
134 const uint32_t* ros[256];
135 size_t ros_counter = sd.children(ros, 256);
136 for (size_t i=0; i<ros_counter; ++i)
137 counter += get_robs(ros[i], &rob[counter], max_count - counter);
138 ERS_DEBUG_1("Subdetector 0x%x contains %d ROB's", sd.source_id(),
139 counter);
140 }
141 break;
142 case FULL_EVENT:
143 {
145 const uint32_t* sd[64];
146 size_t sd_counter = fe.children(sd, 64);
147 for (size_t i=0; i<sd_counter; ++i)
148 counter += get_robs(sd[i], &rob[counter], max_count - counter);
149 ERS_DEBUG_1("Fullevent 0x%x contains %d ROB's", fe.source_id(), counter);
150 }
151 break;
152 }
153
154 return counter;
155}
size_t get_robs(const uint32_t *fragment, const uint32_t **rob, size_t max_count)
Definition: util.cxx:105

Referenced by EFEventLoopMgr::executeEvent(), get_robs(), main(), RawDataInputSvc::nextEvent(), MixerAlg::nextEvent(), and RawEventReader::readEvent().

◆ marker2string() [1/2]

std::string eformat::marker2string ( const eformat::HeaderMarker e)

Returns a string that represents the string of the equivalent marker

Parameters
eThe enumeration value

Definition at line 33 of file HeaderMarker.cxx.

34{
35 using namespace eformat;
36 switch (e) {
37 case ROD:
38 return "ROD";
39 case ROB:
40 return "ROB";
41 case ROS:
42 return "ROS";
43 case SUB_DETECTOR:
44 return "SUB_DETECTOR";
45 case FULL_EVENT:
46 return "FULL_EVENT";
47 }
48 return "UNKNOWN_MARKER";
49}

Referenced by eformat::Header< TPointer >::check(), eformat::Header< TPointer >::child(), marker2string(), and eformat::Header< TPointer >::nchildren().

◆ marker2string() [2/2]

std::string eformat::marker2string ( uint32_t  e)

Returns a string that represents the string of the equivalent marker

Parameters
eThe enumeration value

Definition at line 51 of file HeaderMarker.cxx.

52{
54}
std::string marker2string(const eformat::HeaderMarker &e)

◆ next_fragment()

uint32_t * eformat::next_fragment ( std::fstream &  fs,
uint32_t *  addr = 0,
size_t  size = 0 
)

This function will read the next fragment in a normal, already opened, std::fstream. The space for the fragment will be allocated dynamically and the user should free it. Otherwise, if the user wants to re-use a pre-allocated memory space, the second and third arguments can be given, in which case the function will check if the space is enough. If the space is not enough, NULL is returned.

Parameters
fsThe input filestream
addrThe optional user allocated space
sizeThe optional size, in bytes, of the allocated space

Definition at line 22 of file util.cxx.

24{
25 using namespace eformat;
26
27 off_t offset = fs.tellg();
28 ERS_DEBUG_3("Current stream position is 0x%lx", offset);
29
30 uint32_t data[2];
31 if (fs && fs.good() && ! fs.eof()) {
32 //soft check, so we don't make mistakes
33 fs.read((char*)data, 8);
34 if (!fs.good() || fs.eof()) return 0; // end-of-file
35 switch((HeaderMarker)data[0]) {
36 case FULL_EVENT:
37 case SUB_DETECTOR:
38 case ROS:
39 case ROB:
40 case ROD:
41 break;
42 default:
43 //stop!
44 std::cout << "Word at offset " << HEX(offset) << " is not one of "
45 << HEX(FULL_EVENT) << ", "
46 << HEX(SUB_DETECTOR) << ", "
47 << HEX(ROS) << ", "
48 << HEX(ROB) << "or "
49 << HEX(ROS) << ". Stopping execution..." << std::endl;
50 return 0;
51 }
52 }
53 else return 0; //file is over
54
55 //data[1] is the fragment size, in words. Take it and read the fragment
56 ERS_DEBUG_3("Resetting stream position to 0x%lx...", offset);
57 fs.seekg(offset);
58 if (addr && (size >= (data[1]*4))) {
59 //space is preallocated and checked
60 ERS_DEBUG_3("Reading fragment data...");
61 fs.read((char*)addr, data[1]*4);
62 ERS_DEBUG_2("Size of fragment readout is %u bytes", 4*data[1]);
63 ERS_DEBUG_3("Stream position is 0x%lx", offset = fs.tellg());
64 return addr;
65 }
66 else if (addr) {
67 std::cout << "The fragment at offset " << HEX(offset) << " has "
68 << data[1]*4 << " bytes and you provided only "
69 << size << " bytes in your buffer. Stopping execution..."
70 << std::endl;
71 return 0;
72 }
73
74 //if I get here, is because I have to allocate space myself
75 ERS_DEBUG_3("Allocating fragment data storage of size %ud bytes", 4*data[1]);
76 uint32_t* retval = new uint32_t[data[1]];
77 ERS_DEBUG_3("Reading fragment data...");
78 fs.read((char*)retval, data[1]*4);
79 ERS_DEBUG_2("Size of fragment readout is %u bytes", 4*data[1]);
80 ERS_DEBUG_3("Stream position is 0x%lx", offset = fs.tellg());
81 return retval;
82}
TTree * data

Variable Documentation

◆ DEFAULT_STATUS

◆ DEFAULT_VERSION

◆ MAJOR_DEFAULT_VERSION

const uint16_t eformat::MAJOR_DEFAULT_VERSION = 0x0300

◆ MAJOR_OLD_VERSION

const uint16_t eformat::MAJOR_OLD_VERSION = 0x0204

The major default eformat version to use

Definition at line 34 of file Event/eformat/eformat-00-00-04/eformat/Version.h.

Referenced by eformat::old::Header::check(), eformat::old::RODFragment::check(), and eformat::old::convert().

◆ STATUS_BACK

const uint32_t eformat::STATUS_BACK = 1

status goes after data block

Definition at line 39 of file Event/eformat/eformat-00-00-04/eformat/Status.h.

Referenced by eformat::old::RODFragment::data().

◆ STATUS_FRONT