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 std::string &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...
 
virtual ~DDAlgorithmHandler ()
 

Private Attributes

std::unique_ptr< DDAlgorithm > algo_
 the wrapped algorithm object More...
 
std::string algoname_
 name of the algorithm object More...
 
DDLogicalPart parent_
 parent logical part 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 ( void  )

creates an DDAlgorithm wrapper

Parameters
ais a pointer to an DDAlgorithm object; its memory is NOT managed by DDAlgorithmHandler

Definition at line 8 of file DDAlgorithmHandler.cc.

9 {}
DDAlgorithmHandler::~DDAlgorithmHandler ( void  )
virtual

Definition at line 11 of file DDAlgorithmHandler.cc.

12 {}

Member Function Documentation

void DDAlgorithmHandler::execute ( DDCompactView cpv)

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

Definition at line 30 of file DDAlgorithmHandler.cc.

References algo_.

Referenced by DDLAlgorithm::processElement().

31 {
32  algo_->execute( cpv );
33 }
std::unique_ptr< DDAlgorithm > algo_
the wrapped algorithm object
void DDAlgorithmHandler::initialize ( const std::string &  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 15 of file DDAlgorithmHandler.cc.

References algo_, HIPAlignmentAlgorithm_cfi::algoName, algoname_, and reco::get().

Referenced by DDLAlgorithm::processElement().

22 {
24  algo_ = std::unique_ptr<DDAlgorithm>( DDAlgorithmFactory::get()->create( algoname_ ));
25  algo_->setParent( parent );
26  algo_->initialize( nArgs, vArgs, mArgs, sArgs, svArgs );
27 }
std::unique_ptr< DDAlgorithm > algo_
the wrapped algorithm object
std::string algoname_
name of the algorithm object
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 41 of file DDAlgorithmHandler.h.

Referenced by execute(), and initialize().

std::string DDAlgorithmHandler::algoname_
private

name of the algorithm object

Definition at line 42 of file DDAlgorithmHandler.h.

Referenced by initialize().

DDLogicalPart DDAlgorithmHandler::parent_
private

parent logical part

Definition at line 43 of file DDAlgorithmHandler.h.