// AliTRDCalibraVector destructor
//
- if(fPHEntries) delete fPHEntries;
- if(fPHMean) delete fPHMean;
- if(fPHSquares) delete fPHSquares;
- if(fPRFEntries) delete fPRFEntries;
- if(fPRFMean) delete fPRFMean;
- if(fPRFSquares) delete fPRFSquares;
- if(fCHEntries) delete fCHEntries;
+ for (Int_t i=0; i<540; i++) {
+ delete fPHEntries[i];
+ delete fPHMean[i];
+ delete fPHSquares[i];
+ delete fPRFEntries[i];
+ delete fPRFMean[i];
+ delete fPRFSquares[i];
+ delete fCHEntries[i];
+ }
+
if(fHisto) delete fHisto;
if(fGraph) delete fGraph;
if(fCalVector) delete fCalVector;
}
//_____________________________________________________________________________
+Long64_t AliTRDCalibraVector::Merge(const TCollection* list)
+{
+ // Merge list of objects (needed by PROOF)
+
+ if (!list)
+ return 0;
+
+ if (list->IsEmpty())
+ return 1;
+
+ TIterator* iter = list->MakeIterator();
+ TObject* obj = 0;
+
+ // collection of generated histograms
+ Int_t count=0;
+ while((obj = iter->Next()) != 0)
+ {
+ AliTRDCalibraVector* entry = dynamic_cast<AliTRDCalibraVector*>(obj);
+ if (entry == 0) continue;
+
+ if(this->Add(entry)) count++;
+
+ }
+
+ return count;
+}
+//_____________________________________________________________________________
void AliTRDCalibraVector::TestInit(Int_t i, Int_t detmax)
{
//
}
max = -10.0;
groupmax = -1;
- for(Int_t i = 0; i < numberofgroup; i++){
- if(nbgroup[i] > max){
- max = nbgroup[i];
- groupmax = i;
+ for(Int_t io = 0; io < numberofgroup; io++){
+ if(nbgroup[io] > max){
+ max = nbgroup[io];
+ groupmax = io;
}
}
if((max == 0.0) || (groupmax < 0.0) || (groupmax >= numberofgroup)) return kFALSE;
// Axis
Float_t sf = 10.0;
AliTRDCommonParam *parCom = AliTRDCommonParam::Instance();
- if (!parCom) {
+ if (parCom) {
+ sf = parCom->GetSamplingFrequency();
+ }
+ else {
AliInfo("Could not get CommonParam, take the default 10MHz");
}
- sf = parCom->GetSamplingFrequency();
// Axis
Double_t x[35]; // Xaxis
Double_t y[35]; // Sum/entries
//_____________________________________________________________________________
Int_t AliTRDCalibraVector::GetTotalNumberOfBinsInDetector(Int_t det, Int_t i, Int_t nbBin) const
{
+ //
+ // Get the total number of bins (Nb of bins*Nb of groups) in the detector det for the group i
+ //
Int_t ngroup = 0;
Int_t stack = AliTRDgeometry::GetStack(det);
//____________________________________________________________________________
Int_t AliTRDCalibraVector::GetNz(Int_t i) const
{
+ //
+ // Get Nz the granularity in row
+ //
Int_t nz = 0;
if(i==0) nz = (Int_t)(fModeCH>>4);
//____________________________________________________________________________
Int_t AliTRDCalibraVector::GetNrphi(Int_t i) const
{
+ //
+ // Get Nrphi the granularity in col
+ //
Int_t nrphi = 0;
if(i==0) nrphi = (Int_t)(fModeCH&15);
//_________________________________________________________________________________
TString AliTRDCalibraVector::GetNamePH() const
{
+ //
+ // Get the name of PH to know the granularity
+ //
Int_t nz = GetNz(1);
Int_t nrphi = GetNrphi(1);
//_________________________________________________________________________________
TString AliTRDCalibraVector::GetNameCH() const
{
+ //
+ // Get the name of CH to know the granularity
+ //
Int_t nz = GetNz(0);
Int_t nrphi = GetNrphi(0);
//_________________________________________________________________________________
TString AliTRDCalibraVector::GetNamePRF() const
{
-
+ //
+ // Get the name of PRF to know the granularity
+ //
+
Int_t nz = GetNz(2);
Int_t nrphi = GetNrphi(2);
}
//____________________________________________________________________________
-void AliTRDCalibraVector::SetNzNrphi(Int_t i, Int_t nz, Int_t nrphi) {
+void AliTRDCalibraVector::SetNzNrphi(Int_t i, Int_t nz, Int_t nrphi)
+{
+ //
+ // Set NzNrphi for the granularity
+ //
if(i==0) {
fModeCH = nz;
fModePRF |= nrphi;
}
-}
+}
+