LDMX Software
Public Member Functions | Private Attributes | List of all members
simcore::ConditionsInterface Class Reference

Handle to the conditions system, provided at construction to classes which require it. More...

#include <ConditionsInterface.h>

Public Member Functions

 ConditionsInterface (framework::EventProcessor *p)
 
template<class T >
const T & getCondition (const std::string &condition_name)
 Primary request action for a conditions object If the object is in the cache and still valid (IOV), the cached object will be returned.
 

Private Attributes

framework::EventProcessorprocessor_
 Pointer to the owner processor object.
 

Detailed Description

Handle to the conditions system, provided at construction to classes which require it.

Definition at line 21 of file ConditionsInterface.h.

Constructor & Destructor Documentation

◆ ConditionsInterface()

simcore::ConditionsInterface::ConditionsInterface ( framework::EventProcessor p)
inline

Definition at line 23 of file ConditionsInterface.h.

23: processor_{p} {}
framework::EventProcessor * processor_
Pointer to the owner processor object.

Member Function Documentation

◆ getCondition()

template<class T >
const T & simcore::ConditionsInterface::getCondition ( const std::string &  condition_name)
inline

Primary request action for a conditions object If the object is in the cache and still valid (IOV), the cached object will be returned.

If it is not in the cache, or is out of date, the () method will be called to provide the object.

Definition at line 33 of file ConditionsInterface.h.

33 {
34 if (processor_ == 0) {
35 EXCEPTION_RAISE("ConditionUnavailableException",
36 "No conditions system object available in SimCore");
37 }
38 return processor_->getCondition<T>(condition_name);
39 }
const T & getCondition(const std::string &condition_name)
Access a conditions object for the current event.

References framework::EventProcessor::getCondition(), and processor_.

Referenced by simcore::SensitiveDetector::getCondition().

Member Data Documentation

◆ processor_

framework::EventProcessor* simcore::ConditionsInterface::processor_
private

Pointer to the owner processor object.

Definition at line 45 of file ConditionsInterface.h.

Referenced by getCondition().


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