/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
SimG4Core/Application/interface/CustomUIsessionToFile.h
31 строка
1004 B
Vladimir
exteded geometry test
24 июл 2019, 12:08
24 июл 2019, 12:08
3e57ba7
Код
Авторство
О чём код?
#ifndef SimG4Core_CustomUIsessionToFile_H #define SimG4Core_CustomUIsessionToFile_H #include "SimG4Core/Geometry/interface/CustomUIsession.h" #include <fstream> /** * This class is intended for debugging of multithreaded simulation * when the amount of output is moderate to large. Output of Geant4 in * each thread is forwarded to a thread-specific file. Compared to * using MessageLogger, this way the synchronization is avoided. * Thread safety is ensured by * - each thread gets its own file name * - each thread gets its own std::ofstream object (as * RunManagerMTWorker creates a CustomUIsessionToFile object * separately for each thread). */ class CustomUIsessionToFile : public CustomUIsession { public: CustomUIsessionToFile(const std::string& filePrefix, int threadId); ~CustomUIsessionToFile() override; G4int ReceiveG4cout(const G4String& coutString) override; G4int ReceiveG4cerr(const G4String& cerrString) override; private: std::ofstream m_output; }; #endif