1 /**************************************************************************
2 * Copyright(c) 2007-2009, 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 ///////////////////////////////////////////////////////////////////
20 // Implementation of the class containing SDD DCS data //
21 // Origin: F.Prino, Torino, prino@to.infn.it //
23 ///////////////////////////////////////////////////////////////////
25 #include "AliITSDCSDataSDD.h"
28 ClassImp(AliITSDCSDataSDD)
30 //---------------------------------------------------------------
31 AliITSDCSDataSDD::AliITSDCSDataSDD():
40 // default constructor
42 //---------------------------------------------------------------
43 AliITSDCSDataSDD::AliITSDCSDataSDD(Int_t npts):
49 fTemperatureLeft(npts),
50 fTemperatureRight(npts)
52 // standard constructor
54 //---------------------------------------------------------------
55 void AliITSDCSDataSDD::SetNPoints(Int_t npts){
56 // Redimension and resets arrays
59 fDriftField.Set(npts);
60 fTemperatureLeft.Set(npts);
61 fTemperatureRight.Set(npts);
64 //---------------------------------------------------------------
65 void AliITSDCSDataSDD::SetValues(Int_t time, Float_t field, Float_t templ, Float_t tempr){
66 // Set values of next array elements
67 if(fSetPoints>=fNpts){
68 AliWarning("Try to write outside array range");
71 fTimeStamp.AddAt(time,fSetPoints);
72 fDriftField.AddAt(field,fSetPoints);
73 fTemperatureLeft.AddAt(templ,fSetPoints);
74 fTemperatureRight.AddAt(tempr,fSetPoints);
77 //---------------------------------------------------------------
78 void AliITSDCSDataSDD::Compress(){
79 // Redimension arrays removing the empty elements at the end
80 SetNPoints(fSetPoints);
82 //---------------------------------------------------------------
83 void AliITSDCSDataSDD::PrintValues() const {
84 // Printout array contents
85 for(Int_t i=0;i<fNpts;i++){
86 printf("TimeStamp=%d Drift Field=%f Temperatures: Left Hybr=%f Right Hybr=%f\n",fTimeStamp.At(i),fDriftField.At(i),fTemperatureLeft.At(i),fTemperatureRight.At(i));