ATLAS Offline Software
|
Helper base class for "correction tools". More...
#include <CorrectionTool.h>
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... | |
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
Definition at line 42 of file CorrectionTool.h.
typedef T CP::CorrectionTool< T >::xAODContainerType |
description: the type of xAOD container used
Definition at line 46 of file CorrectionTool.h.
typedef xAODContainerType::base_value_type CP::CorrectionTool< T >::xAODObjectType |
description: the type of xAOD object used
Definition at line 48 of file CorrectionTool.h.
|
inlinevirtual |
effects: standard destructor rationale: virtual destruct for base class
Definition at line 52 of file CorrectionTool.h.
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
|
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 | ||
) |
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