]> git.uio.no Git - u/mrichter/AliRoot.git/blame - ITS/AliITSOnlineSPDfoChip.cxx
Fixing local structure disabled word, which had an incorrect value.
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineSPDfoChip.cxx
CommitLineData
286382a3 1/**************************************************************************
2 * Copyright(c) 2008-2010, ALICE Experiment at CERN, All rights reserved. *
3 * *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
6 * *
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 **************************************************************************/
15
16/* $Id$ */
17
18/////////////////////////////////////////////////////////////////
19// Author: A. Mastroserio //
20// This class is used as a container for the FO scan //
21// //
22/////////////////////////////////////////////////////////////////
23
24
25#include <TObjArray.h>
26#include "AliITSOnlineSPDfoChipConfig.h"
27#include "AliITSOnlineSPDfoChip.h"
28
29ClassImp(AliITSOnlineSPDfoChip)
30//-----------------------------------------------
31AliITSOnlineSPDfoChip::AliITSOnlineSPDfoChip():
32TObject(),
33fActiveHS(0),
34fChipId(0),
35fNumDACparams(0),
36fNumChipConfigs(0),
37fDACparams(0x0),
38fChipConfigArray(0x0)
39{
40// default constructor
41}
42
43//-------------------------------------------------
44AliITSOnlineSPDfoChip::AliITSOnlineSPDfoChip(Short_t nparams):
45TObject(),
46fActiveHS(0),
47fChipId(0),
48fNumDACparams(nparams),
49fNumChipConfigs(0),
50fDACparams(0x0),
51fChipConfigArray(0x0)
52{
53 //
54 // constructor
55 //
56 fDACparams = new Short_t[fNumDACparams];
57 fChipConfigArray = new TObjArray(); //starting with no objects, then adding...
58}
59//--------------------------------------------------
60
61AliITSOnlineSPDfoChip::AliITSOnlineSPDfoChip(const AliITSOnlineSPDfoChip &c):
62TObject(c),
63fActiveHS(c.fActiveHS),
64fChipId(c.fChipId),
65fNumDACparams(c.fNumDACparams),
66fNumChipConfigs(c.fNumChipConfigs),
67fDACparams(0x0),
68fChipConfigArray(0x0)
69{
70 //
71 //copy constructor
72 // fChipConfigArray is not copied. This method is private
73 //
74
75 for(Int_t iPar =0; iPar < fNumDACparams; iPar++) fDACparams[iPar] = c.fDACparams[iPar];
76}
77//--------------------------------------------------
78AliITSOnlineSPDfoChip::~AliITSOnlineSPDfoChip()
79{
80 // dctor
81
82 fChipConfigArray->SetOwner(kTRUE);
83 fChipConfigArray->Clear();
84 delete fChipConfigArray;
85 delete [] fDACparams;
86}
87//--------------------------------------------------
88void AliITSOnlineSPDfoChip::AddMeasurement(AliITSOnlineSPDfoChipConfig *confinfo)
89{
90 //
91 //setter for the Chip global measurement
92 //
93
94 fChipConfigArray->AddLast(confinfo);
95 fNumChipConfigs++;
96}
97//_____________________________________________________
98void AliITSOnlineSPDfoChip::PrintInfo()
99{
100 //
101 // prints container content
102 //
103 printf(" \n ActiveHS %d ChipId %d",fActiveHS,fChipId);
104 printf(" DAC parameters : %d %d %d %d \n",fDACparams[0],fDACparams[1],fDACparams[2],fDACparams[3]);
105 for(Int_t i=0; i< fNumChipConfigs; i++) {
106 if(!(AliITSOnlineSPDfoChipConfig*)(GetChipConfigInfo()->At(i)) ) printf("AliISOnlineSPDfoChipConfig pointer null");
107 else ((AliITSOnlineSPDfoChipConfig*)(GetChipConfigInfo()->At(i)))->PrintInfo();
108 }
109}