Small wrapper around hit collection map to facilitate accessing the hit collection.  
 More...
#include <HitCollectionMap.h>
|  | 
| std::pair< StorageIterator, bool > | Insert (std::string const &hitCollectionName, std::unique_ptr< HitsVectorBase > hitCollection) | 
|  | Insert the hit collection for a given SDs.  More... 
 | 
|  | 
| template<class HitCollectionT , class... CollectionArgs> | 
| std::pair< StorageIterator, bool > | Emplace (std::string const &hitCollectionName, CollectionArgs &&... args) | 
|  | Insert a container in the map with in-place construction.  More... 
 | 
|  | 
| template<class T > | 
| T * | Find (std::string const &hitCollectionName) | 
|  | Get the hit collection for a given SDs.  More... 
 | 
|  | 
| template<class T > | 
| std::unique_ptr< T > | Extract (std::string const &hitCollectionName) | 
|  | Extract the hit collection for a given SDs downcasted to the template parameter.  More... 
 | 
|  | 
| template<class T > | 
| void | Record (std::string const &sgKey, std::string const &hitCollectionName, EventContext const &ctx) | 
|  | Record the hit collection hitCollectionName to the StoreGate sgKey.  More... 
 | 
|  | 
| template<class T > | 
| void | Record (std::string const &hitCollectionName) | 
|  | Overload for Record with the same name for the SG key and hit collection name.  More... 
 | 
|  | 
| template<class T > | 
| void | TransformAndRecord (std::string const &sgKey, std::string const &hitCollectionName, EventContext const &ctx, std::function< void(T &)> transform) | 
|  | Record the hit collection hitCollectionName to the StoreGate sgKey, applying a transformation function to the hit collection before recording it.  More... 
 | 
|  | 
| template<class T > | 
| void | TransformAndRecord (std::string const &hitCollectionName, std::function< void(T &)> transform) | 
|  | Overload for TransformAndRecord with the same name for the SG key and hit collection name.  More... 
 | 
|  | 
Small wrapper around hit collection map to facilitate accessing the hit collection. 
Definition at line 20 of file HitCollectionMap.h.
◆ Storage
◆ StorageIterator
◆ Emplace()
template<class HitCollectionT , class... CollectionArgs> 
  
  | 
        
          | std::pair<StorageIterator, bool> HitCollectionMap::Emplace | ( | std::string const & | hitCollectionName, |  
          |  |  | CollectionArgs &&... | args |  
          |  | ) |  |  |  | inline | 
 
Insert a container in the map with in-place construction. 
Definition at line 38 of file HitCollectionMap.h.
   40         std::is_base_of_v<HitsVectorBase, HitCollectionT>,
 
   41         "HitCollectionT must be derived from HitsVectorBase");
 
   43             hitCollectionName, std::make_unique<HitCollectionT>(std::forward<CollectionArgs>(
args)...));
 
 
 
 
◆ Extract()
template<class T > 
  
  | 
        
          | std::unique_ptr<T> HitCollectionMap::Extract | ( | std::string const & | hitCollectionName | ) |  |  | inline | 
 
Extract the hit collection for a given SDs downcasted to the template parameter. 
Definition at line 66 of file HitCollectionMap.h.
   68         std::is_base_of_v<HitsVectorBase, T>,
 
   69         "T must be derived from HitsVectorBase");
 
   73       return std::unique_ptr<T>(
static_cast<T*
>(handle.mapped().release()));
 
 
 
 
◆ Find()
template<class T > 
  
  | 
        
          | T* HitCollectionMap::Find | ( | std::string const & | hitCollectionName | ) |  |  | inline | 
 
Get the hit collection for a given SDs. 
Definition at line 50 of file HitCollectionMap.h.
   52         std::is_base_of_v<HitsVectorBase, T>,
 
   53         "T must be derived from HitsVectorBase");
 
   56       return static_cast<T*
>(
it->second.get());
 
 
 
 
◆ Insert()
◆ Record() [1/2]
template<class T > 
  
  | 
        
          | void HitCollectionMap::Record | ( | std::string const & | hitCollectionName | ) |  |  | inline | 
 
Overload for Record with the same name for the SG key and hit collection name. 
Definition at line 91 of file HitCollectionMap.h.
   92     Record<T>(hitCollectionName, hitCollectionName, Gaudi::Hive::currentContext());
 
 
 
 
◆ Record() [2/2]
template<class T > 
  
  | 
        
          | void HitCollectionMap::Record | ( | std::string const & | sgKey, |  
          |  |  | std::string const & | hitCollectionName, |  
          |  |  | EventContext const & | ctx |  
          |  | ) |  |  |  | inline | 
 
Record the hit collection hitCollectionName to the StoreGate sgKey. 
Definition at line 82 of file HitCollectionMap.h.
   84     handle = Extract<T>(hitCollectionName);
 
 
 
 
◆ TransformAndRecord() [1/2]
template<class T > 
  
  | 
        
          | void HitCollectionMap::TransformAndRecord | ( | std::string const & | hitCollectionName, |  
          |  |  | std::function< void(T &)> | transform |  
          |  | ) |  |  |  | inline | 
 
Overload for TransformAndRecord with the same name for the SG key and hit collection name. 
Definition at line 115 of file HitCollectionMap.h.
 
 
◆ TransformAndRecord() [2/2]
template<class T > 
  
  | 
        
          | void HitCollectionMap::TransformAndRecord | ( | std::string const & | sgKey, |  
          |  |  | std::string const & | hitCollectionName, |  
          |  |  | EventContext const & | ctx, |  
          |  |  | std::function< void(T &)> | transform |  
          |  | ) |  |  |  | inline | 
 
Record the hit collection hitCollectionName to the StoreGate sgKey, applying a transformation function to the hit collection before recording it. 
Definition at line 100 of file HitCollectionMap.h.
  105     auto hitColl = Extract<T>(hitCollectionName);
 
  108     handle = std::move(hitColl);
 
 
 
 
◆ m_outputCollections
  
  | 
        
          | Storage HitCollectionMap::m_outputCollections |  | private | 
 
 
The documentation for this class was generated from the following file:
 
void TransformAndRecord(std::string const &sgKey, std::string const &hitCollectionName, EventContext const &ctx, std::function< void(T &)> transform)
Record the hit collection hitCollectionName to the StoreGate sgKey, applying a transformation functio...