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

In This Package:

DayaBay::RunData Class Reference

Basic information about the run. More...

#include <RunData.h>

Collaboration diagram for DayaBay::RunData:

[legend]
List of all members.

Public Types

typedef std::vector< DayaBay::DetectorDetectorContainer
 Detector collection type.
typedef std::vector< DayaBay::CalibSourceCalibSources
 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 Mon Apr 11 03:37:44 2011

Definition at line 44 of file RunData.h.


Member Typedef Documentation

typedef std::vector<DayaBay::Detector> DayaBay::RunData::DetectorContainer

Detector collection type.

Definition at line 49 of file RunData.h.

typedef std::vector<DayaBay::CalibSource> DayaBay::RunData::CalibSources

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.

00054               : m_runNumber(0),
00055                 m_runType(DayaBay::RunType::kUnknown),
00056                 m_detectors(),
00057                 m_startTime(0),
00058                 m_endTime(0),
00059                 m_calibSources() {}

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

Copy Constructor.

Definition at line 189 of file RunData.h.

00189                                                         : 
00190    m_runNumber( rh.m_runNumber ),
00191    m_runType( rh.m_runType ),
00192    m_detectors( rh.m_detectors ),
00193    m_startTime( rh.m_startTime ),
00194    m_endTime( rh.m_endTime ),
00195    m_calibSources( rh.m_calibSources )
00196    {}

virtual DayaBay::RunData::~RunData (  )  [inline, virtual]

Default Destructor.

Definition at line 68 of file RunData.h.

00068 {}


Member Function Documentation

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

Assignment operator.

Definition at line 198 of file RunData.h.

00198                                                                            {
00199   if ( this != &rh ) {
00200     m_runNumber    = rh.m_runNumber;
00201     m_runType      = rh.m_runType;
00202     m_detectors    = rh.m_detectors;
00203     m_startTime    = rh.m_startTime;
00204     m_endTime      = rh.m_endTime;
00205     m_calibSources = rh.m_calibSources;
00206   }
00207   return *this;
00208 }

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.

00271 {
00272 
00273           return (std::find(m_detectors.begin(), m_detectors.end(), detector)
00274                   != m_detectors.end());
00275         
00276 }

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.

00279 {
00280 
00281             DayaBay::RunData::CalibSources::const_iterator srcIter, srcDone
00282                = m_calibSources.end();
00283             for (srcIter=m_calibSources.begin(); srcIter != srcDone; ++srcIter){
00284                 if( (*srcIter).id() == sourceId ) return true;
00285             }
00286             return false;
00287         
00288 }

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.

00291 {
00292 
00293             DayaBay::RunData::CalibSources::iterator srcIter, srcDone
00294                = m_calibSources.end();
00295             for (srcIter=m_calibSources.begin(); srcIter != srcDone; ++srcIter){
00296                 if( (*srcIter).id() == sourceId ) return &(*srcIter);
00297             }
00298             return 0;
00299         
00300 }

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

Print the run data.

Definition at line 3 of file RunData.cc.

00004 {
00005   s << " run number: " << m_runNumber << std::endl;
00006   s << " run type: " << DayaBay::RunType::AsString(m_runType) << std::endl;
00007   size_t siz = m_detectors.size();
00008   s << "{ " 
00009     << siz << " detectors : " << std::endl;
00010   
00011   DayaBay::RunData::DetectorContainer::const_iterator it, done 
00012     = m_detectors.end();
00013   for (it=m_detectors.begin(); it != done; ++it) {
00014     s << *it << std::endl;
00015   }
00016   s << "}";
00017   s << " start time: " << m_startTime << std::endl;
00018   s << " end time: " << m_endTime << std::endl;
00019 
00020   // Calibration source information
00021   s << "{  active calibration sources : " << std::endl;
00022   s << "       number of sources: " << m_calibSources.size() << std::endl;
00023   DayaBay::RunData::CalibSources::const_iterator srcIter, srcDone
00024     = m_calibSources.end();
00025   for (srcIter=m_calibSources.begin(); srcIter != srcDone; ++srcIter) {
00026     s << "      " << *srcIter << std::endl;
00027   }
00028   s << "}";
00029 
00030   return s;
00031 }

int DayaBay::RunData::runNumber (  )  const [inline]

Retrieve const The run number.

Definition at line 210 of file RunData.h.

00211 {
00212   return m_runNumber;
00213 }

void DayaBay::RunData::setRunNumber ( int  value  )  [inline]

Update The run number.

Definition at line 215 of file RunData.h.

00216 {
00217   m_runNumber = value;
00218 }

const DayaBay::RunType::RunType_t & DayaBay::RunData::runType (  )  const [inline]

Retrieve const The run type.

Definition at line 220 of file RunData.h.

00221 {
00222   return m_runType;
00223 }

void DayaBay::RunData::setRunType ( const DayaBay::RunType::RunType_t value  )  [inline]

Update The run type.

Definition at line 225 of file RunData.h.

00226 {
00227   m_runType = value;
00228 }

const DayaBay::RunData::DetectorContainer & DayaBay::RunData::detectors (  )  const [inline]

Retrieve const Detectors active in this run.

Definition at line 230 of file RunData.h.

00231 {
00232   return m_detectors;
00233 }

void DayaBay::RunData::setDetectors ( const DetectorContainer value  )  [inline]

Update Detectors active in this run.

Definition at line 235 of file RunData.h.

00236 {
00237   m_detectors = value;
00238 }

const TimeStamp & DayaBay::RunData::startTime (  )  const [inline]

Retrieve const Start time of the run.

Definition at line 240 of file RunData.h.

00241 {
00242   return m_startTime;
00243 }

void DayaBay::RunData::setStartTime ( const TimeStamp value  )  [inline]

Update Start time of the run.

Definition at line 245 of file RunData.h.

00246 {
00247   m_startTime = value;
00248 }

const TimeStamp & DayaBay::RunData::endTime (  )  const [inline]

Retrieve const End time of the run.

Definition at line 250 of file RunData.h.

00251 {
00252   return m_endTime;
00253 }

void DayaBay::RunData::setEndTime ( const TimeStamp value  )  [inline]

Update End time of the run.

Definition at line 255 of file RunData.h.

00256 {
00257   m_endTime = value;
00258 }

const DayaBay::RunData::CalibSources & DayaBay::RunData::calibSources (  )  const [inline]

Retrieve const List of active calibration sources.

Definition at line 260 of file RunData.h.

00261 {
00262   return m_calibSources;
00263 }

void DayaBay::RunData::setCalibSources ( const CalibSources value  )  [inline]

Update List of active calibration sources.

Definition at line 265 of file RunData.h.

00266 {
00267   m_calibSources = value;
00268 }

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

operator new

Definition at line 133 of file RunData.h.

00134     {
00135       return ( sizeof(RunData) == size ? 
00136                boost::singleton_pool<RunData, sizeof(RunData)>::malloc() :
00137                ::operator new(size) );
00138     }

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.

00144     {
00145       return ::operator new (size,pObj);
00146     }

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

operator delete

Definition at line 149 of file RunData.h.

00150     {
00151       boost::singleton_pool<RunData, sizeof(RunData)>::is_from(p) ?
00152       boost::singleton_pool<RunData, sizeof(RunData)>::free(p) :
00153       ::operator delete(p);
00154     }

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.

00159     {
00160       ::operator delete (p, pObj);
00161     }


Member Data Documentation

int DayaBay::RunData::m_runNumber [private]

The run number.

Definition at line 167 of file RunData.h.

DayaBay::RunType::RunType_t DayaBay::RunData::m_runType [private]

The run type.

Definition at line 168 of file RunData.h.

DetectorContainer DayaBay::RunData::m_detectors [private]

Detectors active in this run.

Definition at line 169 of file RunData.h.

TimeStamp DayaBay::RunData::m_startTime [private]

Start time of the run.

Definition at line 170 of file RunData.h.

TimeStamp DayaBay::RunData::m_endTime [private]

End time of the run.

Definition at line 171 of file RunData.h.

CalibSources DayaBay::RunData::m_calibSources [private]

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 Mon Apr 11 20:22:13 2011 for RunData by doxygen 1.4.7