Container for historical events.
More...
#include <JHistory.hh>
|
std::ostream & | operator<< (std::ostream &out, const JHistory &history) |
| Write history to output stream.
|
|
Container for historical events.
Definition at line 128 of file JHistory.hh.
◆ JHistory() [1/4]
JFIT::JHistory::JHistory |
( |
| ) |
|
|
inline |
◆ JHistory() [2/4]
JFIT::JHistory::JHistory |
( |
const JEvent & | event | ) |
|
|
inline |
◆ JHistory() [3/4]
JFIT::JHistory::JHistory |
( |
const int | type | ) |
|
|
inline |
Constructor.
- Parameters
-
Definition at line 249 of file JHistory.hh.
249 :
251 {}
Data structure for start_event tag.
◆ JHistory() [4/4]
JFIT::JHistory::JHistory |
( |
const JHistory & | history, |
|
|
const JEvent & | event ) |
|
inline |
Constructor.
- Parameters
-
history | history |
event | event |
Definition at line 260 of file JHistory.hh.
261 :
263 {
264 push_back(event);
265 }
◆ ~JHistory()
virtual JFIT::JHistory::~JHistory |
( |
| ) |
|
|
inlinevirtual |
◆ getHistory() [1/2]
const JHistory & JFIT::JHistory::getHistory |
( |
| ) |
const |
|
inline |
Get history.
- Returns
- histtory
Definition at line 280 of file JHistory.hh.
281 {
282 return static_cast<const JHistory&
>(*this);
283 }
JHistory()
Default constructor.
◆ getHistory() [2/2]
JHistory & JFIT::JHistory::getHistory |
( |
| ) |
|
|
inline |
Get history.
- Returns
- histtory
Definition at line 291 of file JHistory.hh.
292 {
293 return static_cast<JHistory&
>(*this);
294 }
◆ has()
bool JFIT::JHistory::has |
( |
const int | type | ) |
const |
|
inline |
Has event in history.
- Parameters
-
- Returns
- true if given event in history; else false
Definition at line 303 of file JHistory.hh.
304 {
305 for (const_iterator i = this->begin(); i != this->end(); ++i) {
306 if (i->type == type) {
307 return true;
308 }
309 }
310
311 return false;
312 }
◆ getStatus()
bool JFIT::JHistory::getStatus |
( |
const std::vector< int > & | types | ) |
const |
|
inline |
Get status.
- Parameters
-
- Returns
- true if history matches appplication types; else false
Definition at line 321 of file JHistory.hh.
322 {
323 if (this->size() == types.size()) {
324
325 for (size_t i = 0; i != this->size(); ++i) {
326 if ((*this)[i].type != types[i]) {
327 return false;
328 }
329 }
330
331 return true;
332
333 } else {
334
335 return false;
336 }
337 }
◆ add()
JHistory & JFIT::JHistory::add |
( |
const int | type | ) |
|
|
inline |
Add event to history.
- Parameters
-
- Returns
- this history
Definition at line 346 of file JHistory.hh.
347 {
349
350 return *this;
351 }
◆ hasParentUUID()
bool JFIT::JHistory::hasParentUUID |
( |
| ) |
const |
|
inline |
Has parent UUID.
Definition at line 357 of file JHistory.hh.
358 {
359 return this->size() >= 2u;
360 }
◆ getUUID()
const JUUID & JFIT::JHistory::getUUID |
( |
| ) |
const |
|
inline |
Get UUID.
Definition at line 366 of file JHistory.hh.
367 {
368 return this->at(this->size() - 1).uuid;
369 }
◆ getParentUUID()
const JUUID & JFIT::JHistory::getParentUUID |
( |
| ) |
const |
|
inline |
Get parent UUID.
Definition at line 375 of file JHistory.hh.
376 {
377 return this->at(this->size() - 2).uuid;
378 }
◆ ClassDef()
JFIT::JHistory::ClassDef |
( |
JHistory | , |
|
|
2 | ) |
◆ operator<<
std::ostream & operator<< |
( |
std::ostream & | out, |
|
|
const JHistory & | history ) |
|
friend |
Write history to output stream.
- Parameters
-
out | output stream |
history | history |
- Returns
- output stream
Definition at line 388 of file JHistory.hh.
389 {
391
392 for (const_iterator i = history.begin(); i != history.end(); ++i) {
393 out << *i << endl;
394 }
395
396 return out;
397 }
The documentation for this struct was generated from the following file: