diff --git a/DataFormats/Common/interface/DataFrameContainer.h b/DataFormats/Common/interface/DataFrameContainer.h index e10b8058f97..11d1806123f 100644 --- a/DataFormats/Common/interface/DataFrameContainer.h +++ b/DataFormats/Common/interface/DataFrameContainer.h @@ -136,7 +136,8 @@ namespace edm { const_IdIter p = std::lower_bound(m_ids.begin(), m_ids.end(), i); return (p == m_ids.end() || (*p) != i) ? end() - : boost::make_transform_iterator(boost::counting_iterator(static_cast(p - m_ids.begin())), IterHelp(*this)); + : boost::make_transform_iterator(boost::counting_iterator(static_cast(p - m_ids.begin())), + IterHelp(*this)); } /// The iterator returned can not safely be used across threads diff --git a/DataFormats/Common/interface/MultiAssociation.h b/DataFormats/Common/interface/MultiAssociation.h index e21a58bde7b..5779ad287f6 100644 --- a/DataFormats/Common/interface/MultiAssociation.h +++ b/DataFormats/Common/interface/MultiAssociation.h @@ -216,8 +216,7 @@ namespace edm { template FastFiller(MultiAssociation &assoc, const HandleType &handle) : assoc_(assoc), - indexFiller_( - new IndexFiller(assoc_.indices_, handle.id(), static_cast(handle->size()))) {} + indexFiller_(new IndexFiller(assoc_.indices_, handle.id(), static_cast(handle->size()))) {} FastFiller(MultiAssociation &assoc, edm::ProductID id, unsigned int size) : assoc_(assoc), indexFiller_(new IndexFiller(assoc_.indices_, id, size)) {} diff --git a/DataFormats/Common/src/MultiAssociation.cc b/DataFormats/Common/src/MultiAssociation.cc index f30af3e21bf..58eef44266c 100644 --- a/DataFormats/Common/src/MultiAssociation.cc +++ b/DataFormats/Common/src/MultiAssociation.cc @@ -42,7 +42,9 @@ void IndexRangeAssociation::swap(IndexRangeAssociation &other) { IndexRangeAssociation::FastFiller::FastFiller(IndexRangeAssociation &assoc, ProductID id, size_type size) : assoc_(assoc), id_(id), - start_(assoc.ref_offsets_.empty() ? 0 : static_cast(assoc.ref_offsets_.size() - 1)), // must skip the end marker element + start_(assoc.ref_offsets_.empty() + ? 0 + : static_cast(assoc.ref_offsets_.size() - 1)), // must skip the end marker element end_(start_ + size), lastKey_(-1) { if (assoc_.isFilling_) diff --git a/DataFormats/Provenance/src/IndexIntoFile.cc b/DataFormats/Provenance/src/IndexIntoFile.cc index 8703e860c20..29b1004b162 100644 --- a/DataFormats/Provenance/src/IndexIntoFile.cc +++ b/DataFormats/Provenance/src/IndexIntoFile.cc @@ -369,7 +369,8 @@ namespace edm { oldToNewIndex[static_cast(iter - processHistoryIDs_.begin())] = static_cast(processHistoryIDs.size()); processHistoryIDs.push_back(*iter); } else { - oldToNewIndex[static_cast(iter - processHistoryIDs_.begin())] = static_cast(iterExisting - processHistoryIDs.begin()); + oldToNewIndex[static_cast(iter - processHistoryIDs_.begin())] = + static_cast(iterExisting - processHistoryIDs.begin()); } } processHistoryIDs_ = processHistoryIDs; @@ -550,8 +551,14 @@ namespace edm { continue; if (lumi == invalidLumi && event == invalidEvent) { - IndexIntoFileItr indexItr( - this, numericalOrder, kRun, static_cast(iRun - runOrLumiIndexes().begin()), invalidIndex, invalidIndex, 0, 0); + IndexIntoFileItr indexItr(this, + numericalOrder, + kRun, + static_cast(iRun - runOrLumiIndexes().begin()), + invalidIndex, + invalidIndex, + 0, + 0); indexItr.initializeRun(); return indexItr; } diff --git a/DataFormats/Provenance/src/ProductResolverIndexHelper.cc b/DataFormats/Provenance/src/ProductResolverIndexHelper.cc index 5e86e4c0288..327eb54ecf7 100644 --- a/DataFormats/Provenance/src/ProductResolverIndexHelper.cc +++ b/DataFormats/Provenance/src/ProductResolverIndexHelper.cc @@ -391,12 +391,12 @@ namespace edm { ++iCount; if (iFirstThisType || item.moduleLabel() != previousModuleLabel || item.instance() != previousInstance) { - for(auto const& label: item.moduleLabel()) { + for (auto const& label : item.moduleLabel()) { bigNamesContainer_.push_back(label); } bigNamesContainer_.push_back('\0'); - for(auto const& instance: item.instance()) { + for (auto const& instance : item.instance()) { bigNamesContainer_.push_back(instance); } bigNamesContainer_.push_back('\0'); diff --git a/FWCore/Common/src/OutputProcessBlockHelper.cc b/FWCore/Common/src/OutputProcessBlockHelper.cc index 38924fcd368..35fe873d641 100644 --- a/FWCore/Common/src/OutputProcessBlockHelper.cc +++ b/FWCore/Common/src/OutputProcessBlockHelper.cc @@ -58,7 +58,8 @@ namespace edm { std::vector storedCacheIndices; // Number of processes in StoredProcessBlockHelper. - unsigned int nStoredProcesses = static_cast(storedProcessBlockHelper.processesWithProcessBlockProducts().size()); + unsigned int nStoredProcesses = + static_cast(storedProcessBlockHelper.processesWithProcessBlockProducts().size()); if (!productsFromInputKept_) { // This is really simple if we are not keeping any ProcessBlock products diff --git a/FWCore/Common/src/ProcessBlockHelper.cc b/FWCore/Common/src/ProcessBlockHelper.cc index 3ade8784f7c..e12303e00a6 100644 --- a/FWCore/Common/src/ProcessBlockHelper.cc +++ b/FWCore/Common/src/ProcessBlockHelper.cc @@ -125,7 +125,8 @@ namespace edm { assert(processesWithProcessBlockProducts().empty()); setProcessesWithProcessBlockProducts(storedProcessBlockHelper.processesWithProcessBlockProducts()); - nProcessesInFirstFile_ = static_cast(processesWithProcessBlockProducts().size()); + nProcessesInFirstFile_ = + static_cast(processesWithProcessBlockProducts().size()); } } diff --git a/FWCore/Common/src/ProcessBlockHelperBase.cc b/FWCore/Common/src/ProcessBlockHelperBase.cc index 39a91326dda..f915fe292ac 100644 --- a/FWCore/Common/src/ProcessBlockHelperBase.cc +++ b/FWCore/Common/src/ProcessBlockHelperBase.cc @@ -46,7 +46,8 @@ namespace edm { [&desc](auto const& processFromHelper) { return processFromHelper == desc.processName(); }); if (found != processesWithProcessBlockProducts_.end()) { const auto position = std::distance(processesWithProcessBlockProducts_.begin(), found); - static_assert(std::is_same_v); + static_assert(std::is_same_v); if (position >= bestPosition) { bestPosition = position; selectedProcess = desc.processName(); diff --git a/FWCore/ParameterSet/src/types.cc b/FWCore/ParameterSet/src/types.cc index 3b1bd67c12b..6bb976dbf64 100644 --- a/FWCore/ParameterSet/src/types.cc +++ b/FWCore/ParameterSet/src/types.cc @@ -691,7 +691,8 @@ bool edm::decode(edm::EventID& to, std::string_view from) { std::vector tokens = edm::tokenize(std::string(from), ":"); assert(tokens.size() == 2 || tokens.size() == 3); RunNumber_t run = static_cast(strtoul(tokens[0].c_str(), nullptr, 0)); - LuminosityBlockNumber_t lumi = (tokens.size() == 2 ? 0 : static_cast(strtoul(tokens[1].c_str(), nullptr, 0))); + LuminosityBlockNumber_t lumi = + (tokens.size() == 2 ? 0 : static_cast(strtoul(tokens[1].c_str(), nullptr, 0))); EventNumber_t event = strtoull(tokens[tokens.size() - 1].c_str(), nullptr, 0); to = edm::EventID(run, lumi, event); diff --git a/FWCore/SOA/interface/TableView.h b/FWCore/SOA/interface/TableView.h index 6880f982faf..32dbfff1e96 100644 --- a/FWCore/SOA/interface/TableView.h +++ b/FWCore/SOA/interface/TableView.h @@ -58,8 +58,7 @@ namespace edm { } TableView(size_t iSize, std::array& iArray) : m_size(iSize), m_values(iArray) {} - TableView(size_t iSize, std::array& iArray) - : m_size(iSize), m_values(iArray) {} + TableView(size_t iSize, std::array& iArray) : m_size(iSize), m_values(iArray) {} auto size() const { return m_size; } diff --git a/FWCore/Utilities/bin/adler32.cc b/FWCore/Utilities/bin/adler32.cc index 01a2c9fd27e..996889821b2 100644 --- a/FWCore/Utilities/bin/adler32.cc +++ b/FWCore/Utilities/bin/adler32.cc @@ -48,7 +48,7 @@ int main(int argc, char* argv[]) { lseek(myFD, 0, SEEK_SET); - decltype(read(myFD,nullptr, EDMFILEUTILADLERBUFSIZE)) readSize = 0; + decltype(read(myFD, nullptr, EDMFILEUTILADLERBUFSIZE)) readSize = 0; while ((readSize = read(myFD, buffer.get(), EDMFILEUTILADLERBUFSIZE)) > 0) { adlerCksum = adler32(adlerCksum, buffer.get(), static_cast(readSize)); fileSize += readSize; diff --git a/FWCore/Utilities/src/CPUTimer.cc b/FWCore/Utilities/src/CPUTimer.cc index 68f692fc34e..49baeac8b7c 100644 --- a/FWCore/Utilities/src/CPUTimer.cc +++ b/FWCore/Utilities/src/CPUTimer.cc @@ -113,10 +113,12 @@ CPUTimer::Times CPUTimer::calculateDeltaTime() const { struct timespec tp; clock_gettime(CLOCK_PROCESS_CPUTIME_ID, &tp); - returnValue.cpu_ = double(tp.tv_sec - startCPUTime_.tv_sec) + nanosecToSec * double(tp.tv_nsec - startCPUTime_.tv_nsec); + returnValue.cpu_ = + double(tp.tv_sec - startCPUTime_.tv_sec) + nanosecToSec * double(tp.tv_nsec - startCPUTime_.tv_nsec); clock_gettime(CLOCK_MONOTONIC, &tp); - returnValue.real_ = double(tp.tv_sec - startRealTime_.tv_sec) + nanosecToSec * double(tp.tv_nsec - startRealTime_.tv_nsec); + returnValue.real_ = + double(tp.tv_sec - startRealTime_.tv_sec) + nanosecToSec * double(tp.tv_nsec - startRealTime_.tv_nsec); #else rusage theUsage; if (0 != getrusage(RUSAGE_SELF, &theUsage)) {