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

A program to convert a pixie16 binary .set file into a root file. More...

#include <iostream>
#include <sstream>
#include <fstream>
#include "set2root.hpp"
Include dependency graph for set2root.cpp:

Go to the source code of this file.

Macros

#define FILTER_CLOCK   8E-3
 
#define ADC_CLOCK   4E-3
 
#define READ_SIZE   1280
 

Functions

parameterfindParameter (std::vector< parameter > &params, const unsigned int &offset_)
 
bool readVarFile (std::vector< parameter > &params, const char *var_filename_)
 
int readSetFile (std::vector< parameter > &params, const char *set_filename_, const size_t &offset_, const size_t &len_=READ_SIZE)
 
void closeFile (std::ofstream &f_)
 
void help (char *prog_name_)
 
int main (int argc, char *argv[])
 

Detailed Description

A program to convert a pixie16 binary .set file into a root file.

This program reads a pixie16 dsp variable file (.var) and a binary .set file and outputs a .root file containing the names of the pixie16 parameters and their values.

Author
C. R. Thornsberry
Date
May 18th, 2016

Definition in file set2root.cpp.

Macro Definition Documentation

§ ADC_CLOCK

#define ADC_CLOCK   4E-3

Definition at line 23 of file set2root.cpp.

§ FILTER_CLOCK

#define FILTER_CLOCK   8E-3

Definition at line 22 of file set2root.cpp.

§ READ_SIZE

#define READ_SIZE   1280

Definition at line 24 of file set2root.cpp.

Function Documentation

§ closeFile()

void closeFile ( std::ofstream &  f_)

Definition at line 181 of file set2root.cpp.

Here is the caller graph for this function:

§ findParameter()

parameter* findParameter ( std::vector< parameter > &  params,
const unsigned int &  offset_ 
)

Find a parameter with a given file offset. This function returns NULL if a match was not found, and a returns a pointer to a parameter object upon success. param[in] params : Vector filled with parameter objects. param[in] offset_ : Set file offset to attempt to match.

Definition at line 85 of file set2root.cpp.

Here is the caller graph for this function:

§ help()

void help ( char *  prog_name_)

Definition at line 186 of file set2root.cpp.

Here is the caller graph for this function:

§ main()

int main ( int  argc,
char *  argv[] 
)

Definition at line 190 of file set2root.cpp.

Here is the call graph for this function:

§ readSetFile()

int readSetFile ( std::vector< parameter > &  params,
const char *  set_filename_,
const size_t &  offset_,
const size_t &  len_ = READ_SIZE 
)

Read a pixie16 .set file and store the integer values in a vector of parameter objects. This function returns -1 if an error occured, and the number of entries read upon success. param[in] params : Vector filled with parameter objects. param[in] set_filename_ : Filename of the .set file to read. param[in] offset_ : The number of words to skip at the beginning of the file. param[in] len_ : The number of words to read form the file.

Definition at line 136 of file set2root.cpp.

Here is the call graph for this function:
Here is the caller graph for this function:

§ readVarFile()

bool readVarFile ( std::vector< parameter > &  params,
const char *  var_filename_ 
)

Read a pixie16 .var dsp file and store the parameter names and offsets in a vector of parameter objects. This function returns false if an error occured, and true upon success. param[out] params : Vector to be filled with parameter objects. param[in] var_filename_ : Filename of the .var file to read.

Definition at line 98 of file set2root.cpp.

Here is the call graph for this function:
Here is the caller graph for this function: