/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
FWStorage/DavixAdaptor/test/davixreadv.cpp
41 строка
1 KB
Christopher Jones
Moved Utilities/DavixAdaptor to FWStorage/DavixAdaptor
10 дек 2025, 23:12
10 дек 2025, 23:12
e5282f2
Код
Авторство
О чём код?
#include "FWCore/Utilities/interface/Exception.h" #include "FWStorage/StorageFactory/interface/Storage.h" #include "FWStorage/StorageFactory/test/Test.h" #include <cassert> int main(int, char ** /*argv*/) try { initTest(); using namespace edm::storage; std::unique_ptr<Storage> s = StorageFactory::get()->open( "http://cern.ch/cmsbuild/cms/Run2011A/PhotonHad/AOD" "/12Oct2013-v1/00000/024938EB-3445-E311-A72B-002590593920.root"); assert(s); IOSize totalVecs = 6; char *buf[4096] = {NULL}; int sizes[] = {20, 100, 50, 1024, 2222}; int offset[] = {1000, 2, 19, 100, 500}; for (IOSize i = 1; i < totalVecs; i++) { std::cout << i; std::vector<IOPosBuffer> iov; iov.reserve(i); for (IOSize j = 0; j < i; j++) { iov.push_back(IOPosBuffer(offset[j], buf, sizes[j])); } s->readv(&iov[0], iov.size()); std::cout << "stats " << i << ":\n" << StorageAccount::summaryText() << std::endl; } s->close(); std::cout << "final stats:\n" << StorageAccount::summaryText() << std::endl; return EXIT_SUCCESS; } catch (cms::Exception const &e) { std::cerr << e.explainSelf() << std::endl; return EXIT_FAILURE; } catch (std::exception const &e) { std::cerr << e.what() << std::endl; return EXIT_FAILURE; }