11#ifndef ASGSERVICES_SERVICESTORE_H
12#define ASGSERVICES_SERVICESTORE_H
14#ifndef XAOD_STANDALONE
16#error "This header should only be used in XAOD_STANDALONE"
43 class ServiceStore
final
48 static StatusCode put(
const std::shared_ptr<IAsgService>& pservice );
51 static std::shared_ptr<IAsgService>
get(
const std::string& name,
bool silent =
false );
54 template<
typename T >
55 static std::shared_ptr<T>
get(
const std::string& name )
57 return std::dynamic_pointer_cast< T >(
get( name ) );
61 template<
typename T >
62 static bool contains(
const std::string& name )
64 return (
dynamic_cast< T*
>(
get( name,
true ).
get() ) != 0 );
68 static void dumpServiceConfig ();
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
bool contains(const std::string &s, const std::string ®x)
does a string contain the substring
::StatusCode StatusCode
StatusCode definition for legacy code.