Monarch  v3.8.2
Project 8 Data File Format Library
Public Types | Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
M3Header Class Reference

Egg file header information. More...

#include <M3Header.hh>

Public Types

typedef std::vector< M3ChannelHeaderM3ChannelHeaders
 
typedef std::vector< M3StreamHeaderM3StreamHeaders
 

Public Member Functions

 M3Header ()
 
 ~M3Header ()
 
void CopyBasicInfo (const M3Header &aOrig)
 
 camel_case_mv_referrable_mutable (std::string, EggVersion)
 
 camel_case_mv_referrable_mutable (std::string, Filename)
 
 camel_case_mv_accessible_mutable (uint32_t, RunDuration)
 
 camel_case_mv_referrable_mutable (std::string, Timestamp)
 
 camel_case_mv_referrable_mutable (std::string, Description)
 
 camel_case_mv_accessible_mutable (uint32_t, NChannels)
 
 camel_case_mv_accessible_mutable (uint32_t, NStreams)
 
 camel_case_mv_referrable_mutable (std::vector< uint32_t >, ChannelStreams)
 
 camel_case_mv_referrable_mutable (std::vector< std::vector< bool > >, ChannelCoherence)
 
void SetCoherence (unsigned aChanA, unsigned aChanB, bool aCoherence)
 
 camel_case_mv_referrable_mutable (std::vector< M3ChannelHeader >, ChannelHeaders)
 
std::vector< M3ChannelHeader > & GetChannelHeaders ()
 
 camel_case_mv_referrable_mutable (std::vector< M3StreamHeader >, StreamHeaders)
 
std::vector< M3StreamHeader > & GetStreamHeaders ()
 
unsigned AddStream (const std::string &aSource, uint32_t anAcqRate, uint32_t aRecSize, uint32_t aSampleSize, uint32_t aDataTypeSize, uint32_t aDataFormat, uint32_t aBitDepth, uint32_t aBitAlignment, std::vector< unsigned > *aChanVec=NULL)
 
unsigned AddStream (const std::string &aSource, uint32_t aNChannels, uint32_t aFormat, uint32_t anAcqRate, uint32_t aRecSize, uint32_t aSampleSize, uint32_t aDataTypeSize, uint32_t aDataFormat, uint32_t aBitDepth, uint32_t aBitAlignment, std::vector< unsigned > *aChanVec=NULL)
 
void WriteToHDF5 (H5::H5File *aFile)
 
void ReadFromHDF5 (const H5::H5File *aFile) const
 
const H5::Group * GetStreamsGroup () const
 
H5::Group * GetStreamsGroup ()
 
const H5::Group * GetChannelsGroup () const
 
H5::Group * GetChannelsGroup ()
 
template<>
std::string ReadScalarFromHDF5 (const HAS_ATTR_IFC *aLoc, const std::string &aName)
 
template<>
std::string ReadScalarFromHDF5 (const HAS_ATTR_IFC *aLoc, const std::string &aName, const std::string &aDefaultValue)
 

Static Public Member Functions

static void WriteScalarToHDF5 (HAS_ATTR_IFC *aLoc, const std::string &aName, const std::string &aValue)
 
template<typename XType >
static void WriteScalarToHDF5 (HAS_ATTR_IFC *aLoc, const std::string &aName, XType aValue)
 
template<typename XType >
static XType ReadScalarFromHDF5 (const HAS_ATTR_IFC *aLoc, const std::string &aName)
 
template<typename XType >
static XType ReadScalarFromHDF5 (const HAS_ATTR_IFC *aLoc, const std::string &aName, const XType &aDefault)
 

Private Member Functions

void WriteChannelStreams (HAS_ATTR_IFC *aLoc)
 
void ReadChannelStreams (const HAS_ATTR_IFC *aLoc) const
 
void WriteChannelCoherence (HAS_ATTR_IFC *aLoc)
 
void ReadChannelCoherence (const HAS_ATTR_IFC *aLoc) const
 

Private Attributes

H5::H5File * fFile
 
H5::Group * fStreamsGroup
 
H5::Group * fChannelsGroup
 

Detailed Description

Egg file header information.

Author
N. S. Oblath

General run setup can be configured by setting variables in this header object.

The stream structure of the data is also configured using the AddStream functions.

Definition at line 152 of file M3Header.hh.

Member Typedef Documentation

◆ M3ChannelHeaders

typedef std::vector< M3ChannelHeader > M3ChannelHeaders

Definition at line 155 of file M3Header.hh.

◆ M3StreamHeaders

typedef std::vector< M3StreamHeader > M3StreamHeaders

Definition at line 156 of file M3Header.hh.

Constructor & Destructor Documentation

◆ M3Header()

M3Header ( )

Definition at line 357 of file M3Header.cc.

◆ ~M3Header()

~M3Header ( )

Definition at line 373 of file M3Header.cc.

Member Function Documentation

◆ AddStream() [1/2]

uint32_t AddStream ( const std::string &  aSource,
uint32_t  anAcqRate,
uint32_t  aRecSize,
uint32_t  aSampleSize,
uint32_t  aDataTypeSize,
uint32_t  aDataFormat,
uint32_t  aBitDepth,
uint32_t  aBitAlignment,
std::vector< unsigned > *  aChanVec = NULL 
)

Add a stream with one channel with aRecSize samples per record Returns the stream number (used to address the stream later)

Definition at line 400 of file M3Header.cc.

◆ AddStream() [2/2]

uint32_t AddStream ( const std::string &  aSource,
uint32_t  aNChannels,
uint32_t  aFormat,
uint32_t  anAcqRate,
uint32_t  aRecSize,
uint32_t  aSampleSize,
uint32_t  aDataTypeSize,
uint32_t  aDataFormat,
uint32_t  aBitDepth,
uint32_t  aBitAlignment,
std::vector< unsigned > *  aChanVec = NULL 
)

Add a stream with multiple channels with aRecSize samples per record Returns the stream number (used to address the stream later)

Definition at line 422 of file M3Header.cc.

◆ camel_case_mv_accessible_mutable() [1/3]

camel_case_mv_accessible_mutable ( uint32_t  ,
RunDuration   
)

◆ camel_case_mv_accessible_mutable() [2/3]

camel_case_mv_accessible_mutable ( uint32_t  ,
NChannels   
)

◆ camel_case_mv_accessible_mutable() [3/3]

camel_case_mv_accessible_mutable ( uint32_t  ,
NStreams   
)

◆ camel_case_mv_referrable_mutable() [1/8]

camel_case_mv_referrable_mutable ( std::string  ,
EggVersion   
)

◆ camel_case_mv_referrable_mutable() [2/8]

camel_case_mv_referrable_mutable ( std::string  ,
Filename   
)

◆ camel_case_mv_referrable_mutable() [3/8]

camel_case_mv_referrable_mutable ( std::string  ,
Timestamp   
)

◆ camel_case_mv_referrable_mutable() [4/8]

camel_case_mv_referrable_mutable ( std::string  ,
Description   
)

◆ camel_case_mv_referrable_mutable() [5/8]

camel_case_mv_referrable_mutable ( std::vector< uint32_t >  ,
ChannelStreams   
)

◆ camel_case_mv_referrable_mutable() [6/8]

camel_case_mv_referrable_mutable ( std::vector< std::vector< bool > >  ,
ChannelCoherence   
)

◆ camel_case_mv_referrable_mutable() [7/8]

camel_case_mv_referrable_mutable ( std::vector< M3ChannelHeader ,
ChannelHeaders   
)

◆ camel_case_mv_referrable_mutable() [8/8]

camel_case_mv_referrable_mutable ( std::vector< M3StreamHeader ,
StreamHeaders   
)

◆ CopyBasicInfo()

void CopyBasicInfo ( const M3Header aOrig)

Definition at line 379 of file M3Header.cc.

◆ GetChannelHeaders()

std::vector< M3ChannelHeader > & GetChannelHeaders ( )
inline

Definition at line 265 of file M3Header.hh.

◆ GetChannelsGroup() [1/2]

const H5::Group * GetChannelsGroup ( ) const
inline

Definition at line 255 of file M3Header.hh.

◆ GetChannelsGroup() [2/2]

H5::Group * GetChannelsGroup ( )
inline

Definition at line 260 of file M3Header.hh.

◆ GetStreamHeaders()

std::vector< M3StreamHeader > & GetStreamHeaders ( )
inline

Definition at line 270 of file M3Header.hh.

◆ GetStreamsGroup() [1/2]

const H5::Group * GetStreamsGroup ( ) const
inline

Definition at line 245 of file M3Header.hh.

◆ GetStreamsGroup() [2/2]

H5::Group * GetStreamsGroup ( )
inline

Definition at line 250 of file M3Header.hh.

◆ ReadChannelCoherence()

void ReadChannelCoherence ( const HAS_ATTR_IFC *  aLoc) const
private

Definition at line 656 of file M3Header.cc.

◆ ReadChannelStreams()

void ReadChannelStreams ( const HAS_ATTR_IFC *  aLoc) const
private

Definition at line 597 of file M3Header.cc.

◆ ReadFromHDF5()

void ReadFromHDF5 ( const H5::H5File *  aFile) const

Definition at line 500 of file M3Header.cc.

◆ ReadScalarFromHDF5() [1/4]

XType ReadScalarFromHDF5 ( const HAS_ATTR_IFC *  aLoc,
const std::string &  aName 
)
static

Definition at line 336 of file M3Header.hh.

◆ ReadScalarFromHDF5() [2/4]

XType ReadScalarFromHDF5 ( const HAS_ATTR_IFC *  aLoc,
const std::string &  aName,
const XType &  aDefault 
)
static

Definition at line 367 of file M3Header.hh.

◆ ReadScalarFromHDF5() [3/4]

std::string ReadScalarFromHDF5 ( const HAS_ATTR_IFC *  aLoc,
const std::string &  aName 
)
inline

Definition at line 321 of file M3Header.hh.

◆ ReadScalarFromHDF5() [4/4]

std::string ReadScalarFromHDF5 ( const HAS_ATTR_IFC *  aLoc,
const std::string &  aName,
const std::string &  aDefaultValue 
)
inline

Definition at line 351 of file M3Header.hh.

◆ SetCoherence()

void SetCoherence ( unsigned  aChanA,
unsigned  aChanB,
bool  aCoherence 
)

Definition at line 389 of file M3Header.cc.

◆ WriteChannelCoherence()

void WriteChannelCoherence ( HAS_ATTR_IFC *  aLoc)
private

Definition at line 630 of file M3Header.cc.

◆ WriteChannelStreams()

void WriteChannelStreams ( HAS_ATTR_IFC *  aLoc)
private

Definition at line 574 of file M3Header.cc.

◆ WriteScalarToHDF5() [1/2]

void WriteScalarToHDF5 ( HAS_ATTR_IFC *  aLoc,
const std::string &  aName,
const std::string &  aValue 
)
inlinestatic

Definition at line 276 of file M3Header.hh.

◆ WriteScalarToHDF5() [2/2]

void WriteScalarToHDF5 ( HAS_ATTR_IFC *  aLoc,
const std::string &  aName,
XType  aValue 
)
static

Definition at line 286 of file M3Header.hh.

◆ WriteToHDF5()

void WriteToHDF5 ( H5::H5File *  aFile)

Definition at line 456 of file M3Header.cc.

Member Data Documentation

◆ fChannelsGroup

H5::Group* fChannelsGroup
mutableprivate

Definition at line 224 of file M3Header.hh.

◆ fFile

H5::H5File* fFile
mutableprivate

Definition at line 222 of file M3Header.hh.

◆ fStreamsGroup

H5::Group* fStreamsGroup
mutableprivate

Definition at line 223 of file M3Header.hh.


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