CMS 3D CMS Logo

Static Public Member Functions | Static Protected Member Functions | Static Private Attributes

EPOS::EPOS_Wrapper Class Reference

Generic Wrapper for the fortran EPOS common block. More...

#include <EPOS_Wrapper.h>

List of all members.

Static Public Member Functions

static double e (int index)
 Energy.
static int event_number ()
 event number
static int first_child (int index)
 index of 1st daughter
static int first_parent (int index)
 index of 1st mother
static int id (int index)
 PDG particle id.
static int last_child (int index)
 index of last daughter
static int last_parent (int index)
 index of last mother
static double m (int index)
 generated mass
static int max_number_entries ()
 size of common block
static int number_children (int index)
 number of children
static int number_entries ()
 num entries in current evt
static int number_parents (int index)
 number of parents
static void print_hepcom (std::ostream &ostr=std::cout)
 write information from EPOS common block
static void print_hepcom_particle (int index, std::ostream &ostr=std::cout)
 write particle information to ostr
static double px (int index)
 X momentum.
static double py (int index)
 Y momentum.
static double pz (int index)
 Z momentum.
static void set_children (int index, int firstchild, int lastchild)
 define children of a particle
static void set_event_number (int evtno)
 set event number
static void set_id (int index, int id)
 set particle ID
static void set_mass (int index, double mass)
 set particle mass
static void set_max_number_entries (unsigned int)
 define size of common block
static void set_momentum (int index, double px, double py, double pz, double e)
 set particle momentum
static void set_number_entries (int noentries)
 set number of entries in EPOS
static void set_parents (int index, int firstparent, int lastparent)
 define parents of a particle
static void set_position (int index, double x, double y, double z, double t)
 set particle production vertex
static void set_sizeof_int (unsigned int)
 define size of integer
static void set_sizeof_real (unsigned int)
 define size of real
static void set_status (int index, int status)
 set particle status
static unsigned int sizeof_int ()
 size of integer in bytes
static unsigned int sizeof_real ()
 size of real in bytes
static int status (int index)
 status code
static double t (int index)
 production time
static double x (int index)
 X Production vertex.
static double y (int index)
 Y Production vertex.
static double z (int index)
 Z Production vertex.
static void zero_everything ()
 set all entries in EPOS to zero

Static Protected Member Functions

static double byte_num_to_double (unsigned int)
 navigate a byte array
static int byte_num_to_int (unsigned int)
 navigate a byte array
static void print_legend (std::ostream &ostr=std::cout)
 print output legend
static void write_byte_num (double, unsigned int)
 pretend common block is an array of bytes
static void write_byte_num (int, unsigned int)
 pretend common block is an array of bytes

Static Private Attributes

static unsigned int s_max_number_entries = 99900
static unsigned int s_sizeof_int = 4
static unsigned int s_sizeof_real = sizeof(double)

Detailed Description

Generic Wrapper for the fortran EPOS common block.

This class is intended for static use only - it makes no sense to instantiate it.

Definition at line 131 of file EPOS_Wrapper.h.


Member Function Documentation

double EPOS::EPOS_Wrapper::byte_num_to_double ( unsigned int  b) [inline, static, protected]

navigate a byte array

Definition at line 251 of file EPOS_Wrapper.h.

References dtNoiseDBValidation_cfg::cerr, epos_bytes_allocation, hepcom, and s_sizeof_real.

Referenced by e(), m(), px(), py(), pz(), t(), x(), y(), and z().

                                                                   {
        if ( b >= epos_bytes_allocation ) std::cerr 
                  << "EPOS_Wrapper: requested hepcom data exceeds allocation"
                  << std::endl;
        if ( s_sizeof_real == sizeof(float) ) {
            float* myfloat = (float*)&hepcom.data[b];
            return (double)(*myfloat);
        } else if ( s_sizeof_real == sizeof(double) ) {
            double* mydouble = (double*)&hepcom.data[b];
            return (*mydouble);
        } else {
            std::cerr 
                << "EPOS_Wrapper: illegal floating point number length." 
                << s_sizeof_real << std::endl;
        }
        return 0;
    }
int EPOS::EPOS_Wrapper::byte_num_to_int ( unsigned int  b) [inline, static, protected]

navigate a byte array

Definition at line 269 of file EPOS_Wrapper.h.

References dtNoiseDBValidation_cfg::cerr, epos_bytes_allocation, hepcom, and s_sizeof_int.

Referenced by event_number(), first_child(), first_parent(), id(), last_child(), last_parent(), number_entries(), and status().

                                                             {
        if ( b >= epos_bytes_allocation ) std::cerr 
                  << "EPOS_Wrapper: requested hepcom data exceeds allocation"
                  << std::endl;
        if ( s_sizeof_int == sizeof(short int) ) {
            short int* myshortint = (short int*)&hepcom.data[b];
            return (int)(*myshortint);
        } else if ( s_sizeof_int == sizeof(long int) ) {
            long int* mylongint = (long int*)&hepcom.data[b];
            return (*mylongint);
       // on some 64 bit machines, int, short, and long are all different
        } else if ( s_sizeof_int == sizeof(int) ) {
            int* myint = (int*)&hepcom.data[b];
            return (*myint);
        } else {
            std::cerr 
                << "EPOS_Wrapper: illegal integer number length." 
                << s_sizeof_int << std::endl;
        }
        return 0;
    }
double EPOS::EPOS_Wrapper::e ( int  index) [inline, static]
int EPOS::EPOS_Wrapper::event_number ( ) [inline, static]
int EPOS::EPOS_Wrapper::first_child ( int  index) [inline, static]

index of 1st daughter

Definition at line 384 of file EPOS_Wrapper.h.

References byte_num_to_int(), max_number_entries(), number_entries(), and sizeof_int().

Referenced by EPOS::IO_EPOS::build_end_vertex(), last_child(), number_children(), and print_hepcom_particle().

    { 
        int child = byte_num_to_int( (2+4*max_number_entries()+2*(index-1)) 
                                     * sizeof_int() ); 
        return ( child > 0 && child <= number_entries() ) ?
                                       child : 0; 
    }
int EPOS::EPOS_Wrapper::first_parent ( int  index) [inline, static]

index of 1st mother

Definition at line 352 of file EPOS_Wrapper.h.

References byte_num_to_int(), max_number_entries(), number_entries(), dbtoconf::parent, and sizeof_int().

Referenced by EPOS::IO_EPOS::build_production_vertex(), last_parent(), number_parents(), and print_hepcom_particle().

    { 
        int parent = byte_num_to_int( (2+2*max_number_entries()+2*(index-1)) 
                                      * sizeof_int() ); 
        return ( parent > 0 && parent <= number_entries() ) ?
                                         parent : 0; 
    }
int EPOS::EPOS_Wrapper::id ( int  index) [inline, static]

PDG particle id.

Definition at line 346 of file EPOS_Wrapper.h.

References byte_num_to_int(), max_number_entries(), and sizeof_int().

Referenced by EPOS::IO_EPOS::build_particle().

    { 
        return byte_num_to_int( (2+max_number_entries()+index-1) 
                                * sizeof_int() ); 
    }
int EPOS::EPOS_Wrapper::last_child ( int  index) [inline, static]

index of last daughter

Definition at line 392 of file EPOS_Wrapper.h.

References byte_num_to_int(), first_child(), max_number_entries(), number_entries(), and sizeof_int().

Referenced by EPOS::IO_EPOS::build_end_vertex(), number_children(), and print_hepcom_particle().

    { 
        // Returns the Index of the LAST child in the EPOS record
        // for particle with Index index.
        // If there is only one child, the last child is forced to 
        // be the same as the first child.
        // If there are no children for this particle, both the first_child
        // and the last_child with return 0.
        // Error checking is done to ensure the child is always
        // within range ( 0 <= parent <= nhep )
        //
        int firstchild = first_child(index);
        int child = byte_num_to_int( (2+4*max_number_entries()+2*(index-1)+1) 
                                     * sizeof_int() ); 
        return ( child > firstchild && child <= number_entries() ) 
                                                ? child : firstchild;
    }
int EPOS::EPOS_Wrapper::last_parent ( int  index) [inline, static]

index of last mother

Definition at line 360 of file EPOS_Wrapper.h.

References byte_num_to_int(), first_parent(), max_number_entries(), number_entries(), dbtoconf::parent, and sizeof_int().

Referenced by EPOS::IO_EPOS::build_production_vertex(), number_parents(), and print_hepcom_particle().

    { 
        // Returns the Index of the LAST parent in the EPOS record
        // for particle with Index index.
        // If there is only one parent, the last parent is forced to 
        // be the same as the first parent.
        // If there are no parents for this particle, both the first_parent
        // and the last_parent with return 0.
        // Error checking is done to ensure the parent is always
        // within range ( 0 <= parent <= nhep )
        //
        int firstparent = first_parent(index);
        int parent = byte_num_to_int( (2+2*max_number_entries()+2*(index-1)+1) 
                                      * sizeof_int() ); 
        return ( parent > firstparent && parent <= number_entries() ) 
                                                   ? parent : firstparent; 
    }
double EPOS::EPOS_Wrapper::m ( int  index) [inline, static]

generated mass

Definition at line 442 of file EPOS_Wrapper.h.

References byte_num_to_double(), max_number_entries(), sizeof_int(), and sizeof_real().

Referenced by EPOS::IO_EPOS::build_particle(), and print_hepcom_particle().

    { 
        return byte_num_to_double( (2+6*max_number_entries())*sizeof_int()
                                 + (5*(index-1)+4) *sizeof_real() );
    }
int EPOS::EPOS_Wrapper::max_number_entries ( ) [inline, static]
int EPOS::EPOS_Wrapper::number_children ( int  index) [inline, static]

number of children

Definition at line 410 of file EPOS_Wrapper.h.

References first_child(), and last_child().

Referenced by EPOS::IO_EPOS::build_end_vertex().

    {
        int firstchild = first_child(index);
        return ( firstchild>0 ) ? 
            ( 1+last_child(index)-firstchild ) : 0;
    }
int EPOS::EPOS_Wrapper::number_entries ( ) [inline, static]

num entries in current evt

Definition at line 336 of file EPOS_Wrapper.h.

References byte_num_to_int(), max_number_entries(), and sizeof_int().

Referenced by EPOS::IO_EPOS::fill_next_event(), first_child(), first_parent(), last_child(), last_parent(), and print_hepcom().

    { 
        int nhep = byte_num_to_int( 1*sizeof_int() );
        return ( nhep <= max_number_entries() ?
                 nhep : max_number_entries() );
    }
int EPOS::EPOS_Wrapper::number_parents ( int  index) [inline, static]

number of parents

Definition at line 378 of file EPOS_Wrapper.h.

References first_parent(), and last_parent().

Referenced by EPOS::IO_EPOS::build_production_vertex().

                                                       {
        int firstparent = first_parent(index);
        return ( firstparent>0 ) ? 
            ( 1+last_parent(index)-firstparent ) : 0;
    }
void EPOS::EPOS_Wrapper::print_hepcom ( std::ostream &  ostr = std::cout) [inline, static]

write information from EPOS common block

Definition at line 568 of file EPOS_Wrapper.h.

References event_number(), i, max_number_entries(), number_entries(), print_hepcom_particle(), print_legend(), sizeof_int(), and sizeof_real().

    {
        ostr << "________________________________________"
             << "________________________________________" << std::endl;
        ostr << "***** HEPEVT Common Event#: " 
             << event_number()
             << ", " << number_entries() << " particles (max "
             << max_number_entries() << ") *****";
        ostr << sizeof_int() << "-byte integers, " 
             << sizeof_real() << "-byte floating point numbers, "
             << max_number_entries() << "-allocated entries." 
             << std::endl;
        print_legend(ostr);
        ostr << "________________________________________"
             << "________________________________________" << std::endl;
        for ( int i=1; i <= number_entries(); ++i ) {
             print_hepcom_particle( i, ostr );
        }
        ostr << "________________________________________"
             << "________________________________________" << std::endl;
    } 
void EPOS::EPOS_Wrapper::print_hepcom_particle ( int  index,
std::ostream &  ostr = std::cout 
) [inline, static]

write particle information to ostr

Definition at line 590 of file EPOS_Wrapper.h.

References e(), first_child(), first_parent(), last_child(), last_parent(), m(), dbtoconf::outline, px(), py(), pz(), status(), t(), x(), y(), and z().

Referenced by print_hepcom().

    {
        char outline[81];
        sprintf( outline,
                 "%4d %+4d %4d %4d    (%9.3g, %9.3g, %9.3g, %9.3g, %9.3g)"
                ,i, status(i), first_parent(i), first_child(i),
                 px(i), py(i), pz(i), e(i), m(i) );
        ostr << outline << "\n";
        sprintf( outline,"%+9d %4d %4d    (%9.3g, %9.3g, %9.3g, %9.3g)",
              // old version was:" (%+9.2e, %+9.2e, %+9.2e, %+9.2e)"
                id(i), last_parent(i), last_child(i), 
                x(i), y(i), z(i), t(i) );
        ostr << outline << std::endl;
    } 
void EPOS::EPOS_Wrapper::print_legend ( std::ostream &  ostr = std::cout) [inline, static, protected]

print output legend

Definition at line 605 of file EPOS_Wrapper.h.

References dbtoconf::outline.

Referenced by print_hepcom().

    {
        char outline[81];
        sprintf( outline,"%4s %4s %4s %5s   %10s, %9s, %9s, %9s, %10s",
                "Indx","Stat","Par-","chil-",
                "(  P_x","P_y","P_z","Energy","M ) ");
        ostr << outline << std::endl;
        sprintf( outline,"%9s %4s %4s    %10s, %9s, %9s, %9s) %9s",
                "ID ","ents","dren",
                "Prod (   X","Y","Z","cT", "[mm]");
        ostr << outline << std::endl;
    }     
double EPOS::EPOS_Wrapper::px ( int  index) [inline, static]

X momentum.

Definition at line 417 of file EPOS_Wrapper.h.

References byte_num_to_double(), max_number_entries(), sizeof_int(), and sizeof_real().

Referenced by EPOS::IO_EPOS::build_particle(), and print_hepcom_particle().

    { 
        return byte_num_to_double( (2+6*max_number_entries())*sizeof_int()
                                 + (5*(index-1)+0) *sizeof_real() );
    }
double EPOS::EPOS_Wrapper::py ( int  index) [inline, static]

Y momentum.

Definition at line 423 of file EPOS_Wrapper.h.

References byte_num_to_double(), max_number_entries(), sizeof_int(), and sizeof_real().

Referenced by EPOS::IO_EPOS::build_particle(), and print_hepcom_particle().

    { 
        return byte_num_to_double( (2+6*max_number_entries())*sizeof_int()
                                 + (5*(index-1)+1) *sizeof_real() );
    }
double EPOS::EPOS_Wrapper::pz ( int  index) [inline, static]

Z momentum.

Definition at line 430 of file EPOS_Wrapper.h.

References byte_num_to_double(), max_number_entries(), sizeof_int(), and sizeof_real().

Referenced by EPOS::IO_EPOS::build_particle(), and print_hepcom_particle().

    { 
        return byte_num_to_double( (2+6*max_number_entries())*sizeof_int()
                                 + (5*(index-1)+2) *sizeof_real() );
    }
void EPOS::EPOS_Wrapper::set_children ( int  index,
int  firstchild,
int  lastchild 
) [inline, static]

define children of a particle

Definition at line 504 of file EPOS_Wrapper.h.

References max_number_entries(), sizeof_int(), and write_byte_num().

Referenced by EPOS::IO_EPOS::write_event(), and zero_everything().

    {
        if ( index <= 0 || index > max_number_entries() ) return;
        write_byte_num( firstchild, (2+4*max_number_entries()+2*(index-1)) 
                                     *sizeof_int() );
        write_byte_num( lastchild, (2+4*max_number_entries()+2*(index-1)+1) 
                                    *sizeof_int() );
    }
void EPOS::EPOS_Wrapper::set_event_number ( int  evtno) [inline, static]

set event number

Definition at line 476 of file EPOS_Wrapper.h.

References write_byte_num().

Referenced by EPOS::IO_EPOS::write_event(), and zero_everything().

    { write_byte_num( evtno, 0 ); }
void EPOS::EPOS_Wrapper::set_id ( int  index,
int  id 
) [inline, static]

set particle ID

Definition at line 488 of file EPOS_Wrapper.h.

References max_number_entries(), sizeof_int(), and write_byte_num().

Referenced by EPOS::IO_EPOS::write_event(), and zero_everything().

    {
        if ( index <= 0 || index > max_number_entries() ) return;
        write_byte_num( id, (2+max_number_entries()+index-1) *sizeof_int() );
    }
void EPOS::EPOS_Wrapper::set_mass ( int  index,
double  mass 
) [inline, static]

set particle mass

Definition at line 528 of file EPOS_Wrapper.h.

References max_number_entries(), sizeof_int(), sizeof_real(), and write_byte_num().

Referenced by EPOS::IO_EPOS::write_event(), and zero_everything().

    {
        if ( index <= 0 || index > max_number_entries() ) return;
        write_byte_num( mass, (2+6*max_number_entries())*sizeof_int()
                              + (5*(index-1)+4) *sizeof_real() );
    }
void EPOS::EPOS_Wrapper::set_max_number_entries ( unsigned int  size) [inline, static]

define size of common block

Definition at line 247 of file EPOS_Wrapper.h.

References s_max_number_entries, and findQualityFiles::size.

void EPOS::EPOS_Wrapper::set_momentum ( int  index,
double  px,
double  py,
double  pz,
double  e 
) [inline, static]

set particle momentum

Definition at line 514 of file EPOS_Wrapper.h.

References max_number_entries(), sizeof_int(), sizeof_real(), and write_byte_num().

Referenced by EPOS::IO_EPOS::write_event(), and zero_everything().

    {
        if ( index <= 0 || index > max_number_entries() ) return;
        write_byte_num( px, (2+6*max_number_entries()) *sizeof_int()
                            + (5*(index-1)+0) *sizeof_real() );
        write_byte_num( py, (2+6*max_number_entries())*sizeof_int()
                            + (5*(index-1)+1) *sizeof_real() );
        write_byte_num( pz, (2+6*max_number_entries())*sizeof_int()
                            + (5*(index-1)+2) *sizeof_real() );
        write_byte_num( e,  (2+6*max_number_entries())*sizeof_int()
                            + (5*(index-1)+3) *sizeof_real() );
    }
void EPOS::EPOS_Wrapper::set_number_entries ( int  noentries) [inline, static]

set number of entries in EPOS

Definition at line 479 of file EPOS_Wrapper.h.

References sizeof_int(), and write_byte_num().

Referenced by EPOS::IO_EPOS::write_event(), and zero_everything().

    { write_byte_num( noentries, 1*sizeof_int() ); }
void EPOS::EPOS_Wrapper::set_parents ( int  index,
int  firstparent,
int  lastparent 
) [inline, static]

define parents of a particle

Definition at line 494 of file EPOS_Wrapper.h.

References max_number_entries(), sizeof_int(), and write_byte_num().

Referenced by EPOS::IO_EPOS::write_event(), and zero_everything().

    {
        if ( index <= 0 || index > max_number_entries() ) return;
        write_byte_num( firstparent, (2+2*max_number_entries()+2*(index-1)) 
                                     *sizeof_int() );
        write_byte_num( lastparent, (2+2*max_number_entries()+2*(index-1)+1) 
                                    * sizeof_int() );
    }
void EPOS::EPOS_Wrapper::set_position ( int  index,
double  x,
double  y,
double  z,
double  t 
) [inline, static]

set particle production vertex

Definition at line 535 of file EPOS_Wrapper.h.

References max_number_entries(), sizeof_int(), sizeof_real(), and write_byte_num().

Referenced by EPOS::IO_EPOS::write_event(), and zero_everything().

    {
        if ( index <= 0 || index > max_number_entries() ) return;
        write_byte_num( x, (2+6*max_number_entries())*sizeof_int()
                           + ( 5*max_number_entries()
                               + (4*(index-1)+0) ) *sizeof_real() );
        write_byte_num( y, (2+6*max_number_entries())*sizeof_int()
                           + ( 5*max_number_entries()
                               + (4*(index-1)+1) ) *sizeof_real() );
        write_byte_num( z, (2+6*max_number_entries())*sizeof_int()
                           + ( 5*max_number_entries()
                               + (4*(index-1)+2) ) *sizeof_real() );
        write_byte_num( t, (2+6*max_number_entries())*sizeof_int()
                           + ( 5*max_number_entries()
                               + (4*(index-1)+3) ) *sizeof_real() );
    }
void EPOS::EPOS_Wrapper::set_sizeof_int ( unsigned int  size) [inline, static]

define size of integer

Definition at line 228 of file EPOS_Wrapper.h.

References dtNoiseDBValidation_cfg::cerr, s_sizeof_int, and findQualityFiles::size.

    {
        if ( size != sizeof(short int) && size != sizeof(long int) && size != sizeof(int) ) {
            std::cerr << "HepMC is not able to handle integers "
                      << " of size other than 2 or 4."
                      << " You requested: " << size << std::endl;
        }
        s_sizeof_int = size;
    }
void EPOS::EPOS_Wrapper::set_sizeof_real ( unsigned int  size) [inline, static]

define size of real

Definition at line 238 of file EPOS_Wrapper.h.

References dtNoiseDBValidation_cfg::cerr, s_sizeof_real, and findQualityFiles::size.

                                                                 {
        if ( size != sizeof(float) && size != sizeof(double) ) {
            std::cerr << "HepMC is not able to handle floating point numbers"
                      << " of size other than 4 or 8."
                      << " You requested: " << size << std::endl;
        }
        s_sizeof_real = size;
    }
void EPOS::EPOS_Wrapper::set_status ( int  index,
int  status 
) [inline, static]

set particle status

Definition at line 482 of file EPOS_Wrapper.h.

References max_number_entries(), sizeof_int(), and write_byte_num().

Referenced by EPOS::IO_EPOS::write_event(), and zero_everything().

    {
        if ( index <= 0 || index > max_number_entries() ) return;
        write_byte_num( status, (2+index-1) * sizeof_int() );
    }
unsigned int EPOS::EPOS_Wrapper::sizeof_int ( ) [inline, static]
unsigned int EPOS::EPOS_Wrapper::sizeof_real ( ) [inline, static]

size of real in bytes

Definition at line 223 of file EPOS_Wrapper.h.

References s_sizeof_real.

Referenced by e(), m(), print_hepcom(), px(), py(), pz(), set_mass(), set_momentum(), set_position(), t(), x(), y(), and z().

{ return s_sizeof_real; }
int EPOS::EPOS_Wrapper::status ( int  index) [inline, static]

status code

Definition at line 343 of file EPOS_Wrapper.h.

References byte_num_to_int(), and sizeof_int().

Referenced by EPOS::IO_EPOS::build_particle(), and print_hepcom_particle().

    { return byte_num_to_int( (2+index-1) * sizeof_int() ); }
double EPOS::EPOS_Wrapper::t ( int  index) [inline, static]
void EPOS::EPOS_Wrapper::write_byte_num ( double  in,
unsigned int  b 
) [inline, static, protected]

pretend common block is an array of bytes

Definition at line 291 of file EPOS_Wrapper.h.

References dtNoiseDBValidation_cfg::cerr, epos_bytes_allocation, hepcom, and s_sizeof_real.

Referenced by set_children(), set_event_number(), set_id(), set_mass(), set_momentum(), set_number_entries(), set_parents(), set_position(), and set_status().

                                                                        {
        if ( b >= epos_bytes_allocation ) std::cerr 
                  << "EPOS_Wrapper: requested hepcom data exceeds allocation"
                  << std::endl;
        if ( s_sizeof_real == sizeof(float) ) {
            float* myfloat = (float*)&hepcom.data[b];
            (*myfloat) = (float)in;
        } else if ( s_sizeof_real == sizeof(double) ) {
            double* mydouble = (double*)&hepcom.data[b];
            (*mydouble) = (double)in;
        } else {
            std::cerr 
                << "EPOS_Wrapper: illegal floating point number length." 
                << s_sizeof_real << std::endl;
        }
    }
void EPOS::EPOS_Wrapper::write_byte_num ( int  in,
unsigned int  b 
) [inline, static, protected]

pretend common block is an array of bytes

Definition at line 308 of file EPOS_Wrapper.h.

References dtNoiseDBValidation_cfg::cerr, epos_bytes_allocation, hepcom, and s_sizeof_int.

                                                                     {
        if ( b >= epos_bytes_allocation ) std::cerr 
                  << "EPOS_Wrapper: requested hepcom data exceeds allocation"
                  << std::endl;
        if ( s_sizeof_int == sizeof(short int) ) {
            short int* myshortint = (short int*)&hepcom.data[b];
            (*myshortint) = (short int)in;
        } else if ( s_sizeof_int == sizeof(long int) ) {
            long int* mylongint = (long int*)&hepcom.data[b];
            (*mylongint) = (int)in;
       // on some 64 bit machines, int, short, and long are all different
        } else if ( s_sizeof_int == sizeof(int) ) {
            int* myint = (int*)&hepcom.data[b];
            (*myint) = (int)in;
        } else {
            std::cerr 
                << "EPOS_Wrapper: illegal integer number length." 
                << s_sizeof_int << std::endl;
        }
    }
double EPOS::EPOS_Wrapper::x ( int  index) [inline, static]
double EPOS::EPOS_Wrapper::y ( int  index) [inline, static]
double EPOS::EPOS_Wrapper::z ( int  index) [inline, static]
void EPOS::EPOS_Wrapper::zero_everything ( ) [inline, static]

set all entries in EPOS to zero

Definition at line 553 of file EPOS_Wrapper.h.

References i, max_number_entries(), set_children(), set_event_number(), set_id(), set_mass(), set_momentum(), set_number_entries(), set_parents(), set_position(), and set_status().

    {
        set_event_number( 0 );
        set_number_entries( 0 );
        for ( int i = 1; i<=max_number_entries(); ++i ) {
           set_status( i, 0 );
           set_id( i, 0 );
           set_parents( i, 0, 0 );
           set_children( i, 0, 0 );
           set_momentum( i, 0, 0, 0, 0 );
           set_mass( i, 0 );
           set_position( i, 0, 0, 0, 0 );
        }
    }

Member Data Documentation

unsigned int EPOS::EPOS_Wrapper::s_max_number_entries = 99900 [static, private]

Definition at line 214 of file EPOS_Wrapper.h.

Referenced by max_number_entries(), and set_max_number_entries().

unsigned int EPOS::EPOS_Wrapper::s_sizeof_int = 4 [static, private]

Definition at line 212 of file EPOS_Wrapper.h.

Referenced by byte_num_to_int(), set_sizeof_int(), sizeof_int(), and write_byte_num().

unsigned int EPOS::EPOS_Wrapper::s_sizeof_real = sizeof(double) [static, private]

Definition at line 213 of file EPOS_Wrapper.h.

Referenced by byte_num_to_double(), set_sizeof_real(), sizeof_real(), and write_byte_num().