AliPhysics  cda3415 (cda3415)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliEmcalDownscaleFactorsOCDB Class Reference

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

#include <AliEmcalDownscaleFactorsOCDB.h>

Inheritance diagram for 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
AliEmcalDownscaleFactorsOCDB
Instance ()
 

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
AliEmcalDownscaleFactorsOCDB
fgDownscaleFactors = 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 37 of file AliEmcalDownscaleFactorsOCDB.h.

Constructor & Destructor Documentation

virtual AliEmcalDownscaleFactorsOCDB::~AliEmcalDownscaleFactorsOCDB ( )
inlinevirtual

Destructor

Definition at line 50 of file AliEmcalDownscaleFactorsOCDB.h.

AliEmcalDownscaleFactorsOCDB::AliEmcalDownscaleFactorsOCDB ( )
private

Definition at line 33 of file AliEmcalDownscaleFactorsOCDB.cxx.

Referenced by Instance().

AliEmcalDownscaleFactorsOCDB::AliEmcalDownscaleFactorsOCDB ( const AliEmcalDownscaleFactorsOCDB )
private

Member Function Documentation

Int_t AliEmcalDownscaleFactorsOCDB::GetCurrentRun ( ) const
inline

Get the current run number

Returns
Current run number

Definition at line 76 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 64 of file AliEmcalDownscaleFactorsOCDB.cxx.

Referenced by AliAnalysisTaskEmcal::FillGeneralHistograms().

std::vector< TString > AliEmcalDownscaleFactorsOCDB::GetTriggerClasses ( ) const

Get list of trigger classes found for the given run.

Returns

Definition at line 71 of file AliEmcalDownscaleFactorsOCDB.cxx.

Referenced by AliAnalysisTaskEmcal::FillGeneralHistograms().

AliEmcalDownscaleFactorsOCDB * AliEmcalDownscaleFactorsOCDB::Instance ( )
static

Get instance of the downscale OCDB handler. If called for the first time a new object is created

Returns
Downscale OCDB handler

Definition at line 39 of file AliEmcalDownscaleFactorsOCDB.cxx.

Referenced by AliAnalysisTaskEmcal::FillGeneralHistograms(), and AliAnalysisTaskEmcal::UserExec().

AliEmcalDownscaleFactorsOCDB& 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 46 of file AliEmcalDownscaleFactorsOCDB.cxx.

Referenced by AliAnalysisTaskEmcal::UserExec().

Member Data Documentation

Int_t AliEmcalDownscaleFactorsOCDB::fCurrentRun
private

Current run number (for which downscale factors are loaded)

Definition at line 79 of file AliEmcalDownscaleFactorsOCDB.h.

Referenced by GetCurrentRun(), and SetRun().

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

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

Definition at line 80 of file AliEmcalDownscaleFactorsOCDB.h.

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

AliEmcalDownscaleFactorsOCDB * AliEmcalDownscaleFactorsOCDB::fgDownscaleFactors = nullptr
staticprivate

Singleton object.

Definition at line 81 of file AliEmcalDownscaleFactorsOCDB.h.

Referenced by Instance().


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