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 99 of file JHistory.hh.
◆ JHistory() [1/3]
JFIT::JHistory::JHistory |
( |
| ) |
|
|
inline |
◆ JHistory() [2/3]
JFIT::JHistory::JHistory |
( |
const int | type | ) |
|
|
inline |
Constructor.
- Parameters
-
Definition at line 196 of file JHistory.hh.
196 :
198 {
200 }
JHistory & add(const int type)
Add event to history.
◆ JHistory() [3/3]
JFIT::JHistory::JHistory |
( |
const JHistory & | history, |
|
|
const int | type ) |
|
inline |
Constructor.
- Parameters
-
history | history |
type | application type |
Definition at line 209 of file JHistory.hh.
◆ ~JHistory()
virtual JFIT::JHistory::~JHistory |
( |
| ) |
|
|
inlinevirtual |
◆ getHistory() [1/2]
const JHistory & JFIT::JHistory::getHistory |
( |
| ) |
const |
|
inline |
Get history.
- Returns
- histtory
Definition at line 229 of file JHistory.hh.
230 {
231 return static_cast<const JHistory&
>(*this);
232 }
JHistory()
Default constructor.
◆ getHistory() [2/2]
JHistory & JFIT::JHistory::getHistory |
( |
| ) |
|
|
inline |
Get history.
- Returns
- histtory
Definition at line 240 of file JHistory.hh.
241 {
242 return static_cast<JHistory&
>(*this);
243 }
◆ 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 252 of file JHistory.hh.
253 {
254 for (const_iterator i = this->begin(); i != this->end(); ++i) {
255 if (i->type == type) {
256 return true;
257 }
258 }
259
260 return false;
261 }
◆ 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 270 of file JHistory.hh.
271 {
272 if (this->size() == types.size()) {
273
274 for (size_t i = 0; i != this->size(); ++i) {
275 if ((*this)[i].type != types[i]) {
276 return false;
277 }
278 }
279
280 return true;
281
282 } else {
283
284 return false;
285 }
286 }
◆ add()
JHistory & JFIT::JHistory::add |
( |
const int | type | ) |
|
|
inline |
Add event to history.
- Parameters
-
- Returns
- this history
Definition at line 295 of file JHistory.hh.
296 {
298
299 return *this;
300 }
Data structure for start_event tag.
◆ hasParentUUID()
bool JFIT::JHistory::hasParentUUID |
( |
| ) |
const |
|
inline |
Has parent UUID.
Definition at line 306 of file JHistory.hh.
307 {
308 return this->size() >= 2u;
309 }
◆ getUUID()
const JUUID & JFIT::JHistory::getUUID |
( |
| ) |
const |
|
inline |
Get UUID.
Definition at line 315 of file JHistory.hh.
316 {
317 return this->at(this->size() - 1).uuid;
318 }
◆ getParentUUID()
const JUUID & JFIT::JHistory::getParentUUID |
( |
| ) |
const |
|
inline |
Get parent UUID.
Definition at line 324 of file JHistory.hh.
325 {
326 return this->at(this->size() - 2).uuid;
327 }
◆ 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 337 of file JHistory.hh.
338 {
340
341 for (const_iterator i = history.begin(); i != history.end(); ++i) {
342 out << *i << endl;
343 }
344
345 return out;
346 }
The documentation for this struct was generated from the following file: