#include <RunData.h>
Collaboration diagram for DayaBay::RunData:
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. | |
RunData & | operator= (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. | |
CalibSource * | getSource (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_t & | runType () const |
Retrieve const The run type. | |
void | setRunType (const DayaBay::RunType::RunType_t &value) |
Update The run type. | |
const DetectorContainer & | detectors () const |
Retrieve const Detectors active in this run. | |
void | setDetectors (const DetectorContainer &value) |
Update Detectors active in this run. | |
const TimeStamp & | startTime () const |
Retrieve const Start time of the run. | |
void | setStartTime (const TimeStamp &value) |
Update Start time of the run. | |
const TimeStamp & | endTime () const |
Retrieve const End time of the run. | |
void | setEndTime (const TimeStamp &value) |
Update End time of the run. | |
const CalibSources & | calibSources () 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. |
Definition at line 44 of file RunData.h.
typedef std::vector<DayaBay::Detector> DayaBay::RunData::DetectorContainer |
typedef std::vector<DayaBay::CalibSource> DayaBay::RunData::CalibSources |
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] |
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] |
void DayaBay::RunData::setRunType | ( | const DayaBay::RunType::RunType_t & | value | ) | [inline] |
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] |
void DayaBay::RunData::setEndTime | ( | const TimeStamp & | value | ) | [inline] |
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] |
static void* DayaBay::RunData::operator new | ( | size_t | size, | |
void * | pObj | |||
) | [inline, static] |
static void DayaBay::RunData::operator delete | ( | void * | p | ) | [inline, static] |
static void DayaBay::RunData::operator delete | ( | void * | p, | |
void * | pObj | |||
) | [inline, static] |
int DayaBay::RunData::m_runNumber [private] |
TimeStamp DayaBay::RunData::m_startTime [private] |
TimeStamp DayaBay::RunData::m_endTime [private] |
CalibSources DayaBay::RunData::m_calibSources [private] |