1#ifndef __JRECONSTRUCTION__JHISTORY__
2#define __JRECONSTRUCTION__JHISTORY__
57 this->
git = getGITVersion();
58 this->
date = getDateAndTime();
64 uniform_int_distribution<uint32_t>
generator(1, numeric_limits<uint32_t>::max());
66 uint32_t* value =
reinterpret_cast<uint32_t*
>(&(this->
uuid.
uuid));
68 for (
int i = 0; i != 3; ++i) {
88 uint32_t* value =
reinterpret_cast<uint32_t*
>(&(this->
uuid.
uuid));
107 out << setw(3) << right <<
event.type <<
' '
108 << setw(36) << left <<
event.uuid <<
' '
109 << setw(20) << left <<
event.git <<
' '
110 << setw(20) << left <<
event.date << right;
144 for (JHistory::const_iterator i = history.begin(); i != history.end(); ++i) {
145 this->push_back(i->type);
186 return !history.empty() && history.rbegin()->type == this->
type;
219 return count_if(history.begin(), history.end(), make_predicate(&
JEvent::type, this->
type)) == 0;
282 return static_cast<const JHistory&
>(*this);
293 return static_cast<JHistory&
>(*this);
303 bool has(
const int type)
const
305 for (const_iterator i = this->begin(); i != this->end(); ++i) {
306 if (i->type == type) {
323 if (this->size() == types.size()) {
325 for (
size_t i = 0; i != this->size(); ++i) {
326 if ((*
this)[i].type != types[i]) {
359 return this->size() >= 2u;
368 return this->at(this->size() - 1).
uuid;
377 return this->at(this->size() - 2).
uuid;
392 for (const_iterator i = history.begin(); i != history.end(); ++i) {
Jpp environment information.
Auxiliary classes and methods for linear and iterative data regression.
This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
Description of Monte Carlo event generation applications.
Auxiliary class for historical event.
virtual ~JEvent()
Virtual destructor.
JEvent(const int type)
Constructor.
uint32_t counter
internal counter
JEvent()
Default constructor.
friend std::ostream & operator<<(std::ostream &out, const JEvent &event)
Write event to output stream.
const JEvent & operator()()
Make this event unique.
std::string git
GIT revision.
Auxiliary class to test history.
is_application(int type)
Constructor.
bool operator()(const JHistory &history) const
Test history.
Auxiliary class to test history.
bool operator()(const JHistory &history) const
Test history.
is_event(const JHistory &history)
Constructor.
Auxiliary class to test history.
bool operator()(const JHistory &history) const
Test history.
is_not_event(int type)
Constructor.
Container for historical events.
JHistory(const JEvent &event)
Constructor.
const JUUID & getUUID() const
Get UUID.
bool getStatus(const std::vector< int > &types) const
Get status.
bool hasParentUUID() const
Has parent UUID.
JHistory()
Default constructor.
const JUUID & getParentUUID() const
Get parent UUID.
const JHistory & getHistory() const
Get history.
JHistory & getHistory()
Get history.
JHistory(const int type)
Constructor.
JHistory(const JHistory &history, const JEvent &event)
Constructor.
virtual ~JHistory()
Virtual destructor.
friend std::ostream & operator<<(std::ostream &out, const JHistory &history)
Write history to output stream.
JHistory & add(const int type)
Add event to history.
bool has(const int type) const
Has event in history.