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

In This Package:

DayaBay::TemporalDataObject Class Reference

Base class for any object participating in the time window. More...

#include <TemporalDataObject.h>

Inheritance diagram for DayaBay::TemporalDataObject:

[legend]
Collaboration diagram for DayaBay::TemporalDataObject:
[legend]
List of all members.

Public Member Functions

 TemporalDataObject ()
 Default Constructor.
 ~TemporalDataObject ()
 destructor
virtual const CLIDclID () const
virtual std::ostream & fillStream (std::ostream &s) const
 Fill the ASCII output stream.
virtual const std::string & defLoc ()
 Default location in the TES for this type of object.
virtual void setOutputAddress (const GenericAddress *roa)
 Set the output address when this header object is written out.
virtual void setInputAddress (const GenericAddress *ria)
 Set the input address when this header object is read in.
virtual const TimeStampearliest () const
 Retrieve const The earliest time of the existence of the object.
void setEarliest (const TimeStamp &value)
 Update The earliest time of the existence of the object.
virtual const TimeStamplatest () const
 Retrieve const The latest time of the existence of the object.
void setLatest (const TimeStamp &value)
 Update The latest time of the existence of the object.
virtual const GenericAddressoutputAddress () const
 Retrieve const Output address containing output stream, entry and path (base class of RootIOAddress).
virtual const GenericAddressinputAddress () const
 Retrieve const Input address containing input stream, entry and path (base class of RootIOAddress).
void setRegistry (IRegistry *pRegistry)
IRegistryregistry () const
LinkManagerlinkMgr () const
unsigned char version () const
void setVersion (unsigned char vsn)
unsigned long refCount () const
virtual unsigned long addRef ()
virtual unsigned long release ()
const std::string & name () const
virtual StreamBufferserialize (StreamBuffer &s)
virtual StreamBufferserialize (StreamBuffer &s) const

Static Public Member Functions

static const CLIDclassID ()
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

TimeStamp m_earliest
 The earliest time of the existence of the object.
TimeStamp m_latest
 The latest time of the existence of the object.
GenericAddressm_outputAddress
 Output address containing output stream, entry and path (base class of RootIOAddress).
GenericAddressm_inputAddress
 Input address containing input stream, entry and path (base class of RootIOAddress).

Friends

friend std::ostream & operator<< (std::ostream &s, const DataObject &obj)

Detailed Description

Base class for any object participating in the time window.

Author:
bv@bnl.gov created Mon Apr 11 03:25:54 2011

Definition at line 46 of file TemporalDataObject.h.


Constructor & Destructor Documentation

DayaBay::TemporalDataObject::TemporalDataObject (  )  [inline]

Default Constructor.

Definition at line 51 of file TemporalDataObject.h.

00051                          : m_earliest(),
00052                            m_latest(),
00053                            m_outputAddress(0),
00054                            m_inputAddress(0) {}

DayaBay::TemporalDataObject::~TemporalDataObject (  ) 

destructor

Definition at line 6 of file TemporalDataObject.cc.

00007 {
00008   if(m_outputAddress!=0) {
00009     m_outputAddress->release();
00010   }
00011   if(m_inputAddress!=0) {
00012     m_inputAddress->release();
00013   }
00014 }


Member Function Documentation

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

Reimplemented from DataObject.

Reimplemented in DayaBay::HeaderObject, and DayaBay::RegistrationSequence.

Definition at line 156 of file TemporalDataObject.h.

00157 {
00158   return DayaBay::TemporalDataObject::classID();
00159 }

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

Reimplemented from DataObject.

Reimplemented in DayaBay::HeaderObject, and DayaBay::RegistrationSequence.

Definition at line 161 of file TemporalDataObject.h.

00162 {
00163   return CLID_TemporalDataObject;
00164 }

std::ostream & DayaBay::TemporalDataObject::fillStream ( std::ostream &  s  )  const [inline, virtual]

Fill the ASCII output stream.

Reimplemented from DataObject.

Reimplemented in DayaBay::HeaderObject, and DayaBay::RegistrationSequence.

Definition at line 166 of file TemporalDataObject.h.

00167 {
00168   ITemporal::fillStream(s);
00169   s << "{ " << "earliest :      " << m_earliest << std::endl
00170             << "latest :        " << m_latest << std::endl
00171             << "outputAddress : " << m_outputAddress << std::endl
00172             << "inputAddress :  " << m_inputAddress << std::endl << " }";
00173   return s;
00174 }

const std::string & DayaBay::TemporalDataObject::defLoc (  )  [virtual]

Default location in the TES for this type of object.

Definition at line 17 of file TemporalDataObject.cc.

00018 {
00019     cerr << "TemporalDataObject::defLoc() called.  Some method did not define a default location!" << endl;
00020     static string empty("");
00021     return empty;
00022 }

void DayaBay::TemporalDataObject::setOutputAddress ( const GenericAddress roa  )  [virtual]

Set the output address when this header object is written out.

Definition at line 26 of file TemporalDataObject.cc.

00027 {
00028   // bad input
00029   if(roa==0) {
00030     return;
00031   }
00032     
00033   // prepare to set
00034   if(m_outputAddress!=0) {
00035     m_outputAddress->release();
00036   }
00037 
00038   GenericAddress* non_const_roa=const_cast<GenericAddress*>(roa);
00039 
00040   m_outputAddress=non_const_roa;
00041   m_outputAddress->addRef();
00042 }

void DayaBay::TemporalDataObject::setInputAddress ( const GenericAddress ria  )  [virtual]

Set the input address when this header object is read in.

Definition at line 46 of file TemporalDataObject.cc.

00047 {
00048   // bad input
00049   if(ria==0) {
00050     return;
00051   }
00052 
00053   // prepare to set
00054   if(m_inputAddress!=0) {
00055     m_inputAddress->release();
00056   }
00057 
00058   GenericAddress* non_const_ria=const_cast<GenericAddress*>(ria);
00059 
00060   m_inputAddress=non_const_ria;
00061   m_inputAddress->addRef();
00062 }

const TimeStamp & DayaBay::TemporalDataObject::earliest (  )  const [inline, virtual]

Retrieve const The earliest time of the existence of the object.

Implements DayaBay::ITemporal.

Definition at line 177 of file TemporalDataObject.h.

00178 {
00179   return m_earliest;
00180 }

void DayaBay::TemporalDataObject::setEarliest ( const TimeStamp value  )  [inline, virtual]

Update The earliest time of the existence of the object.

Implements DayaBay::ITemporal.

Definition at line 182 of file TemporalDataObject.h.

00183 {
00184   m_earliest = value;
00185 }

const TimeStamp & DayaBay::TemporalDataObject::latest (  )  const [inline, virtual]

Retrieve const The latest time of the existence of the object.

Implements DayaBay::ITemporal.

Definition at line 187 of file TemporalDataObject.h.

00188 {
00189   return m_latest;
00190 }

void DayaBay::TemporalDataObject::setLatest ( const TimeStamp value  )  [inline, virtual]

Update The latest time of the existence of the object.

Implements DayaBay::ITemporal.

Definition at line 192 of file TemporalDataObject.h.

00193 {
00194   m_latest = value;
00195 }

const GenericAddress * DayaBay::TemporalDataObject::outputAddress (  )  const [inline, virtual]

Retrieve const Output address containing output stream, entry and path (base class of RootIOAddress).

Definition at line 197 of file TemporalDataObject.h.

00198 {
00199   return m_outputAddress;
00200 }

const GenericAddress * DayaBay::TemporalDataObject::inputAddress (  )  const [inline, virtual]

Retrieve const Input address containing input stream, entry and path (base class of RootIOAddress).

Definition at line 202 of file TemporalDataObject.h.

00203 {
00204   return m_inputAddress;
00205 }

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

operator new

Reimplemented from DayaBay::ITemporal.

Reimplemented in DayaBay::HeaderObject, and DayaBay::RegistrationSequence.

Definition at line 102 of file TemporalDataObject.h.

00103     {
00104       return ( sizeof(TemporalDataObject) == size ? 
00105                boost::singleton_pool<TemporalDataObject, sizeof(TemporalDataObject)>::malloc() :
00106                ::operator new(size) );
00107     }

static void* DayaBay::TemporalDataObject::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::ITemporal.

Reimplemented in DayaBay::HeaderObject, and DayaBay::RegistrationSequence.

Definition at line 112 of file TemporalDataObject.h.

00113     {
00114       return ::operator new (size,pObj);
00115     }

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

operator delete

Reimplemented from DayaBay::ITemporal.

Reimplemented in DayaBay::HeaderObject, and DayaBay::RegistrationSequence.

Definition at line 118 of file TemporalDataObject.h.

00119     {
00120       boost::singleton_pool<TemporalDataObject, sizeof(TemporalDataObject)>::is_from(p) ?
00121       boost::singleton_pool<TemporalDataObject, sizeof(TemporalDataObject)>::free(p) :
00122       ::operator delete(p);
00123     }

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

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

Reimplemented from DayaBay::ITemporal.

Reimplemented in DayaBay::HeaderObject, and DayaBay::RegistrationSequence.

Definition at line 127 of file TemporalDataObject.h.

00128     {
00129       ::operator delete (p, pObj);
00130     }


Member Data Documentation

TimeStamp DayaBay::TemporalDataObject::m_earliest [private]

The earliest time of the existence of the object.

Definition at line 136 of file TemporalDataObject.h.

TimeStamp DayaBay::TemporalDataObject::m_latest [private]

The latest time of the existence of the object.

Definition at line 137 of file TemporalDataObject.h.

GenericAddress* DayaBay::TemporalDataObject::m_outputAddress [private]

Output address containing output stream, entry and path (base class of RootIOAddress).

Definition at line 138 of file TemporalDataObject.h.

GenericAddress* DayaBay::TemporalDataObject::m_inputAddress [private]

Input address containing input stream, entry and path (base class of RootIOAddress).

Definition at line 139 of file TemporalDataObject.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:18:03 2011 for BaseEvent by doxygen 1.4.7