ATLAS Offline Software
Loading...
Searching...
No Matches
CP::SystematicRegistry Class Reference

This module implements the central registry for handling systematic uncertainties with CP tools. More...

#include <SystematicRegistry.h>

Collaboration diagram for CP::SystematicRegistry:

Public Member Functions

const SystematicSetglobalSystematics () const
 returns: the global set of systematics
const SystematicSetrecommendedSystematics () const
 returns: the recommended set of systematics
StatusCode registerSystematics (const IReentrantSystematicsTool &tool)
 effects: register all the systematics from the tool
void registerSystematic (const SystematicVariation &systematic)
 description: add a systematic to the global registry set
void registerSystematics (const SystematicSet &systematics)
 description: add a set of systematics to the global registry set failures: requesting a systematic that's not on the global list
StatusCode addSystematicToRecommended (const SystematicVariation &systematic)
 description: add a systematic to the recommended set
StatusCode addSystematicsToRecommended (const SystematicSet &systematics)
 description: add a set of systematics to the recommended set

Static Public Member Functions

static SystematicRegistrygetInstance ()
 Get the singleton instance of the registry for the curren thread.

Private Member Functions

 SystematicRegistry ()
 Private constructor.
 SystematicRegistry (SystematicRegistry const &)=delete
 Private copy constructor.
void operator= (SystematicRegistry const &)=delete
 Private assignment operator.

Private Attributes

Sets of systematics in the registry
SystematicSet m_globalSystematics
 Global set of possible systematics.
SystematicSet m_recommendedSystematics
 recommended set of systematics

Detailed Description

This module implements the central registry for handling systematic uncertainties with CP tools.

Author
Steve Farrell steve.nosp@m.n.fa.nosp@m.rrell.nosp@m.@cer.nosp@m.n.ch

Definition at line 24 of file SystematicRegistry.h.

Constructor & Destructor Documentation

◆ SystematicRegistry() [1/2]

CP::SystematicRegistry::SystematicRegistry ( )
private

Private constructor.

Definition at line 100 of file SystematicRegistry.cxx.

101 {
102 }

◆ SystematicRegistry() [2/2]

CP::SystematicRegistry::SystematicRegistry ( SystematicRegistry const & )
privatedelete

Private copy constructor.

Member Function Documentation

◆ addSystematicsToRecommended()

StatusCode CP::SystematicRegistry::addSystematicsToRecommended ( const SystematicSet & systematics)

description: add a set of systematics to the recommended set

Definition at line 86 of file SystematicRegistry.cxx.

88 {
89 std::set<SystematicVariation>::const_iterator sysItr;
90 for(sysItr = systematics.begin(); sysItr != systematics.end(); ++sysItr)
91 {
93 if(code != StatusCode::SUCCESS) return code;
94 }
95 return StatusCode::SUCCESS;
96 }
static const std::vector< std::string > systematics
StatusCode addSystematicToRecommended(const SystematicVariation &systematic)
description: add a systematic to the recommended set
::StatusCode StatusCode
StatusCode definition for legacy code.

◆ addSystematicToRecommended()

StatusCode CP::SystematicRegistry::addSystematicToRecommended ( const SystematicVariation & systematic)

description: add a systematic to the recommended set

Definition at line 71 of file SystematicRegistry.cxx.

73 {
74 // Check for consistency
75 if(!m_globalSystematics.matchSystematic(systematic,
77 {
78 return StatusCode::FAILURE;
79 }
80 m_recommendedSystematics.insert(systematic);
81 return StatusCode::SUCCESS;
82 }
SystematicSet m_recommendedSystematics
recommended set of systematics
SystematicSet m_globalSystematics
Global set of possible systematics.

◆ getInstance()

SystematicRegistry & CP::SystematicRegistry::getInstance ( )
static

Get the singleton instance of the registry for the curren thread.

Note that each thread gets its own instance of SystematicRegistry in the current setup. Assuming that all analysis tools get instantiated once per thread.

This will have to be re-visited once we start making analysis tools thread-safe.

Returns
A thread specific SystematicRegistry instance

Definition at line 25 of file SystematicRegistry.cxx.

26 {
27 TTHREAD_TLS( SystematicRegistry ) systRegistry;
28 return systRegistry;
29 }
SystematicRegistry()
Private constructor.
TTHREAD_TLS(TStore *) s_store
Pointer to the currently active TStore object of the thread.

◆ globalSystematics()

const SystematicSet & CP::SystematicRegistry::globalSystematics ( ) const

returns: the global set of systematics

Definition at line 32 of file SystematicRegistry.cxx.

33 {
35 }

◆ operator=()

void CP::SystematicRegistry::operator= ( SystematicRegistry const & )
privatedelete

Private assignment operator.

◆ recommendedSystematics()

const SystematicSet & CP::SystematicRegistry::recommendedSystematics ( ) const

returns: the recommended set of systematics

Definition at line 38 of file SystematicRegistry.cxx.

39 {
41 }

◆ registerSystematic()

void CP::SystematicRegistry::registerSystematic ( const SystematicVariation & systematic)

description: add a systematic to the global registry set

Definition at line 53 of file SystematicRegistry.cxx.

55 {
56 m_globalSystematics.insert(systematic);
57 }

◆ registerSystematics() [1/2]

StatusCode CP::SystematicRegistry::registerSystematics ( const IReentrantSystematicsTool & tool)

effects: register all the systematics from the tool

Definition at line 44 of file SystematicRegistry.cxx.

46 {
47 registerSystematics (tool.affectingSystematics());
48 return addSystematicsToRecommended (tool.recommendedSystematics());
49 }
StatusCode addSystematicsToRecommended(const SystematicSet &systematics)
description: add a set of systematics to the recommended set
StatusCode registerSystematics(const IReentrantSystematicsTool &tool)
effects: register all the systematics from the tool

◆ registerSystematics() [2/2]

void CP::SystematicRegistry::registerSystematics ( const SystematicSet & systematics)

description: add a set of systematics to the global registry set failures: requesting a systematic that's not on the global list

Definition at line 60 of file SystematicRegistry.cxx.

61 {
62 std::set<SystematicVariation>::const_iterator sysItr;
63 for(sysItr = systematics.begin(); sysItr != systematics.end(); ++sysItr)
64 {
65 registerSystematic(*sysItr);
66 }
67 }
void registerSystematic(const SystematicVariation &systematic)
description: add a systematic to the global registry set

Member Data Documentation

◆ m_globalSystematics

SystematicSet CP::SystematicRegistry::m_globalSystematics
private

Global set of possible systematics.

Definition at line 78 of file SystematicRegistry.h.

◆ m_recommendedSystematics

SystematicSet CP::SystematicRegistry::m_recommendedSystematics
private

recommended set of systematics

Definition at line 81 of file SystematicRegistry.h.


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