event time stamp: More...
#include <ana_event.h>
Public Member Functions | |
| timestamp () | |
| timestamp (int date_, int time_) | |
| void | set (int date_, int time_) |
| int32_t | get_date () const |
| int32_t | get_time () const |
| int32_t | get_sec_epoch () const |
| int32_t | get_millisec () const |
| int32_t | get_year () const |
| get year yyyy | |
| int32_t | get_month () const |
| get month 1-12 | |
| int32_t | get_day () const |
| get day 1-31 | |
| int32_t | get_hours () const |
| get hour 00-23 | |
| int32_t | get_minutes () const |
| get minutes 0-59 | |
| int32_t | get_seconds () const |
| get seconds 0-59 | |
| int32_t | get_milliseconds () const |
| < get microseconds | |
| bool | is_valid () const |
| void | clear () |
| std::string | to_string () const |
| void | from_string (const std::string &) |
Static Public Member Functions | |
| static int32_t | convert_to_sec_epoch (int date_, int time_) |
| static int32_t | extract_millisec (int time_) |
Public Attributes | |
| int32_t | __date |
| int32_t | __time |
| uint32_t | __sec_epoch |
| int32_t | __millisec |
Static Public Attributes | |
| static const char | IO_FORMAT_SEP = '_' |
Private Member Functions | |
| template<class Archive > | |
| void | serialize (Archive &ar_, const unsigned int version_) |
Friends | |
| class | boost::serialization::access |
| what is saved and opened in data file | |
| std::ostream & | operator<< (std::ostream &, const timestamp &) |
| std::istream & | operator>> (std::istream &, timestamp &) |
event time stamp:
default constructor
| nemo3::ana_event::timestamp::timestamp | ( | int | date_, |
| int | time_ | ||
| ) |
Constructor with a defined date and time in format yyyymmdd and hhmmss
| void nemo3::ana_event::timestamp::clear | ( | ) |
erase and set not valid format
| void nemo3::ana_event::timestamp::from_string | ( | const std::string & | ) |
set an easy to read string format
| int32_t nemo3::ana_event::timestamp::get_date | ( | ) | const |
get date in format yyyymmdd
| int32_t nemo3::ana_event::timestamp::get_millisec | ( | ) | const |
get microseconds
Referenced by get_milliseconds().
| int32_t nemo3::ana_event::timestamp::get_sec_epoch | ( | ) | const |
get elapsed second from 1970
Referenced by nemo3::ana_event::get_sec_epoch().
| int32_t nemo3::ana_event::timestamp::get_time | ( | ) | const |
get time of day in format hhmmss
| bool nemo3::ana_event::timestamp::is_valid | ( | ) | const |
check timestamp format (everything > 0)
| void nemo3::ana_event::timestamp::set | ( | int | date_, |
| int | time_ | ||
| ) |
sSet date and time in format yyyymmdd and hhmmss
| std::string nemo3::ana_event::timestamp::to_string | ( | ) | const |
return an easy to read string format
friend class boost::serialization::access [friend] |
what is saved and opened in data file
Using boost format, to add a new element, use versionning.
| date | |
| time | |
| sec_epoch | |
| millisec |
| std::ostream& operator<< | ( | std::ostream & | , |
| const timestamp & | |||
| ) | [friend] |
standard cout overloading
| std::istream& operator>> | ( | std::istream & | , |
| timestamp & | |||
| ) | [friend] |
standard cin overloading
Date in format yyyymmdd
microseconds
elapsed second from 1970
Time of day in format hhmmss
1.8.0