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

Header for SimTrigger Command information. More...

#include <SimTrigCommandHeader.h>

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

List of all members.

Public Types

typedef std::map
< DayaBay::Detector,
DayaBay::SimTrigCommandCollection * > 
detCollMap
 Detector to SimTriggerCommandCollection map.

Public Member Functions

 SimTrigCommandHeader (DayaBay::SimTrigHeader *header)
 Create with pointer to SimTrigHeader.
 SimTrigCommandHeader ()
 Default Constructor.
 ~SimTrigCommandHeader ()
 destructor
std::ostream & fillStream (std::ostream &s) const
 Print the header.
void addCommand (DayaBay::SimTrigCommand *tc)
 add a trigger command to the appropriate collection.
void addCollection (DayaBay::SimTrigCommandCollection *tcc)
 add a command collection.
const DayaBay::SimTrigHeaderheader () const
 Retrieve const SimTrig Header in which this CommandHeader resides.
void setHeader (DayaBay::SimTrigHeader *value)
 Update SimTrig Header in which this CommandHeader resides.
const DayaBay::Detectordetector () const
 Retrieve const Detector which SimTriggerCommandHeader belongs.
void setDetector (const DayaBay::Detector &value)
 Update Detector which SimTriggerCommandHeader belongs.
const detCollMapcollections () const
 Retrieve const Map from detector to collection.

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::SimTrigHeaderm_header
 SimTrig Header in which this CommandHeader resides.
DayaBay::Detector m_detector
 Detector which SimTriggerCommandHeader belongs.
detCollMap m_collections
 Map from detector to collection.

Detailed Description

Header for SimTrigger Command information.

Author:
bseilhan@iit.edu created Thu Dec 5 18:04:34 2013

Definition at line 44 of file SimTrigCommandHeader.h.


Member Typedef Documentation

Detector to SimTriggerCommandCollection map.

Definition at line 49 of file SimTrigCommandHeader.h.


Constructor & Destructor Documentation

DayaBay::SimTrigCommandHeader::SimTrigCommandHeader ( DayaBay::SimTrigHeader header) [inline]

Create with pointer to SimTrigHeader.

Definition at line 52 of file SimTrigCommandHeader.h.

                                                     : m_header(header),
                                                          m_collections() {}
DayaBay::SimTrigCommandHeader::SimTrigCommandHeader ( ) [inline]

Default Constructor.

Definition at line 56 of file SimTrigCommandHeader.h.

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

destructor

Definition at line 152 of file SimTrigCommandHeader.h.

{

          DayaBay::SimTrigCommandHeader::detCollMap::iterator it;
          for(it=m_collections.begin();
              it!=m_collections.end();
              ++it){
                delete it->second;
           }
        
}

Member Function Documentation

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

Print the header.

Definition at line 17 of file SimTrigCommandHeader.cc.

{
    s << std::endl << "{ ";
    s << "trigCommandHeader : ";
    s << "\tDetector: " << m_detector.detName() << std::endl;
    s << "\tContains " << m_collections.size()
      << " CommandCollections:" << std::endl;
    s << "  {" << std::endl;

    DayaBay::SimTrigCommandHeader::detCollMap::const_iterator it;

    for(it = m_collections.begin(); it != m_collections.end(); ++it)
    {
      s << "{{" << std::endl;
      s << "Detector: " << (it->first).detName() << std::endl;
      s << *(it->second) << std::endl;
      s << "}}" << std::endl;
    }

    s << "  }" << std::endl;
    s << std::endl;
    s << " }";
    return s;
}
void DayaBay::SimTrigCommandHeader::addCommand ( DayaBay::SimTrigCommand tc)

add a trigger command to the appropriate collection.

Definition at line 3 of file SimTrigCommandHeader.cc.

                                                                     {
  DayaBay::Detector det(tc->detector());
  detCollMap::iterator it = m_collections.find(det);
  if (it == m_collections.end())
    std::cerr << "addCommand(): cannot find collection for detector "<<det<<std::endl;
  m_collections[det]->addCommand(tc);
}
void DayaBay::SimTrigCommandHeader::addCollection ( DayaBay::SimTrigCommandCollection tcc)

add a command collection.

Definition at line 11 of file SimTrigCommandHeader.cc.

                                                                                   {
  DayaBay::Detector det(tcc->detector());
  delete m_collections[det];
  m_collections[det]=tcc;
}
const DayaBay::SimTrigHeader * DayaBay::SimTrigCommandHeader::header ( ) const [inline]

Retrieve const SimTrig Header in which this CommandHeader resides.

Definition at line 164 of file SimTrigCommandHeader.h.

{
  return m_header;
}
void DayaBay::SimTrigCommandHeader::setHeader ( DayaBay::SimTrigHeader value) [inline]

Update SimTrig Header in which this CommandHeader resides.

Definition at line 169 of file SimTrigCommandHeader.h.

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

Retrieve const Detector which SimTriggerCommandHeader belongs.

Definition at line 174 of file SimTrigCommandHeader.h.

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

Update Detector which SimTriggerCommandHeader belongs.

Definition at line 179 of file SimTrigCommandHeader.h.

{
  m_detector = value;
}
const DayaBay::SimTrigCommandHeader::detCollMap & DayaBay::SimTrigCommandHeader::collections ( ) const [inline]

Retrieve const Map from detector to collection.

Definition at line 184 of file SimTrigCommandHeader.h.

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

operator new

Definition at line 95 of file SimTrigCommandHeader.h.

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

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

operator delete

Definition at line 111 of file SimTrigCommandHeader.h.

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

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

Definition at line 120 of file SimTrigCommandHeader.h.

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

Member Data Documentation

SimTrig Header in which this CommandHeader resides.

Definition at line 129 of file SimTrigCommandHeader.h.

Detector which SimTriggerCommandHeader belongs.

Definition at line 130 of file SimTrigCommandHeader.h.

Map from detector to collection.

Definition at line 131 of file SimTrigCommandHeader.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:16 for SimTrigEvent by doxygen 1.7.4