1 /**************************************************************************
2 * Copyright(c) 2008-2010, 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 **************************************************************************/
18 /////////////////////////////////////////////////////////////////
19 // Author: A. Mastroserio //
20 // This class is used as a container for the FO scan //
22 /////////////////////////////////////////////////////////////////
25 #include <TObjArray.h>
26 #include "AliITSOnlineSPDfoChipConfig.h"
27 #include "AliITSOnlineSPDfoChip.h"
29 ClassImp(AliITSOnlineSPDfoChip)
30 //-----------------------------------------------
31 AliITSOnlineSPDfoChip::AliITSOnlineSPDfoChip():
40 // default constructor
43 //-------------------------------------------------
44 AliITSOnlineSPDfoChip::AliITSOnlineSPDfoChip(Short_t nparams):
48 fNumDACparams(nparams),
56 fDACparams = new Short_t[fNumDACparams];
57 fChipConfigArray = new TObjArray(); //starting with no objects, then adding...
59 //--------------------------------------------------
61 AliITSOnlineSPDfoChip::AliITSOnlineSPDfoChip(const AliITSOnlineSPDfoChip &c):
63 fActiveHS(c.fActiveHS),
65 fNumDACparams(c.fNumDACparams),
66 fNumChipConfigs(c.fNumChipConfigs),
72 // fChipConfigArray is not copied. This method is private
74 fDACparams = new Short_t[fNumDACparams];
75 for(Int_t iPar =0; iPar < fNumDACparams; iPar++) fDACparams[iPar] = c.fDACparams[iPar];
77 //--------------------------------------------------
78 AliITSOnlineSPDfoChip::~AliITSOnlineSPDfoChip()
82 fChipConfigArray->SetOwner(kTRUE);
83 fChipConfigArray->Clear();
84 delete fChipConfigArray;
87 //--------------------------------------------------
88 void AliITSOnlineSPDfoChip::AddMeasurement(AliITSOnlineSPDfoChipConfig *confinfo)
91 //setter for the Chip global measurement
94 fChipConfigArray->AddLast(confinfo);
97 //_____________________________________________________
98 void AliITSOnlineSPDfoChip::PrintInfo()
101 // prints container content
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();