ATLAS Offline Software
Public Types | Public Member Functions | List of all members
CP::CorrectionTool< T > Class Template Referenceabstract

Helper base class for "correction tools". More...

#include <CorrectionTool.h>

Collaboration diagram for CP::CorrectionTool< T >:

Public Types

typedef T xAODContainerType
 description: the type of xAOD container used More...
 
typedef xAODContainerType::base_value_type xAODObjectType
 description: the type of xAOD object used More...
 

Public Member Functions

virtual ~CorrectionTool ()
 effects: standard destructor rationale: virtual destruct for base class More...
 
virtual CorrectionCode applyCorrection (xAODObjectType &inputObject)=0
 effects: apply the correction and store the output in the object returns: success More...
 
CorrectionCode correctedCopy (const xAODObjectType &inputObject, xAODObjectType *&outputObject)
 effects: make a clone of the input object, apply the correction to it and store the output in the object returns: success rationale: the interface class provides a default implementation in terms of applyCorrection, that the derived classes can override for efficiency More...
 
CorrectionCode applyContainerCorrection (xAODContainerType &inputContainer)
 effects: apply the correction to all the members of the container returns: overall success rationale: this will apply the correction to every single member (even if some members fail) rationale: the interface class provides a default implementation in terms of applyCorrection, that the derived classes can override for efficiency More...
 

Detailed Description

template<class T>
class CP::CorrectionTool< T >

Helper base class for "correction tools".

This class is provided to make the coding of CP tools that apply some modification to objects a little easier. The tool needs to provide a separate, proper interface class. This class will just provide the implementation of the functions defined in that interface. So the CP tool itself will look like:

class MySmearingTool : public virtual IMySmearingTool,
public virtual CP::CorrectionTool< MyContainerType >,
public asg::AsgTool {
...
};

The idea is that the user only needs to implement one function in the final tool in order to implement the interface outlined in https://cds.cern.ch/record/1667206

Author
Nils Krumnack krumn.nosp@m.ack@.nosp@m.iasta.nosp@m.te.e.nosp@m.du
Attila Krasznahorkay Attil.nosp@m.a.Kr.nosp@m.aszna.nosp@m.hork.nosp@m.ay@ce.nosp@m.rn.c.nosp@m.h
Revision
600738
Date
2014-06-07 16:34:05 +0200 (Sat, 07 Jun 2014)

Definition at line 42 of file CorrectionTool.h.

Member Typedef Documentation

◆ xAODContainerType

template<class T >
typedef T CP::CorrectionTool< T >::xAODContainerType

description: the type of xAOD container used

Definition at line 46 of file CorrectionTool.h.

◆ xAODObjectType

template<class T >
typedef xAODContainerType::base_value_type CP::CorrectionTool< T >::xAODObjectType

description: the type of xAOD object used

Definition at line 48 of file CorrectionTool.h.

Constructor & Destructor Documentation

◆ ~CorrectionTool()

template<class T >
virtual CP::CorrectionTool< T >::~CorrectionTool ( )
inlinevirtual

effects: standard destructor rationale: virtual destruct for base class

Definition at line 52 of file CorrectionTool.h.

52 {}

Member Function Documentation

◆ applyContainerCorrection()

template<class T >
CorrectionCode CP::CorrectionTool< T >::applyContainerCorrection ( xAODContainerType inputContainer)

effects: apply the correction to all the members of the container returns: overall success rationale: this will apply the correction to every single member (even if some members fail) rationale: the interface class provides a default implementation in terms of applyCorrection, that the derived classes can override for efficiency

◆ applyCorrection()

template<class T >
virtual CorrectionCode CP::CorrectionTool< T >::applyCorrection ( xAODObjectType inputObject)
pure virtual

effects: apply the correction and store the output in the object returns: success

◆ correctedCopy()

template<class T >
CorrectionCode CP::CorrectionTool< T >::correctedCopy ( const xAODObjectType inputObject,
xAODObjectType *&  outputObject 
)

effects: make a clone of the input object, apply the correction to it and store the output in the object returns: success rationale: the interface class provides a default implementation in terms of applyCorrection, that the derived classes can override for efficiency


The documentation for this class was generated from the following file: