#include <CorrectionTool.h>
Public Types | |
typedef T | xAODContainerType |
description: the type of xAOD container used | |
typedef xAODContainerType::base_value_type | xAODObjectType |
description: the type of xAOD object used | |
Public Member Functions | |
virtual | ~CorrectionTool () |
virtual CorrectionCode | applyCorrection (xAODObjectType &inputObject)=0 |
CorrectionCode | correctedCopy (const xAODObjectType &inputObject, xAODObjectType *&outputObject) |
CorrectionCode | applyContainerCorrection (xAODContainerType &inputContainer) |
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
virtual CP::CorrectionTool< T >::~CorrectionTool | ( | ) | [inline, virtual] |
effects: standard destructor rationale: virtual destruct for base class
CorrectionCode CP::CorrectionTool< T >::applyContainerCorrection | ( | xAODContainerType & | inputContainer | ) | [inline] |
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
virtual CorrectionCode CP::CorrectionTool< T >::applyCorrection | ( | xAODObjectType & | inputObject | ) | [pure virtual] |
effects: apply the correction and store the output in the object returns: success
CorrectionCode CP::CorrectionTool< T >::correctedCopy | ( | const xAODObjectType & | inputObject, | |
xAODObjectType *& | outputObject | |||
) | [inline] |
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