Go to the documentation of this file.
11 #ifndef GAUDIKERNEL_EVENTIDBASE_H
12 #define GAUDIKERNEL_EVENTIDBASE_H 1
33 template <
typename lambda>
35 template <
typename T,
typename Ret,
typename Arg>
42 template <
typename lambda>
45 template <
typename Fun>
47 return compose( f, [=](
auto*... p ) {
return f( *p... ); } );
50 template <
typename Proj,
typename Cmp = std::greater<>>
52 static_assert( std::is_reference_v<argument_t<Proj>>,
"must be a reference" );
53 static_assert( std::is_const_v<std::remove_reference_t<argument_t<Proj>>>,
"must be const" );
54 return [=]( argument_t<Proj> lhs, argument_t<Proj> rhs ) {
return cmp( p( lhs ), p( rhs ) ); };
276 const char* separator =
"";
307 #endif // EVENTINFO_EVENTID_H
friend bool operator!=(const EventIDBase &lhs, const EventIDBase &rhs)
number_type m_time_stamp_ns_offset
time stamp ns - ns time offset for time_stamp, 32 bit unsigned
static auto SortByRunLumi()
Event ID Range object. Holds two EventIDBases (start and stop)
number_type m_run_number
run number
number_type lumi_block() const
luminosity block identifier, 32 bit unsigned
number_type m_bunch_crossing_id
bunch crossing ID, 32 bit unsigned
void set_time_stamp_ns_offset(number_type timeStampNs)
set time stamp in ns
number_type bunch_crossing_id() const
bunch crossing ID, 32 bit unsigned
static const event_number_t UNDEFEVT
static const number_type UNDEFNUM
number_type m_lumi_block
luminosity block number: the number which uniquely tags a luminosity block within a run
virtual ~EventIDBase()=default
friend bool operator<=(const EventIDBase &lhs, const EventIDBase &rhs)
friend bool operator>(const EventIDBase &lhs, const EventIDBase &rhs)
void set_run_number(number_type runNumber)
set run number
event_number_t m_event_number
event number
friend std::ostream & operator<<(std::ostream &os, const EventIDBase &rhs)
Extraction operators.
typename arg_helper< lambda >::type argument_t
friend bool operator<(const EventIDBase &lhs, const EventIDBase &rhs)
auto make_cmp(Proj p, Cmp cmp={})
auto compose(lambda_ts &&... lambdas)
void set_time_stamp(number_type timeStamp)
set time stamp
number_type time_stamp() const
time stamp - posix time in seconds from 1970, 32 bit unsigned
number_type run_number() const
run number - 32 bit unsigned
static auto SortByLumiEvent()
friend bool operator>=(const EventIDBase &lhs, const EventIDBase &rhs)
void set_bunch_crossing_id(number_type bcid)
set bunch crossing ID
friend EventIDBase max(const EventIDBase &lhs, const EventIDBase &rhs)
void set_lumi_block(number_type lumiBlock)
set luminosity block identifier
This class provides a unique identification for each event, in terms of run/event number and/or a tim...
static auto SortByTimeStamp()
friend bool operator==(const EventIDBase &lhs, const EventIDBase &rhs)
Comparison operators.
number_type time_stamp_ns_offset() const
time stamp ns - ns time offset for time_stamp, 32 bit unsigned
friend EventIDBase min(const EventIDBase &lhs, const EventIDBase &rhs)
event_number_t event_number() const
event number - 64 bit unsigned
void set_event_number(event_number_t eventNumber)
set event number
number_type m_time_stamp
posix time in seconds since 1970/01/01
static auto SortByRunEvent()