/
githubmirror
/
cmssw
Обзор
Документация
Войти
/
githubmirror
/
cmssw
Код
Запросы
0
Пакеты
0
Релизы
0
Аналитика
Безопасность
master
FWCore/ServiceRegistry/src/ESParentContext.cc
36 строк
1 KB
Chris Jones
code formatting
17 фев 2021, 01:34
17 фев 2021, 01:34
1d77705
Код
Авторство
О чём код?
#include "FWCore/ServiceRegistry/interface/ESParentContext.h" #include "FWCore/ServiceRegistry/interface/ModuleCallingContext.h" #include "FWCore/ServiceRegistry/interface/ESModuleCallingContext.h" #include "FWCore/Utilities/interface/EDMException.h" #include <ostream> namespace edm { ESParentContext::ESParentContext() : type_(Type::kInvalid) { parent_.esmodule = nullptr; } ESParentContext::ESParentContext(ModuleCallingContext const* module) noexcept : type_(Type::kModule) { parent_.module = module; } ESParentContext::ESParentContext(ESModuleCallingContext const* module) noexcept : type_(Type::kESModule) { parent_.esmodule = module; } ModuleCallingContext const* ESParentContext::moduleCallingContext() const { if (type_ != Type::kModule) { throw Exception(errors::LogicError) << "ESParentContext::moduleCallingContext called for incorrect type of context"; } return parent_.module; } ESModuleCallingContext const* ESParentContext::esmoduleCallingContext() const { if (type_ != Type::kESModule) { throw Exception(errors::LogicError) << "ESParentContext::esmoduleCallingContext called for incorrect type of context"; } return parent_.esmodule; } } // namespace edm