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::JHitL1::compare Struct Reference

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

#include <JHitL1.hh>

Public Member Functions

bool operator() (const JHitL1 &first, const JHitL1 &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 362 of file JHitL1.hh.

Member Function Documentation

bool JTRIGGER::JHitL1::compare::operator() ( const JHitL1 first,
const JHitL1 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 370 of file JHitL1.hh.

371  {
372  if (first.getModuleID() == second.getModuleID()) {
373  if (first.size() == second.size())
374  return first.getT() < second.getT();
375  else
376  return first.size() > second.size();
377  } else {
378  return first.getModuleID() < second.getModuleID();
379  }
380  }
int getModuleID() const
Get module identifier.
double getT(const unsigned int i) const
Get time of hit i.
Definition: JHitL1.hh:170

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