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

Top level header for all detector Readout data. More...

#include <ReadoutHeader.h>

Inheritance diagram for DayaBay::ReadoutHeader:
Inheritance graph
[legend]
Collaboration diagram for DayaBay::ReadoutHeader:
Collaboration graph
[legend]

List of all members.

Public Types

typedef std::vector< IHeader * > Vector
typedef std::vector< const
IHeader * > 
ConstVector

Public Member Functions

virtual const std::string & defLoc () const
 ReadoutHeader ()
 Default Constructor.
 ~ReadoutHeader ()
 destructor
virtual const CLID & clID () const
virtual std::ostream & fillStream (std::ostream &s) const
 Fill the ASCII output stream.
const DayaBay::DaqCratedaqCrate () const
 Returns the DaqCrate held by this object.
const DayaBay::Readoutreadout () const
 Retrieve const Readout Data associated with one trigger in one detector.
void setReadout (DayaBay::Readout *value)
 Update Readout Data associated with one trigger in one detector.
void setDaqCrate (const DayaBay::DaqCrate *value)
 Update Readout Data associated with one trigger in one detector.
virtual const std::string & defLoc ()
void setInputHeaders (const std::vector< const DayaBay::IHeader * > &iheaders)
void clearInputHeaders ()
void addInputHeader (const DayaBay::IHeader *iheader)
const TimeStamptimeStamp () const
void setTimeStamp (const TimeStamp &ts)
const std::vector< const
DayaBay::IHeader * > 
findHeaders (const CLID &clid) const
const std::vector< const
DayaBay::IHeader * > 
findHeaders (const std::string &name) const
const Contextcontext () const
void setContext (const Context &value)
int execNumber () const
void setExecNumber (int value)
const std::vector< unsigned
long > & 
randomState () const
void setRandomState (const std::vector< unsigned long > &value)
const std::vector< const
DayaBay::IHeader * > & 
inputHeaders () const
const DayaBay::JobIdjobId () const
void setJobId (const DayaBay::JobId &value)
virtual void setOutputAddress (const GenericAddress *roa)
virtual void setInputAddress (const GenericAddress *ria)
virtual const TimeStampearliest () const
void setEarliest (const TimeStamp &value)
virtual const TimeStamplatest () const
void setLatest (const TimeStamp &value)
virtual const GenericAddress * outputAddress () const
virtual const GenericAddress * inputAddress () const

Static Public Member Functions

static const std::string & defaultLocation ()
 Give access to default location from class scope.
static const CLID & classID ()
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::Readoutm_readout
 Readout Data associated with one trigger in one detector.
const DayaBay::DaqCratem_daqCrate
 Readout Data associated with one trigger in one detector.

Detailed Description

Top level header for all detector Readout data.

Author:
dandwyer@caltech.edu created Thu Dec 5 17:52:30 2013

Definition at line 51 of file ReadoutHeader.h.


Constructor & Destructor Documentation

DayaBay::ReadoutHeader::ReadoutHeader ( ) [inline]

Default Constructor.

Definition at line 60 of file ReadoutHeader.h.

                    : m_readout(0),
                      m_daqCrate(0) {}
DayaBay::ReadoutHeader::~ReadoutHeader ( ) [inline]

destructor

Definition at line 145 of file ReadoutHeader.h.

{

          delete m_daqCrate;
          delete m_readout;
        
}

Member Function Documentation

static const std::string& DayaBay::ReadoutHeader::defaultLocation ( ) [inline, static]

Give access to default location from class scope.

Reimplemented from DayaBay::HeaderObject.

Definition at line 56 of file ReadoutHeader.h.

virtual const std::string& DayaBay::ReadoutHeader::defLoc ( ) const [inline, virtual]

Reimplemented from DayaBay::HeaderObject.

Definition at line 57 of file ReadoutHeader.h.

const CLID & DayaBay::ReadoutHeader::clID ( ) const [inline, virtual]

Reimplemented from DayaBay::HeaderObject.

Definition at line 153 of file ReadoutHeader.h.

const CLID & DayaBay::ReadoutHeader::classID ( ) [inline, static]

Reimplemented from DayaBay::HeaderObject.

Definition at line 158 of file ReadoutHeader.h.

{
  return CLID_ReadoutHeader;
}
std::ostream & DayaBay::ReadoutHeader::fillStream ( std::ostream &  s) const [inline, virtual]

Fill the ASCII output stream.

Reimplemented from DayaBay::HeaderObject.

Definition at line 163 of file ReadoutHeader.h.

{
  HeaderObject::fillStream(s);
  s << "{ " << "readout :       " << m_readout << std::endl
            << "daqCrate :      " << m_daqCrate << std::endl << " }";
  return s;
}
const DayaBay::DaqCrate * DayaBay::ReadoutHeader::daqCrate ( ) const

Returns the DaqCrate held by this object.

Definition at line 29 of file ReadoutHeader.cc.

                                                            {
    if (0 == m_daqCrate) {
        // Create DAQ crate if necessary.
        IDaqReadoutSvc* daqReadoutSvc = getDaqReadoutSvc();
        if (0 != daqReadoutSvc) {
            if (daqReadoutSvc->isGenerating()) {
                const DayaBay::Detector& detector = m_readout->detector();
                ReadoutPmtCrate* pmtCrate;
                ReadoutRpcCrate* rpcCrate;
                if (0 != (pmtCrate = dynamic_cast<ReadoutPmtCrate*>(m_readout))) {
                    const DayaBay::DaqCrate** crate = const_cast<const DayaBay::DaqCrate**>(&m_daqCrate);
                    *(crate) = pmtCrate->daqCrate(daqReadoutSvc->runNumber(detector),
                                  daqReadoutSvc->nextEventNumber(detector),
                                  daqReadoutSvc->ltbSlot(detector));
                } else if (0 != (rpcCrate = dynamic_cast<ReadoutRpcCrate*>(m_readout))) {
                    const DayaBay::DaqCrate** crate = const_cast<const DayaBay::DaqCrate**>(&m_daqCrate);
                    // FIXME: what is the DaqCrate's ltbSlot for? Need to treat the number in proper way, not hardcoded.
                    int rtmSlot = 3;
                    *(crate) = rpcCrate->daqCrate(daqReadoutSvc->runNumber(detector),
                                  daqReadoutSvc->nextEventNumber(detector), rtmSlot);
                }
            }
        }
    }
    return m_daqCrate;

}
const DayaBay::Readout * DayaBay::ReadoutHeader::readout ( ) const [inline]

Retrieve const Readout Data associated with one trigger in one detector.

Definition at line 172 of file ReadoutHeader.h.

{
  return m_readout;
}
void DayaBay::ReadoutHeader::setReadout ( DayaBay::Readout value) [inline]

Update Readout Data associated with one trigger in one detector.

Definition at line 177 of file ReadoutHeader.h.

{
  m_readout = value;
}
void DayaBay::ReadoutHeader::setDaqCrate ( const DayaBay::DaqCrate value) [inline]

Update Readout Data associated with one trigger in one detector.

Definition at line 182 of file ReadoutHeader.h.

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

operator new

Reimplemented from DayaBay::HeaderObject.

Definition at line 91 of file ReadoutHeader.h.

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

Reimplemented from DayaBay::HeaderObject.

Definition at line 101 of file ReadoutHeader.h.

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

operator delete

Reimplemented from DayaBay::HeaderObject.

Definition at line 107 of file ReadoutHeader.h.

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

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

Reimplemented from DayaBay::HeaderObject.

Definition at line 116 of file ReadoutHeader.h.

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

Member Data Documentation

Readout Data associated with one trigger in one detector.

Definition at line 125 of file ReadoutHeader.h.

Readout Data associated with one trigger in one detector.

Definition at line 126 of file ReadoutHeader.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:01:16 for ReadoutEvent by doxygen 1.7.4