Public Member Functions | Static Public Member Functions | Private Member Functions | Private Attributes | List of all members
fnex::SystematicSigmas Class Reference

#include "/cvmfs/nova-development.opensciencegrid.org/novasoft/releases/N20-12-03/FNEX/dataProducts/SystematicSigmas.h"

Public Member Functions

void InsertSigma (fhicl::ParameterSet const &param)
 
double const Sigma (std::string const &name) const
 
void Lock ()
 
void Unlock ()
 
void Clear ()
 
void Print (std::ostream &stream=std::cout)
 

Static Public Member Functions

static SystematicSigmasInstance ()
 

Private Member Functions

 SystematicSigmas ()
 
 ~SystematicSigmas ()
 

Private Attributes

std::unordered_map< std::string, double > fSigmaMap
 map name to size of 1 sigma More...
 
bool fLock
 set if we are done allowing new parameters More...
 

Detailed Description

Definition at line 22 of file SystematicSigmas.h.

Constructor & Destructor Documentation

fnex::SystematicSigmas::SystematicSigmas ( )
private

Definition at line 22 of file SystematicSigmas.cxx.

References fSigmaMap.

Referenced by Instance().

23  : fLock(true)
24  {
25  fSigmaMap.clear();
26 
27  return;
28  }
bool fLock
set if we are done allowing new parameters
std::unordered_map< std::string, double > fSigmaMap
map name to size of 1 sigma
fnex::SystematicSigmas::~SystematicSigmas ( )
private

Definition at line 31 of file SystematicSigmas.cxx.

32  {
33 
34  }

Member Function Documentation

void fnex::SystematicSigmas::Clear ( )
inline

Definition at line 71 of file SystematicSigmas.h.

References fSigmaMap.

72 {
73  fSigmaMap.clear();
74  return;
75 }
std::unordered_map< std::string, double > fSigmaMap
map name to size of 1 sigma
void fnex::SystematicSigmas::InsertSigma ( fhicl::ParameterSet const &  param)
inline

Definition at line 50 of file SystematicSigmas.h.

References fLock, fSigmaMap, fhicl::ParameterSet::get(), fhicl::ParameterSet::has_key(), and string.

51 {
52  // Don't do anything if we are locked out or if we don't have a "Sigma" key
53  if(fLock || !param.has_key("Sigma") ) return;
54 
55  fSigmaMap[param.get<std::string>("Parameter")] = param.get<double>("Sigma");
56 
57  return;
58 }
bool fLock
set if we are done allowing new parameters
std::unordered_map< std::string, double > fSigmaMap
map name to size of 1 sigma
enum BeamMode string
SystematicSigmas * fnex::SystematicSigmas::Instance ( )
static
void fnex::SystematicSigmas::Lock ( )
inline

Definition at line 78 of file SystematicSigmas.h.

References fLock.

79 {
80  fLock = true;
81  return;
82 }
bool fLock
set if we are done allowing new parameters
void fnex::SystematicSigmas::Print ( std::ostream &  stream = std::cout)

Definition at line 37 of file SystematicSigmas.cxx.

References allTimeWatchdog::endl, HTMLTools::entry(), and fSigmaMap.

38  {
39  stream << "SystematicSigmas::Print( ): \n";
40  stream << std::setw(30) << "Name" << std::setw(20) << "Sigma\n";
41  for(auto entry : fSigmaMap){
42  stream << std::setw(30) << entry.first << std::setw(20) << entry.second << std::endl;
43  }
44  }
std::unordered_map< std::string, double > fSigmaMap
map name to size of 1 sigma
def entry(str)
Definition: HTMLTools.py:26
double const fnex::SystematicSigmas::Sigma ( std::string const &  name) const
inline
void fnex::SystematicSigmas::Unlock ( )
inline

Definition at line 85 of file SystematicSigmas.h.

References fLock.

86 {
87  fLock = false;
88  return;
89 }
bool fLock
set if we are done allowing new parameters

Member Data Documentation

bool fnex::SystematicSigmas::fLock
private

set if we are done allowing new parameters

Definition at line 43 of file SystematicSigmas.h.

Referenced by InsertSigma(), Lock(), and Unlock().

std::unordered_map<std::string, double> fnex::SystematicSigmas::fSigmaMap
private

map name to size of 1 sigma

Definition at line 42 of file SystematicSigmas.h.

Referenced by Clear(), InsertSigma(), Print(), Sigma(), and SystematicSigmas().


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