ROOT logo
/**************************************************************************
 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
 *                                                                        *
 * Author: The ALICE Off-line Project.                                    *
 * Contributors are mentioned in the code where appropriate.              *
 *                                                                        *
 * Permission to use, copy, modify and distribute this software and its   *
 * documentation strictly for non-commercial purposes is hereby granted   *
 * without fee, provided that the above copyright notice appears in all   *
 * copies and that both the copyright notice and this permission notice   *
 * appear in the supporting documentation. The authors make no claims     *
 * about the suitability of this software for any purpose. It is          *
 * provided "as is" without express or implied warranty.                  *
 **************************************************************************/

/* $Id: AliTRDCalDCSv2.cxx 18952 2007-06-08 11:36:12Z cblume $ */

///////////////////////////////////////////////////////////////////////////////
//                                                                           //
//  TRD calibration class v2 for TRD DCS parameters                             //
//                                                                           //
///////////////////////////////////////////////////////////////////////////////

#include "AliTRDCalDCSv2.h"
#include "AliTRDCalDCSFEEv2.h"
#include "AliTRDCalDCSGTU.h"

ClassImp(AliTRDCalDCSv2)
  
//_____________________________________________________________________________
AliTRDCalDCSv2::AliTRDCalDCSv2()
  :TNamed()
  ,fGNumberOfTimeBins(-1)
  ,fGConfigTag(-1)
  ,fGSingleHitThres(-1)
  ,fGThreePadClustThres(-1)
  ,fGSelNoZS(-1)
  ,fGTCFilterWeight(-1)
  ,fGTCFilterShortDecPar(-1)
  ,fGTCFilterLongDecPar(-1)
  ,fGFastStatNoise(-1)
  ,fGConfigVersion(0)
  ,fGConfigName(0)
  ,fGFilterType(0)
  ,fGReadoutParam(0)
  ,fGTestPattern(0)
  ,fGTrackletMode(0)
  ,fGTrackletDef(0)
  ,fGTriggerSetup(0)
  ,fGAddOptions(0)
  ,fRunType("")
  ,fStartTime(0)
  ,fEndTime(0)
  ,fFEEArr(new TObjArray(540))
  ,fPTRArr(new TObjArray(6))
  ,fGTUObj(new AliTRDCalDCSGTU())
{
  //
  // AliTRDCalDCSv2 default constructor
  //
}

//_____________________________________________________________________________
AliTRDCalDCSv2::AliTRDCalDCSv2(const Text_t *name, const Text_t *title)
  :TNamed(name,title)
  ,fGNumberOfTimeBins(-1)
  ,fGConfigTag(-1)
  ,fGSingleHitThres(-1)
  ,fGThreePadClustThres(-1)
  ,fGSelNoZS(-1)
  ,fGTCFilterWeight(-1)
  ,fGTCFilterShortDecPar(-1)
  ,fGTCFilterLongDecPar(-1)
  ,fGFastStatNoise(-1)
  ,fGConfigVersion(0)
  ,fGConfigName(0)
  ,fGFilterType(0)
  ,fGReadoutParam(0)
  ,fGTestPattern(0)
  ,fGTrackletMode(0)
  ,fGTrackletDef(0)
  ,fGTriggerSetup(0)
  ,fGAddOptions(0)
  ,fRunType("")
  ,fStartTime(0)
  ,fEndTime(0)
  ,fFEEArr(new TObjArray(540))
  ,fPTRArr(new TObjArray(6))
  ,fGTUObj(new AliTRDCalDCSGTU())
{
  //
  // AliTRDCalDCSv2 constructor
  //
}

//_____________________________________________________________________________
AliTRDCalDCSv2::AliTRDCalDCSv2(const AliTRDCalDCSv2 &cd)
  :TNamed(cd)
  ,fGNumberOfTimeBins(-1)
  ,fGConfigTag(-1)
  ,fGSingleHitThres(-1)
  ,fGThreePadClustThres(-1)
  ,fGSelNoZS(-1)
  ,fGTCFilterWeight(-1)
  ,fGTCFilterShortDecPar(-1)
  ,fGTCFilterLongDecPar(-1)
  ,fGFastStatNoise(-1)
  ,fGConfigVersion(0)
  ,fGConfigName(0)
  ,fGFilterType(0)
  ,fGReadoutParam(0)
  ,fGTestPattern(0)
  ,fGTrackletMode(0)
  ,fGTrackletDef(0)
  ,fGTriggerSetup(0)
  ,fGAddOptions(0)
  ,fRunType("")
  ,fStartTime(0)
  ,fEndTime(0)
  ,fFEEArr(new TObjArray(540))
  ,fPTRArr(new TObjArray(6))
  ,fGTUObj(new AliTRDCalDCSGTU())
{
  //
  // AliTRDCalDCSv2 copy constructor
  //
}

//_____________________________________________________________________________
AliTRDCalDCSv2 &AliTRDCalDCSv2::operator=(const AliTRDCalDCSv2 &cd)
{
  //
  // Assignment operator
  //
  if (&cd == this) return *this;

  new (this) AliTRDCalDCSv2(cd);
  return *this;
}

//_____________________________________________________________________________
void AliTRDCalDCSv2::EvaluateGlobalParameters()
{
  //
  // Do an evaluation of all global parameters
  //

  for(Int_t i=0; i<540; i++) {
    AliTRDCalDCSFEEv2 *iDCSFEEObj;
    iDCSFEEObj = GetCalDCSFEEObj(i);
    if(iDCSFEEObj != NULL) {
      if(iDCSFEEObj->GetStatusBit() == 0) {
	// first, set the parameters of the first good ROC as global
	fGNumberOfTimeBins    = iDCSFEEObj->GetNumberOfTimeBins();
	fGConfigTag           = iDCSFEEObj->GetConfigTag();
	fGSingleHitThres      = iDCSFEEObj->GetSingleHitThres();
	fGThreePadClustThres  = iDCSFEEObj->GetThreePadClustThres();
	fGSelNoZS             = iDCSFEEObj->GetSelectiveNoZS();
	fGTCFilterWeight      = iDCSFEEObj->GetTCFilterWeight();
	fGTCFilterShortDecPar = iDCSFEEObj->GetTCFilterShortDecPar();
	fGTCFilterLongDecPar  = iDCSFEEObj->GetTCFilterLongDecPar();
	fGFastStatNoise       = iDCSFEEObj->GetFastStatNoise();
	fGConfigVersion       = iDCSFEEObj->GetConfigVersion();
	fGConfigName          = iDCSFEEObj->GetConfigName();
	fGFilterType          = iDCSFEEObj->GetFilterType();
	fGReadoutParam        = iDCSFEEObj->GetReadoutParam();
	fGTestPattern         = iDCSFEEObj->GetTestPattern();
	fGTrackletMode        = iDCSFEEObj->GetTrackletMode();
	fGTrackletDef         = iDCSFEEObj->GetTrackletDef();
	fGTriggerSetup        = iDCSFEEObj->GetTriggerSetup();
	fGAddOptions          = iDCSFEEObj->GetAddOptions();
	break;
      }
    }
  }

  for(Int_t i=0; i<540; i++) {
    AliTRDCalDCSFEEv2 *iDCSFEEObj;
    iDCSFEEObj = GetCalDCSFEEObj(i);
    if(iDCSFEEObj != NULL) {
      if(iDCSFEEObj->GetStatusBit() == 0) {
	// second, if any of the other good chambers differ, set the global value to -1/""
	if(fGNumberOfTimeBins    != iDCSFEEObj->GetNumberOfTimeBins())    fGNumberOfTimeBins    = -2;
	if(fGConfigTag           != iDCSFEEObj->GetConfigTag())           fGConfigTag           = -2;
	if(fGSingleHitThres      != iDCSFEEObj->GetSingleHitThres())      fGSingleHitThres      = -2;
	if(fGThreePadClustThres  != iDCSFEEObj->GetThreePadClustThres())  fGThreePadClustThres  = -2;
	if(fGSelNoZS             != iDCSFEEObj->GetSelectiveNoZS())       fGSelNoZS             = -2;
	if(fGTCFilterWeight      != iDCSFEEObj->GetTCFilterWeight())      fGTCFilterWeight      = -2;
	if(fGTCFilterShortDecPar != iDCSFEEObj->GetTCFilterShortDecPar()) fGTCFilterShortDecPar = -2;
	if(fGTCFilterLongDecPar  != iDCSFEEObj->GetTCFilterLongDecPar())  fGTCFilterLongDecPar  = -2;
	if(fGFastStatNoise       != iDCSFEEObj->GetFastStatNoise())       fGFastStatNoise       = -2;
	if(fGConfigVersion       != iDCSFEEObj->GetConfigVersion())       fGConfigVersion       = "mixed";
	if(fGConfigName          != iDCSFEEObj->GetConfigName())          fGConfigName          = "mixed";
	if(fGFilterType          != iDCSFEEObj->GetFilterType())          fGFilterType          = "mixed";
	if(fGReadoutParam        != iDCSFEEObj->GetReadoutParam())        fGReadoutParam        = "mixed";
	if(fGTestPattern         != iDCSFEEObj->GetTestPattern())         fGTestPattern         = "mixed";
	if(fGTrackletMode        != iDCSFEEObj->GetTrackletMode())        fGTrackletMode        = "mixed";
	if(fGTrackletDef         != iDCSFEEObj->GetTrackletDef())         fGTrackletDef         = "mixed";
	if(fGTriggerSetup        != iDCSFEEObj->GetTriggerSetup())        fGTriggerSetup        = "mixed";
	if(fGAddOptions          != iDCSFEEObj->GetAddOptions())          fGAddOptions          = "mixed";
      }
    }
  }
}


 AliTRDCalDCSv2.cxx:1
 AliTRDCalDCSv2.cxx:2
 AliTRDCalDCSv2.cxx:3
 AliTRDCalDCSv2.cxx:4
 AliTRDCalDCSv2.cxx:5
 AliTRDCalDCSv2.cxx:6
 AliTRDCalDCSv2.cxx:7
 AliTRDCalDCSv2.cxx:8
 AliTRDCalDCSv2.cxx:9
 AliTRDCalDCSv2.cxx:10
 AliTRDCalDCSv2.cxx:11
 AliTRDCalDCSv2.cxx:12
 AliTRDCalDCSv2.cxx:13
 AliTRDCalDCSv2.cxx:14
 AliTRDCalDCSv2.cxx:15
 AliTRDCalDCSv2.cxx:16
 AliTRDCalDCSv2.cxx:17
 AliTRDCalDCSv2.cxx:18
 AliTRDCalDCSv2.cxx:19
 AliTRDCalDCSv2.cxx:20
 AliTRDCalDCSv2.cxx:21
 AliTRDCalDCSv2.cxx:22
 AliTRDCalDCSv2.cxx:23
 AliTRDCalDCSv2.cxx:24
 AliTRDCalDCSv2.cxx:25
 AliTRDCalDCSv2.cxx:26
 AliTRDCalDCSv2.cxx:27
 AliTRDCalDCSv2.cxx:28
 AliTRDCalDCSv2.cxx:29
 AliTRDCalDCSv2.cxx:30
 AliTRDCalDCSv2.cxx:31
 AliTRDCalDCSv2.cxx:32
 AliTRDCalDCSv2.cxx:33
 AliTRDCalDCSv2.cxx:34
 AliTRDCalDCSv2.cxx:35
 AliTRDCalDCSv2.cxx:36
 AliTRDCalDCSv2.cxx:37
 AliTRDCalDCSv2.cxx:38
 AliTRDCalDCSv2.cxx:39
 AliTRDCalDCSv2.cxx:40
 AliTRDCalDCSv2.cxx:41
 AliTRDCalDCSv2.cxx:42
 AliTRDCalDCSv2.cxx:43
 AliTRDCalDCSv2.cxx:44
 AliTRDCalDCSv2.cxx:45
 AliTRDCalDCSv2.cxx:46
 AliTRDCalDCSv2.cxx:47
 AliTRDCalDCSv2.cxx:48
 AliTRDCalDCSv2.cxx:49
 AliTRDCalDCSv2.cxx:50
 AliTRDCalDCSv2.cxx:51
 AliTRDCalDCSv2.cxx:52
 AliTRDCalDCSv2.cxx:53
 AliTRDCalDCSv2.cxx:54
 AliTRDCalDCSv2.cxx:55
 AliTRDCalDCSv2.cxx:56
 AliTRDCalDCSv2.cxx:57
 AliTRDCalDCSv2.cxx:58
 AliTRDCalDCSv2.cxx:59
 AliTRDCalDCSv2.cxx:60
 AliTRDCalDCSv2.cxx:61
 AliTRDCalDCSv2.cxx:62
 AliTRDCalDCSv2.cxx:63
 AliTRDCalDCSv2.cxx:64
 AliTRDCalDCSv2.cxx:65
 AliTRDCalDCSv2.cxx:66
 AliTRDCalDCSv2.cxx:67
 AliTRDCalDCSv2.cxx:68
 AliTRDCalDCSv2.cxx:69
 AliTRDCalDCSv2.cxx:70
 AliTRDCalDCSv2.cxx:71
 AliTRDCalDCSv2.cxx:72
 AliTRDCalDCSv2.cxx:73
 AliTRDCalDCSv2.cxx:74
 AliTRDCalDCSv2.cxx:75
 AliTRDCalDCSv2.cxx:76
 AliTRDCalDCSv2.cxx:77
 AliTRDCalDCSv2.cxx:78
 AliTRDCalDCSv2.cxx:79
 AliTRDCalDCSv2.cxx:80
 AliTRDCalDCSv2.cxx:81
 AliTRDCalDCSv2.cxx:82
 AliTRDCalDCSv2.cxx:83
 AliTRDCalDCSv2.cxx:84
 AliTRDCalDCSv2.cxx:85
 AliTRDCalDCSv2.cxx:86
 AliTRDCalDCSv2.cxx:87
 AliTRDCalDCSv2.cxx:88
 AliTRDCalDCSv2.cxx:89
 AliTRDCalDCSv2.cxx:90
 AliTRDCalDCSv2.cxx:91
 AliTRDCalDCSv2.cxx:92
 AliTRDCalDCSv2.cxx:93
 AliTRDCalDCSv2.cxx:94
 AliTRDCalDCSv2.cxx:95
 AliTRDCalDCSv2.cxx:96
 AliTRDCalDCSv2.cxx:97
 AliTRDCalDCSv2.cxx:98
 AliTRDCalDCSv2.cxx:99
 AliTRDCalDCSv2.cxx:100
 AliTRDCalDCSv2.cxx:101
 AliTRDCalDCSv2.cxx:102
 AliTRDCalDCSv2.cxx:103
 AliTRDCalDCSv2.cxx:104
 AliTRDCalDCSv2.cxx:105
 AliTRDCalDCSv2.cxx:106
 AliTRDCalDCSv2.cxx:107
 AliTRDCalDCSv2.cxx:108
 AliTRDCalDCSv2.cxx:109
 AliTRDCalDCSv2.cxx:110
 AliTRDCalDCSv2.cxx:111
 AliTRDCalDCSv2.cxx:112
 AliTRDCalDCSv2.cxx:113
 AliTRDCalDCSv2.cxx:114
 AliTRDCalDCSv2.cxx:115
 AliTRDCalDCSv2.cxx:116
 AliTRDCalDCSv2.cxx:117
 AliTRDCalDCSv2.cxx:118
 AliTRDCalDCSv2.cxx:119
 AliTRDCalDCSv2.cxx:120
 AliTRDCalDCSv2.cxx:121
 AliTRDCalDCSv2.cxx:122
 AliTRDCalDCSv2.cxx:123
 AliTRDCalDCSv2.cxx:124
 AliTRDCalDCSv2.cxx:125
 AliTRDCalDCSv2.cxx:126
 AliTRDCalDCSv2.cxx:127
 AliTRDCalDCSv2.cxx:128
 AliTRDCalDCSv2.cxx:129
 AliTRDCalDCSv2.cxx:130
 AliTRDCalDCSv2.cxx:131
 AliTRDCalDCSv2.cxx:132
 AliTRDCalDCSv2.cxx:133
 AliTRDCalDCSv2.cxx:134
 AliTRDCalDCSv2.cxx:135
 AliTRDCalDCSv2.cxx:136
 AliTRDCalDCSv2.cxx:137
 AliTRDCalDCSv2.cxx:138
 AliTRDCalDCSv2.cxx:139
 AliTRDCalDCSv2.cxx:140
 AliTRDCalDCSv2.cxx:141
 AliTRDCalDCSv2.cxx:142
 AliTRDCalDCSv2.cxx:143
 AliTRDCalDCSv2.cxx:144
 AliTRDCalDCSv2.cxx:145
 AliTRDCalDCSv2.cxx:146
 AliTRDCalDCSv2.cxx:147
 AliTRDCalDCSv2.cxx:148
 AliTRDCalDCSv2.cxx:149
 AliTRDCalDCSv2.cxx:150
 AliTRDCalDCSv2.cxx:151
 AliTRDCalDCSv2.cxx:152
 AliTRDCalDCSv2.cxx:153
 AliTRDCalDCSv2.cxx:154
 AliTRDCalDCSv2.cxx:155
 AliTRDCalDCSv2.cxx:156
 AliTRDCalDCSv2.cxx:157
 AliTRDCalDCSv2.cxx:158
 AliTRDCalDCSv2.cxx:159
 AliTRDCalDCSv2.cxx:160
 AliTRDCalDCSv2.cxx:161
 AliTRDCalDCSv2.cxx:162
 AliTRDCalDCSv2.cxx:163
 AliTRDCalDCSv2.cxx:164
 AliTRDCalDCSv2.cxx:165
 AliTRDCalDCSv2.cxx:166
 AliTRDCalDCSv2.cxx:167
 AliTRDCalDCSv2.cxx:168
 AliTRDCalDCSv2.cxx:169
 AliTRDCalDCSv2.cxx:170
 AliTRDCalDCSv2.cxx:171
 AliTRDCalDCSv2.cxx:172
 AliTRDCalDCSv2.cxx:173
 AliTRDCalDCSv2.cxx:174
 AliTRDCalDCSv2.cxx:175
 AliTRDCalDCSv2.cxx:176
 AliTRDCalDCSv2.cxx:177
 AliTRDCalDCSv2.cxx:178
 AliTRDCalDCSv2.cxx:179
 AliTRDCalDCSv2.cxx:180
 AliTRDCalDCSv2.cxx:181
 AliTRDCalDCSv2.cxx:182
 AliTRDCalDCSv2.cxx:183
 AliTRDCalDCSv2.cxx:184
 AliTRDCalDCSv2.cxx:185
 AliTRDCalDCSv2.cxx:186
 AliTRDCalDCSv2.cxx:187
 AliTRDCalDCSv2.cxx:188
 AliTRDCalDCSv2.cxx:189
 AliTRDCalDCSv2.cxx:190
 AliTRDCalDCSv2.cxx:191
 AliTRDCalDCSv2.cxx:192
 AliTRDCalDCSv2.cxx:193
 AliTRDCalDCSv2.cxx:194
 AliTRDCalDCSv2.cxx:195
 AliTRDCalDCSv2.cxx:196
 AliTRDCalDCSv2.cxx:197
 AliTRDCalDCSv2.cxx:198
 AliTRDCalDCSv2.cxx:199
 AliTRDCalDCSv2.cxx:200
 AliTRDCalDCSv2.cxx:201
 AliTRDCalDCSv2.cxx:202
 AliTRDCalDCSv2.cxx:203
 AliTRDCalDCSv2.cxx:204
 AliTRDCalDCSv2.cxx:205
 AliTRDCalDCSv2.cxx:206