Back to home page

EIC code displayed by LXR

 
 

    


File indexing completed on 2025-02-21 10:00:28

0001 /***********************************************************************************\
0002 * (c) Copyright 1998-2019 CERN for the benefit of the LHCb and ATLAS collaborations *
0003 *                                                                                   *
0004 * This software is distributed under the terms of the Apache version 2 licence,     *
0005 * copied verbatim in the file "LICENSE".                                            *
0006 *                                                                                   *
0007 * In applying this licence, CERN does not waive the privileges and immunities       *
0008 * granted to it by virtue of its status as an Intergovernmental Organization        *
0009 * or submit itself to any jurisdiction.                                             *
0010 \***********************************************************************************/
0011 #ifndef GAUDIKERNEL_DATAHANDLEFINDER
0012 #define GAUDIKERNEL_DATAHANDLEFINDER 1
0013 
0014 #include "GaudiKernel/DataObjID.h"
0015 #include "GaudiKernel/IDataHandleHolder.h"
0016 
0017 /** @class DataHandleFinder DataHandleFinder.h GaudiKernel/DataHandleFinder.h
0018  *
0019  *  Implements the IDataHandleVisitor interface
0020  *  Class used to explore heirarchy of nested IDataHandleHolders
0021  *  <UL>
0022  *  <LI> Instantiated with a specific target data object to find
0023  *  <LI> Descends heirarchy of tools, examining all data handles
0024  *  <LI> Returns a vector of tool/algorithm names that own handles
0025  *  to the target data
0026  *  </UL>
0027  *
0028  *  @author Ben Wynne
0029  */
0030 
0031 class DataHandleFinder : public IDataHandleVisitor {
0032 public:
0033   DataHandleFinder( DataObjID const& target );
0034 
0035   void                      visit( const IDataHandleHolder* visitee ) override;
0036   std::vector<std::string>& holderNames() { return m_holderNames; }
0037 
0038 private:
0039   DataObjID const&         m_target;
0040   std::vector<std::string> m_holderNames;
0041 };
0042 
0043 #endif