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

Basic information about the run. More...

#include <RunData.h>

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

List of all members.

Public Types

typedef std::vector
< DayaBay::Detector
DetectorContainer
 Detector collection type.
typedef std::vector
< DayaBay::CalibSource
CalibSources
 List of active calibration sources.

Public Member Functions

 RunData ()
 Default Constructor.
 RunData (const RunData &rh)
 Copy Constructor.
RunDataoperator= (const RunData &rh)
 Assignment operator.
virtual ~RunData ()
 Default Destructor.
bool hasDetector (const DayaBay::Detector &detector) const
 Return true if the detector was active in this run.
bool hasSource (const DayaBay::CalibSourceId &sourceId) const
 Return true if the calibration source was active in the run.
CalibSourcegetSource (const DayaBay::CalibSourceId &sourceId)
 Return the calibration source information in this run.
std::ostream & fillStream (std::ostream &s) const
 Print the run data.
int runNumber () const
 Retrieve const The run number.
void setRunNumber (int value)
 Update The run number.
const DayaBay::RunType::RunType_trunType () const
 Retrieve const The run type.
void setRunType (const DayaBay::RunType::RunType_t &value)
 Update The run type.
const DetectorContainerdetectors () const
 Retrieve const Detectors active in this run.
void setDetectors (const DetectorContainer &value)
 Update Detectors active in this run.
const TimeStampstartTime () const
 Retrieve const Start time of the run.
void setStartTime (const TimeStamp &value)
 Update Start time of the run.
const TimeStampendTime () const
 Retrieve const End time of the run.
void setEndTime (const TimeStamp &value)
 Update End time of the run.
const CalibSourcescalibSources () const
 Retrieve const List of active calibration sources.
void setCalibSources (const CalibSources &value)
 Update List of active calibration sources.

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

int m_runNumber
 The run number.
DayaBay::RunType::RunType_t m_runType
 The run type.
DetectorContainer m_detectors
 Detectors active in this run.
TimeStamp m_startTime
 Start time of the run.
TimeStamp m_endTime
 End time of the run.
CalibSources m_calibSources
 List of active calibration sources.

Detailed Description

Basic information about the run.

Author:
dandwyer@caltech.edu created Thu Dec 5 17:46:42 2013

Definition at line 44 of file RunData.h.


Member Typedef Documentation

Detector collection type.

Definition at line 49 of file RunData.h.

List of active calibration sources.

Definition at line 51 of file RunData.h.


Constructor & Destructor Documentation

DayaBay::RunData::RunData ( ) [inline]

Default Constructor.

Definition at line 54 of file RunData.h.

DayaBay::RunData::RunData ( const RunData rh) [inline]

Copy Constructor.

Definition at line 189 of file RunData.h.

                                                        : 
   m_runNumber( rh.m_runNumber ),
   m_runType( rh.m_runType ),
   m_detectors( rh.m_detectors ),
   m_startTime( rh.m_startTime ),
   m_endTime( rh.m_endTime ),
   m_calibSources( rh.m_calibSources )
   {}
virtual DayaBay::RunData::~RunData ( ) [inline, virtual]

Default Destructor.

Definition at line 68 of file RunData.h.

{}

Member Function Documentation

DayaBay::RunData & DayaBay::RunData::operator= ( const RunData rh) [inline]

Assignment operator.

Definition at line 198 of file RunData.h.

                                                                           {
  if ( this != &rh ) {
    m_runNumber    = rh.m_runNumber;
    m_runType      = rh.m_runType;
    m_detectors    = rh.m_detectors;
    m_startTime    = rh.m_startTime;
    m_endTime      = rh.m_endTime;
    m_calibSources = rh.m_calibSources;
  }
  return *this;
}
bool DayaBay::RunData::hasDetector ( const DayaBay::Detector detector) const [inline]

Return true if the detector was active in this run.

Definition at line 270 of file RunData.h.

{

          return (std::find(m_detectors.begin(), m_detectors.end(), detector)
                  != m_detectors.end());
        
}
bool DayaBay::RunData::hasSource ( const DayaBay::CalibSourceId sourceId) const [inline]

Return true if the calibration source was active in the run.

Definition at line 278 of file RunData.h.

{

            DayaBay::RunData::CalibSources::const_iterator srcIter, srcDone
               = m_calibSources.end();
            for (srcIter=m_calibSources.begin(); srcIter != srcDone; ++srcIter){
                if( (*srcIter).id() == sourceId ) return true;
            }
            return false;
        
}
DayaBay::CalibSource * DayaBay::RunData::getSource ( const DayaBay::CalibSourceId sourceId) [inline]

Return the calibration source information in this run.

Definition at line 290 of file RunData.h.

{

            DayaBay::RunData::CalibSources::iterator srcIter, srcDone
               = m_calibSources.end();
            for (srcIter=m_calibSources.begin(); srcIter != srcDone; ++srcIter){
                if( (*srcIter).id() == sourceId ) return &(*srcIter);
            }
            return 0;
        
}
std::ostream & DayaBay::RunData::fillStream ( std::ostream &  s) const

Print the run data.

Definition at line 3 of file RunData.cc.

{
  s << " run number: " << m_runNumber << std::endl;
  s << " run type: " << DayaBay::RunType::AsString(m_runType) << std::endl;
  size_t siz = m_detectors.size();
  s << "{ " 
    << siz << " detectors : " << std::endl;
  
  DayaBay::RunData::DetectorContainer::const_iterator it, done 
    = m_detectors.end();
  for (it=m_detectors.begin(); it != done; ++it) {
    s << *it << std::endl;
  }
  s << "}";
  s << " start time: " << m_startTime << std::endl;
  s << " end time: " << m_endTime << std::endl;

  // Calibration source information
  s << "{  active calibration sources : " << std::endl;
  s << "       number of sources: " << m_calibSources.size() << std::endl;
  DayaBay::RunData::CalibSources::const_iterator srcIter, srcDone
    = m_calibSources.end();
  for (srcIter=m_calibSources.begin(); srcIter != srcDone; ++srcIter) {
    s << "      " << *srcIter << std::endl;
  }
  s << "}";

  return s;
}
int DayaBay::RunData::runNumber ( ) const [inline]

Retrieve const The run number.

Definition at line 210 of file RunData.h.

{
  return m_runNumber;
}
void DayaBay::RunData::setRunNumber ( int  value) [inline]

Update The run number.

Definition at line 215 of file RunData.h.

{
  m_runNumber = value;
}
const DayaBay::RunType::RunType_t & DayaBay::RunData::runType ( ) const [inline]

Retrieve const The run type.

Definition at line 220 of file RunData.h.

{
  return m_runType;
}
void DayaBay::RunData::setRunType ( const DayaBay::RunType::RunType_t value) [inline]

Update The run type.

Definition at line 225 of file RunData.h.

{
  m_runType = value;
}
const DayaBay::RunData::DetectorContainer & DayaBay::RunData::detectors ( ) const [inline]

Retrieve const Detectors active in this run.

Definition at line 230 of file RunData.h.

{
  return m_detectors;
}
void DayaBay::RunData::setDetectors ( const DetectorContainer value) [inline]

Update Detectors active in this run.

Definition at line 235 of file RunData.h.

{
  m_detectors = value;
}
const TimeStamp & DayaBay::RunData::startTime ( ) const [inline]

Retrieve const Start time of the run.

Definition at line 240 of file RunData.h.

{
  return m_startTime;
}
void DayaBay::RunData::setStartTime ( const TimeStamp value) [inline]

Update Start time of the run.

Definition at line 245 of file RunData.h.

{
  m_startTime = value;
}
const TimeStamp & DayaBay::RunData::endTime ( ) const [inline]

Retrieve const End time of the run.

Definition at line 250 of file RunData.h.

{
  return m_endTime;
}
void DayaBay::RunData::setEndTime ( const TimeStamp value) [inline]

Update End time of the run.

Definition at line 255 of file RunData.h.

{
  m_endTime = value;
}
const DayaBay::RunData::CalibSources & DayaBay::RunData::calibSources ( ) const [inline]

Retrieve const List of active calibration sources.

Definition at line 260 of file RunData.h.

{
  return m_calibSources;
}
void DayaBay::RunData::setCalibSources ( const CalibSources value) [inline]

Update List of active calibration sources.

Definition at line 265 of file RunData.h.

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

operator new

Definition at line 133 of file RunData.h.

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

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

operator delete

Definition at line 149 of file RunData.h.

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

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

Definition at line 158 of file RunData.h.

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

Member Data Documentation

The run number.

Definition at line 167 of file RunData.h.

The run type.

Definition at line 168 of file RunData.h.

Detectors active in this run.

Definition at line 169 of file RunData.h.

Start time of the run.

Definition at line 170 of file RunData.h.

End time of the run.

Definition at line 171 of file RunData.h.

List of active calibration sources.

Definition at line 172 of file RunData.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:00:09 for RunData by doxygen 1.7.4