#include "AliITSFONoiseSPD.h"
AliITSFONoiseSPD::AliITSFONoiseSPD() :
TObject()
{
ResetValues();
}
AliITSFONoiseSPD::AliITSFONoiseSPD(const AliITSFONoiseSPD& foNoi) :
TObject()
{
for (UInt_t eq=0; eq<20; eq++) {
for (UInt_t hs=0; hs<6; hs++) {
for (UInt_t chip=0; chip<10; chip++) {
fChipNoise[eq][hs][chip] = foNoi.fChipNoise[eq][hs][chip];
}
}
}
}
AliITSFONoiseSPD::~AliITSFONoiseSPD() {}
void AliITSFONoiseSPD::ResetValues() {
for (UInt_t eq=0; eq<20; eq++) {
for (UInt_t hs=0; hs<6; hs++) {
for (UInt_t chip=0; chip<10; chip++) {
fChipNoise[eq][hs][chip] = 0;
}
}
}
}
AliITSFONoiseSPD& AliITSFONoiseSPD::operator=(const AliITSFONoiseSPD& foNoi) {
if (this!=&foNoi) {
for (UInt_t eq=0; eq<20; eq++) {
for (UInt_t hs=0; hs<6; hs++) {
for (UInt_t chip=0; chip<10; chip++) {
fChipNoise[eq][hs][chip] = foNoi.fChipNoise[eq][hs][chip];
}
}
}
}
return *this;
}
void AliITSFONoiseSPD::SetChipNoise(UInt_t eq, UInt_t hs, UInt_t chip, Float_t value) {
if (eq>=20) {
Error("AliITSFONoiseSPD::SetChipNoise", "eq (%d) out of bounds.",eq);
return;
}
if (hs>=6) {
Error("AliITSFONoiseSPD::SetChipNoise", "hs (%d) out of bounds.",hs);
return;
}
if (chip>=10) {
Error("AliITSFONoiseSPD::SetChipNoise", "chip (%d) out of bounds.",chip);
return;
}
fChipNoise[eq][hs][chip] = value;
}
Float_t AliITSFONoiseSPD::GetChipNoise(UInt_t eq, UInt_t hs, UInt_t chip) const {
if (eq>=20) {
Error("AliITSFONoiseSPD::GetChipNoise", "eq (%d) out of bounds.",eq);
return 0;
}
if (hs>=6) {
Error("AliITSFONoiseSPD::GetChipNoise", "hs (%d) out of bounds.",hs);
return 0;
}
if (chip>=10) {
Error("AliITSFONoiseSPD::GetChipNoise", "chip (%d) out of bounds.",chip);
return 0;
}
return fChipNoise[eq][hs][chip];
}