| Classes | Job Modules | Data Objects | Services | Algorithms | Tools | Packages | Directories | Tracs |

In This Package:

DayaBay::SimHitCollection Class Reference

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

#include <SimHitCollection.h>

Collaboration diagram for DayaBay::SimHitCollection:

[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 Mon Apr 11 03:59:56 2011

Definition at line 43 of file SimHitCollection.h.


Member Typedef Documentation

typedef std::vector<DayaBay::SimHit*> DayaBay::SimHitCollection::hit_container

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.

00053                                                 : m_header(header),
00054                                                      m_detector(det),
00055                                                      m_collection(hits) {}

DayaBay::SimHitCollection::SimHitCollection (  )  [inline]

Default Constructor.

Definition at line 58 of file SimHitCollection.h.

00058                        : m_header(0),
00059                          m_detector(),
00060                          m_collection() {}

DayaBay::SimHitCollection::~SimHitCollection (  ) 

Destructor.

Definition at line 4 of file SimHitCollection.cc.

00005 {
00006     m_header = 0;
00007     hit_container::iterator it, done = m_collection.end();
00008     for (it = m_collection.begin(); it != done; ++it) {
00009         delete *it;
00010     }
00011     m_collection.clear();
00012 }


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.

00015 {
00016     return m_collection;
00017 }

std::ostream & DayaBay::SimHitCollection::fillStream ( std::ostream &  s  )  const

Print the collection.

Definition at line 19 of file SimHitCollection.cc.

00020 {
00021     size_t siz = m_collection.size();
00022 
00023     s << "{ " 
00024       << siz << " hits : " << std::endl;
00025     
00026     hit_container::const_iterator it, done = m_collection.end();
00027     for (it=m_collection.begin(); it != done; ++it) {
00028         s << *(*it) << std::endl;
00029     }
00030     s << "}";
00031     return s;
00032 }

const DayaBay::SimHitHeader * DayaBay::SimHitCollection::header (  )  const [inline]

Retrieve const The SimHitHeader holding this collection.

Definition at line 153 of file SimHitCollection.h.

00154 {
00155   return m_header;
00156 }

void DayaBay::SimHitCollection::setHeader ( DayaBay::SimHitHeader value  )  [inline]

Update The SimHitHeader holding this collection.

Definition at line 158 of file SimHitCollection.h.

00159 {
00160   m_header = value;
00161 }

const DayaBay::Detector & DayaBay::SimHitCollection::detector (  )  const [inline]

Retrieve const The detector for these SimHits.

Definition at line 163 of file SimHitCollection.h.

00164 {
00165   return m_detector;
00166 }

void DayaBay::SimHitCollection::setDetector ( const DayaBay::Detector value  )  [inline]

Update The detector for these SimHits.

Definition at line 168 of file SimHitCollection.h.

00169 {
00170   m_detector = value;
00171 }

const DayaBay::SimHitCollection::hit_container & DayaBay::SimHitCollection::collection (  )  const [inline]

Retrieve const Collection of SimHits.

Definition at line 173 of file SimHitCollection.h.

00174 {
00175   return m_collection;
00176 }

void DayaBay::SimHitCollection::setCollection ( const hit_container value  )  [inline]

Update Collection of SimHits.

Definition at line 178 of file SimHitCollection.h.

00179 {
00180   m_collection = value;
00181 }

static void* DayaBay::SimHitCollection::operator new ( size_t  size  )  [inline, static]

operator new

Definition at line 98 of file SimHitCollection.h.

00099     {
00100       return ( sizeof(SimHitCollection) == size ? 
00101                boost::singleton_pool<SimHitCollection, sizeof(SimHitCollection)>::malloc() :
00102                ::operator new(size) );
00103     }

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.

00109     {
00110       return ::operator new (size,pObj);
00111     }

static void DayaBay::SimHitCollection::operator delete ( void *  p  )  [inline, static]

operator delete

Definition at line 114 of file SimHitCollection.h.

00115     {
00116       boost::singleton_pool<SimHitCollection, sizeof(SimHitCollection)>::is_from(p) ?
00117       boost::singleton_pool<SimHitCollection, sizeof(SimHitCollection)>::free(p) :
00118       ::operator delete(p);
00119     }

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.

00124     {
00125       ::operator delete (p, pObj);
00126     }


Member Data Documentation

DayaBay::SimHitHeader* DayaBay::SimHitCollection::m_header [private]

The SimHitHeader holding this collection.

Definition at line 132 of file SimHitCollection.h.

DayaBay::Detector DayaBay::SimHitCollection::m_detector [private]

The detector for these SimHits.

Definition at line 133 of file SimHitCollection.h.

hit_container DayaBay::SimHitCollection::m_collection [private]

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 Mon Apr 11 20:31:30 2011 for SimEvent by doxygen 1.4.7