From c1d650a4f16008a607b6c6525fea47cd57fd13ac Mon Sep 17 00:00:00 2001 From: Jan de Cuveland <cuveland@compeng.uni-frankfurt.de> Date: Wed, 5 Jul 2023 14:34:19 +0200 Subject: [PATCH] Apply clang-format --- algo/unpack/Unpack.cxx | 15 ++++++--------- algo/unpack/Unpack.h | 17 +++++++---------- reco/steer/CbmRecoUnpack.cxx | 14 +++++++------- reco/steer/CbmRecoUnpack.h | 8 ++++---- 4 files changed, 24 insertions(+), 30 deletions(-) diff --git a/algo/unpack/Unpack.cxx b/algo/unpack/Unpack.cxx index d706b5ac07..74f0462dbe 100644 --- a/algo/unpack/Unpack.cxx +++ b/algo/unpack/Unpack.cxx @@ -28,13 +28,11 @@ namespace cbm::algo UnpackMonitorData& monitor = result.second; if (DetectorEnabled(Subsystem::STS)) { - ParallelMsLoop(Subsystem::STS, digiTs.fData.fSts.fDigis, monitor.fSts, *timeslice, fAlgoSts, - 0x20); + ParallelMsLoop(Subsystem::STS, digiTs.fData.fSts.fDigis, monitor.fSts, *timeslice, fAlgoSts, 0x20); } if (DetectorEnabled(Subsystem::TOF)) { - ParallelMsLoop(Subsystem::TOF, digiTs.fData.fTof.fDigis, monitor.fTof, *timeslice, fAlgoTof, - 0x00); + ParallelMsLoop(Subsystem::TOF, digiTs.fData.fTof.fDigis, monitor.fTof, *timeslice, fAlgoTof, 0x00); } // --- Component loop @@ -127,9 +125,8 @@ namespace cbm::algo // ---------------------------------------------------------------------------- template<class Digi, class UnpackAlgo, class Monitor> - void Unpack::ParallelMsLoop(const Subsystem subsystem, std::vector<Digi>& digisOut, - std::vector<Monitor>& monitorOut, const fles::Timeslice& ts, - const std::map<u16, UnpackAlgo>& algos, u8 sys_ver) + void Unpack::ParallelMsLoop(const Subsystem subsystem, std::vector<Digi>& digisOut, std::vector<Monitor>& monitorOut, + const fles::Timeslice& ts, const std::map<u16, UnpackAlgo>& algos, u8 sys_ver) { xpu::scoped_timer t_(fles::to_string(subsystem)); @@ -219,8 +216,8 @@ namespace cbm::algo const auto duration = std::chrono::duration_cast<std::chrono::microseconds>(endtime - starttime); L_(debug) << "Unpack(): Component " << comp << ", subsystem " - << fles::to_string(static_cast<Subsystem>(timeslice->descriptor(comp, 0).sys_id)) - << ", microslices " << numMsInComp << " input size " << numBytesInComp << " bytes," + << fles::to_string(static_cast<Subsystem>(timeslice->descriptor(comp, 0).sys_id)) << ", microslices " + << numMsInComp << " input size " << numBytesInComp << " bytes," << " digis " << numDigisInComp << ", CPU time " << duration.count() / 1000. << " ms"; monitor.fNumMs += numMsInComp; diff --git a/algo/unpack/Unpack.h b/algo/unpack/Unpack.h index 795169109e..8b93ff770b 100644 --- a/algo/unpack/Unpack.h +++ b/algo/unpack/Unpack.h @@ -140,12 +140,11 @@ namespace cbm::algo /** @brief Parallel microslice loop **/ template<class Digi, class UnpackAlgo, class Monitor> - void ParallelMsLoop(const Subsystem subsystem, std::vector<Digi>& digisOut, - std::vector<Monitor>& monitor, const fles::Timeslice& ts, - const std::map<u16, UnpackAlgo>& algos, u8 sys_ver); + void ParallelMsLoop(const Subsystem subsystem, std::vector<Digi>& digisOut, std::vector<Monitor>& monitor, + const fles::Timeslice& ts, const std::map<u16, UnpackAlgo>& algos, u8 sys_ver); - std::pair<size_t, size_t> ParallelInit(const fles::Timeslice& ts, Subsystem subsystem, - std::vector<u16>& eqIds, std::vector<fles::MicrosliceDescriptor>& msDesc, + std::pair<size_t, size_t> ParallelInit(const fles::Timeslice& ts, Subsystem subsystem, std::vector<u16>& eqIds, + std::vector<fles::MicrosliceDescriptor>& msDesc, std::vector<const u8*>& msContent); /** @brief Sort Digis and add bytes to timer for throughput */ @@ -155,7 +154,7 @@ namespace cbm::algo private: // members bool fApplyWalkCorrection = true; ///< Apply walk correction - std::vector<Subsystem> fSubsystems = {}; ///< Detector identifiers to unpack + std::vector<Subsystem> fSubsystems = {}; ///< Detector identifiers to unpack /** @brief STS unpackers **/ std::map<uint16_t, UnpackSts> fAlgoSts = {}; @@ -180,10 +179,8 @@ namespace cbm::algo /** @brief System time offsets **/ std::map<Subsystem, int32_t> fSystemTimeOffset = { - {Subsystem::STS, -970}, {Subsystem::MUCH, -980}, - {Subsystem::RICH, 100}, {Subsystem::TOF, 40}, - {Subsystem::T0, 0}, {Subsystem::TRD, 1300}, - {Subsystem::TRD2D, -510}}; + {Subsystem::STS, -970}, {Subsystem::MUCH, -980}, {Subsystem::RICH, 100}, {Subsystem::TOF, 40}, + {Subsystem::T0, 0}, {Subsystem::TRD, 1300}, {Subsystem::TRD2D, -510}}; }; } // namespace cbm::algo diff --git a/reco/steer/CbmRecoUnpack.cxx b/reco/steer/CbmRecoUnpack.cxx index aa551236ee..0c724b4c40 100644 --- a/reco/steer/CbmRecoUnpack.cxx +++ b/reco/steer/CbmRecoUnpack.cxx @@ -112,7 +112,7 @@ Bool_t CbmRecoUnpack::Init() // --- Psd if (fPsdConfig) { fPsdConfig->InitOutput(); - RegisterOutputs(ioman, fPsdConfig); /// Framework bound work = kept in this Task + RegisterOutputs(ioman, fPsdConfig); /// Framework bound work = kept in this Task fPsdConfig->SetAlgo(); initParContainers(fPsdConfig->GetParContainerRequest()); /// Framework bound work = kept in this Task fPsdConfig->InitAlgo(); @@ -121,7 +121,7 @@ Bool_t CbmRecoUnpack::Init() // --- Rich if (fRichConfig) { fRichConfig->InitOutput(); - RegisterOutputs(ioman, fRichConfig); /// Framework bound work = kept in this Task + RegisterOutputs(ioman, fRichConfig); /// Framework bound work = kept in this Task fRichConfig->SetAlgo(); initParContainers(fRichConfig->GetParContainerRequest()); /// Framework bound work = kept in this Task fRichConfig->InitAlgo(); @@ -131,7 +131,7 @@ Bool_t CbmRecoUnpack::Init() // --- Sts if (fStsConfig) { fStsConfig->InitOutput(); - RegisterOutputs(ioman, fStsConfig); /// Framework bound work = kept in this Task + RegisterOutputs(ioman, fStsConfig); /// Framework bound work = kept in this Task fStsConfig->SetAlgo(); initParContainers(fStsConfig->GetParContainerRequest()); /// Framework bound work = kept in this Task fStsConfig->InitAlgo(); @@ -141,7 +141,7 @@ Bool_t CbmRecoUnpack::Init() // --- Much if (fMuchConfig) { fMuchConfig->InitOutput(); - RegisterOutputs(ioman, fMuchConfig); /// Framework bound work = kept in this Task + RegisterOutputs(ioman, fMuchConfig); /// Framework bound work = kept in this Task fMuchConfig->SetAlgo(); initParContainers(fMuchConfig->GetParContainerRequest()); /// Framework bound work = kept in this Task fMuchConfig->InitAlgo(); @@ -154,7 +154,7 @@ Bool_t CbmRecoUnpack::Init() fTofConfig->InitOutput(); RegisterOutputs(ioman, fTofConfig); /// Framework bound work = kept in this Task fTofConfig->SetAlgo(); - fTofConfig->LoadParFileName(); /// Needed to change the Parameter file name before it is used!!! + fTofConfig->LoadParFileName(); /// Needed to change the Parameter file name before it is used!!! initParContainers(fTofConfig->GetParContainerRequest()); /// Framework bound work = kept in this Task fTofConfig->InitAlgo(); initPerformanceMaps(Subsystem::TOF, "TOF"); @@ -162,7 +162,7 @@ Bool_t CbmRecoUnpack::Init() // --- Trd if (fTrd1DConfig) { fTrd1DConfig->InitOutput(); - RegisterOutputs(ioman, fTrd1DConfig); /// Framework bound work = kept in this Task + RegisterOutputs(ioman, fTrd1DConfig); /// Framework bound work = kept in this Task fTrd1DConfig->SetAlgo(); initParContainers(fTrd1DConfig->GetParContainerRequest()); /// Framework bound work = kept in this Task fTrd1DConfig->InitAlgo(); @@ -194,7 +194,7 @@ Bool_t CbmRecoUnpack::Init() fBmonConfig->InitOutput(); RegisterOutputs(ioman, fBmonConfig); /// Framework bound work = kept in this Task fBmonConfig->SetAlgo(); - fBmonConfig->LoadParFileName(); /// Needed to change the Parameter file name before it is used!!! + fBmonConfig->LoadParFileName(); /// Needed to change the Parameter file name before it is used!!! initParContainers(fBmonConfig->GetParContainerRequest()); /// Framework bound work = kept in this Task fBmonConfig->InitAlgo(); initPerformanceMaps(Subsystem::T0, "Bmon"); diff --git a/reco/steer/CbmRecoUnpack.h b/reco/steer/CbmRecoUnpack.h index 4533077c77..c528b0861b 100644 --- a/reco/steer/CbmRecoUnpack.h +++ b/reco/steer/CbmRecoUnpack.h @@ -221,16 +221,16 @@ private: TH1* fhRealTimePerTs = nullptr; //! Processing time per TS TH1* fhCpuTimePerTsHist = nullptr; //! Plotting time per TS TH1* fhRealTimePerTsHist = nullptr; //! Plotting time per TS - std::map<Subsystem, TH1*> fvhInpRatioPerTs = {}; //! ratio of system data in total input size vs TS in run - std::map<Subsystem, TH1*> fvhOutRatioPerTs = {}; //! ratio of system digi size in total output size vs TS in run - std::map<Subsystem, TH1*> fvhUnpRatioPerTs = {}; //! ratio of selected digi vs TS in run + std::map<Subsystem, TH1*> fvhInpRatioPerTs = {}; //! ratio of system data in total input size vs TS in run + std::map<Subsystem, TH1*> fvhOutRatioPerTs = {}; //! ratio of system digi size in total output size vs TS in run + std::map<Subsystem, TH1*> fvhUnpRatioPerTs = {}; //! ratio of selected digi vs TS in run TH1* fhUnpackingRatioPerTs = nullptr; //! ratio of total unpacked size to input size vs TS in run std::unique_ptr<cbm::Monitor> fMonitor; //! The application's monitoring object std::string fMoniCurrrentHostname = ""; std::string fMoniJobId = ""; std::chrono::system_clock::time_point fMonitorSecCurrentTs = std::chrono::system_clock::time_point(); //! - std::map<Subsystem, std::pair<double, double>> fDataSizeMapCurrSec = {}; //! + std::map<Subsystem, std::pair<double, double>> fDataSizeMapCurrSec = {}; //! /** @brief Run the performance profiling based on the fTimeMap and fDataSizeMap members. */ void performanceProfiling(); -- GitLab