/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
FastSimulation/Utilities/src/Looses.cc
46 строк
1 KB
Shahzad Malik Muzaffar
[FASTSIM] [LLVM21] Apply clang-tidy changes
26 ноя 2025, 17:11
26 ноя 2025, 17:11
dd10790
Код
Авторство
О чём код?
//FAMOS headers #include "FastSimulation/Utilities/interface/Looses.h" #include <iomanip> #include <iostream> Looses* Looses::myself = nullptr; Looses::Looses() {} Looses* Looses::instance() { if (!myself) myself = new Looses(); return myself; } Looses::~Looses() { summary(); } void Looses::count(const std::string& name, unsigned cut) { if (theLosses.find(name) == theLosses.end()) { std::vector<unsigned> myCounts; myCounts.reserve(20); for (unsigned i = 0; i < 20; ++i) myCounts.push_back(0); theLosses[name] = myCounts; } if (cut < 20) ++theLosses[name][cut]; } void Looses::summary() { std::map<std::string, std::vector<unsigned> >::const_iterator lossItr; std::cout << "***** From LOOSES ***** : Cuts effects" << std::endl << std::endl; for (lossItr = theLosses.begin(); lossItr != theLosses.end(); ++lossItr) { std::cout << lossItr->first << ":" << std::endl; for (unsigned i = 0; i < 4; ++i) { for (unsigned j = 0; j < 5; ++j) { std::cout << std::setw(8) << lossItr->second[5 * i + j] << " "; } std::cout << std::endl; } std::cout << std::endl; } }