DD4hep  1.30.0
Detector Description Toolkit for High Energy Physics
Public Member Functions | Public Attributes | Private Member Functions | List of all members
dd4hep::ConditionsSelectWrapper< OBJECT > Class Template Reference

Conditions selector functor. Wraps a user defined object by reference. More...

#include <Conditions.h>

Inheritance diagram for dd4hep::ConditionsSelectWrapper< OBJECT >:
dd4hep::ConditionsSelect

Public Member Functions

 ConditionsSelectWrapper (OBJECT &o)
 Default constructor. More...
 
 ConditionsSelectWrapper (const ConditionsSelectWrapper &copy)=default
 Copy constructor. More...
 
virtual ~ConditionsSelectWrapper ()=default
 Default destructor. More...
 
ConditionsSelectWrapperoperator= (const ConditionsSelectWrapper &copy)=default
 Default assignment operator. More...
 
- Public Member Functions inherited from dd4hep::ConditionsSelect
bool operator() (Condition cond) const
 Selection callback: return true if the condition should be selected. More...
 
bool operator() (std::pair< Condition::key_type, Condition::Object * > cond) const
 Selection callback: return true if the condition should be selected. More...
 
bool operator() (std::pair< Condition::key_type, Condition > cond) const
 Selection callback: return true if the condition should be selected. More...
 
virtual size_t size () const
 Overloadable entry: Return number of conditions selected. Default does nothing.... More...
 
virtual bool operator() (Condition::Object *cond) const =0
 Overloadable entry: Selection callback: return true if the condition should be selected. More...
 

Public Attributes

OBJECT & object
 Reference to the infomation collector. More...
 

Private Member Functions

 ConditionsSelectWrapper ()=delete
 Default constructor. More...
 
bool operator== (const ConditionsSelectWrapper &compare)=delete
 Default assignment operator. More...
 

Additional Inherited Members

- Protected Member Functions inherited from dd4hep::ConditionsSelect
 ConditionsSelect ()=default
 Default constructor. More...
 
 ConditionsSelect (const ConditionsSelect &copy)=default
 Copy constructor. More...
 
virtual ~ConditionsSelect ()
 Default destructor. More...
 
ConditionsSelectoperator= (const ConditionsSelect &copy)=default
 Default assignment operator. More...
 

Detailed Description

template<typename OBJECT>
class dd4hep::ConditionsSelectWrapper< OBJECT >

Conditions selector functor. Wraps a user defined object by reference.

Example usage for the slow ones:

class MyCounter : public ConditionsSelectWrapper<long> { MyCounter(long& cnt) : ConditionsSelectWrapper<long>(cnt) {} virtual bool operator()(Condition::Object* cond) const { if ( cond != 0 ) ++object; } // Optionally overload: virtual size_t size() const { return object; } };

long counter = 0; for_each(std::begin(conditons), std::end(conditions), MyCounter(counter));

Author
M.Frank
Version
1.0

Definition at line 468 of file Conditions.h.

Constructor & Destructor Documentation

◆ ConditionsSelectWrapper() [1/3]

template<typename OBJECT >
dd4hep::ConditionsSelectWrapper< OBJECT >::ConditionsSelectWrapper ( )
privatedelete

Default constructor.

◆ ConditionsSelectWrapper() [2/3]

template<typename OBJECT >
dd4hep::ConditionsSelectWrapper< OBJECT >::ConditionsSelectWrapper ( OBJECT &  o)
inline

Default constructor.

Definition at line 481 of file Conditions.h.

◆ ConditionsSelectWrapper() [3/3]

template<typename OBJECT >
dd4hep::ConditionsSelectWrapper< OBJECT >::ConditionsSelectWrapper ( const ConditionsSelectWrapper< OBJECT > &  copy)
default

Copy constructor.

◆ ~ConditionsSelectWrapper()

template<typename OBJECT >
virtual dd4hep::ConditionsSelectWrapper< OBJECT >::~ConditionsSelectWrapper ( )
virtualdefault

Default destructor.

Member Function Documentation

◆ operator=()

template<typename OBJECT >
ConditionsSelectWrapper& dd4hep::ConditionsSelectWrapper< OBJECT >::operator= ( const ConditionsSelectWrapper< OBJECT > &  copy)
default

Default assignment operator.

◆ operator==()

template<typename OBJECT >
bool dd4hep::ConditionsSelectWrapper< OBJECT >::operator== ( const ConditionsSelectWrapper< OBJECT > &  compare)
privatedelete

Default assignment operator.

Member Data Documentation

◆ object

template<typename OBJECT >
OBJECT& dd4hep::ConditionsSelectWrapper< OBJECT >::object

Reference to the infomation collector.

Definition at line 477 of file Conditions.h.


The documentation for this class was generated from the following file: