#include "GaudiEnv.h"
#include <Gaudi/Algorithm.h>
#include <Gaudi/PluginService.h>
#include <GaudiKernel/Bootstrap.h>
#include <GaudiKernel/IAlgorithm.h>
#include <regex>
#include <typeinfo>
Go to the source code of this file.
◆ main()
Definition at line 20 of file ToolVisitorTest_test.cpp.
22 const auto& reg = Gaudi::PluginService::Details::Registry::instance();
25 const auto& info = reg.getInfo(
"GaudiTesting::TestAlg",
true );
27 using FactoryType =
typename Traits::FactoryType;
29 DEBUG_TRACE(
std::cout <<
"DEBUG get factory " << info.library <<
"\n type : " << info.factory.type().name()
30 <<
"\n exp. : " <<
typeid( FactoryType ).name() <<
std::endl );
31 auto alg = std::any_cast<FactoryType>( info.factory )(
"TestAlg", &( *(
gaudi.m_svcLoc ) ) );
33 <<
" with some inputs renounced. Should not \"have\" implicit circular dependencies." <<
std::endl;
35 if (
alg->sysInitialize().isFailure() )
return 1;
37 if (
alg->sysFinalize().isFailure() )
return 1;
40 alg = std::any_cast<FactoryType>( info.factory )(
"TestAlgBug", &( *(
gaudi.m_svcLoc ) ) );
43 <<
"INFO Now check that initialize will fail when there are circular dependencies which should be the case for "
45 if ( !
alg->sysInitialize().isFailure() ) {
47 if (
alg->sysFinalize().isFailure() )
return 1;