/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::SimTrackReference Class Reference

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

#include <SimTrackReference.h>

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

List of all members.

Public Member Functions

 SimTrackReference ()
 Default Constructor.
 SimTrackReference (SimTrack *t, int indirection)
 Constructor with data.
virtual ~SimTrackReference ()
 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 track means that this is a placeholder for a link to a primary kinetic input.
SimTracktrack ()
 Access non-const track.
std::ostream & fillStream (std::ostream &s) const
 Serialize to an ostream.
const DayaBay::SimTracktrack () const
 Retrieve const The track.
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::SimTrackm_track
 The track.
int m_indirection
 The indirection count.

Detailed Description

A lightweight class to be used like SimTrack*, 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:52 2013

Definition at line 41 of file SimTrackReference.h.


Constructor & Destructor Documentation

DayaBay::SimTrackReference::SimTrackReference ( ) [inline]

Default Constructor.

Definition at line 46 of file SimTrackReference.h.

                      : m_track(0),
                          m_indirection(-999) {}
DayaBay::SimTrackReference::SimTrackReference ( SimTrack t,
int  indirection 
) [inline]

Constructor with data.

Definition at line 50 of file SimTrackReference.h.

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

Default Destructor.

Definition at line 55 of file SimTrackReference.h.

{}

Member Function Documentation

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

Return true if reference is direct.

Definition at line 150 of file SimTrackReference.h.

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

Return true if reference is indirec.

Definition at line 155 of file SimTrackReference.h.

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

Return true if reference is invalid.

Definition at line 160 of file SimTrackReference.h.

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

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

Definition at line 165 of file SimTrackReference.h.

{
  return(m_track==0)&&(m_indirection==0);
}
DayaBay::SimTrack * DayaBay::SimTrackReference::track ( ) [inline]

Access non-const track.

Definition at line 170 of file SimTrackReference.h.

{
  return m_track;
}
std::ostream & DayaBay::SimTrackReference::fillStream ( std::ostream &  s) const

Serialize to an ostream.

Definition at line 3 of file SimTrackReference.cc.

{
    s << "{ " << "track :       ";
    if (m_track) s << *m_track;
    else s << "NULL";
    s << std::endl
      << "indirection : " << m_indirection << std::endl << " }";
    return s;
}
const DayaBay::SimTrack * DayaBay::SimTrackReference::track ( ) const [inline]

Retrieve const The track.

Definition at line 140 of file SimTrackReference.h.

{
  return m_track;
}
int DayaBay::SimTrackReference::indirection ( ) const [inline]

Retrieve const The indirection count.

Definition at line 145 of file SimTrackReference.h.

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

operator new

Definition at line 86 of file SimTrackReference.h.

    {
      return ( sizeof(SimTrackReference) == size ? 
               boost::singleton_pool<SimTrackReference, sizeof(SimTrackReference)>::malloc() :
               ::operator new(size) );
    }
static void* DayaBay::SimTrackReference::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 SimTrackReference.h.

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

operator delete

Definition at line 102 of file SimTrackReference.h.

    {
      boost::singleton_pool<SimTrackReference, sizeof(SimTrackReference)>::is_from(p) ?
      boost::singleton_pool<SimTrackReference, sizeof(SimTrackReference)>::free(p) :
      ::operator delete(p);
    }
static void DayaBay::SimTrackReference::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 SimTrackReference.h.

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

Member Data Documentation

The track.

Definition at line 120 of file SimTrackReference.h.

The indirection count.

Definition at line 121 of file SimTrackReference.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