1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
7 * Permission to use, copy, modify and distribute this software and its *
8 * documentation strictly for non-commercial purposes is hereby granted *
9 * without fee, provided that the above copyright notice appears in all *
10 * copies and that both the copyright notice and this permission notice *
11 * appear in the supporting documentation. The authors make no claims *
12 * about the suitability of this software for any purpose. It is *
13 * provided "as is" without express or implied warranty. *
14 **************************************************************************/
16 /* $Id: AliTRDEntriesInfo.cxx 27946 2008-08-13 15:26:24Z cblume $ */
18 ///////////////////////////////////////////////////////////////////////////////
20 // Calibration base class for a single ROC //
21 // Contains one UShort_t value per pad //
22 // However, values are set and get as float, there are stored internally as //
23 // (UShort_t) value * 10000 //
25 ///////////////////////////////////////////////////////////////////////////////
32 #include "AliTRDEntriesInfo.h"
34 #include "AliMathBase.h"
35 #include "TLinearFitter.h"
41 #include "TGraphDelaunay.h"
44 #include "AliTRDCommonParam.h"
45 #include "AliTRDpadPlane.h"
48 ClassImp(AliTRDEntriesInfo)
50 //_____________________________________________________________________________
51 AliTRDEntriesInfo::AliTRDEntriesInfo()
55 // Default constructor
59 //_____________________________________________________________________________
60 AliTRDEntriesInfo::AliTRDEntriesInfo(Int_t n)
64 // Constructor that initializes a given size
68 //_____________________________________________________________________________
69 AliTRDEntriesInfo::AliTRDEntriesInfo(const AliTRDEntriesInfo &c)
73 // AliTRDEntriesInfo copy constructor
77 //_____________________________________________________________________________
78 AliTRDEntriesInfo::~AliTRDEntriesInfo()
81 // AliTRDEntriesInfo destructor
86 //_____________________________________________________________________________
87 AliTRDEntriesInfo &AliTRDEntriesInfo::operator=(const AliTRDEntriesInfo &c)
90 // Assignment operator
93 if (this != &c) ((AliTRDEntriesInfo &) c).Copy(*this);
97 //___________________________________________________________________________________
98 Int_t AliTRDEntriesInfo::GetSum()
101 // Calculate the sum of entries
106 for(Int_t k = 0; k < fSize; k++){
114 //____________________________________________________________________________________________
115 Bool_t AliTRDEntriesInfo::TestAdd(const AliTRDEntriesInfo * info)
120 for (Int_t idata = 0; idata< fSize; idata++){
121 if((At(idata)+info->At(idata)) > 65535) return kFALSE;
125 //____________________________________________________________________________________________
126 void AliTRDEntriesInfo::Add(const AliTRDEntriesInfo * info)
131 for (Int_t idata = 0; idata< fSize; idata++){
132 fData[idata] += info->At(idata);
135 //____________________________________________________________________________________________
136 void AliTRDEntriesInfo::AddIf(const AliTRDEntriesInfo * info)
141 for (Int_t idata = 0; idata< fSize; idata++){
142 if(((fData[idata]+info->At(idata)) <= 65535) && ((fData[idata]+info->At(idata)) >= 0)) fData[idata] += info->At(idata);