libPaceventsMetaInfo 2.0(r200)
Metainfo Object for .pacevents Files

PaceventsMetaInfo Class Reference

Provides access to the information contained in the header of a .pacevents file written by PacMaster. More...

#include <PaceventsMetaInfo.h>

List of all members.

Public Member Functions

Constructors, destructor and methods for opening files
 PaceventsMetaInfo (QObject *parent=0)
 PaceventsMetaInfo (QFile *paceventsfile, QObject *parent=0)
 PaceventsMetaInfo (QFile *paceventsfile, bool allowChanges=false, QObject *parent=0)
 ~PaceventsMetaInfo ()
bool processFile (QFile *paceventsfile)
 Reads the file header.
Methods for changing the working mode of this object
void setAllowChanges (bool allow)
Methods to access information contained in the file header
bool isValidFile () const
QString errorMessage () const
quint32 fileFormatVersion () const
quint64 fileSize () const
quint64 dataPointer () const
quint64 footerPointer () const
void setFooterPointer (quint64 pos)
quint8 compressionLevel () const
quint64 eventsPerChunk () const
QDateTime startOfMeasurement () const
void setStartOfMeasurement (const QDateTime &starttime)
QDateTime stopOfMeasurement () const
void setStopOfMeasurement (const QDateTime &stoptime)
quint64 numOfRecords () const
void setNumOfRecords (quint64 num)
quint16 numOfColumns () const
QList< Pac::DataFileColumnscolumnContents () const
QList< Pac::DataFileColumTypecolumnTypes () const
Pac::DataFileColumType columnTypeOfContent (Pac::DataFileColumns content) const
int byteOffsetOfColumnContent (Pac::DataFileColumns content) const
quint8 numNodes () const
QList< quint8 > nodeIds () const
QHash< quint8, float > nodeIdsToPhi () const
void setPhi (quint8 nid, float phi)
QHash< quint8, float > nodeIdsToTheta () const
void setTheta (quint8 nid, float theta)
QMap< QString, QString > setupTree () const
QString setupTreeItem (const QString &key) const
Pac::DataFileFlags flags () const
QStringList flagsStringList () const
bool stillRecording () const
void setStillRecording (bool flagstate)
bool finalized () const
void setFinalized (bool flagstate)
bool manuallyFinalized () const
void setManuallyFinalized (bool flagstate)
bool manuallyMerged () const
void setManuallyMerged (bool flagstate)
bool parametersManuallyModified () const
void setParametersManuallyModified (bool flagstate)
QString finalComment () const
void setFinalComment (const QString &comment)
qint32 sizeOfRecord () const
Access to a widget containing the header information for display in a GUI
QWidget * metaInfoWidget ()

Static Public Member Functions

Methods to access constant parameters
static quint8 sizeOfCol (Pac::DataFileColumType type)
Data conversion
static QString createByteString (quint64 bytes)

Detailed Description

Provides access to the information contained in the header of a .pacevents file written by PacMaster.

Author:
Matthias Nagl <mnagl@uni-goettingen.de>

This class reads the header of a pacevents file and allows easy access to the contained information. It can also create a QWidget containing the information to provide an easy way to display it in GUIs. The setup tree contained in the file header is displayed in a dialog box containing a tree view.

The pacevents binary format is described in the documentation of PacEventSaver.


Constructor & Destructor Documentation

PaceventsMetaInfo::PaceventsMetaInfo ( QObject *  parent = 0)
PaceventsMetaInfo::PaceventsMetaInfo ( QFile *  paceventsfile,
QObject *  parent = 0 
)
PaceventsMetaInfo::PaceventsMetaInfo ( QFile *  paceventsfile,
bool  allowChanges = false,
QObject *  parent = 0 
)
PaceventsMetaInfo::~PaceventsMetaInfo ( )

Member Function Documentation

int PaceventsMetaInfo::byteOffsetOfColumnContent ( Pac::DataFileColumns  content) const

returns the byte offset of a column identified by its content

Returns:
-1 if content does not exist, offset otherwise
QList< Pac::DataFileColumns > PaceventsMetaInfo::columnContents ( ) const
Pac::DataFileColumType PaceventsMetaInfo::columnTypeOfContent ( Pac::DataFileColumns  content) const

returns the type of a column identified by its content

QList< Pac::DataFileColumType > PaceventsMetaInfo::columnTypes ( ) const
quint8 PaceventsMetaInfo::compressionLevel ( ) const
QString PaceventsMetaInfo::createByteString ( quint64  bytes) [static]
quint64 PaceventsMetaInfo::dataPointer ( ) const
QString PaceventsMetaInfo::errorMessage ( ) const
quint64 PaceventsMetaInfo::eventsPerChunk ( ) const
quint32 PaceventsMetaInfo::fileFormatVersion ( ) const
quint64 PaceventsMetaInfo::fileSize ( ) const
QString PaceventsMetaInfo::finalComment ( ) const
bool PaceventsMetaInfo::finalized ( ) const
Pac::DataFileFlags PaceventsMetaInfo::flags ( ) const
QStringList PaceventsMetaInfo::flagsStringList ( ) const
quint64 PaceventsMetaInfo::footerPointer ( ) const

Returns a pointer to the last backpointer. The real footer begins 8 bytes later.

bool PaceventsMetaInfo::isValidFile ( ) const
bool PaceventsMetaInfo::manuallyFinalized ( ) const
bool PaceventsMetaInfo::manuallyMerged ( ) const
QWidget * PaceventsMetaInfo::metaInfoWidget ( )
QList< quint8 > PaceventsMetaInfo::nodeIds ( ) const
QHash< quint8, float > PaceventsMetaInfo::nodeIdsToPhi ( ) const

Returns the spherical phi coordinates of all detectors in degree (0.0° to 360.0°).

QHash< quint8, float > PaceventsMetaInfo::nodeIdsToTheta ( ) const

Returns the spherical theta coordinates of all detectors in degree (-90.0° to 90.0°).

quint8 PaceventsMetaInfo::numNodes ( ) const
quint16 PaceventsMetaInfo::numOfColumns ( ) const
quint64 PaceventsMetaInfo::numOfRecords ( ) const
bool PaceventsMetaInfo::parametersManuallyModified ( ) const
bool PaceventsMetaInfo::processFile ( QFile *  paceventsfile)

Reads the file header.

Accepts pointer to already opened QFile Sets internal file pointer to its original position after header and footer are read.

void PaceventsMetaInfo::setAllowChanges ( bool  allow)
void PaceventsMetaInfo::setFinalComment ( const QString &  comment)
void PaceventsMetaInfo::setFinalized ( bool  flagstate)
void PaceventsMetaInfo::setFooterPointer ( quint64  pos)
void PaceventsMetaInfo::setManuallyFinalized ( bool  flagstate)
void PaceventsMetaInfo::setManuallyMerged ( bool  flagstate)
void PaceventsMetaInfo::setNumOfRecords ( quint64  num)
void PaceventsMetaInfo::setParametersManuallyModified ( bool  flagstate)
void PaceventsMetaInfo::setPhi ( quint8  nid,
float  phi 
)

Sets the spherical theta coordinate

Parameters:
phi0.0° to 360.0° in degree
void PaceventsMetaInfo::setStartOfMeasurement ( const QDateTime &  starttime)
void PaceventsMetaInfo::setStillRecording ( bool  flagstate)
void PaceventsMetaInfo::setStopOfMeasurement ( const QDateTime &  stoptime)
void PaceventsMetaInfo::setTheta ( quint8  nid,
float  theta 
)

Sets the spherical theta coordinate

Parameters:
theta-90.0° to 90.0° in degree
QMap< QString, QString > PaceventsMetaInfo::setupTree ( ) const
QString PaceventsMetaInfo::setupTreeItem ( const QString &  key) const
quint8 PaceventsMetaInfo::sizeOfCol ( Pac::DataFileColumType  type) [static]
qint32 PaceventsMetaInfo::sizeOfRecord ( ) const
QDateTime PaceventsMetaInfo::startOfMeasurement ( ) const
bool PaceventsMetaInfo::stillRecording ( ) const
QDateTime PaceventsMetaInfo::stopOfMeasurement ( ) const

The documentation for this class was generated from the following files:
 All Classes Namespaces Files Functions Variables Enumerations Properties Friends Defines