File indexing completed on 2025-02-26 04:25:07
0001 #ifndef DataFormats_TestObjects_interface_ThingWithDoNotSort_h
0002 #define DataFormats_TestObjects_interface_ThingWithDoNotSort_h
0003
0004 #include <stdexcept>
0005 #include <cstdint>
0006
0007 #include "DataFormats/Common/interface/traits.h"
0008 #include "FWCore/Utilities/interface/Exception.h"
0009 #include "FWCore/Utilities/interface/typedefs.h"
0010
0011 namespace edmtest {
0012
0013 class ThingWithDoNotSort : public edm::DoNotSortUponInsertion {
0014 public:
0015 ThingWithDoNotSort() : value_{0} {};
0016 explicit ThingWithDoNotSort(cms_int32_t v) : value_{v} {}
0017
0018 void post_insert() {
0019 throw cms::Exception("LogicError")
0020 << "post_insert() called for ThingWithDoNotSort that inherits from edm::DoNotSortUponInsertion";
0021 }
0022
0023 int32_t value() const { return value_; }
0024
0025 private:
0026 cms_int32_t value_;
0027 };
0028
0029 }
0030
0031 #endif