PAASS
Software suite to Acquire and Analyze Data from Pixie16
hribf_buffers.cpp File Reference

Handles poll2 output data files. More...

#include <sstream>
#include <iostream>
#include <string.h>
#include <unistd.h>
#include <iomanip>
#include <vector>
#include "hribf_buffers.h"
#include "poll2_socket.h"
Include dependency graph for hribf_buffers.cpp:

Go to the source code of this file.

Macros

#define SMALLEST_CHUNK_SIZE   20
 
#define NO_HEADER_SIZE   8192
 
#define OPTIMAL_CHUNK_SIZE   8187
 
#define HEAD   1145128264
 
#define DATA   1096040772
 
#define SCAL   1279345491
 
#define DEAD   1145128260
 
#define DIR   542263620
 
#define PAC   541278544
 
#define ENDFILE   541478725
 
#define ENDBUFF   0xFFFFFFFF
 
#define LDF_DATA_LENGTH   8193
 

Functions

void set_char_array (const std::string &input_, char *arr_, const unsigned int &size_)
 End of spill vsn. The scan code searches for these words. More...
 
bool is_hribf_buffer (const unsigned int &input_)
 Return true if the input word corresponds to the header of a ldf style buffer. More...
 

Variables

const unsigned int end_spill_size = 20
 
const unsigned int pacman_word1 = 2
 The size of the end of spill "event" (5 words). More...
 
const unsigned int pacman_word2 = 9999
 Words to signify the end of a spill. The scan code searches for these words. More...
 

Detailed Description

Handles poll2 output data files.

The classes within this file are used to open, format, and properly write data to an hribf style ldf file so that it may be read by programs which read legacy ldf files. Each individual buffer class (inheriting from the BufferType class) is responsible for writting a different type of buffer to the data file. PollOutputFile is the class used to stitch all of the individual buffers together into a correctly formatted output ldf file which may be read by SCANOR from the hhirf upak library.

Author
Cory R. Thornsberry
Date
Sept. 19th, 2016
Version
1.3.00

Definition in file hribf_buffers.cpp.

Macro Definition Documentation

§ DATA

#define DATA   1096040772

Definition at line 37 of file hribf_buffers.cpp.

§ DEAD

#define DEAD   1145128260

Definition at line 39 of file hribf_buffers.cpp.

§ DIR

#define DIR   542263620

Definition at line 40 of file hribf_buffers.cpp.

§ ENDBUFF

#define ENDBUFF   0xFFFFFFFF

Definition at line 43 of file hribf_buffers.cpp.

§ ENDFILE

#define ENDFILE   541478725

Definition at line 42 of file hribf_buffers.cpp.

§ HEAD

#define HEAD   1145128264

Definition at line 36 of file hribf_buffers.cpp.

§ LDF_DATA_LENGTH

#define LDF_DATA_LENGTH   8193

Definition at line 45 of file hribf_buffers.cpp.

§ NO_HEADER_SIZE

#define NO_HEADER_SIZE   8192

Definition at line 33 of file hribf_buffers.cpp.

§ OPTIMAL_CHUNK_SIZE

#define OPTIMAL_CHUNK_SIZE   8187

Definition at line 34 of file hribf_buffers.cpp.

§ PAC

#define PAC   541278544

Definition at line 41 of file hribf_buffers.cpp.

§ SCAL

#define SCAL   1279345491

Definition at line 38 of file hribf_buffers.cpp.

§ SMALLEST_CHUNK_SIZE

#define SMALLEST_CHUNK_SIZE   20

Definition at line 32 of file hribf_buffers.cpp.

Function Documentation

§ is_hribf_buffer()

bool is_hribf_buffer ( const unsigned int &  input_)

Return true if the input word corresponds to the header of a ldf style buffer.

Definition at line 63 of file hribf_buffers.cpp.

§ set_char_array()

void set_char_array ( const std::string &  input_,
char *  arr_,
const unsigned int &  size_ 
)

End of spill vsn. The scan code searches for these words.

Definition at line 52 of file hribf_buffers.cpp.

Here is the caller graph for this function:

Variable Documentation

§ end_spill_size

const unsigned int end_spill_size = 20

Definition at line 47 of file hribf_buffers.cpp.

§ pacman_word1

const unsigned int pacman_word1 = 2

The size of the end of spill "event" (5 words).

Definition at line 48 of file hribf_buffers.cpp.

§ pacman_word2

const unsigned int pacman_word2 = 9999

Words to signify the end of a spill. The scan code searches for these words.

Definition at line 49 of file hribf_buffers.cpp.