Go to the documentation of this file.
26 const std::string& condition_string ) {
28 std::stringstream
msg;
29 msg <<
"Conditoin Failed: " << file_name <<
":" << line_no <<
" " << condition_string;
30 throw std::runtime_error(
msg.str() );
35 std::string::size_type pos = full_name.rfind(
"." );
36 std::string::size_type pos2 = full_name.rfind(
"/" );
37 if ( pos == std::string::npos ) {
39 }
else if ( pos2 > pos ) {
42 return pos != std::string::npos ? full_name.substr( pos + 1 ) : full_name;
55 DEBUG_TRACE( std::cout <<
"DEBUG " <<
name() <<
" setDefaults" << base_name << std::endl; );
56 if ( base_name ==
"tool1" ) {
59 }
else if ( base_name ==
"tool2" ) {
63 }
else if ( base_name ==
"tool3" ) {
68 }
else if ( base_name ==
"tool4" ) {
72 }
else if ( base_name ==
"tool5" || base_name ==
"tool5Bug" ) {
77 }
else if ( base_name ==
"tool6" ) {
82 <<
", data handles:" <<
m_handles.size() << std::endl );
87 void renounce( [[maybe_unused]] std::string_view
tool, [[maybe_unused]] std::string_view input )
override {
88 DEBUG_TRACE( std::cout <<
"renounce " <<
tool <<
" . " << input << std::endl );
107 DEBUG_TRACE( std::cout <<
"DEBUG " <<
name() <<
" initialize." << std::endl );
110 DEBUG_TRACE( std::cout <<
name() <<
" tool:" << handle.typeAndName() << std::endl );
111 handle.retrieve().ignore();
113 if ( base_name ==
"tool5" ) {
115 return data.mode() == Gaudi::DataHandle::Writer && data.objKey() ==
"Renounce";
120 <<
"Renounce" << std::endl );
122 ToolVisitor::visit(
tools(), visitor );
126 <<
", data handles:" <<
m_handles.size() << std::endl );
139 DEBUG_TRACE( std::cout <<
"DEBUG TestAlg ctor " <<
name() << std::endl );
141 addTool(
"GaudiTesting::TestTool/tool5Bug" );
144 addTool(
"GaudiTesting::TestTool/tool5" );
150 DEBUG_TRACE( std::cout <<
name() <<
" tool:" << handle.typeAndName() << std::endl );
161 if ( handle->objKey().find(
pattern ) != std::string::npos ) {
162 DEBUG_TRACE( std::cout <<
"DEBUG input Handle " <<
tool->name() <<
" . " << handle->objKey()
167 if ( handle->objKey().find(
pattern ) != std::string::npos ) {
168 DEBUG_TRACE( std::cout <<
"DEBUG output Handle " <<
tool->name() <<
" . " << handle->objKey()
173 if ( elm.key().find(
pattern ) != std::string::npos ) {
174 DEBUG_TRACE( std::cout <<
"DEBUGinput Handle " <<
tool->name() <<
" . " << elm.key() << std::endl );
179 ToolVisitor::visit(
tools(), dumper );
185 DEBUG_TRACE( std::cout <<
"DEBUG " <<
name() <<
" input:" << const_obj_id.key() << std::endl );
188 DEBUG_TRACE( std::cout <<
"DEBUG " <<
name() <<
" output:" << const_obj_id.key() << std::endl );
const std::string & name() const override
The identifying name of the algorithm object.
StatusCode setProperty(const Gaudi::Details::PropertyBase &p)
Set the property from a property.
StatusCode initialize() override
Alias for backward compatibility.
std::string extractBaseName(const std::string &full_name)
std::vector< Gaudi::DataHandle * > outputHandles() const override
void declare(Gaudi::DataHandle &handle) override
StatusCode declareTool(ToolHandle< T > &handle, bool createIf=true)
void addTool(const std::string &name)
TestAlg(const std::string &aname, ISvcLocator *svc_Locator)
std::deque< ToolHandle< ITestTool > > m_algTools
const std::vector< IAlgTool * > & tools() const
Base class used to extend a class implementing other interfaces.
std::vector< Gaudi::DataHandle * > inputHandles() const override
GAUDIPS_API Logger & logger()
Return the current logger instance.
constexpr static const auto SUCCESS
void throwConditionFailed(bool condition, const std::string &file_name, int line_no, const std::string &condition_string)
const DataObjIDColl & outputDataObjs() const override
#define DECLARE_COMPONENT(type)
StatusCode finalize() override
void dumpData(const std::string &pattern) const
const DataObjIDColl & inputDataObjs() const override
StatusCode execute() override
constexpr static const auto FAILURE