CMS 3D CMS Logo

Classes | Functions | Variables
FRDFileHeader.h File Reference
#include <array>

Go to the source code of this file.

Classes

struct  FRDFileHeader_v1
 

Functions

uint16_t getFRDFileHeaderVersion (const std::array< uint8_t, 4 > &id, const std::array< uint8_t, 4 > &version)
 

Variables

constexpr std::array< unsigned char, 4 > FRDFileHeader_id {{0x52, 0x41, 0x57, 0x5f}}
 
constexpr std::array< unsigned char, 4 > FRDFileVersion_1 {{0x30, 0x30, 0x30, 0x31}}
 

Function Documentation

◆ getFRDFileHeaderVersion()

uint16_t getFRDFileHeaderVersion ( const std::array< uint8_t, 4 > &  id,
const std::array< uint8_t, 4 > &  version 
)
inline

Definition at line 41 of file FRDFileHeader.h.

41  {
42  size_t i;
43  for (i = 0; i < 4; i++)
44  if (id[i] != FRDFileHeader_id[i])
45  return 0; //not FRD file header
46  uint16_t ret = 0;
47  for (i = 0; i < 4; i++) {
48  if (version[i] > '9' || version[i] < '0')
49  return 0; //NaN sequence
50  ret = ret * 10 + (uint16_t)(version[i] - '0');
51  }
52  return ret;
53 }

References FRDFileHeader_id, mps_fire::i, runTheMatrix::ret, and BeamSplash_cfg::version.

Referenced by evf::EvFDaqDirector::parseFRDFileHeader(), evf::EvFDaqDirector::rawFileHasHeader(), and FRDStreamSource::setRunAndEventInfo().

Variable Documentation

◆ FRDFileHeader_id

constexpr std::array<unsigned char, 4> FRDFileHeader_id {{0x52, 0x41, 0x57, 0x5f}}
constexpr

Definition at line 19 of file FRDFileHeader.h.

Referenced by FRDFileHeader_v1::FRDFileHeader_v1(), and getFRDFileHeaderVersion().

◆ FRDFileVersion_1

constexpr std::array<unsigned char, 4> FRDFileVersion_1 {{0x30, 0x30, 0x30, 0x31}}
constexpr

Definition at line 20 of file FRDFileHeader.h.

runTheMatrix.ret
ret
prodAgent to be discontinued
Definition: runTheMatrix.py:542
mps_fire.i
i
Definition: mps_fire.py:428
BeamSplash_cfg.version
version
Definition: BeamSplash_cfg.py:45
FRDFileHeader_id
constexpr std::array< unsigned char, 4 > FRDFileHeader_id
Definition: FRDFileHeader.h:19