gaps-online-software 0.10
online software for the TOF system for the GAPS experiment
Loading...
Searching...
No Matches
Gaps Namespace Reference

Classes

struct  CRFrame
 
struct  CRFrameObject
 
struct  CRReader
 
class  FatalException
 Exception for log_fatal(..) macro. More...
 
class  IOError
 
class  TofPacketReader
 
struct  TofPaddle
 
struct  TrackerStrip
 
struct  TrackerStripMask
 
struct  TrackerStripPedestal
 

Typedefs

typedef std::map< u8, TofPaddleTofPaddleMap
 A map of paddle id -> TofPaddle.
 
typedef std::map< u8, std::map< u8, std::tuple< u8, TofPaddleEnd > > > RbIdChannelPaddleIdMap
 A map of RBID, RBCh -> TofPaddle.
 
typedef std::map< u8, std::map< u8, std::map< u8, u8 > > > DsiJChnPaddleIdMap
 A map of DSI,J -> TofPaddle.
 
typedef std::map< u32, TrackerStripTrkStripMap
 A map of strip identifier (layer-row-module-channel -> Tracker strip.
 
typedef std::map< u32, bool > TrkStripMaskMap
 
typedef std::map< u32, TrackerStripPedestalTrkStripPedMap
 
typedef spdlog::level::level_enum LOGLEVEL
 

Enumerations

enum class  CRFrameObjectType : u8 { Unknown = 0 , TofPacket = 10 , TelemetryPacket = 20 }
 These are objects which can be stored in a caraspace frame

 
enum class  TofPaddleEnd : i16 { Unknown = 0 , A = -1 , B = 1 }
 
enum class  ProtocolVersion : u8 { Unknown = PROTOCOLVERSION_UNKNOWN , V1 = PROTOCOLVERSION_V1 , V2 = PROTOCOLVERSION_V2 , V3 = PROTOCOLVERSION_V3 }
 

Functions

std::vector< std::string > list_path_contents_sorted (const std::string &input)
 
auto get_tofpaddles () -> TofPaddleMap
 Get a paddle from the database.
 
auto get_rb_id_paddles () -> RbIdChannelPaddleIdMap
 Get a paddle if the rb id and channel is known (HG)
 
auto get_dsi_j_paddles () -> DsiJChnPaddleIdMap
 Get a paddle if the dsi,j connection of a paddle is known (LTB, LG)
 
auto get_trackerstrips () -> TrkStripMap
 Retrieve all tracker strips from the database.
 
auto get_module_position (u8 layer, u8 row, u8 mod, const TrkStripMap &) -> Vec< f32 >
 Get the position of a module - returns in cm.
 
auto get_trackerstripmasks (std::string mask_name="") -> TrkStripMaskMap
 
auto get_trackerstrippedestals () -> TrkStripPedMap
 
std::string severity_to_str (const LOGLEVEL &severity)
 
void set_loglevel (LOGLEVEL severity)
 
template<typename T >
Vec< T > slice (const Vec< T > &vec, usize start, usize end)
 
bool parse_bool (const Vec< u8 > &bytestream, usize &pos)
 
u8 parse_u8 (const Vec< u8 > &bytestream, usize &pos)
 get an unsigned char from a vector of bytes, advancing pos by 1
 
u16 parse_u16 (const Vec< u8 > &bytestream, usize &pos)
 get an unsigned short from a vector of bytes, advancing pos by 2
 
f32 parse_f16 (const Vec< u8 > &bytestream, usize &pos)
 
u32 parse_u32 (const Vec< u8 > &bytestream, usize &pos)
 get an unsigned 32bit int from a vector of bytes, advancing pos by 4
 
u64 parse_u64 (const Vec< u8 > &bytestream, usize &pos)
 get an unsigned long64 from a vector of bytes, advancing pos by 8
 
i32 parse_i32 (const Vec< u8 > &bytestream, usize &pos)
 get a signed 32bit int from a vector of bytes, advancing pos by 4
 
f32 parse_f32 (const Vec< u8 > &bytestream, usize &pos)
 get a signed float32 from a vector of bytes, advancning pos by 4
 
f64 parse_f64 (const Vec< u8 > &bytestream, usize &pos)
 get a signed long float (64) from a vector of bytes, advancing pos by 8
 
std::string parse_string (const Vec< u8 > &bytestream, usize &pos)
 
std::string pversion_to_string (ProtocolVersion version)
 

Detailed Description

Bascially a re-write of some bfsw stuff to avoid pulling in the dependency

Function Documentation

◆ list_path_contents_sorted()

std::vector< std::string > Gaps::list_path_contents_sorted ( const std::string &  input)

Get all files in a certain directory in case it is a directory, for a single file just get the file <3 ChatGPT

◆ parse_f16()

f32 Gaps::parse_f16 ( const Vec< u8 > &  bytestream,
usize &  pos 
)

get a f16 ("half float") from a vector of bytes, advancing pos by 2

NOTE - this will actually convert the result to the more common f32 directly

◆ parse_string()

std::string Gaps::parse_string ( const Vec< u8 > &  bytestream,
usize &  pos 
)

custom string parser. This is only used for CRFrame's index. The actual byte content of the string needs to be prefixed with its 16bit length

◆ set_loglevel()

void Gaps::set_loglevel ( LOGLEVEL  severity)

Suppress log messages if their severity is lower than

Parameters
severity