ATLAS Offline Software
Public Member Functions | List of all members
xAOD::SortLumiBlockRangeByStart Class Reference

Helper functor used to sort xAOD::LumiBlockRangeContainer-s. More...

#include <SortLumiBlockRangeByStart.h>

Collaboration diagram for xAOD::SortLumiBlockRangeByStart:

Public Member Functions

bool operator() (const LumiBlockRange &lbr1, const LumiBlockRange &lbr2)
 Function ordering the xAOD::LumiBlockRange objects by starting time. More...
 
bool operator() (const LumiBlockRange *lbr1, const LumiBlockRange *lbr2)
 Function ordering the xAOD::LumiBlockRange objects by starting time. More...
 

Detailed Description

Helper functor used to sort xAOD::LumiBlockRangeContainer-s.

As with all xAOD containers, one needs to be careful with using std::sort and friends. They should never be used on the containers that own their elements, only on view containers. Otherwise the performance of the code will degrade significantly.

Author
Marjorie Shapiro mdsha.nosp@m.piro.nosp@m.@lbl..nosp@m.gov
Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h
Revision
647501
Date
2015-02-17 15:22:33 +0100 (Tue, 17 Feb 2015)

Definition at line 29 of file SortLumiBlockRangeByStart.h.

Member Function Documentation

◆ operator()() [1/2]

bool xAOD::SortLumiBlockRangeByStart::operator() ( const LumiBlockRange lbr1,
const LumiBlockRange lbr2 
)

Function ordering the xAOD::LumiBlockRange objects by starting time.

Definition at line 12 of file SortLumiBlockRangeByStart.cxx.

13  {
14 
15  if( lbr1.startRunNumber() != lbr2.startRunNumber() ) {
16  return lbr1.startRunNumber() < lbr2.startRunNumber();
17  } else {
18  return lbr1.startLumiBlockNumber() < lbr2.startLumiBlockNumber();
19  }
20  }

◆ operator()() [2/2]

bool xAOD::SortLumiBlockRangeByStart::operator() ( const LumiBlockRange lbr1,
const LumiBlockRange lbr2 
)

Function ordering the xAOD::LumiBlockRange objects by starting time.

Definition at line 22 of file SortLumiBlockRangeByStart.cxx.

23  {
24 
25  return this->operator()( *lbr1, *lbr2 );
26  }

The documentation for this class was generated from the following files:
xAOD::SortLumiBlockRangeByStart::operator()
bool operator()(const LumiBlockRange &lbr1, const LumiBlockRange &lbr2)
Function ordering the xAOD::LumiBlockRange objects by starting time.
Definition: SortLumiBlockRangeByStart.cxx:12