ATLAS Offline Software
Classes | Namespaces | Functions
CaloIDHelper_IDDetDescrCnv.h File Reference

Common code for creating calo ID helpers in the detector store. More...

#include "DetDescrCnvSvc/DetDescrConverter.h"
#include "CaloIdCnv/CaloIDHelper_IDDetDescrCnv.icc"
Include dependency graph for CaloIDHelper_IDDetDescrCnv.h:

Go to the source code of this file.

Classes

class  CaloIdCnv::CaloIDHelper_IDDetDescrCnv
 Base class for calo ID helper converters. More...
 
class  CaloIdCnv::CaloIDHelper_IDDetDescrCnv_T< T >
 Class for calo ID helper converters. More...
 

Namespaces

 CaloIdCnv
 

Functions

template<class T >
StatusCode CaloIdCnv::make_CaloIDHelper (ISvcLocator *svcloc, const std::string &helperKey, T *&idhelper)
 Helper function to actually create a new helper. More...
 

Detailed Description

Common code for creating calo ID helpers in the detector store.

Author
scott snyder snyde.nosp@m.r@bn.nosp@m.l.gov
Date
Aug, 2012 A converter to make an ID helper and put it in the detector store is mostly boilerplate, so we use the classes here to factor that out. The base class CaloIDHelper_IDDetDescrCnv has most of the boilerplate, and also contains the code for initializing the helper. This relies on the abstract virtual function createHelper to do the work of actually creating the helper and storing it into the DataObject (as those depend on the actual type of the helper).

An implementation of createHelper is provided in the class CaloIDHelper_IDDetDescrCnv_T<T>, which is templated on the helper type. Usually, specializations of this class can be used directly as the converter class. This calls the function make_CaloIDHelper to actually create the helper instance. By default, this just does new with the default constructor, but it can be overridden for specific types if needed (for example for the CaloCell_* helpers).

Definition in file CaloIDHelper_IDDetDescrCnv.h.