Jpp master_rocky-44-g75b7c4f75
the software that should make you happy
Loading...
Searching...
No Matches
JFIT::JHistory::is_event Struct Reference

Auxiliary class to test history. More...

#include <JHistory.hh>

Public Member Functions

 is_event (int type)
 Constructor.
 
 is_event (const JHistory &history)
 Constructor.
 
bool operator() (const JHistory &history) const
 Test history.
 

Public Attributes

int type
 

Detailed Description

Auxiliary class to test history.

Definition at line 105 of file JHistory.hh.

Constructor & Destructor Documentation

◆ is_event() [1/2]

JFIT::JHistory::is_event::is_event ( int type)
inline

Constructor.

Parameters
typeapplication type

Definition at line 111 of file JHistory.hh.

112 {
113 this->type = type;
114 }

◆ is_event() [2/2]

JFIT::JHistory::is_event::is_event ( const JHistory & history)
inline

Constructor.

Parameters
historyhistory

Definition at line 122 of file JHistory.hh.

123 {
124 if (!history.empty())
125 this->type = history.rbegin()->type;
126 else
127 this->type = -1;
128 }

Member Function Documentation

◆ operator()()

bool JFIT::JHistory::is_event::operator() ( const JHistory & history) const
inline

Test history.

Parameters
historyhistory
Returns
true if given history ends with specified event type; else false

Definition at line 137 of file JHistory.hh.

138 {
139 if (!history.empty()) {
140 return history.rbegin()->type == this->type;
141 }
142
143 return false;
144 }

Member Data Documentation

◆ type

int JFIT::JHistory::is_event::type

Definition at line 146 of file JHistory.hh.


The documentation for this struct was generated from the following file: