Analysis Software
Documentation for sPHENIX simulation software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
fileEventiterator Class Reference

#include <online_distribution/blob/master/newbasic/fileEventiterator.h>

+ Inheritance diagram for fileEventiterator:
+ Collaboration diagram for fileEventiterator:

Public Member Functions

virtual ~fileEventiterator ()
 
 fileEventiterator (const char *filename)
 This simple constructor just needs the file name of the data file.
 
 fileEventiterator (const char *filename, int &status)
 
const char * getIdTag () const
 
virtual void identify (std::ostream &os=std::cout) const
 
virtual const char * getCurrentFileName () const
 
EventgetNextEvent ()
 
int setVerbosity (const int v)
 
int getVerbosity () const
 
- Public Member Functions inherited from Eventiterator
virtual ~Eventiterator ()
 The virtual destructor.
 
virtual int * getNextEventData ()
 
virtual int releaseEventData ()
 
virtual void setBlockingMode (const int)
 
virtual int getBlockingMode () const
 
virtual void setSelectMode (const int)
 
virtual int getSelectMode () const
 
virtual void setSelectWords (const int, const int, const int, const int)
 
virtual void getSelectWords (int[]) const
 

Private Member Functions

int open_file (const char *filename)
 
int read_next_buffer ()
 

Private Attributes

char * thefilename
 
int fd
 
PHDWORDbp
 
unsigned int allocatedsize
 
int current_index
 
int last_read_status
 
unsigned int buffer_size
 
bufferbptr
 
int events_so_far
 
int verbosity
 
int _defunct
 

Detailed Description

The fileEventiterator reads the event data from a data file on disk. It creates and returns pointers to Event objects. At the end of the file it returns 0 when there are no events left.

Definition at line 19 of file fileEventiterator.h.

View newest version in sPHENIX GitHub at line 19 of file fileEventiterator.h

Constructor & Destructor Documentation

fileEventiterator::~fileEventiterator ( )
virtual

Definition at line 25 of file fileEventiterator.cc.

View newest version in sPHENIX GitHub at line 25 of file fileEventiterator.cc

References bp, bptr, fd, and thefilename.

fileEventiterator::fileEventiterator ( const char *  filename)

This simple constructor just needs the file name of the data file.

Definition at line 34 of file fileEventiterator.cc.

View newest version in sPHENIX GitHub at line 34 of file fileEventiterator.cc

References open_file().

+ Here is the call graph for this function:

fileEventiterator::fileEventiterator ( const char *  filename,
int &  status 
)

This constructor gives you a status so you can learn that the creation of the fileEventiterator object was successful. If the status is not 0, something went wrong and you should delete the object again.

Definition at line 39 of file fileEventiterator.cc.

View newest version in sPHENIX GitHub at line 39 of file fileEventiterator.cc

References open_file().

+ Here is the call graph for this function:

Member Function Documentation

const char * fileEventiterator::getCurrentFileName ( ) const
virtual

Reimplemented from Eventiterator.

Definition at line 84 of file fileEventiterator.cc.

View newest version in sPHENIX GitHub at line 84 of file fileEventiterator.cc

References thefilename.

const char * fileEventiterator::getIdTag ( ) const
virtual

Implements Eventiterator.

Definition at line 101 of file fileEventiterator.cc.

View newest version in sPHENIX GitHub at line 101 of file fileEventiterator.cc

Event * fileEventiterator::getNextEvent ( )
virtual

this member function returns a pointer to the Event object, or NULL if there are no events left.

Implements Eventiterator.

Definition at line 112 of file fileEventiterator.cc.

View newest version in sPHENIX GitHub at line 112 of file fileEventiterator.cc

References _defunct, bptr, events_so_far, buffer::getEvent(), last_read_status, and read_next_buffer().

+ Here is the call graph for this function:

int fileEventiterator::getVerbosity ( ) const
inlinevirtual

Reimplemented from Eventiterator.

Definition at line 55 of file fileEventiterator.h.

View newest version in sPHENIX GitHub at line 55 of file fileEventiterator.h

References verbosity.

void fileEventiterator::identify ( std::ostream &  os = std::cout) const
virtual

Implements Eventiterator.

Definition at line 75 of file fileEventiterator.cc.

View newest version in sPHENIX GitHub at line 75 of file fileEventiterator.cc

References _defunct, and thefilename.

int fileEventiterator::open_file ( const char *  filename)
private

Definition at line 45 of file fileEventiterator.cc.

View newest version in sPHENIX GitHub at line 45 of file fileEventiterator.cc

References _defunct, allocatedsize, bp, bptr, current_index, events_so_far, fd, last_read_status, Acts::open, thefilename, and verbosity.

Referenced by fileEventiterator().

+ Here is the caller graph for this function:

int fileEventiterator::read_next_buffer ( )
private

Definition at line 148 of file fileEventiterator.cc.

View newest version in sPHENIX GitHub at line 148 of file fileEventiterator.cc

References allocatedsize, bp, bptr, buffer_size, BUFFERBLOCKSIZE, BUFFERMARKER, COUT, events_so_far, fd, GZBUFFERMARKER, i, LZO1XBUFFERMARKER, buffer::makeBuffer(), ONCSBUFFERMARKER, ActsExamples::JsonSurfacesReader::read(), and buffer::u4swap().

Referenced by getNextEvent().

+ Here is the call graph for this function:

+ Here is the caller graph for this function:

int fileEventiterator::setVerbosity ( const int  v)
inlinevirtual

Reimplemented from Eventiterator.

Definition at line 49 of file fileEventiterator.h.

View newest version in sPHENIX GitHub at line 49 of file fileEventiterator.h

References testSigmaEff::v, and verbosity.

Member Data Documentation

int fileEventiterator::_defunct
private

Definition at line 78 of file fileEventiterator.h.

View newest version in sPHENIX GitHub at line 78 of file fileEventiterator.h

Referenced by getNextEvent(), identify(), and open_file().

unsigned int fileEventiterator::allocatedsize
private

Definition at line 69 of file fileEventiterator.h.

View newest version in sPHENIX GitHub at line 69 of file fileEventiterator.h

Referenced by open_file(), and read_next_buffer().

PHDWORD* fileEventiterator::bp
private

Definition at line 68 of file fileEventiterator.h.

View newest version in sPHENIX GitHub at line 68 of file fileEventiterator.h

Referenced by open_file(), read_next_buffer(), and ~fileEventiterator().

buffer* fileEventiterator::bptr
private

Definition at line 74 of file fileEventiterator.h.

View newest version in sPHENIX GitHub at line 74 of file fileEventiterator.h

Referenced by getNextEvent(), open_file(), read_next_buffer(), and ~fileEventiterator().

unsigned int fileEventiterator::buffer_size
private

Definition at line 73 of file fileEventiterator.h.

View newest version in sPHENIX GitHub at line 73 of file fileEventiterator.h

Referenced by read_next_buffer().

int fileEventiterator::current_index
private

Definition at line 71 of file fileEventiterator.h.

View newest version in sPHENIX GitHub at line 71 of file fileEventiterator.h

Referenced by open_file().

int fileEventiterator::events_so_far
private

Definition at line 76 of file fileEventiterator.h.

View newest version in sPHENIX GitHub at line 76 of file fileEventiterator.h

Referenced by getNextEvent(), open_file(), and read_next_buffer().

int fileEventiterator::fd
private

Definition at line 66 of file fileEventiterator.h.

View newest version in sPHENIX GitHub at line 66 of file fileEventiterator.h

Referenced by open_file(), read_next_buffer(), and ~fileEventiterator().

int fileEventiterator::last_read_status
private

Definition at line 72 of file fileEventiterator.h.

View newest version in sPHENIX GitHub at line 72 of file fileEventiterator.h

Referenced by getNextEvent(), and open_file().

char* fileEventiterator::thefilename
private

Definition at line 65 of file fileEventiterator.h.

View newest version in sPHENIX GitHub at line 65 of file fileEventiterator.h

Referenced by getCurrentFileName(), identify(), open_file(), and ~fileEventiterator().

int fileEventiterator::verbosity
private

Definition at line 77 of file fileEventiterator.h.

View newest version in sPHENIX GitHub at line 77 of file fileEventiterator.h

Referenced by open_file().


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