ProMCBook Class Reference

List of all members.

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 ()
void setHeader (ProMCHeader h)
void setStatistics (ProMCStat h)
ProMCStat getStatistics ()
void close ()
void write (ProMCEvent e)
void clear ()
unsigned int size ()

Static Public Attributes

static const int current_version = 3

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.

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

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

Returns:
ProMCEvent record.
ProMCHeader ProMCBook::getHeader (  ) 

Get the record with the header file.

Parameters:
Header file record.
ProMCStat ProMCBook::getStatistics (  ) 

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

Returns:
int ProMCBook::next (  ) 

Get the next record.

Returns:
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.

Parameters:
requested_events Requested events (not the actual!)
describe description
void ProMCBook::setHeader ( ProMCHeader  h  ) 

Set a header file.

Parameters:
h Header file.
void ProMCBook::setStatistics ( ProMCStat  h  ) 

Set statistics information

Parameters:
h Statistics info
unsigned int ProMCBook::size (  ) 

Return the number of records.

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

Write an event.

Parameters:
eve Event to be written.

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

Generated on 10 Mar 2014 for ProMC by  doxygen 1.6.1