Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2026-04-17 07:50:35

0001 // SPDX-License-Identifier: LGPL-3.0-or-later
0002 // Copyright (C) 2026 Derek Anderson
0003 
0004 #pragma once
0005 
0006 #include <podio/ObjectID.h>
0007 
0008 namespace eicrecon {
0009 
0010 /*! Comparator struct for podio::ObjectID. Organizes podio objects by
0011  *  their ObjectID's in decreasing collection ID first, and second by
0012  *  decreasing index second.
0013  */
0014 template <typename T> struct CompareObjectID {
0015   bool operator()(const T& lhs, const T& rhs) const {
0016     if (lhs.getObjectID().collectionID == rhs.getObjectID().collectionID) {
0017       return (lhs.getObjectID().index < rhs.getObjectID().index);
0018     } else {
0019       return (lhs.getObjectID().collectionID < rhs.getObjectID().collectionID);
0020     }
0021   }
0022 };
0023 
0024 } // namespace eicrecon