From 06ade60deafdfa3856da5b61dfc18cd22ca24ef9 Mon Sep 17 00:00:00 2001 From: Ivan Razumov Date: Thu, 30 Nov 2023 11:37:42 +0100 Subject: [PATCH 1/2] Replace CPP11_auto_ptr with std::unique_ptr (CPP11_auto_ptr was #defined as std::unique_ptr) --- Alignment/Geners/interface/CPP11_auto_ptr.hh | 14 -- Alignment/Geners/interface/CStringStream.hh | 5 +- Alignment/Geners/interface/CompressedIO.hh | 4 +- Alignment/Geners/interface/GenericIO.hh | 22 +-- Alignment/Geners/interface/Reference.hh | 7 +- .../Geners/interface/WriteOnlyCatalog.hh | 3 +- Alignment/Geners/interface/binaryIO.hh | 11 +- Alignment/Geners/interface/forward_listIO.hh | 176 ++++++++---------- Alignment/Geners/src/CStringStream.cc | 4 +- Alignment/Geners/src/CatalogEntry.cc | 3 +- Alignment/Geners/src/ContiguousCatalog.cc | 5 +- Alignment/Geners/src/StringArchive.cc | 4 +- Alignment/Geners/src/WriteOnlyCatalog.cc | 5 +- Alignment/Geners/src/stringArchiveIO.cc | 6 +- Alignment/Geners/test/cdump.cc | 5 +- Alignment/Geners/test/cmerge.cc | 5 +- Alignment/Geners/test/crecover.cc | 1 - Alignment/Geners/test/print_items.cc | 1 - .../interface/FFTJetESParameterParser.h | 2 +- .../plugins/FFTJetCorrectionESProducer.h | 2 +- .../plugins/FFTJetCorrectorDBReader.cc | 2 +- .../plugins/FFTJetLookupTableESProducer.cc | 4 +- .../interface/loadFFTJetInterpolationTable.h | 7 +- .../src/loadFFTJetInterpolationTable.cc | 8 +- .../InterpolationTables/interface/HistoND.h | 3 +- .../interface/LinInterpolatedTableND.h | 34 ++-- .../interface/StorableHistoNDFunctor.h | 3 +- .../interface/StorableInterpolationFunctor.h | 3 +- .../InterpolationTables/src/DualAxis.cc | 5 +- .../InterpolationTables/src/DualHistoAxis.cc | 5 +- 30 files changed, 152 insertions(+), 207 deletions(-) delete mode 100644 Alignment/Geners/interface/CPP11_auto_ptr.hh diff --git a/Alignment/Geners/interface/CPP11_auto_ptr.hh b/Alignment/Geners/interface/CPP11_auto_ptr.hh deleted file mode 100644 index 1de84b424a6b1..0000000000000 --- a/Alignment/Geners/interface/CPP11_auto_ptr.hh +++ /dev/null @@ -1,14 +0,0 @@ -#ifndef GENERS_CPP11_AUTO_PTR_HH_ -#define GENERS_CPP11_AUTO_PTR_HH_ - -#include "Alignment/Geners/interface/CPP11_config.hh" - -#include - -#ifdef CPP11_STD_AVAILABLE -#define CPP11_auto_ptr std::unique_ptr -#else -#define CPP11_auto_ptr std::auto_ptr -#endif - -#endif // GENERS_CPP11_AUTO_PTR_HH_ diff --git a/Alignment/Geners/interface/CStringStream.hh b/Alignment/Geners/interface/CStringStream.hh index df7d6e0d5d918..df44bda484e31 100644 --- a/Alignment/Geners/interface/CStringStream.hh +++ b/Alignment/Geners/interface/CStringStream.hh @@ -18,7 +18,6 @@ #include #include -#include "Alignment/Geners/interface/CPP11_auto_ptr.hh" #include "Alignment/Geners/interface/CStringBuf.hh" #include "Alignment/Geners/interface/ZlibHandle.hh" @@ -76,8 +75,8 @@ namespace gs { std::vector comprBuf_; std::vector readBuf_; std::ostream *sink_; - CPP11_auto_ptr inflator_; - CPP11_auto_ptr deflator_; + std::unique_ptr inflator_; + std::unique_ptr deflator_; }; } // namespace gs diff --git a/Alignment/Geners/interface/CompressedIO.hh b/Alignment/Geners/interface/CompressedIO.hh index be107abd91fa2..acb90e5f60bee 100644 --- a/Alignment/Geners/interface/CompressedIO.hh +++ b/Alignment/Geners/interface/CompressedIO.hh @@ -25,7 +25,7 @@ namespace gs { void restore_compressed_item(std::istream &in, Item *item); template - CPP11_auto_ptr read_compressed_item(std::istream &in); + std::unique_ptr read_compressed_item(std::istream &in); } // namespace gs namespace gs { @@ -77,7 +77,7 @@ namespace gs { } template - inline CPP11_auto_ptr read_compressed_item(std::istream &is) { + inline std::unique_ptr read_compressed_item(std::istream &is) { long long len; read_pod(is, &len); unsigned compressionCode; diff --git a/Alignment/Geners/interface/GenericIO.hh b/Alignment/Geners/interface/GenericIO.hh index 10e86d158ac08..13ad7d38b97a1 100644 --- a/Alignment/Geners/interface/GenericIO.hh +++ b/Alignment/Geners/interface/GenericIO.hh @@ -51,13 +51,13 @@ namespace gs { // from std::exception. */ template - inline CPP11_auto_ptr read_item(Stream &is, const bool readClassId = true) { + inline std::unique_ptr read_item(Stream &is, const bool readClassId = true) { typedef std::vector State; Item *item = nullptr; State state; const bool status = GenericReader::ISNULLPOINTER>>::process( item, is, &state, readClassId); - CPP11_auto_ptr ptr(item); + std::unique_ptr ptr(item); if (is.fail()) throw IOReadFailure("In gs::read_item: input stream failure"); if (!status || item == nullptr) @@ -150,9 +150,9 @@ namespace gs { template struct GenericReader::ISPOD>> { inline static bool readIntoPtr(T *&ptr, Stream &str, State *, const bool processClassId) { - CPP11_auto_ptr myptr; + std::unique_ptr myptr; if (ptr == nullptr) - myptr = CPP11_auto_ptr(new T()); + myptr = std::unique_ptr(new T()); if (processClassId) { static const ClassId current(ClassId::makeId()); ClassId id(str, 1); @@ -441,9 +441,9 @@ namespace gs { template struct GenericReader::ISPAIR>> { inline static bool readIntoPtr(T *&ptr, Stream &str, State *s, const bool processClassId) { - CPP11_auto_ptr myptr; + std::unique_ptr myptr; if (ptr == 0) { - myptr = CPP11_auto_ptr(new T()); + myptr = std::unique_ptr(new T()); clearIfPointer(myptr.get()->first); clearIfPointer(myptr.get()->second); } @@ -499,9 +499,9 @@ namespace gs { template struct GenericReader::ISSTRING>> { inline static bool readIntoPtr(std::string *&ptr, Stream &is, State *, const bool processClassId) { - CPP11_auto_ptr myptr; + std::unique_ptr myptr; if (ptr == nullptr) - myptr = CPP11_auto_ptr(new std::string()); + myptr = std::unique_ptr(new std::string()); if (processClassId) { static const ClassId current(ClassId::makeId()); ClassId id(is, 1); @@ -613,7 +613,7 @@ namespace gs { if (ptr) return process_item(*ptr, str, s, processClassId); else { - CPP11_auto_ptr myptr(new T()); + std::unique_ptr myptr(new T()); if (!process_item(*myptr, str, s, processClassId)) return false; ptr = myptr.release(); @@ -673,9 +673,9 @@ namespace gs { template struct GenericReader::ISPLACEREADABLE>> { inline static bool readIntoPtr(T *&ptr, Stream &str, State *s, const bool processClassId) { - CPP11_auto_ptr myptr; + std::unique_ptr myptr; if (ptr == 0) - myptr = CPP11_auto_ptr(new T()); + myptr = std::unique_ptr(new T()); if (processClassId) { ClassId id(str, 1); T::restore(id, str, ptr ? ptr : myptr.get()); diff --git a/Alignment/Geners/interface/Reference.hh b/Alignment/Geners/interface/Reference.hh index 217330920e066..03f80f43b42ba 100644 --- a/Alignment/Geners/interface/Reference.hh +++ b/Alignment/Geners/interface/Reference.hh @@ -2,7 +2,6 @@ #define GENERS_REFERENCE_HH_ #include "Alignment/Geners/interface/AbsReference.hh" -#include "Alignment/Geners/interface/CPP11_auto_ptr.hh" #include @@ -32,7 +31,7 @@ namespace gs { // Methods to retrieve the item void restore(unsigned long index, T *obj) const; - CPP11_auto_ptr get(unsigned long index) const; + std::unique_ptr get(unsigned long index) const; std::shared_ptr getShared(unsigned long index) const; Reference() = delete; @@ -73,8 +72,8 @@ namespace gs { } template - inline CPP11_auto_ptr Reference::get(const unsigned long index) const { - return CPP11_auto_ptr(getPtr(index)); + inline std::unique_ptr Reference::get(const unsigned long index) const { + return std::unique_ptr(getPtr(index)); } template diff --git a/Alignment/Geners/interface/WriteOnlyCatalog.hh b/Alignment/Geners/interface/WriteOnlyCatalog.hh index d19c3e452b805..970f946bf679e 100644 --- a/Alignment/Geners/interface/WriteOnlyCatalog.hh +++ b/Alignment/Geners/interface/WriteOnlyCatalog.hh @@ -4,7 +4,6 @@ #include #include "Alignment/Geners/interface/AbsCatalog.hh" -#include "Alignment/Geners/interface/CPP11_auto_ptr.hh" namespace gs { class WriteOnlyCatalog : public AbsCatalog { @@ -63,7 +62,7 @@ namespace gs { unsigned long long count_; unsigned long long smallestId_; unsigned long long largestId_; - CPP11_auto_ptr lastEntry_; + std::unique_ptr lastEntry_; }; } // namespace gs diff --git a/Alignment/Geners/interface/binaryIO.hh b/Alignment/Geners/interface/binaryIO.hh index e5df7129e5fb6..11d76e9a4ac25 100644 --- a/Alignment/Geners/interface/binaryIO.hh +++ b/Alignment/Geners/interface/binaryIO.hh @@ -15,7 +15,6 @@ #ifndef GENERS_BINARYIO_HH_ #define GENERS_BINARYIO_HH_ -#include "Alignment/Geners/interface/CPP11_auto_ptr.hh" #include "Alignment/Geners/interface/ClassId.hh" #include "Alignment/Geners/interface/IOException.hh" @@ -143,9 +142,9 @@ namespace gs { } template - inline CPP11_auto_ptr read_obj(std::istream &in) { + inline std::unique_ptr read_obj(std::istream &in) { const ClassId id(in, 1); - return CPP11_auto_ptr(T::read(id, in)); + return std::unique_ptr(T::read(id, in)); } template @@ -157,10 +156,10 @@ namespace gs { // The following function is templated upon the reader factory template - inline CPP11_auto_ptr read_base_obj(std::istream &in, const Reader &f) { + inline std::unique_ptr read_base_obj(std::istream &in, const Reader &f) { typedef typename Reader::value_type T; const ClassId id(in, 1); - return CPP11_auto_ptr(f.read(id, in)); + return std::unique_ptr(f.read(id, in)); } // The following function assumes that the array contains actual @@ -279,7 +278,7 @@ namespace gs { const ClassId id(in, 1); pv->reserve(vlen); for (unsigned long i = 0; i < vlen; ++i) { - CPP11_auto_ptr obj(T::read(id, in)); + std::unique_ptr obj(T::read(id, in)); pv->push_back(*obj); } } diff --git a/Alignment/Geners/interface/forward_listIO.hh b/Alignment/Geners/interface/forward_listIO.hh index 47b004c7c7f38..9440cdc7d4fc8 100644 --- a/Alignment/Geners/interface/forward_listIO.hh +++ b/Alignment/Geners/interface/forward_listIO.hh @@ -12,111 +12,89 @@ // standard containers. Instead, we will designate std::forward_list // as an external type and will handle it separately. // -gs_declare_template_external_TT(std::forward_list) -gs_specialize_template_id_TT(std::forward_list, 0, 1) +gs_declare_template_external_TT(std::forward_list) gs_specialize_template_id_TT(std::forward_list, 0, 1) -namespace gs { - // Assuming that we want to write the list once and potentially - // read it back many times, we will write it out in the reverse - // order. This is because it is easy to extend the list from the - // front but not from the back. - // - template - struct GenericWriter, - Int2Type::ISEXTERNAL> > - { - inline static bool process(const std::forward_list& s, Stream& os, - State* p2, const bool processClassId) - { - typedef typename std::forward_list::const_iterator Iter; + namespace gs { + // Assuming that we want to write the list once and potentially + // read it back many times, we will write it out in the reverse + // order. This is because it is easy to extend the list from the + // front but not from the back. + // + template + struct GenericWriter, Int2Type::ISEXTERNAL> > { + inline static bool process(const std::forward_list& s, Stream& os, State* p2, const bool processClassId) { + typedef typename std::forward_list::const_iterator Iter; - bool status = processClassId ? - ClassId::makeId >().write(os) : true; - if (status) - { - const Iter listend = s.end(); - std::size_t sz = 0; - for (Iter it=s.begin(); it!=listend; ++it, ++sz) {;} - write_pod(os, sz); - if (sz) - { - status = ClassId::makeId().write(os); - std::vector iters(sz); - sz = 0; - for (Iter it=s.begin(); it!=listend; ++it, ++sz) - iters[sz] = it; - for (long long number=sz-1; number>=0 && status; --number) - status = process_const_item( - *iters[number], os, p2, false); - } - } - return status && !os.fail(); + bool status = processClassId ? ClassId::makeId >().write(os) : true; + if (status) { + const Iter listend = s.end(); + std::size_t sz = 0; + for (Iter it = s.begin(); it != listend; ++it, ++sz) { + ; } - }; + write_pod(os, sz); + if (sz) { + status = ClassId::makeId().write(os); + std::vector iters(sz); + sz = 0; + for (Iter it = s.begin(); it != listend; ++it, ++sz) + iters[sz] = it; + for (long long number = sz - 1; number >= 0 && status; --number) + status = process_const_item(*iters[number], os, p2, false); + } + } + return status && !os.fail(); + } + }; - template - struct InsertContainerItem > - { - inline static void insert(std::forward_list& obj, const T& item, - const std::size_t /* itemNumber */) - {obj.push_front(item);} - }; + template + struct InsertContainerItem > { + inline static void insert(std::forward_list& obj, const T& item, const std::size_t /* itemNumber */) { + obj.push_front(item); + } + }; - template - struct GenericReader, - Int2Type::ISEXTERNAL> > - { - inline static bool readIntoPtr(std::forward_list*& ptr, Stream& is, - State* p2, const bool processClassId) - { - if (processClassId) - { - ClassId id(is, 1); - const ClassId& curr = ClassId::makeId >(); - curr.ensureSameName(id); - } - CPP11_auto_ptr > myptr; - if (ptr == 0) - myptr = CPP11_auto_ptr >( - new std::forward_list()); - else - ptr->clear(); - std::size_t sz = 0; - read_pod(is, &sz); - bool itemStatus = true; - if (sz) - { - ClassId itemId(is, 1); - p2->push_back(itemId); - std::forward_list* nzptr = ptr ? ptr : myptr.get(); - try - { - for (std::size_t i=0; i < sz && itemStatus; ++i) - itemStatus = GenericReader< - Stream,State,std::forward_list,InContainerCycle - >::process(*nzptr, is, p2, i); - } - catch (...) - { - p2->pop_back(); - throw; - } - } - const bool success = itemStatus && !is.fail(); - if (success && ptr == 0) - ptr = myptr.release(); - return success; + template + struct GenericReader, Int2Type::ISEXTERNAL> > { + inline static bool readIntoPtr(std::forward_list*& ptr, Stream& is, State* p2, const bool processClassId) { + if (processClassId) { + ClassId id(is, 1); + const ClassId& curr = ClassId::makeId >(); + curr.ensureSameName(id); + } + std::unique_ptr > myptr; + if (ptr == 0) + myptr = std::unique_ptr >(new std::forward_list()); + else + ptr->clear(); + std::size_t sz = 0; + read_pod(is, &sz); + bool itemStatus = true; + if (sz) { + ClassId itemId(is, 1); + p2->push_back(itemId); + std::forward_list* nzptr = ptr ? ptr : myptr.get(); + try { + for (std::size_t i = 0; i < sz && itemStatus; ++i) + itemStatus = + GenericReader, InContainerCycle>::process(*nzptr, is, p2, i); + } catch (...) { + p2->pop_back(); + throw; } + } + const bool success = itemStatus && !is.fail(); + if (success && ptr == 0) + ptr = myptr.release(); + return success; + } - inline static bool process(std::forward_list& s, Stream& is, - State* st, const bool processClassId) - { - std::forward_list* ps = &s; - return readIntoPtr(ps, is, st, processClassId); - } - }; + inline static bool process(std::forward_list& s, Stream& is, State* st, const bool processClassId) { + std::forward_list* ps = &s; + return readIntoPtr(ps, is, st, processClassId); + } + }; } -#endif // CPP11_STD_AVAILABLE -#endif // GENERS_FORWARD_LISTIO_HH_ - +#endif // CPP11_STD_AVAILABLE +#endif // GENERS_FORWARD_LISTIO_HH_ diff --git a/Alignment/Geners/src/CStringStream.cc b/Alignment/Geners/src/CStringStream.cc index b507f45903b49..81b9d6f7d24f9 100644 --- a/Alignment/Geners/src/CStringStream.cc +++ b/Alignment/Geners/src/CStringStream.cc @@ -108,7 +108,7 @@ namespace gs { case ZLIB: { if (!inflator_.get()) - inflator_ = CPP11_auto_ptr(new ZlibInflateHandle()); + inflator_ = std::unique_ptr(new ZlibInflateHandle()); doZlibCompression(&readBuf_[0], len, false, inflator_->strm(), &comprBuf_[0], comprBuf_.size(), *this); } break; @@ -144,7 +144,7 @@ namespace gs { switch (mode_) { case ZLIB: { if (!deflator_.get()) - deflator_ = CPP11_auto_ptr(new ZlibDeflateHandle(compressionLevel_)); + deflator_ = std::unique_ptr(new ZlibDeflateHandle(compressionLevel_)); doZlibCompression(data, len, true, deflator_->strm(), &comprBuf_[0], comprBuf_.size(), *sink_); } break; diff --git a/Alignment/Geners/src/CatalogEntry.cc b/Alignment/Geners/src/CatalogEntry.cc index 65dee0ec12e8c..55d454d54c7ef 100644 --- a/Alignment/Geners/src/CatalogEntry.cc +++ b/Alignment/Geners/src/CatalogEntry.cc @@ -1,6 +1,5 @@ #include "Alignment/Geners/interface/IOException.hh" -#include "Alignment/Geners/interface/CPP11_auto_ptr.hh" #include "Alignment/Geners/interface/CatalogEntry.hh" #include "Alignment/Geners/interface/binaryIO.hh" @@ -80,7 +79,7 @@ namespace gs { CatalogEntry *rec = nullptr; if (!in.fail()) { - CPP11_auto_ptr loc(ItemLocation::read(locId, in)); + std::unique_ptr loc(ItemLocation::read(locId, in)); if (loc.get()) rec = new CatalogEntry(ItemDescriptor(itemClass, ioPrototype.c_str(), name.c_str(), category.c_str()), itemId, diff --git a/Alignment/Geners/src/ContiguousCatalog.cc b/Alignment/Geners/src/ContiguousCatalog.cc index 3f3327505b805..0162382f87c5f 100644 --- a/Alignment/Geners/src/ContiguousCatalog.cc +++ b/Alignment/Geners/src/ContiguousCatalog.cc @@ -2,7 +2,6 @@ #include #include -#include "Alignment/Geners/interface/CPP11_auto_ptr.hh" #include "Alignment/Geners/interface/ContiguousCatalog.hh" #include "Alignment/Geners/interface/IOException.hh" #include "Alignment/Geners/interface/binaryIO.hh" @@ -113,7 +112,7 @@ namespace gs { ClassId rId(in, 1); ClassId locId(in, 1); - CPP11_auto_ptr catalog(new ContiguousCatalog()); + std::unique_ptr catalog(new ContiguousCatalog()); bool firstEntry = true; for (long long recnum = 0; recnum < nRecords; ++recnum) { CatalogEntry *rec = CatalogEntry::read(rId, locId, in); @@ -146,7 +145,7 @@ namespace gs { ClassId rId(in, 1); ClassId locId(in, 1); - CPP11_auto_ptr catalog(new ContiguousCatalog()); + std::unique_ptr catalog(new ContiguousCatalog()); bool firstEntry = true; for (in.peek(); !in.eof(); in.peek()) { CatalogEntry *rec = CatalogEntry::read(rId, locId, in); diff --git a/Alignment/Geners/src/StringArchive.cc b/Alignment/Geners/src/StringArchive.cc index 62bd21a95a84e..9581e873f21a0 100644 --- a/Alignment/Geners/src/StringArchive.cc +++ b/Alignment/Geners/src/StringArchive.cc @@ -57,12 +57,12 @@ namespace gs { read_pod(in, &nam); if (in.fail()) throw IOReadFailure("In gs::StringArchive::read: input stream failure"); - CPP11_auto_ptr archive(new StringArchive(nam.c_str())); + std::unique_ptr archive(new StringArchive(nam.c_str())); archive->lastpos_ = lastpos; ClassId streamId(in, 1); CharBuffer::restore(streamId, in, &archive->stream_); ClassId catId(in, 1); - CPP11_auto_ptr p(ContiguousCatalog::read(catId, in)); + std::unique_ptr p(ContiguousCatalog::read(catId, in)); assert(p.get()); archive->catalog_ = *p; return archive.release(); diff --git a/Alignment/Geners/src/WriteOnlyCatalog.cc b/Alignment/Geners/src/WriteOnlyCatalog.cc index 242f337141f9a..2e0f6e2a2fd59 100644 --- a/Alignment/Geners/src/WriteOnlyCatalog.cc +++ b/Alignment/Geners/src/WriteOnlyCatalog.cc @@ -1,4 +1,3 @@ -#include "Alignment/Geners/interface/CPP11_auto_ptr.hh" #include "Alignment/Geners/interface/IOException.hh" #include "Alignment/Geners/interface/WriteOnlyCatalog.hh" #include "Alignment/Geners/interface/binaryIO.hh" @@ -16,7 +15,7 @@ namespace gs { const unsigned long long off) { const unsigned long long id = count_ ? largestId_ + 1 : smallestId_; lastEntry_ = - CPP11_auto_ptr(new CatalogEntry(descriptor, id, compressionCode, itemLen, loc, off)); + std::unique_ptr(new CatalogEntry(descriptor, id, compressionCode, itemLen, loc, off)); if (lastEntry_->write(os_)) { ++count_; largestId_ = id; @@ -53,7 +52,7 @@ namespace gs { ClassId rId(in, 1); ClassId locId(in, 1); - CPP11_auto_ptr cat(new WriteOnlyCatalog(dynamic_cast(in))); + std::unique_ptr cat(new WriteOnlyCatalog(dynamic_cast(in))); bool firstEntry = true; for (in.peek(); !in.eof(); in.peek()) { CatalogEntry *rec = CatalogEntry::read(rId, locId, in); diff --git a/Alignment/Geners/src/stringArchiveIO.cc b/Alignment/Geners/src/stringArchiveIO.cc index 9ab011ba47434..cd1e02d339da0 100644 --- a/Alignment/Geners/src/stringArchiveIO.cc +++ b/Alignment/Geners/src/stringArchiveIO.cc @@ -41,7 +41,7 @@ namespace gs { std::ifstream is(filename, std::ios_base::binary); if (!is.is_open()) throw IOOpeningFailure("gs::readStringArchive", filename); - CPP11_auto_ptr ar = read_item(is); + std::unique_ptr ar = read_item(is); return ar.release(); } @@ -73,7 +73,7 @@ namespace gs { std::ifstream is(filename, std::ios_base::binary); if (!is.is_open()) throw IOOpeningFailure("gs::readCompressedStringArchive", filename); - CPP11_auto_ptr ar = read_compressed_item(is); + std::unique_ptr ar = read_compressed_item(is); return ar.release(); } @@ -85,7 +85,7 @@ namespace gs { << "StringArchive item with id " << id << " not found"; throw gs::IOInvalidArgument(os.str()); } - CPP11_auto_ptr p = ref.get(0); + std::unique_ptr p = ref.get(0); return p.release(); } diff --git a/Alignment/Geners/test/cdump.cc b/Alignment/Geners/test/cdump.cc index 174d5741418a8..1ed9905502109 100644 --- a/Alignment/Geners/test/cdump.cc +++ b/Alignment/Geners/test/cdump.cc @@ -6,7 +6,6 @@ #include #include -#include "Alignment/Geners/interface/CPP11_auto_ptr.hh" #include "Alignment/Geners/interface/CStringStream.hh" #include "Alignment/Geners/interface/CatalogIO.hh" #include "Alignment/Geners/interface/ContiguousCatalog.hh" @@ -81,9 +80,9 @@ int main(int argc, char const *argv[]) { unsigned compressionCode = 0, mergeLevel = 0; std::vector annotations; - CPP11_auto_ptr cat; + std::unique_ptr cat; try { - cat = CPP11_auto_ptr( + cat = std::unique_ptr( readBinaryCatalog(in, &compressionCode, &mergeLevel, &annotations, true)); } catch (std::exception &e) { cerr << "Failed to read catalog from file \"" << inputfile << "\". " << e.what() << endl; diff --git a/Alignment/Geners/test/cmerge.cc b/Alignment/Geners/test/cmerge.cc index 1eef3ebe5bc04..059e016c2468f 100644 --- a/Alignment/Geners/test/cmerge.cc +++ b/Alignment/Geners/test/cmerge.cc @@ -5,7 +5,6 @@ #include #include -#include "Alignment/Geners/interface/CPP11_auto_ptr.hh" #include "Alignment/Geners/interface/CatalogIO.hh" #include "Alignment/Geners/interface/ContiguousCatalog.hh" #include "Alignment/Geners/interface/uriUtils.hh" @@ -102,9 +101,9 @@ int main(int argc, char const *argv[]) { unsigned compressionCode = 0, mergeLevel = 0; std::vector annotations; - CPP11_auto_ptr cat; + std::unique_ptr cat; try { - cat = CPP11_auto_ptr( + cat = std::unique_ptr( readBinaryCatalog(in, &compressionCode, &mergeLevel, &annotations, true)); } catch (std::exception &e) { cerr << "Failed to read catalog from file \"" << inputfile << "\". " << e.what() << endl; diff --git a/Alignment/Geners/test/crecover.cc b/Alignment/Geners/test/crecover.cc index c530c61a0a057..a71d2eddefa68 100644 --- a/Alignment/Geners/test/crecover.cc +++ b/Alignment/Geners/test/crecover.cc @@ -5,7 +5,6 @@ #include #include "Alignment/Geners/interface/BinaryArchiveBase.hh" -#include "Alignment/Geners/interface/CPP11_auto_ptr.hh" #include "Alignment/Geners/interface/CatalogIO.hh" #include "Alignment/Geners/interface/ContiguousCatalog.hh" #include "Alignment/Geners/interface/IOException.hh" diff --git a/Alignment/Geners/test/print_items.cc b/Alignment/Geners/test/print_items.cc index bbb18e0453f51..a5a2f26236e5a 100644 --- a/Alignment/Geners/test/print_items.cc +++ b/Alignment/Geners/test/print_items.cc @@ -8,7 +8,6 @@ // statements already present in this program. // -#include "Alignment/Geners/interface/CPP11_auto_ptr.hh" #include "Alignment/Geners/interface/ClassId.hh" #include "Alignment/Geners/interface/MultiFileArchive.hh" #include "Alignment/Geners/interface/Reference.hh" diff --git a/JetMETCorrections/FFTJetModules/interface/FFTJetESParameterParser.h b/JetMETCorrections/FFTJetModules/interface/FFTJetESParameterParser.h index ba31028da4275..0dd8a25c24ff4 100644 --- a/JetMETCorrections/FFTJetModules/interface/FFTJetESParameterParser.h +++ b/JetMETCorrections/FFTJetModules/interface/FFTJetESParameterParser.h @@ -52,7 +52,7 @@ std::shared_ptr > parseFFTJetScaleCalc // } // Load the table from the archive - CPP11_auto_ptr autof = loadFFTJetInterpolationTable(ps, ar, verbose); + std::unique_ptr autof = loadFFTJetInterpolationTable(ps, ar, verbose); std::shared_ptr f(autof.release()); // Swap the class name if it is supposed to be determined diff --git a/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectionESProducer.h b/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectionESProducer.h index 3a8a3645a1e7b..41495f36050a1 100644 --- a/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectionESProducer.h +++ b/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectionESProducer.h @@ -60,7 +60,7 @@ static void buildCorrectorSequence(const FFTJetCorrectorParameters& tablePars, typedef typename CorrectorSequence::jet_type jet_type; // Load the archive stored in the FFTJetCorrectorParameters object - CPP11_auto_ptr ar; + std::unique_ptr ar; { std::istringstream is(tablePars.str()); if (isArchiveCompressed) diff --git a/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectorDBReader.cc b/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectorDBReader.cc index 2417cb8903ee9..bb91d28f94c03 100644 --- a/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectorDBReader.cc +++ b/JetMETCorrections/FFTJetModules/plugins/FFTJetCorrectorDBReader.cc @@ -80,7 +80,7 @@ void FFTJetCorrectorDBReader::analyze(const edm::Event& iEvent, const edm::Event if (printAsString) std::cout << "++++ String rep: \"" << JetCorParams->str() << '"' << std::endl; else if (readArchive) { - CPP11_auto_ptr par; + std::unique_ptr par; { std::istringstream is(JetCorParams->str()); diff --git a/JetMETCorrections/FFTJetModules/plugins/FFTJetLookupTableESProducer.cc b/JetMETCorrections/FFTJetModules/plugins/FFTJetLookupTableESProducer.cc index 4606cef39b746..8a5e8ea8005ac 100644 --- a/JetMETCorrections/FFTJetModules/plugins/FFTJetLookupTableESProducer.cc +++ b/JetMETCorrections/FFTJetModules/plugins/FFTJetLookupTableESProducer.cc @@ -57,7 +57,7 @@ static void buildLookupTables(const FFTJetCorrectorParameters& tablePars, const bool verbose, FFTJetLookupTableSequence* ptr) { // Load the archive stored in the FFTJetCorrectorParameters object - CPP11_auto_ptr ar; + std::unique_ptr ar; { std::istringstream is(tablePars.str()); if (isArchiveCompressed) @@ -82,7 +82,7 @@ static void buildLookupTables(const FFTJetCorrectorParameters& tablePars, for (unsigned long item = 0; item < nItems; ++item) { const unsigned long long id = ref.id(item); if (loadedSet.insert(id).second) { - CPP11_auto_ptr p(ref.get(item)); + std::unique_ptr p(ref.get(item)); StorableFunctorPtr fptr(p.release()); std::shared_ptr e = ar->catalogEntry(id); insertLUTItem(*ptr, fptr, e->name(), e->category()); diff --git a/JetMETCorrections/FFTJetObjects/interface/loadFFTJetInterpolationTable.h b/JetMETCorrections/FFTJetObjects/interface/loadFFTJetInterpolationTable.h index 314eae41dbf7a..68eefd14dcfb9 100644 --- a/JetMETCorrections/FFTJetObjects/interface/loadFFTJetInterpolationTable.h +++ b/JetMETCorrections/FFTJetObjects/interface/loadFFTJetInterpolationTable.h @@ -2,13 +2,12 @@ #define JetMETCorrections_FFTJetObjects_loadFFTJetInterpolationTable_h #include "Alignment/Geners/interface/StringArchive.hh" -#include "Alignment/Geners/interface/CPP11_auto_ptr.hh" #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" #include "JetMETCorrections/InterpolationTables/interface/StorableMultivariateFunctor.h" -CPP11_auto_ptr loadFFTJetInterpolationTable(const edm::ParameterSet& ps, - gs::StringArchive& ar, - bool verbose); +std::unique_ptr loadFFTJetInterpolationTable(const edm::ParameterSet& ps, + gs::StringArchive& ar, + bool verbose); #endif // JetMETCorrections_FFTJetObjects_loadFFTJetInterpolationTable_h diff --git a/JetMETCorrections/FFTJetObjects/src/loadFFTJetInterpolationTable.cc b/JetMETCorrections/FFTJetObjects/src/loadFFTJetInterpolationTable.cc index 9817f64ffe60c..de30a40408793 100644 --- a/JetMETCorrections/FFTJetObjects/src/loadFFTJetInterpolationTable.cc +++ b/JetMETCorrections/FFTJetObjects/src/loadFFTJetInterpolationTable.cc @@ -25,9 +25,9 @@ static void dumpArchiveMetadata(gs::StringArchive& ar, std::ostream& os) { } } -CPP11_auto_ptr loadFFTJetInterpolationTable(const edm::ParameterSet& ps, - gs::StringArchive& ar, - const bool verbose) { +std::unique_ptr loadFFTJetInterpolationTable(const edm::ParameterSet& ps, + gs::StringArchive& ar, + const bool verbose) { gs::SearchSpecifier nameSearch(ps.getParameter("name"), ps.getParameter("nameIsRegex")); gs::SearchSpecifier categorySearch(ps.getParameter("category"), ps.getParameter("categoryIsRegex")); @@ -52,7 +52,7 @@ CPP11_auto_ptr loadFFTJetInterpolationTable throw cms::Exception("FFTJetBadConfig", os.str()); } - CPP11_auto_ptr p = ref.get(0); + std::unique_ptr p = ref.get(0); if (verbose) { std::cout << "In loadFFTJetInterpolationTable: loaded table with metadata" << std::endl; std::shared_ptr e = ref.indexedCatalogEntry(0); diff --git a/JetMETCorrections/InterpolationTables/interface/HistoND.h b/JetMETCorrections/InterpolationTables/interface/HistoND.h index 1a97f7336c4c5..a5d85721c54c0 100644 --- a/JetMETCorrections/InterpolationTables/interface/HistoND.h +++ b/JetMETCorrections/InterpolationTables/interface/HistoND.h @@ -1002,7 +1002,6 @@ namespace npstat { #include #include -#include "Alignment/Geners/interface/CPP11_auto_ptr.hh" #include "Alignment/Geners/interface/binaryIO.hh" namespace npstat { @@ -3521,7 +3520,7 @@ namespace npstat { ArrayND data, over; ArrayND::restore(ida, in, &data); ArrayND::restore(ida, in, &over); - CPP11_auto_ptr > result( + std::unique_ptr > result( new HistoND(axes, title.c_str(), accumulatedDataLabel.c_str())); result->data_ = data; result->overflow_ = over; diff --git a/JetMETCorrections/InterpolationTables/interface/LinInterpolatedTableND.h b/JetMETCorrections/InterpolationTables/interface/LinInterpolatedTableND.h index 14f52ef09728f..bda9cd5e64444 100644 --- a/JetMETCorrections/InterpolationTables/interface/LinInterpolatedTableND.h +++ b/JetMETCorrections/InterpolationTables/interface/LinInterpolatedTableND.h @@ -15,8 +15,6 @@ #include #include -#include "Alignment/Geners/interface/CPP11_auto_ptr.hh" - #include "JetMETCorrections/InterpolationTables/interface/ArrayND.h" #include "JetMETCorrections/InterpolationTables/interface/UniformAxis.h" @@ -179,11 +177,11 @@ namespace npstat { // in case "Numeric" type is either float or double. */ template - CPP11_auto_ptr invertWRTAxis(ConvertibleToUnsigned axisNumber, - const Axis& replacementAxis, - bool newAxisLeftLinear, - bool newAxisRightLinear, - const char* functionLabel = nullptr) const; + std::unique_ptr invertWRTAxis(ConvertibleToUnsigned axisNumber, + const Axis& replacementAxis, + bool newAxisLeftLinear, + bool newAxisRightLinear, + const char* functionLabel = nullptr) const; /** // This method inverts the ratio response. @@ -208,13 +206,13 @@ namespace npstat { // only in case "Numeric" type is either float or double. */ template - CPP11_auto_ptr invertRatioResponse(unsigned axisNumber, - const Axis& replacementAxis, - bool newAxisLeftLinear, - bool newAxisRightLinear, - Functor1 invg, - Functor2 invh, - const char* functionLabel = nullptr) const; + std::unique_ptr invertRatioResponse(unsigned axisNumber, + const Axis& replacementAxis, + bool newAxisLeftLinear, + bool newAxisRightLinear, + Functor1 invg, + Functor2 invh, + const char* functionLabel = nullptr) const; /** Comparison for equality */ bool operator==(const LinInterpolatedTableND&) const; @@ -716,7 +714,7 @@ namespace npstat { template template - CPP11_auto_ptr > LinInterpolatedTableND::invertWRTAxis( + std::unique_ptr > LinInterpolatedTableND::invertWRTAxis( const ConvertibleToUnsigned axisNumC, const Axis& replacementAxis, const bool leftLinear, @@ -737,7 +735,7 @@ namespace npstat { iType[axisNumber] = std::pair(leftLinear, rightLinear); // Create the new table - CPP11_auto_ptr pTable(new LinInterpolatedTableND(newAxes, iType, functionLabel)); + std::unique_ptr pTable(new LinInterpolatedTableND(newAxes, iType, functionLabel)); if (dim_ > 1U) { // Prepare array slices @@ -767,7 +765,7 @@ namespace npstat { template template - CPP11_auto_ptr > LinInterpolatedTableND::invertRatioResponse( + std::unique_ptr > LinInterpolatedTableND::invertRatioResponse( const unsigned axisNumber, const Axis& replacementAxis, const bool leftLinear, @@ -820,7 +818,7 @@ namespace npstat { std::vector workspace(nCoords); // Create the new table - CPP11_auto_ptr pTable(new LinInterpolatedTableND(newAxes, iType, functionLabel)); + std::unique_ptr pTable(new LinInterpolatedTableND(newAxes, iType, functionLabel)); if (dim_ > 1U) { // Prepare array slices diff --git a/JetMETCorrections/InterpolationTables/interface/StorableHistoNDFunctor.h b/JetMETCorrections/InterpolationTables/interface/StorableHistoNDFunctor.h index 4ab2c430cd30e..780bcc118ca5b 100644 --- a/JetMETCorrections/InterpolationTables/interface/StorableHistoNDFunctor.h +++ b/JetMETCorrections/InterpolationTables/interface/StorableHistoNDFunctor.h @@ -118,7 +118,6 @@ namespace npstat { #include "JetMETCorrections/InterpolationTables/interface/NpstatException.h" #include "Alignment/Geners/interface/binaryIO.hh" -#include "Alignment/Geners/interface/CPP11_auto_ptr.hh" #include "Alignment/Geners/interface/IOException.hh" #include "JetMETCorrections/InterpolationTables/interface/interpolateHistoND.h" @@ -157,7 +156,7 @@ namespace npstat { throw gs::IOReadFailure( "In npstat::StorableHistoNDFunctor::read: " "input stream failure"); - CPP11_auto_ptr tab(Table::read(tabid, in)); + std::unique_ptr
tab(Table::read(tabid, in)); return new StorableHistoNDFunctor(*tab, deg, descr); } diff --git a/JetMETCorrections/InterpolationTables/interface/StorableInterpolationFunctor.h b/JetMETCorrections/InterpolationTables/interface/StorableInterpolationFunctor.h index d55b430e5fd5d..0faccbd26f963 100644 --- a/JetMETCorrections/InterpolationTables/interface/StorableInterpolationFunctor.h +++ b/JetMETCorrections/InterpolationTables/interface/StorableInterpolationFunctor.h @@ -183,7 +183,6 @@ namespace npstat { } // namespace npstat #include "Alignment/Geners/interface/binaryIO.hh" -#include "Alignment/Geners/interface/CPP11_auto_ptr.hh" #include "Alignment/Geners/interface/IOException.hh" namespace npstat { @@ -212,7 +211,7 @@ namespace npstat { throw gs::IOReadFailure( "In npstat::StorableInterpolationFunctor::read: " "input stream failure"); - CPP11_auto_ptr
tab(Table::read(tabid, in)); + std::unique_ptr
tab(Table::read(tabid, in)); return new StorableInterpolationFunctor(*tab, descr); } } // namespace npstat diff --git a/JetMETCorrections/InterpolationTables/src/DualAxis.cc b/JetMETCorrections/InterpolationTables/src/DualAxis.cc index dd6eb623f9806..4af41ed9e3a2b 100644 --- a/JetMETCorrections/InterpolationTables/src/DualAxis.cc +++ b/JetMETCorrections/InterpolationTables/src/DualAxis.cc @@ -2,7 +2,6 @@ #include "Alignment/Geners/interface/binaryIO.hh" #include "Alignment/Geners/interface/IOException.hh" -#include "Alignment/Geners/interface/CPP11_auto_ptr.hh" namespace npstat { bool DualAxis::write(std::ostream& of) const { @@ -26,10 +25,10 @@ namespace npstat { "In npstat::DualAxis::read: " "input stream failure"); if (c) { - CPP11_auto_ptr axis(UniformAxis::read(clid, in)); + std::unique_ptr axis(UniformAxis::read(clid, in)); return new DualAxis(*axis); } else { - CPP11_auto_ptr axis(GridAxis::read(clid, in)); + std::unique_ptr axis(GridAxis::read(clid, in)); return new DualAxis(*axis); } } diff --git a/JetMETCorrections/InterpolationTables/src/DualHistoAxis.cc b/JetMETCorrections/InterpolationTables/src/DualHistoAxis.cc index ec1f4e39e41b3..51ef4595b59b7 100644 --- a/JetMETCorrections/InterpolationTables/src/DualHistoAxis.cc +++ b/JetMETCorrections/InterpolationTables/src/DualHistoAxis.cc @@ -2,7 +2,6 @@ #include "Alignment/Geners/interface/binaryIO.hh" #include "Alignment/Geners/interface/IOException.hh" -#include "Alignment/Geners/interface/CPP11_auto_ptr.hh" namespace npstat { bool DualHistoAxis::write(std::ostream& of) const { @@ -26,10 +25,10 @@ namespace npstat { "In npstat::DualHistoAxis::read: " "input stream failure"); if (c) { - CPP11_auto_ptr axis(HistoAxis::read(clid, in)); + std::unique_ptr axis(HistoAxis::read(clid, in)); return new DualHistoAxis(*axis); } else { - CPP11_auto_ptr axis(NUHistoAxis::read(clid, in)); + std::unique_ptr axis(NUHistoAxis::read(clid, in)); return new DualHistoAxis(*axis); } } From 3d5c5ef0079a38ad616238032f56658268c8d013 Mon Sep 17 00:00:00 2001 From: Ivan Razumov Date: Thu, 30 Nov 2023 11:57:22 +0100 Subject: [PATCH 2/2] Add missing include --- Alignment/Geners/interface/CStringStream.hh | 1 + Alignment/Geners/interface/GenericIO.hh | 4 +++- Alignment/Geners/interface/Reference.hh | 1 + Alignment/Geners/interface/WriteOnlyCatalog.hh | 1 + Alignment/Geners/interface/binaryIO.hh | 1 + Alignment/Geners/src/CStringStream.cc | 5 +++-- Alignment/Geners/src/CatalogEntry.cc | 1 + Alignment/Geners/src/ContiguousCatalog.cc | 1 + Alignment/Geners/src/WriteOnlyCatalog.cc | 1 + Alignment/Geners/test/cdump.cc | 1 + Alignment/Geners/test/cmerge.cc | 1 + Alignment/Geners/test/crecover.cc | 1 + Alignment/Geners/test/print_items.cc | 1 + .../FFTJetObjects/interface/loadFFTJetInterpolationTable.h | 1 + JetMETCorrections/InterpolationTables/interface/HistoND.h | 1 + .../InterpolationTables/interface/LinInterpolatedTableND.h | 2 ++ .../InterpolationTables/interface/StorableHistoNDFunctor.h | 1 + .../interface/StorableInterpolationFunctor.h | 1 + JetMETCorrections/InterpolationTables/src/DualAxis.cc | 1 + JetMETCorrections/InterpolationTables/src/DualHistoAxis.cc | 1 + 20 files changed, 25 insertions(+), 3 deletions(-) diff --git a/Alignment/Geners/interface/CStringStream.hh b/Alignment/Geners/interface/CStringStream.hh index df44bda484e31..f52a7c767150e 100644 --- a/Alignment/Geners/interface/CStringStream.hh +++ b/Alignment/Geners/interface/CStringStream.hh @@ -18,6 +18,7 @@ #include #include +#include #include "Alignment/Geners/interface/CStringBuf.hh" #include "Alignment/Geners/interface/ZlibHandle.hh" diff --git a/Alignment/Geners/interface/GenericIO.hh b/Alignment/Geners/interface/GenericIO.hh index 13ad7d38b97a1..c1370918de98f 100644 --- a/Alignment/Geners/interface/GenericIO.hh +++ b/Alignment/Geners/interface/GenericIO.hh @@ -5,6 +5,8 @@ #ifndef GENERS_GENERICIO_HH_ #define GENERS_GENERICIO_HH_ +#include + #include "Alignment/Geners/interface/IOPointeeType.hh" #include "Alignment/Geners/interface/binaryIO.hh" @@ -501,7 +503,7 @@ namespace gs { inline static bool readIntoPtr(std::string *&ptr, Stream &is, State *, const bool processClassId) { std::unique_ptr myptr; if (ptr == nullptr) - myptr = std::unique_ptr(new std::string()); + myptr = std::make_unique(); if (processClassId) { static const ClassId current(ClassId::makeId()); ClassId id(is, 1); diff --git a/Alignment/Geners/interface/Reference.hh b/Alignment/Geners/interface/Reference.hh index 03f80f43b42ba..c3bdbafc07679 100644 --- a/Alignment/Geners/interface/Reference.hh +++ b/Alignment/Geners/interface/Reference.hh @@ -2,6 +2,7 @@ #define GENERS_REFERENCE_HH_ #include "Alignment/Geners/interface/AbsReference.hh" +#include #include diff --git a/Alignment/Geners/interface/WriteOnlyCatalog.hh b/Alignment/Geners/interface/WriteOnlyCatalog.hh index 970f946bf679e..bf91e11651943 100644 --- a/Alignment/Geners/interface/WriteOnlyCatalog.hh +++ b/Alignment/Geners/interface/WriteOnlyCatalog.hh @@ -4,6 +4,7 @@ #include #include "Alignment/Geners/interface/AbsCatalog.hh" +#include namespace gs { class WriteOnlyCatalog : public AbsCatalog { diff --git a/Alignment/Geners/interface/binaryIO.hh b/Alignment/Geners/interface/binaryIO.hh index 11d76e9a4ac25..7cc1069646069 100644 --- a/Alignment/Geners/interface/binaryIO.hh +++ b/Alignment/Geners/interface/binaryIO.hh @@ -15,6 +15,7 @@ #ifndef GENERS_BINARYIO_HH_ #define GENERS_BINARYIO_HH_ +#include #include "Alignment/Geners/interface/ClassId.hh" #include "Alignment/Geners/interface/IOException.hh" diff --git a/Alignment/Geners/src/CStringStream.cc b/Alignment/Geners/src/CStringStream.cc index 81b9d6f7d24f9..b686276fe5fac 100644 --- a/Alignment/Geners/src/CStringStream.cc +++ b/Alignment/Geners/src/CStringStream.cc @@ -1,5 +1,6 @@ #include #include +#include #include "zlib.h" @@ -108,7 +109,7 @@ namespace gs { case ZLIB: { if (!inflator_.get()) - inflator_ = std::unique_ptr(new ZlibInflateHandle()); + inflator_ = std::make_unique(); doZlibCompression(&readBuf_[0], len, false, inflator_->strm(), &comprBuf_[0], comprBuf_.size(), *this); } break; @@ -144,7 +145,7 @@ namespace gs { switch (mode_) { case ZLIB: { if (!deflator_.get()) - deflator_ = std::unique_ptr(new ZlibDeflateHandle(compressionLevel_)); + deflator_ = std::make_unique(compressionLevel_); doZlibCompression(data, len, true, deflator_->strm(), &comprBuf_[0], comprBuf_.size(), *sink_); } break; diff --git a/Alignment/Geners/src/CatalogEntry.cc b/Alignment/Geners/src/CatalogEntry.cc index 55d454d54c7ef..514fa9a91bf91 100644 --- a/Alignment/Geners/src/CatalogEntry.cc +++ b/Alignment/Geners/src/CatalogEntry.cc @@ -1,5 +1,6 @@ #include "Alignment/Geners/interface/IOException.hh" +#include #include "Alignment/Geners/interface/CatalogEntry.hh" #include "Alignment/Geners/interface/binaryIO.hh" diff --git a/Alignment/Geners/src/ContiguousCatalog.cc b/Alignment/Geners/src/ContiguousCatalog.cc index 0162382f87c5f..0b57a6c0394e7 100644 --- a/Alignment/Geners/src/ContiguousCatalog.cc +++ b/Alignment/Geners/src/ContiguousCatalog.cc @@ -2,6 +2,7 @@ #include #include +#include #include "Alignment/Geners/interface/ContiguousCatalog.hh" #include "Alignment/Geners/interface/IOException.hh" #include "Alignment/Geners/interface/binaryIO.hh" diff --git a/Alignment/Geners/src/WriteOnlyCatalog.cc b/Alignment/Geners/src/WriteOnlyCatalog.cc index 2e0f6e2a2fd59..9a32a544934b0 100644 --- a/Alignment/Geners/src/WriteOnlyCatalog.cc +++ b/Alignment/Geners/src/WriteOnlyCatalog.cc @@ -1,3 +1,4 @@ +#include #include "Alignment/Geners/interface/IOException.hh" #include "Alignment/Geners/interface/WriteOnlyCatalog.hh" #include "Alignment/Geners/interface/binaryIO.hh" diff --git a/Alignment/Geners/test/cdump.cc b/Alignment/Geners/test/cdump.cc index 1ed9905502109..82cdd46b7d242 100644 --- a/Alignment/Geners/test/cdump.cc +++ b/Alignment/Geners/test/cdump.cc @@ -6,6 +6,7 @@ #include #include +#include #include "Alignment/Geners/interface/CStringStream.hh" #include "Alignment/Geners/interface/CatalogIO.hh" #include "Alignment/Geners/interface/ContiguousCatalog.hh" diff --git a/Alignment/Geners/test/cmerge.cc b/Alignment/Geners/test/cmerge.cc index 059e016c2468f..3afe06898e842 100644 --- a/Alignment/Geners/test/cmerge.cc +++ b/Alignment/Geners/test/cmerge.cc @@ -5,6 +5,7 @@ #include #include +#include #include "Alignment/Geners/interface/CatalogIO.hh" #include "Alignment/Geners/interface/ContiguousCatalog.hh" #include "Alignment/Geners/interface/uriUtils.hh" diff --git a/Alignment/Geners/test/crecover.cc b/Alignment/Geners/test/crecover.cc index a71d2eddefa68..4e7366c779f51 100644 --- a/Alignment/Geners/test/crecover.cc +++ b/Alignment/Geners/test/crecover.cc @@ -5,6 +5,7 @@ #include #include "Alignment/Geners/interface/BinaryArchiveBase.hh" +#include #include "Alignment/Geners/interface/CatalogIO.hh" #include "Alignment/Geners/interface/ContiguousCatalog.hh" #include "Alignment/Geners/interface/IOException.hh" diff --git a/Alignment/Geners/test/print_items.cc b/Alignment/Geners/test/print_items.cc index a5a2f26236e5a..d98bf986a638e 100644 --- a/Alignment/Geners/test/print_items.cc +++ b/Alignment/Geners/test/print_items.cc @@ -8,6 +8,7 @@ // statements already present in this program. // +#include #include "Alignment/Geners/interface/ClassId.hh" #include "Alignment/Geners/interface/MultiFileArchive.hh" #include "Alignment/Geners/interface/Reference.hh" diff --git a/JetMETCorrections/FFTJetObjects/interface/loadFFTJetInterpolationTable.h b/JetMETCorrections/FFTJetObjects/interface/loadFFTJetInterpolationTable.h index 68eefd14dcfb9..3973bc4667de6 100644 --- a/JetMETCorrections/FFTJetObjects/interface/loadFFTJetInterpolationTable.h +++ b/JetMETCorrections/FFTJetObjects/interface/loadFFTJetInterpolationTable.h @@ -2,6 +2,7 @@ #define JetMETCorrections_FFTJetObjects_loadFFTJetInterpolationTable_h #include "Alignment/Geners/interface/StringArchive.hh" +#include #include "FWCore/ParameterSet/interface/ParameterSetfwd.h" #include "JetMETCorrections/InterpolationTables/interface/StorableMultivariateFunctor.h" diff --git a/JetMETCorrections/InterpolationTables/interface/HistoND.h b/JetMETCorrections/InterpolationTables/interface/HistoND.h index a5d85721c54c0..1542699f552a9 100644 --- a/JetMETCorrections/InterpolationTables/interface/HistoND.h +++ b/JetMETCorrections/InterpolationTables/interface/HistoND.h @@ -1002,6 +1002,7 @@ namespace npstat { #include #include +#include #include "Alignment/Geners/interface/binaryIO.hh" namespace npstat { diff --git a/JetMETCorrections/InterpolationTables/interface/LinInterpolatedTableND.h b/JetMETCorrections/InterpolationTables/interface/LinInterpolatedTableND.h index bda9cd5e64444..4977728483f9d 100644 --- a/JetMETCorrections/InterpolationTables/interface/LinInterpolatedTableND.h +++ b/JetMETCorrections/InterpolationTables/interface/LinInterpolatedTableND.h @@ -15,6 +15,8 @@ #include #include +#include + #include "JetMETCorrections/InterpolationTables/interface/ArrayND.h" #include "JetMETCorrections/InterpolationTables/interface/UniformAxis.h" diff --git a/JetMETCorrections/InterpolationTables/interface/StorableHistoNDFunctor.h b/JetMETCorrections/InterpolationTables/interface/StorableHistoNDFunctor.h index 780bcc118ca5b..29cb753a61794 100644 --- a/JetMETCorrections/InterpolationTables/interface/StorableHistoNDFunctor.h +++ b/JetMETCorrections/InterpolationTables/interface/StorableHistoNDFunctor.h @@ -118,6 +118,7 @@ namespace npstat { #include "JetMETCorrections/InterpolationTables/interface/NpstatException.h" #include "Alignment/Geners/interface/binaryIO.hh" +#include #include "Alignment/Geners/interface/IOException.hh" #include "JetMETCorrections/InterpolationTables/interface/interpolateHistoND.h" diff --git a/JetMETCorrections/InterpolationTables/interface/StorableInterpolationFunctor.h b/JetMETCorrections/InterpolationTables/interface/StorableInterpolationFunctor.h index 0faccbd26f963..3ae51cb8adeba 100644 --- a/JetMETCorrections/InterpolationTables/interface/StorableInterpolationFunctor.h +++ b/JetMETCorrections/InterpolationTables/interface/StorableInterpolationFunctor.h @@ -183,6 +183,7 @@ namespace npstat { } // namespace npstat #include "Alignment/Geners/interface/binaryIO.hh" +#include #include "Alignment/Geners/interface/IOException.hh" namespace npstat { diff --git a/JetMETCorrections/InterpolationTables/src/DualAxis.cc b/JetMETCorrections/InterpolationTables/src/DualAxis.cc index 4af41ed9e3a2b..01b101da34e77 100644 --- a/JetMETCorrections/InterpolationTables/src/DualAxis.cc +++ b/JetMETCorrections/InterpolationTables/src/DualAxis.cc @@ -2,6 +2,7 @@ #include "Alignment/Geners/interface/binaryIO.hh" #include "Alignment/Geners/interface/IOException.hh" +#include namespace npstat { bool DualAxis::write(std::ostream& of) const { diff --git a/JetMETCorrections/InterpolationTables/src/DualHistoAxis.cc b/JetMETCorrections/InterpolationTables/src/DualHistoAxis.cc index 51ef4595b59b7..f90fc7f2f32af 100644 --- a/JetMETCorrections/InterpolationTables/src/DualHistoAxis.cc +++ b/JetMETCorrections/InterpolationTables/src/DualHistoAxis.cc @@ -2,6 +2,7 @@ #include "Alignment/Geners/interface/binaryIO.hh" #include "Alignment/Geners/interface/IOException.hh" +#include namespace npstat { bool DualHistoAxis::write(std::ostream& of) const {