CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DDAlgorithmHandler Class Reference

wrapper around a DDAlgorithm More...

#include <DDAlgorithmHandler.h>

Public Member Functions

 DDAlgorithmHandler ()
 creates an DDAlgorithm wrapper More...
 
void execute (DDCompactView &)
 executes the wrapped algorithm algo_; some pre- and post-processing (exception handling) More...
 
void initialize (const DDName &algoName, const DDLogicalPart &parent, const DDNumericArguments &nArgs, const DDVectorArguments &vArgs, const DDMapArguments &mArgs, const DDStringArguments &sArgs, const DDStringVectorArguments &svArgs)
 initializes the wrapped algorithm algo_ and does some pre- and post-processing More...
 

Private Attributes

std::unique_ptr< DDAlgorithm > algo_
 the wrapped algorithm object More...
 

Detailed Description

wrapper around a DDAlgorithm

used from DDParser for setting up, initializing, and executing an DDAlgorithm

Definition at line 15 of file DDAlgorithmHandler.h.

Constructor & Destructor Documentation

DDAlgorithmHandler::DDAlgorithmHandler ( )
inline

creates an DDAlgorithm wrapper

Definition at line 19 of file DDAlgorithmHandler.h.

References HIPAlignmentAlgorithm_cfi::algoName, execute(), initialize(), and class-composition::parent.

19 {}

Member Function Documentation

void DDAlgorithmHandler::execute ( DDCompactView cpv)

executes the wrapped algorithm algo_; some pre- and post-processing (exception handling)

Definition at line 23 of file DDAlgorithmHandler.cc.

References algo_.

Referenced by DDAlgorithmHandler(), and DDLAlgorithm::processElement().

24 {
25  algo_->execute( cpv );
26 }
std::unique_ptr< DDAlgorithm > algo_
the wrapped algorithm object
void DDAlgorithmHandler::initialize ( const DDName algoName,
const DDLogicalPart parent,
const DDNumericArguments nArgs,
const DDVectorArguments vArgs,
const DDMapArguments mArgs,
const DDStringArguments sArgs,
const DDStringVectorArguments svArgs 
)

initializes the wrapped algorithm algo_ and does some pre- and post-processing

pre- and postprocessing mainly covers exception handling, the algorithm object algo_ is fetched from the plugin-manager

Definition at line 9 of file DDAlgorithmHandler.cc.

References algo_, DDName::fullname(), and reco::get().

Referenced by DDAlgorithmHandler(), and DDLAlgorithm::processElement().

16 {
17  algo_ = std::unique_ptr<DDAlgorithm>(DDAlgorithmFactory::get()->create( algoName.fullname()));
18  algo_->setParent( parent );
19  algo_->initialize( nArgs, vArgs, mArgs, sArgs, svArgs );
20 }
std::unique_ptr< DDAlgorithm > algo_
the wrapped algorithm object
const std::string fullname() const
Definition: DDName.h:43
T get(const Candidate &c)
Definition: component.h:55

Member Data Documentation

std::unique_ptr<DDAlgorithm> DDAlgorithmHandler::algo_
private

the wrapped algorithm object

Definition at line 36 of file DDAlgorithmHandler.h.

Referenced by execute(), and initialize().