MQinoRawDataWriter Class Reference
[Writers]

Inheritance diagram for MQinoRawDataWriter:

QFileWriter QWriter QBaseModule List of all members.

Detailed Description

vsmq format file writer

This writer converts data from diana to 'vsmq' format. It produces compressed data files in vsmq format and an header file for each different input run. This writer is able to detect (and skip) possible muon events from Apollo data, but unless it is used in conjunction with MRawDataFilter (KeepMuonVeto=false,SkipEvents=true), the number of events per file will not match the one requested in config file. Not all informations contained in the header file are meaningful. The following quantities can be trusted:


Public Member Functions

 MQinoRawDataWriter (QSequence *s)
virtual void Open (const std::string &fileName)
 read parameters from config file
virtual void Dump (const QEvent &ev)
 Dump ev to file.
virtual void Close ()
 Close file.

Private Member Functions

void FlushVector ()
 flush events vector (delete existing events)
void WriteFile ()
 write current events to file
void WriteHeader ()
 write header file
std::string GetTimeString (const time_t &time, const std::string &format)
 utility function to convert from time_t to string
QVector Scale (const QVector &data, const int channel, const size_t first, const size_t last)
 scale from PXI to VXI adc units
void DumpStatistics ()
 dump statistics about events that have been modified due to to incompatible values found in input data (negative voltage, values exceeding max ADC input and so on).

Private Attributes

QApolloCalibfCalib
std::vector< QRawQinoEvt_t * > fEvents
time_t fStartTime
time_t fEndTime
std::string fLastFileName
int fLastRunNumber
bool f18BitInput
std::map< short, short > fChanCount
unsigned int fNoHeaterFlag
unsigned int fOffsetForced
unsigned int fShortEvents
unsigned int fSaturatedLow
unsigned int fSaturatedHi
size_t fEvPoints
size_t fPreTrigger
bool fDiffOutput

Static Private Attributes

static const size_t kArraySize = 1023

Classes

struct  QRawQinoEvt_t


Member Function Documentation

void MQinoRawDataWriter::WriteFile (  )  [private]

write current events to file

Parameters:
fileName name of file to be written

std::string MQinoRawDataWriter::GetTimeString ( const time_t &  time,
const std::string &  format 
) [private]

utility function to convert from time_t to string

Parameters:
time value to be converted
format date format as specified in strftime()
Returns:
string filled with formatted date or "NOT_DETECTED" if time is 0

QVector MQinoRawDataWriter::Scale ( const QVector &  data,
const int  channel,
const size_t  first,
const size_t  last 
) [private]

scale from PXI to VXI adc units

Parameters:
data input vector to be scaled
channel logica channel the data belongs to. This information is needed to choose the corect calibration coefficients
first first sample to be scaled (included)
last last sample to be scaled (excluded)
Returns:
QVector containing scaled data

void MQinoRawDataWriter::DumpStatistics (  )  [private]

dump statistics about events that have been modified due to to incompatible values found in input data (negative voltage, values exceeding max ADC input and so on).

This function also reset the statistics counters


Member Data Documentation

const size_t MQinoRawDataWriter::kArraySize = 1023 [static, private]

maximum number of points per pulse

std::string MQinoRawDataWriter::fLastFileName [private]

used to determine header file name

int MQinoRawDataWriter::fLastRunNumber [private]

run number given by QRunData the last time that Open() was called.

bool MQinoRawDataWriter::f18BitInput [private]

determine input files ADC dynamic

std::map<short,short> MQinoRawDataWriter::fChanCount [private]

number of events for each channel

size_t MQinoRawDataWriter::fEvPoints [private]

number of samples per pulse

size_t MQinoRawDataWriter::fPreTrigger [private]

number of pre-trigger samples

bool MQinoRawDataWriter::fDiffOutput [private]

output file format (differential or not)


The documentation for this class was generated from the following files:
Generated on Fri Mar 6 13:40:41 2009 for CUORE Software by  doxygen 1.5.1