CMS 3D CMS Logo

List of all members | Public Member Functions | Protected Member Functions
PhysicsTools::ProcessRegistryImpl< Base_t, CalibBase_t, Parent_t, Instance_t, Calibration_t > Class Template Reference

template to generate a registry singleton for a type. More...

#include <ProcessRegistry.h>

Inheritance diagram for PhysicsTools::ProcessRegistryImpl< Base_t, CalibBase_t, Parent_t, Instance_t, Calibration_t >:
PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >

Public Member Functions

 ProcessRegistryImpl (const char *name)
 

Protected Member Functions

Base_t * instance (const char *name, const CalibBase_t *calib, Parent_t *parent) const override
 virtual method to implement by respective processor instance classes More...
 
- Protected Member Functions inherited from PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >
 ProcessRegistry (const char *name)
 instantiate registry and registers itself with name More...
 
virtual ~ProcessRegistry ()
 

Additional Inherited Members

- Public Types inherited from PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >
template<class Instance_t , class Calibration_t >
using Registry = ProcessRegistryImpl< Base_t, CalibBase_t, Parent_t, Instance_t, Calibration_t >
 
- Static Protected Member Functions inherited from PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >
static Base_t * create (const char *name, const CalibBase_t *calib, Parent_t *parent)
 create an instance of name, given a calibration calib and parent parent More...
 

Detailed Description

template<class Base_t, class CalibBase_t, class Parent_t, class Instance_t, class Calibration_t>
class PhysicsTools::ProcessRegistryImpl< Base_t, CalibBase_t, Parent_t, Instance_t, Calibration_t >

template to generate a registry singleton for a type.

)

Instantiating an instance of this type registers that class with the registry of the base type and provides a factory that calls the constructor of the instance type.

Definition at line 25 of file ProcessRegistry.h.

Constructor & Destructor Documentation

◆ ProcessRegistryImpl()

template<class Base_t , class CalibBase_t , class Parent_t , class Instance_t , class Calibration_t >
PhysicsTools::ProcessRegistryImpl< Base_t, CalibBase_t, Parent_t, Instance_t, Calibration_t >::ProcessRegistryImpl ( const char *  name)
inline

Definition at line 100 of file ProcessRegistry.h.

101  : ProcessRegistry<Base_t, CalibBase_t, Parent_t>(name) {}

Member Function Documentation

◆ instance()

template<class Base_t , class CalibBase_t , class Parent_t , class Instance_t , class Calibration_t >
Base_t* PhysicsTools::ProcessRegistryImpl< Base_t, CalibBase_t, Parent_t, Instance_t, Calibration_t >::instance ( const char *  name,
const CalibBase_t *  calib,
Parent_t *  parent 
) const
inlineoverrideprotectedvirtual

virtual method to implement by respective processor instance classes

Implements PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >.

Definition at line 104 of file ProcessRegistry.h.

104  {
105  return new Instance_t(name, dynamic_cast<const Calibration_t *>(calib), parent);
106  }

References PhysicsTools::ProcessRegistry< Base_t, CalibBase_t, Parent_t >::name, and class-composition::parent.

PhysicsTools::ProcessRegistry::name
const char * name
Definition: ProcessRegistry.h:85
calib
Definition: CalibElectron.h:12
class-composition.parent
parent
Definition: class-composition.py:88