test
CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
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

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 ( )

creates an DDAlgorithm wrapper

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

Definition at line 12 of file DDAlgorithmHandler.cc.

13  : algo_(0)
14 {
15 }
DDAlgorithm * algo_
the wrapped algorithm object
DDAlgorithmHandler::~DDAlgorithmHandler ( )
virtual

Definition at line 17 of file DDAlgorithmHandler.cc.

References algo_.

18 {
19  if (algo_) {
20  delete algo_;
21  }
22 }
DDAlgorithm * algo_
the wrapped algorithm object

Member Function Documentation

void DDAlgorithmHandler::execute ( DDCompactView cpv)

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

Definition at line 41 of file DDAlgorithmHandler.cc.

References algo_.

Referenced by DDLAlgorithm::processElement().

42 {
43  algo_->execute( cpv );
44 }
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 25 of file DDAlgorithmHandler.cc.

References algo_, algoname_, DDSplit(), and reco::get().

Referenced by DDLAlgorithm::processElement().

32 {
33  std::pair<std::string,std::string> algoNmNs = DDSplit(algoName);
34  algoname_ = algoName;
36  algo_->setParent(parent);
37  algo_->initialize(nArgs,vArgs,mArgs,sArgs, svArgs);
38 }
std::string algoname_
name of the algorithm object
std::pair< std::string, std::string > DDSplit(const std::string &n)
split into (name,namespace), separator = &#39;:&#39;
Definition: DDSplit.cc:4
DDAlgorithm * algo_
the wrapped algorithm object
T get(const Candidate &c)
Definition: component.h:55

Member Data Documentation

DDAlgorithm* DDAlgorithmHandler::algo_
private

the wrapped algorithm object

Definition at line 41 of file DDAlgorithmHandler.h.

Referenced by execute(), initialize(), and ~DDAlgorithmHandler().

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.