#include <TMath.h>
#include "AliEMCALTriggerRawDigit.h"
-#include "AliLog.h"
ClassImp(AliEMCALTriggerRawDigit)
fL0Times(),
fL1TimeSum(-1)
{
- //
+ // Ctor
+
for (Int_t i = 0; i < 10; i++) fL0Times[i] = -1;
}
//____________________________________________________________________________
AliEMCALTriggerRawDigit::~AliEMCALTriggerRawDigit()
{
- //
+ // Dtor
+
//delete [] fL0Times;
}
//____________________________________________________________________________
Bool_t AliEMCALTriggerRawDigit::SetL0Time(const Int_t i)
{
- //
+ // Set L0 times
+
for (Int_t j = 0; j < fNL0Times; j++)
{
if (i == fL0Times[j])
{
- AliWarning("L0 time already there! Won't add it twice");
+ AliDebug(1,Form("Digit id %d: L0 time %d already there! Won't add it twice",fId,i));
return kFALSE;
}
}
//____________________________________________________________________________
Bool_t AliEMCALTriggerRawDigit::GetL0Time(const Int_t i, Int_t& time) const
{
- //
+ // Get L0 times
+
if (i < 0 || i > fNL0Times)
{
AliError("Bad index!");
//____________________________________________________________________________
Bool_t AliEMCALTriggerRawDigit::GetL0Times(Int_t times[]) const
{
- //
- if (sizeof(times) < (sizeof(Int_t) * fNL0Times))
- {
- AliError("Array size too small!");
- return kFALSE;
- }
+ // Get L0 times
for (Int_t i = 0; i < fNL0Times; i++) times[i] = fL0Times[i];
//____________________________________________________________________________
Int_t AliEMCALTriggerRawDigit::GetL0TimeSum(const Int_t time) const
{
- //
+ // Get L0 time sum
Int_t value = 0;
//____________________________________________________________________________
Int_t AliEMCALTriggerRawDigit::GetTriggerBit(const TriggerType_t type, const Int_t mode) const
{
- //
+ // Get trigger bit
+
Int_t shift = kTriggerTypeEnd * mode;
Int_t mask = 1 << type;
//____________________________________________________________________________
void AliEMCALTriggerRawDigit::Print(const Option_t* /*opt*/) const
{
- //
+ // Dump
+
printf("===\n| Digit id: %4d / %d Time Samples: \n",fId,fNSamples);
for (Int_t i=0; i < fNSamples; i++)
{