PAASS
Software suite to Acquire and Analyze Data from Pixie16
HisDrr Class Reference

#include <HisDrr.h>

Collaboration diagram for HisDrr:

Public Member Functions

 HisDrr (fstream *drr, fstream *his)
 
 HisDrr (const string &drr, const string &his)
 
 HisDrr (const string &drr, const string &his, const string &input)
 
virtual ~HisDrr ()
 
virtual void getHistogram (vector< unsigned int > &rtn, int id)
 
virtual DrrHisRecordExtended getHistogramInfo (int id) const
 
virtual void getHisList (vector< int > &r)
 
virtual void zeroHistogram (int id)
 
virtual void setValue (const int id, unsigned pos, unsigned value)
 
virtual void setValue (const int id, unsigned pos, unsigned short value)
 
virtual void setValue (const int id, vector< unsigned > &value)
 
virtual void setValue (const int id, vector< unsigned short > &value)
 

Private Member Functions

void readBlock (drrBlock *block)
 
void loadDrr ()
 

Private Attributes

vector< DrrHisRecordExtendedhisList
 
fstream * drrFile
 
fstream * hisFile
 

Detailed Description

Class for handling histogram files. Class opens drrFile and loads histogram information. On request can return specific histogram data points or histogram information. There are some cabalilites of creating a new file, putting data into specific histogram.

Definition at line 41 of file HisDrr.h.

Constructor & Destructor Documentation

§ HisDrr() [1/3]

HisDrr::HisDrr ( fstream *  drr,
fstream *  his 
)

Constructor taking fstreams. User is responsible of opening files, and passing fstreams creating them on heap (new). Ones is passed the HisDrr takes the ownership to pointers. Dtor will close files and delete pointers.

Definition at line 20 of file HisDrr.cpp.

§ HisDrr() [2/3]

HisDrr::HisDrr ( const string &  drr,
const string &  his 
)

Constructor taking names and opening fstreams.

Definition at line 50 of file HisDrr.cpp.

§ HisDrr() [3/3]

HisDrr::HisDrr ( const string &  drr,
const string &  his,
const string &  input 
)

Constructor creating and opening new his and drr using definition from input file.

Definition at line 80 of file HisDrr.cpp.

§ ~HisDrr()

virtual HisDrr::~HisDrr ( )
inlinevirtual

Dtor, closing files and deleting memory.

Definition at line 56 of file HisDrr.h.

Member Function Documentation

§ getHisList()

void HisDrr::getHisList ( vector< int > &  r)
virtual

Returns histograms id's list.

Definition at line 421 of file HisDrr.cpp.

§ getHistogram()

void HisDrr::getHistogram ( vector< unsigned int > &  rtn,
int  id 
)
virtual

Returns specified histogram data.

Definition at line 347 of file HisDrr.cpp.

§ getHistogramInfo()

DrrHisRecordExtended HisDrr::getHistogramInfo ( int  id) const
virtual

Returns drr data on specified histogram.

Definition at line 403 of file HisDrr.cpp.

§ loadDrr()

void HisDrr::loadDrr ( )
private

Function loading .drr file and filling in spectrum vector.

Definition at line 290 of file HisDrr.cpp.

§ readBlock()

void HisDrr::readBlock ( drrBlock block)
private

Reads block of data from drr file.

Definition at line 279 of file HisDrr.cpp.

§ setValue() [1/4]

void HisDrr::setValue ( const int  id,
unsigned  pos,
unsigned  value 
)
virtual

Replaces in histogram 'id' point 'i' by 'value'. 4-bytes long word version.

Definition at line 464 of file HisDrr.cpp.

Here is the caller graph for this function:

§ setValue() [2/4]

void HisDrr::setValue ( const int  id,
unsigned  pos,
unsigned short  value 
)
virtual

Replaces in histogram 'id' point 'i' by 'value'. The 2-bytes long word version.

Definition at line 508 of file HisDrr.cpp.

§ setValue() [3/4]

void HisDrr::setValue ( const int  id,
vector< unsigned > &  value 
)
virtual

Replaces histogram id values by ones given in a vector. The 4-bytes long word version.

Definition at line 551 of file HisDrr.cpp.

§ setValue() [4/4]

void HisDrr::setValue ( const int  id,
vector< unsigned short > &  value 
)
virtual

Replaces histogram id values by ones given in a vector. The 2-bytes long word version.

Definition at line 605 of file HisDrr.cpp.

§ zeroHistogram()

void HisDrr::zeroHistogram ( int  id)
virtual

Zeroes data for a given histogram.

Definition at line 427 of file HisDrr.cpp.

Field Documentation

§ drrFile

fstream* HisDrr::drrFile
private

Pointer to drr file containing information about his structure.

Definition at line 92 of file HisDrr.h.

§ hisFile

fstream* HisDrr::hisFile
private

Pointer to his file containg data.

Definition at line 95 of file HisDrr.h.

§ hisList

vector<DrrHisRecordExtended> HisDrr::hisList
private

Vector holding all the histogram info read from drr file.

Definition at line 89 of file HisDrr.h.


The documentation for this class was generated from the following files: