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

In This Package:

DayaBay::SimTrigCommandCollection Class Reference

Collection of a detector's SimTrigger Commands. More...

#include <SimTrigCommandCollection.h>

Collaboration diagram for DayaBay::SimTrigCommandCollection:

[legend]
List of all members.

Public Types

typedef std::vector< DayaBay::SimTrigCommand * > CommandContainer
 Container holding the SimTriggerCommands.

Public Member Functions

 SimTrigCommandCollection (DayaBay::SimTrigCommandHeader *header, const DayaBay::Detector &det, const CommandContainer &container)
 Fully Construct.
 SimTrigCommandCollection (const DayaBay::Detector &det, const CommandContainer &container)
 Construct without header.
 SimTrigCommandCollection ()
 Default Constructor.
 ~SimTrigCommandCollection ()
 destructor
std::ostream & fillStream (std::ostream &s) const
 Print the collection.
void addCommand (DayaBay::SimTrigCommand *tc)
 add a trigger command to the collection.
void sort ()
 sort the tirgger command collection.
const DayaBay::SimTrigCommandHeaderheader () const
 Retrieve const SimTrig Command Header in which this collection resides.
void setHeader (DayaBay::SimTrigCommandHeader *value)
 Update SimTrig Command Header in which this collection resides.
const CommandContainercommands () const
 Retrieve const Container holding the triggerCommands.
void setCommands (const CommandContainer &value)
 Update Container holding the triggerCommands.
const DayaBay::Detectordetector () const
 Retrieve const Detector which this collection corresponds to.
void setDetector (const DayaBay::Detector &value)
 Update Detector which this collection corresponds to.

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::SimTrigCommandHeaderm_header
 SimTrig Command Header in which this collection resides.
CommandContainer m_commands
 Container holding the triggerCommands.
DayaBay::Detector m_detector
 Detector which this collection corresponds to.

Detailed Description

Collection of a detector's SimTrigger Commands.

Author:
bseilhan@iit.edu created Mon Apr 11 03:58:06 2011

Definition at line 42 of file SimTrigCommandCollection.h.


Member Typedef Documentation

typedef std::vector<DayaBay::SimTrigCommand*> DayaBay::SimTrigCommandCollection::CommandContainer

Container holding the SimTriggerCommands.

Definition at line 47 of file SimTrigCommandCollection.h.


Constructor & Destructor Documentation

DayaBay::SimTrigCommandCollection::SimTrigCommandCollection ( DayaBay::SimTrigCommandHeader header,
const DayaBay::Detector det,
const CommandContainer container 
) [inline]

Fully Construct.

Definition at line 50 of file SimTrigCommandCollection.h.

00052                                                                 : m_header(header),
00053                                                                      m_commands(container),
00054                                                                      m_detector(det) {}

DayaBay::SimTrigCommandCollection::SimTrigCommandCollection ( const DayaBay::Detector det,
const CommandContainer container 
) [inline]

Construct without header.

Definition at line 57 of file SimTrigCommandCollection.h.

00058                                                                 : m_header(0),
00059                                                                  m_commands(container),
00060                                                                  m_detector(det) {}

DayaBay::SimTrigCommandCollection::SimTrigCommandCollection (  )  [inline]

Default Constructor.

Definition at line 63 of file SimTrigCommandCollection.h.

00063                                : m_header(0),
00064                                  m_commands(),
00065                                  m_detector() {}

DayaBay::SimTrigCommandCollection::~SimTrigCommandCollection (  )  [inline]

destructor

Definition at line 161 of file SimTrigCommandCollection.h.

00162 {
00163 
00164           DayaBay::SimTrigCommandCollection::CommandContainer::iterator it;
00165           for(it=m_commands.begin();it!=m_commands.end();++it) delete *it;
00166         
00167 }


Member Function Documentation

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

Print the collection.

Definition at line 13 of file SimTrigCommandCollection.cc.

00014 {
00015     s << std::endl << "{ ";
00016     s << "trigCommandCollection : ";
00017     s << " {" << std::endl;
00018     s << " Detector:" <<  m_detector.detName() << std::endl;
00019     s << " Header: " << m_header << std::endl;
00020     s << " Contains: " << m_commands.size() << " commands" << std::endl;
00021     
00022     DayaBay::SimTrigCommandCollection::CommandContainer::const_iterator it;
00023     for( it = m_commands.begin() ; it != m_commands.end() ; ++it )
00024     {
00025       s << "{{{" << std::endl;
00026       s << **it << std::endl;
00027       s << "}}}" << std::endl;
00028     }
00029     
00030     s << " }"<< std::endl;
00031     s << " }";
00032     return s;
00033 }

void DayaBay::SimTrigCommandCollection::addCommand ( DayaBay::SimTrigCommand tc  ) 

add a trigger command to the collection.

Definition at line 9 of file SimTrigCommandCollection.cc.

00009                                                                          {
00010   m_commands.push_back(tc);
00011 }

void DayaBay::SimTrigCommandCollection::sort (  ) 

sort the tirgger command collection.

Definition at line 5 of file SimTrigCommandCollection.cc.

00005                                           { 
00006     std::sort(m_commands.begin(), m_commands.end(), DayaBay::SimTrigCommand::LessThan); 
00007 }

const DayaBay::SimTrigCommandHeader * DayaBay::SimTrigCommandCollection::header (  )  const [inline]

Retrieve const SimTrig Command Header in which this collection resides.

Definition at line 169 of file SimTrigCommandCollection.h.

00170 {
00171   return m_header;
00172 }

void DayaBay::SimTrigCommandCollection::setHeader ( DayaBay::SimTrigCommandHeader value  )  [inline]

Update SimTrig Command Header in which this collection resides.

Definition at line 174 of file SimTrigCommandCollection.h.

00175 {
00176   m_header = value;
00177 }

const DayaBay::SimTrigCommandCollection::CommandContainer & DayaBay::SimTrigCommandCollection::commands (  )  const [inline]

Retrieve const Container holding the triggerCommands.

Definition at line 179 of file SimTrigCommandCollection.h.

00180 {
00181   return m_commands;
00182 }

void DayaBay::SimTrigCommandCollection::setCommands ( const CommandContainer value  )  [inline]

Update Container holding the triggerCommands.

Definition at line 184 of file SimTrigCommandCollection.h.

00185 {
00186   m_commands = value;
00187 }

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

Retrieve const Detector which this collection corresponds to.

Definition at line 189 of file SimTrigCommandCollection.h.

00190 {
00191   return m_detector;
00192 }

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

Update Detector which this collection corresponds to.

Definition at line 194 of file SimTrigCommandCollection.h.

00195 {
00196   m_detector = value;
00197 }

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

operator new

Definition at line 106 of file SimTrigCommandCollection.h.

00107     {
00108       return ( sizeof(SimTrigCommandCollection) == size ? 
00109                boost::singleton_pool<SimTrigCommandCollection, sizeof(SimTrigCommandCollection)>::malloc() :
00110                ::operator new(size) );
00111     }

static void* DayaBay::SimTrigCommandCollection::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 116 of file SimTrigCommandCollection.h.

00117     {
00118       return ::operator new (size,pObj);
00119     }

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

operator delete

Definition at line 122 of file SimTrigCommandCollection.h.

00123     {
00124       boost::singleton_pool<SimTrigCommandCollection, sizeof(SimTrigCommandCollection)>::is_from(p) ?
00125       boost::singleton_pool<SimTrigCommandCollection, sizeof(SimTrigCommandCollection)>::free(p) :
00126       ::operator delete(p);
00127     }

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

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

Definition at line 131 of file SimTrigCommandCollection.h.

00132     {
00133       ::operator delete (p, pObj);
00134     }


Member Data Documentation

DayaBay::SimTrigCommandHeader* DayaBay::SimTrigCommandCollection::m_header [private]

SimTrig Command Header in which this collection resides.

Definition at line 140 of file SimTrigCommandCollection.h.

CommandContainer DayaBay::SimTrigCommandCollection::m_commands [private]

Container holding the triggerCommands.

Definition at line 141 of file SimTrigCommandCollection.h.

DayaBay::Detector DayaBay::SimTrigCommandCollection::m_detector [private]

Detector which this collection corresponds to.

Definition at line 142 of file SimTrigCommandCollection.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:30:58 2011 for SimTrigEvent by doxygen 1.4.7