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

In This Package:

Public Types | Public Member Functions | Static Public Member Functions | Private Attributes
DayaBay::SimHitCollection Class Reference

Collection of a detector's simulated hits. More...

#include <SimHitCollection.h>

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

List of all members.

Public Types

typedef std::vector
< DayaBay::SimHit * > 
hit_container
 The collection type.

Public Member Functions

 SimHitCollection (DayaBay::SimHitHeader *header, const DayaBay::Detector &det, const hit_container &hits)
 Fully construct.
 SimHitCollection ()
 Default Constructor.
 ~SimHitCollection ()
 Destructor.
hit_containercollection ()
 Access the hit_container as non-const.
std::ostream & fillStream (std::ostream &s) const
 Print the collection.
const DayaBay::SimHitHeaderheader () const
 Retrieve const The SimHitHeader holding this collection.
void setHeader (DayaBay::SimHitHeader *value)
 Update The SimHitHeader holding this collection.
const DayaBay::Detectordetector () const
 Retrieve const The detector for these SimHits.
void setDetector (const DayaBay::Detector &value)
 Update The detector for these SimHits.
const hit_containercollection () const
 Retrieve const Collection of SimHits.
void setCollection (const hit_container &value)
 Update Collection of SimHits.

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::SimHitHeaderm_header
 The SimHitHeader holding this collection.
DayaBay::Detector m_detector
 The detector for these SimHits.
hit_container m_collection
 Collection of SimHits.

Detailed Description

Collection of a detector's simulated hits.

Author:
bv@bnl.gov created Thu Dec 5 18:05:50 2013

Definition at line 43 of file SimHitCollection.h.


Member Typedef Documentation

The collection type.

Definition at line 48 of file SimHitCollection.h.


Constructor & Destructor Documentation

DayaBay::SimHitCollection::SimHitCollection ( DayaBay::SimHitHeader header,
const DayaBay::Detector det,
const hit_container hits 
) [inline]

Fully construct.

Definition at line 51 of file SimHitCollection.h.

                                                : m_header(header),
                                                     m_detector(det),
                                                     m_collection(hits) {}
DayaBay::SimHitCollection::SimHitCollection ( ) [inline]

Default Constructor.

Definition at line 58 of file SimHitCollection.h.

DayaBay::SimHitCollection::~SimHitCollection ( )

Destructor.

Definition at line 4 of file SimHitCollection.cc.

{
    m_header = 0;
    hit_container::iterator it, done = m_collection.end();
    for (it = m_collection.begin(); it != done; ++it) {
        delete *it;
    }
    m_collection.clear();
}

Member Function Documentation

DayaBay::SimHitCollection::hit_container & DayaBay::SimHitCollection::collection ( )

Access the hit_container as non-const.

Definition at line 14 of file SimHitCollection.cc.

{
    return m_collection;
}
std::ostream & DayaBay::SimHitCollection::fillStream ( std::ostream &  s) const

Print the collection.

Definition at line 19 of file SimHitCollection.cc.

{
    size_t siz = m_collection.size();

    s << "{ " 
      << siz << " hits : " << std::endl;
    
    hit_container::const_iterator it, done = m_collection.end();
    for (it=m_collection.begin(); it != done; ++it) {
        s << *(*it) << std::endl;
    }
    s << "}";
    return s;
}
const DayaBay::SimHitHeader * DayaBay::SimHitCollection::header ( ) const [inline]

Retrieve const The SimHitHeader holding this collection.

Definition at line 153 of file SimHitCollection.h.

{
  return m_header;
}
void DayaBay::SimHitCollection::setHeader ( DayaBay::SimHitHeader value) [inline]

Update The SimHitHeader holding this collection.

Definition at line 158 of file SimHitCollection.h.

{
  m_header = value;
}
const DayaBay::Detector & DayaBay::SimHitCollection::detector ( ) const [inline]

Retrieve const The detector for these SimHits.

Definition at line 163 of file SimHitCollection.h.

{
  return m_detector;
}
void DayaBay::SimHitCollection::setDetector ( const DayaBay::Detector value) [inline]

Update The detector for these SimHits.

Definition at line 168 of file SimHitCollection.h.

{
  m_detector = value;
}
const DayaBay::SimHitCollection::hit_container & DayaBay::SimHitCollection::collection ( ) const [inline]

Retrieve const Collection of SimHits.

Definition at line 173 of file SimHitCollection.h.

{
  return m_collection;
}
void DayaBay::SimHitCollection::setCollection ( const hit_container value) [inline]

Update Collection of SimHits.

Definition at line 178 of file SimHitCollection.h.

{
  m_collection = value;
}
static void* DayaBay::SimHitCollection::operator new ( size_t  size) [inline, static]

operator new

Definition at line 98 of file SimHitCollection.h.

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

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

operator delete

Definition at line 114 of file SimHitCollection.h.

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

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

Definition at line 123 of file SimHitCollection.h.

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

Member Data Documentation

The SimHitHeader holding this collection.

Definition at line 132 of file SimHitCollection.h.

The detector for these SimHits.

Definition at line 133 of file SimHitCollection.h.

Collection of SimHits.

Definition at line 134 of file SimHitCollection.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