|  | ATLAS Offline Software
    | 
 
 
 
Go to the documentation of this file.
   15 #ifndef ATHENABASECOMPS_ATHCOMMONDATASTORE_H 
   16 #define ATHENABASECOMPS_ATHCOMMONDATASTORE_H 
   19 #include <type_traits> 
   22 #include "GaudiKernel/StatusCode.h" 
   25   class VarHandleKeyArray;
 
   40 #include "GaudiKernel/ServiceHandle.h" 
   51 template <
class PBASE>
 
   54   template <
typename... 
T>
 
   64                      "Handle to a StoreGateSvc instance: it will be used to " 
   65                      "retrieve data during the course of the job" );
 
   69                      "Handle to a StoreGateSvc/DetectorStore instance: it will be used to " 
   70                      "retrieve data during the course of the job" );
 
   72     auto props = this->getProperties();
 
   73     for( Gaudi::Details::PropertyBase* prop : props ) {
 
   74       if (prop->name() == 
"ExtraOutputs" || prop->name() == 
"ExtraInputs") {
 
   75         prop->declareUpdateHandler
 
  144   template <
class T, 
class V, 
class H>
 
  155   template <
class T, 
class V, 
class H>
 
  161                                                        hndl.documentation());
 
  169   template <
class T, 
class V, 
class H>
 
  175                                                        hndl.documentation());
 
  183   template <
class T, 
class V, 
class H>
 
  189                                                        hndl.documentation());
 
  198   template <
class T, 
class V, 
class H>
 
  201     return PBASE::declareProperty(
t);
 
  223                             const std::string& 
doc,
 
  229     return PBASE::declareProperty(
name,hndl,
doc);
 
  247                             const std::string& 
doc,
 
  250     this->declare(hndl.
vhKey());
 
  251     hndl.
vhKey().setOwner(
this);
 
  253     return PBASE::declareProperty(
name,hndl,
doc);
 
  261                             const std::string& 
doc,
 
  274     m_vhka.push_back(&hndArr);
 
  276     Gaudi::Details::PropertyBase* 
p =  PBASE::declareProperty(
name, hndArr, 
doc);
 
  280       ATH_MSG_ERROR(
"unable to call declareProperty on VarHandleKeyArray "  
  312       std::vector<SG::VarHandleKey*> 
keys = 
a->keys();
 
  313       for (
auto k : 
keys) {
 
  335                             const std::string& 
doc,
 
  338     return PBASE::declareProperty(
name, property, 
doc);
 
  354                             const std::string& 
doc=
"none") 
 
  374   using PBASE::renounce;
 
  376   std::enable_if_t<std::is_void_v<std::result_of_t<decltype(&T::renounce)(
T)> > &&
 
  377                    !std::is_base_of_v<SG::VarHandleKeyArray, T> &&
 
  378                    std::is_base_of_v<Gaudi::DataHandle, T>,
 
  398   std::vector<SG::VarHandleKeyArray*> 
m_vhka;
 
  
Base class for VarHandle classes.
void extraDeps_update_handler(Gaudi::Details::PropertyBase &ExtraDeps)
Add StoreName to extra input/output deps as needed.
virtual StatusCode sysStart() override
Handle START transition.
Handle Gaudi property setting for VarHandleKey.
A property holding a SG store/key/clid from which a VarHandle is made.
AthCommonDataStore(const std::string &name, T... args)
StatusCode parse(std::tuple< Tup... > &tup, const Gaudi::Parsers::InputData &input)
bool m_varHandleArraysDeclared
Gaudi::Details::PropertyBase * declareProperty(const std::string &name, T &property, const std::string &doc="none")
Declare a new Gaudi property.
Base class for VarHandle types.
std::enable_if_t< std::is_void_v< std::result_of_t< decltype(&T::renounce)(T)> > &&!std::is_base_of_v< SG::VarHandleKeyArray, T > &&std::is_base_of_v< Gaudi::DataHandle, T >, void > renounce(T &h)
StoreGateSvc_t m_evtStore
Pointer to StoreGate (event store by default)
std::vector< SG::VarHandleKeyArray * > m_vhka
Base class for VarHandleKeyArray for reading from StoreGate.
void renounceArray(SG::VarHandleKeyArray &handlesArray)
remove all handles from I/O resolution
Gaudi::Details::PropertyBase * declareProperty(const std::string &name, SG::VarHandleKeyArray &hndArr, const std::string &doc, const SG::VarHandleKeyArrayType &)
const ServiceHandle< StoreGateSvc > & detStore() const
The standard StoreGateSvc/DetectorStore Returns (kind of) a pointer to the StoreGateSvc.
virtual void setOwner(IDataHandleHolder *o)=0
class to handle Properties for VarHandleKeyArray
virtual std::vector< Gaudi::DataHandle * > inputHandles() const override
Return this algorithm's input handles.
ServiceHandle< StoreGateSvc > StoreGateSvc_t
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyType &)
specialization for handling Gaudi::Property<SG::VarHandleKey>
ServiceHandle< StoreGateSvc > & evtStore()
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleKeyArrayType &)
specialization for handling Gaudi::Property<SG::VarHandleKeyArray>
virtual std::vector< Gaudi::DataHandle * > outputHandles() const override
Return this algorithm's output handles.
::StatusCode StatusCode
StatusCode definition for legacy code.
Helper to classify the type of a handle property.
Gaudi::Details::PropertyBase & declareProperty(Gaudi::Property< T, V, H > &t)
StoreGateSvc_t m_detStore
Pointer to StoreGate (detector store by default)
Gaudi::Details::PropertyBase * declareProperty(const std::string &name, T &property, const std::string &doc, const SG::NotHandleType &)
Declare a new Gaudi property.
virtual void renounce()=0
std::conditional< std::is_base_of< SG::VarHandleKeyArray, T >::value, VarHandleKeyArrayType, type2 >::type type
virtual StatusCode sysInitialize() override
Perform system initialization for an algorithm.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &hndl, const SG::VarHandleType &)
specialization for handling Gaudi::Property<SG::VarHandleBase>
Gaudi::Details::PropertyBase * declareProperty(const std::string &name, SG::VarHandleBase &hndl, const std::string &doc, const SG::VarHandleType &)
Declare a new Gaudi property.
Gaudi::Details::PropertyBase * declareProperty(const std::string &name, SG::VarHandleKey &hndl, const std::string &doc, const SG::VarHandleKeyType &)
Declare a new Gaudi property.
Gaudi::Details::PropertyBase & declareGaudiProperty(Gaudi::Property< T, V, H > &t, const SG::NotHandleType &)
specialization for handling everything that's not a Gaudi::Property<SG::VarHandleKey> or a <SG::VarHa...
A property holding a SG store/key/clid from which a VarHandle is made.
void updateVHKA(Gaudi::Details::PropertyBase &)
SG::VarHandleKey & vhKey()
Return a non-const reference to the HandleKey.
=============================================================================
const ServiceHandle< StoreGateSvc > & evtStore() const
The standard StoreGateSvc (event store) Returns (kind of) a pointer to the StoreGateSvc.