CMS 3D CMS Logo

Public Member Functions

CastorDbASCIIIO::DetIdLess Class Reference

List of all members.

Public Member Functions

bool operator() (DetId fFirst, DetId fSecond) const

Detailed Description

Definition at line 18 of file CastorDbASCIIIO.cc.


Member Function Documentation

bool CastorDbASCIIIO::DetIdLess::operator() ( DetId  fFirst,
DetId  fSecond 
) const [inline]

Definition at line 20 of file CastorDbASCIIIO.cc.

References HcalDetId::depth(), connectstrParser::f1, first, HcalGenericDetId::genericSubdet(), HcalDetId::ietaAbs(), HcalDetId::iphi(), HcalGenericDetId::isHcalDetId(), DetId::rawId(), edm::second(), and HcalDetId::zside().

                                                         {
      HcalGenericDetId first (fFirst);
      HcalGenericDetId second (fSecond);
      if (first.genericSubdet () != second.genericSubdet ()) return first.genericSubdet () < second.genericSubdet ();
      if (first.isHcalDetId ()) {
        HcalDetId f1 (first);
        HcalDetId s1 (second);
        return  f1.zside () != s1.zside () ? f1.zside () < s1.zside () :
          f1.iphi () != s1.iphi () ? f1.iphi () < s1.iphi () :
          f1.ietaAbs () != s1.ietaAbs () ? f1.ietaAbs () < s1.ietaAbs () :
          f1.depth () < s1.depth ();
      }
      else {
        return first.rawId() < second.rawId();
      }
    }