Add subevents to the stream.
17{
18 const std::vector<xAOD::EventInfo::SubEvent> &subEventsSource = eventInfo->
subEvents();
19 std::vector<std::reference_wrapper<const xAOD::EventInfo::SubEvent>> subEvents(subEventsSource.begin(), subEventsSource.end());
20
21 std::stable_sort(subEvents.begin(), subEvents.end(), [](
const xAOD::EventInfo::SubEvent &
a,
const xAOD::EventInfo::SubEvent &b) {
22 return (a.ptr()->bcid() < b.ptr()->bcid()) ||
23 ((a.ptr()->bcid() == b.ptr()->bcid()) && (a.type() < b.type())) ||
24 ((a.ptr()->bcid() == b.ptr()->bcid()) && (a.type() == b.type()) && (a.ptr()->eventNumber() < b.ptr()->eventNumber()));
25 });
26
27
29 for (const xAOD::EventInfo::SubEvent &subevent : subEvents) {
31 continue;
32 }
33
34 if (first) {
36 } else {
38 }
39
41 }
42}
uint32_t bcid() const
The bunch crossing ID of the event.
const std::vector< SubEvent > & subEvents() const
Get the pileup events that were used in the simulation.
@ Signal
The signal event.
void stable_sort(DataModel_detail::iterator< DVL > beg, DataModel_detail::iterator< DVL > end)
Specialization of stable_sort for DataVector/List.