File indexing completed on 2024-04-06 12:14:23
0001 #include "FWCore/MessageLogger/interface/MessageLogger.h"
0002 #include "Geometry/CommonTopologies/interface/GeomDetEnumerators.h"
0003
0004 #include <iostream>
0005
0006 int main(void) {
0007
0008
0009 bool success = true;
0010 for (int subdetRaw = GeomDetEnumerators::PixelBarrel; subdetRaw != GeomDetEnumerators::invalidDet; ++subdetRaw) {
0011 auto subdet = static_cast<GeomDetEnumerators::SubDetector>(subdetRaw);
0012 if (!(GeomDetEnumerators::isBarrel(subdet) || GeomDetEnumerators::isEndcap(subdet))) {
0013 success = false;
0014 edm::LogVerbatim("CommonTopologies")
0015 << "GeomDetEnumerator::SubDetector " << subdet << " (" << subdetRaw << ") is not barrel or endcap!";
0016 }
0017 if (GeomDetEnumerators::isBarrel(subdet) && GeomDetEnumerators::isEndcap(subdet)) {
0018 success = false;
0019 edm::LogVerbatim("CommonTopologies")
0020 << "GeomDetEnumerator::SubDetector " << subdet << " (" << subdetRaw << ") is both barrel and endcap!";
0021 }
0022 }
0023
0024 return success ? 0 : 1;
0025 }