AliPhysics  ef3b16e (ef3b16e)
PWG::EMCAL::AliEmcalDownscaleFactorsOCDB Class Reference

Handler for downscale factors for various triggers obtained from the OCDB. More...

#include <AliEmcalDownscaleFactorsOCDB.h>

Inheritance diagram for PWG::EMCAL::AliEmcalDownscaleFactorsOCDB:

Public Member Functions

virtual ~AliEmcalDownscaleFactorsOCDB ()
 
void SetRun (int runnumber)
 
Double_t GetDownscaleFactorForTriggerClass (const TString &trigger) const
 
std::vector< TStringGetTriggerClasses () const
 
Int_t GetCurrentRun () const
 

Static Public Member Functions

static AliEmcalDownscaleFactorsOCDBInstance ()
 

Private Member Functions

 AliEmcalDownscaleFactorsOCDB ()
 
 AliEmcalDownscaleFactorsOCDB (const AliEmcalDownscaleFactorsOCDB &)
 
AliEmcalDownscaleFactorsOCDBoperator= (const AliEmcalDownscaleFactorsOCDB &)
 

Private Attributes

Int_t fCurrentRun
 Current run number (for which downscale factors are loaded) More...
 
std::map< TString, Double_tfDownscaleFactors
 Downscale factors for the various trigger classes for the current run. More...
 

Static Private Attributes

static AliEmcalDownscaleFactorsOCDBfgDownscaleFactors = nullptr
 Singleton object. More...
 

Detailed Description

Handler for downscale factors for various triggers obtained from the OCDB.

Author
Markus Fasel marku.nosp@m.s.fa.nosp@m.sel@c.nosp@m.ern..nosp@m.ch, Oak Ridge National Laboratory
Since
Nov 22, 2016

Handler class for downscale factors read from the OCDB. The class is used as singleton class shared among several wagons. In order to access the cdb connect handler the Instance function is used

downscalehandler->SetRunNumber(196310);

Accessing the downscale factor requires a full name of the trigger class, including trigger cluster:

double ds = downscalehandler->GetDownscaleFactorForTriggerClass("CINT7-B-NOPF-ALLNOTRD");

Attention: The class does not manage OCDB access. When used in analysis, the CDB connect wagon is expected to run before.

Definition at line 65 of file AliEmcalDownscaleFactorsOCDB.h.

Constructor & Destructor Documentation

virtual PWG::EMCAL::AliEmcalDownscaleFactorsOCDB::~AliEmcalDownscaleFactorsOCDB ( )
inlinevirtual

Destructor

Definition at line 78 of file AliEmcalDownscaleFactorsOCDB.h.

AliEmcalDownscaleFactorsOCDB::AliEmcalDownscaleFactorsOCDB ( )
private

Definition at line 47 of file AliEmcalDownscaleFactorsOCDB.cxx.

Referenced by Instance().

PWG::EMCAL::AliEmcalDownscaleFactorsOCDB::AliEmcalDownscaleFactorsOCDB ( const AliEmcalDownscaleFactorsOCDB )
private

Member Function Documentation

Int_t PWG::EMCAL::AliEmcalDownscaleFactorsOCDB::GetCurrentRun ( ) const
inline

Get the current run number

Returns
Current run number

Definition at line 104 of file AliEmcalDownscaleFactorsOCDB.h.

double AliEmcalDownscaleFactorsOCDB::GetDownscaleFactorForTriggerClass ( const TString trigger) const

Get the downscale factor for a given trigger class active in the current run

Parameters
[in]triggerTrigger class for which to get the downscale factor
Returns
Downscale factor for the trigger (1. if not found)

Definition at line 78 of file AliEmcalDownscaleFactorsOCDB.cxx.

Referenced by AliAnalysisTaskEmcal::FillGeneralHistograms(), EmcalTriggerJets::AliAnalysisTaskEmcalJetSubstructureTree::Run(), AliAnalysisTaskEmcalDijetImbalance::RunChanged(), AliAnalysisTaskEmcalJetPerformance::RunChanged(), and ~AliEmcalDownscaleFactorsOCDB().

std::vector< TString > AliEmcalDownscaleFactorsOCDB::GetTriggerClasses ( ) const
AliEmcalDownscaleFactorsOCDB& PWG::EMCAL::AliEmcalDownscaleFactorsOCDB::operator= ( const AliEmcalDownscaleFactorsOCDB )
private
void AliEmcalDownscaleFactorsOCDB::SetRun ( int  runnumber)

Set current run number. If the run numbers differ then new downscale factors are loaded from the OCDB.

Parameters
[in]runnumberNew run number

Definition at line 60 of file AliEmcalDownscaleFactorsOCDB.cxx.

Referenced by AliAnalysisTaskEmcalDijetImbalance::RunChanged(), AliAnalysisTaskEmcalJetPerformance::RunChanged(), EmcalTriggerJets::AliAnalysisTaskEmcalJetSubstructureTree::RunChanged(), AliAnalysisTaskEmcal::UserExec(), and ~AliEmcalDownscaleFactorsOCDB().

Member Data Documentation

Int_t PWG::EMCAL::AliEmcalDownscaleFactorsOCDB::fCurrentRun
private

Current run number (for which downscale factors are loaded)

Definition at line 107 of file AliEmcalDownscaleFactorsOCDB.h.

Referenced by GetCurrentRun(), and SetRun().

std::map<TString, Double_t> PWG::EMCAL::AliEmcalDownscaleFactorsOCDB::fDownscaleFactors
private

Downscale factors for the various trigger classes for the current run.

Definition at line 108 of file AliEmcalDownscaleFactorsOCDB.h.

Referenced by GetDownscaleFactorForTriggerClass(), GetTriggerClasses(), and SetRun().

AliEmcalDownscaleFactorsOCDB * AliEmcalDownscaleFactorsOCDB::fgDownscaleFactors = nullptr
staticprivate

Singleton object.

Definition at line 109 of file AliEmcalDownscaleFactorsOCDB.h.

Referenced by Instance().


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