ProMC  1.3
 All Classes Functions
Public Member Functions | Static Public Attributes | List of all members
ProMCBook Class Reference

Public Member Functions

 ProMCBook (const char *filename, const char *option)
void open (const char *filename, const char *option)
ProMCEvent get ()
ProMCEvent event (long idx)
int next ()
int getTimestamp ()
int getVersion ()
string getDescription ()
void setDescription (int events, string s)
int getEvents ()
int getEventsRequested ()
ProMCHeader getHeader ()
ProMCStat getStatistics ()
void setHeader (ProMCHeader h)
void setStatistics (ProMCStat h)
void close ()
void write (ProMCEvent e)
void clear ()
unsigned int size ()

Static Public Attributes

static const int current_version =2

Member Function Documentation

void ProMCBook::clear ( )

Clear all streams (dummmy)

void ProMCBook::close ( )

Close all files and write metadata.

ProMCEvent ProMCBook::event ( long  idx)

Get a data record (event) using a random access. Use a key to extract the record. The key value runs from "0" to size()-1.

key(long) of the record
ProMCEvent record corresponding to this key.
ProMCEvent ProMCBook::get ( )

Get the next record. Make sure you can next() first.

ProMCEvent record.
ProMCHeader ProMCBook::getHeader ( )

Get the record with the header file.

Headerfile record.
ProMCStat ProMCBook::getStatistics ( )

Get the statistics record. Should be called last after all events.

int ProMCBook::next ( )

Get the next record.

0 if the record was extracted OK. 6, or 7 if there is a problem
void ProMCBook::setDescription ( int  requested_events,
string  describe 

Set the description information.

requested_eventsRequested events (not the actual!)
void ProMCBook::setHeader ( ProMCHeader  h)

Set a header file.

hHeader file.
void ProMCBook::setStatistics ( ProMCStat  h)

Set statistics information

hStatistics info
unsigned int ProMCBook::size ( )

Return the number of records.

Return the size of all records (excluding metadata)
void ProMCBook::write ( ProMCEvent  eve)

Write an event.

eveEvent to be written.

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