/search.css" rel="stylesheet" type="text/css"/> /search.js">
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

Public Member Functions | Static Public Member Functions | Private Attributes
DayaBay::SimVertexReference Class Reference

A lightweight class to be used like SimVertex*, but it keeps track of indirect references in the case of indirect particles that weren't stored. More...

#include <SimVertexReference.h>

Collaboration diagram for DayaBay::SimVertexReference:
Collaboration graph
[legend]

List of all members.

Public Member Functions

 SimVertexReference ()
 Default Constructor.
 SimVertexReference (SimVertex *t, int indirection)
 Constructor with data.
virtual ~SimVertexReference ()
 Default Destructor.
bool isDirect () const
 Return true if reference is direct.
bool isIndirect () const
 Return true if reference is indirec.
bool isBad () const
 Return true if reference is invalid.
bool isPrimary () const
 This is a special case: no indrection and no vertex means that this is a placeholder for a link to a primary kinetic input.
SimVertexvertex ()
 Access non-const vertex.
std::ostream & fillStream (std::ostream &s) const
 Serialize to an ostream.
const DayaBay::SimVertexvertex () const
 Retrieve const The vertex.
int indirection () const
 Retrieve const The indirection count.

Static Public Member Functions

static void * operator new (size_t size)
 operator new
static void * operator new (size_t size, void *pObj)
 placement operator new it is needed by libstdc++ 3.2.3 (e.g.
static void operator delete (void *p)
 operator delete
static void operator delete (void *p, void *pObj)
 placement operator delete not sure if really needed, but it does not harm

Private Attributes

DayaBay::SimVertexm_vertex
 The vertex.
int m_indirection
 The indirection count.

Detailed Description

A lightweight class to be used like SimVertex*, but it keeps track of indirect references in the case of indirect particles that weren't stored.

Author:
tagg@minos.phy.tufts.edu created Thu Dec 5 18:05:49 2013

Definition at line 41 of file SimVertexReference.h.


Constructor & Destructor Documentation

DayaBay::SimVertexReference::SimVertexReference ( ) [inline]

Default Constructor.

Definition at line 46 of file SimVertexReference.h.

                       : m_vertex(0),
                           m_indirection(-999) {}
DayaBay::SimVertexReference::SimVertexReference ( SimVertex t,
int  indirection 
) [inline]

Constructor with data.

Definition at line 50 of file SimVertexReference.h.

virtual DayaBay::SimVertexReference::~SimVertexReference ( ) [inline, virtual]

Default Destructor.

Definition at line 55 of file SimVertexReference.h.

{}

Member Function Documentation

bool DayaBay::SimVertexReference::isDirect ( ) const [inline]

Return true if reference is direct.

Definition at line 150 of file SimVertexReference.h.

{
  return (m_indirection == 0);
}
bool DayaBay::SimVertexReference::isIndirect ( ) const [inline]

Return true if reference is indirec.

Definition at line 155 of file SimVertexReference.h.

{
  return (m_indirection > 0);
}
bool DayaBay::SimVertexReference::isBad ( ) const [inline]

Return true if reference is invalid.

Definition at line 160 of file SimVertexReference.h.

{
  return (m_indirection < 0);
}
bool DayaBay::SimVertexReference::isPrimary ( ) const [inline]

This is a special case: no indrection and no vertex means that this is a placeholder for a link to a primary kinetic input.

Definition at line 165 of file SimVertexReference.h.

{
  return(m_vertex==0)&&(m_indirection==0);
}
DayaBay::SimVertex * DayaBay::SimVertexReference::vertex ( ) [inline]

Access non-const vertex.

Definition at line 170 of file SimVertexReference.h.

{
  return m_vertex;
}
std::ostream & DayaBay::SimVertexReference::fillStream ( std::ostream &  s) const

Serialize to an ostream.

Definition at line 3 of file SimVertexReference.cc.

{
    s << "{ " << "vertex :      ";
    if (m_vertex) s << *m_vertex;
    else s << "NULL";
    s << std::endl
      << "indirection : " << m_indirection << std::endl << " }";
    return s;
}
const DayaBay::SimVertex * DayaBay::SimVertexReference::vertex ( ) const [inline]

Retrieve const The vertex.

Definition at line 140 of file SimVertexReference.h.

{
  return m_vertex;
}
int DayaBay::SimVertexReference::indirection ( ) const [inline]

Retrieve const The indirection count.

Definition at line 145 of file SimVertexReference.h.

{
  return m_indirection;
}
static void* DayaBay::SimVertexReference::operator new ( size_t  size) [inline, static]

operator new

Definition at line 86 of file SimVertexReference.h.

    {
      return ( sizeof(SimVertexReference) == size ? 
               boost::singleton_pool<SimVertexReference, sizeof(SimVertexReference)>::malloc() :
               ::operator new(size) );
    }
static void* DayaBay::SimVertexReference::operator new ( size_t  size,
void *  pObj 
) [inline, static]

placement operator new it is needed by libstdc++ 3.2.3 (e.g.

in std::vector) it is not needed in libstdc++ >= 3.4

Definition at line 96 of file SimVertexReference.h.

    {
      return ::operator new (size,pObj);
    }
static void DayaBay::SimVertexReference::operator delete ( void *  p) [inline, static]

operator delete

Definition at line 102 of file SimVertexReference.h.

    {
      boost::singleton_pool<SimVertexReference, sizeof(SimVertexReference)>::is_from(p) ?
      boost::singleton_pool<SimVertexReference, sizeof(SimVertexReference)>::free(p) :
      ::operator delete(p);
    }
static void DayaBay::SimVertexReference::operator delete ( void *  p,
void *  pObj 
) [inline, static]

placement operator delete not sure if really needed, but it does not harm

Definition at line 111 of file SimVertexReference.h.

    {
      ::operator delete (p, pObj);
    }

Member Data Documentation

The vertex.

Definition at line 120 of file SimVertexReference.h.

The indirection count.

Definition at line 121 of file SimVertexReference.h.


The documentation for this class was generated from the following files:
| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

Generated on Fri May 16 2014 10:05:28 for SimEvent by doxygen 1.7.4