Jpp  18.6.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | List of all members
JTRIGGER::JHitR1::compare Struct Reference

Auxiliary data structure for sorting of hits. More...

#include <JHitR1.hh>

Public Member Functions

bool operator() (const JHitR1 &first, const JHitR1 &second) const
 Compare hits by module identifier, number of hits and time. More...
 

Detailed Description

Auxiliary data structure for sorting of hits.

Definition at line 203 of file JHitR1.hh.

Member Function Documentation

bool JTRIGGER::JHitR1::compare::operator() ( const JHitR1 first,
const JHitR1 second 
) const
inline

Compare hits by module identifier, number of hits and time.

Parameters
firstfirst hit
secondsecond hit
Returns
true if first before second; else false

Definition at line 211 of file JHitR1.hh.

212  {
213  if (first.getModuleID() == second.getModuleID()) {
214  if (first.getN() == second.getN())
215  return first.getT() < second.getT();
216  else
217  return first.getN() > second.getT();
218  } else {
219  return first.getModuleID() < second.getModuleID();
220  }
221  }
double getT() const
Get calibrated time of hit.
int getModuleID() const
Get module identifier.
int getN() const
Get count.
Definition: JHitR1.hh:183

The documentation for this struct was generated from the following file: