1 /**************************************************************************
2 * Copyright(c) 1998-1999, 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 **************************************************************************/
16 //-----------------------------------------------------------------
18 // This class deals with the DCS related info of the GRP
19 // Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
20 //-----------------------------------------------------------------
22 #include "AliGRPDCS.h"
24 #include "AliDCSValue.h"
26 //#include <TObjString.h>
33 //_______________________________________________________________
34 AliGRPDCS::AliGRPDCS():
35 TObject(), fDCSArray(new TObjArray()) {
36 // default constructor
40 //_______________________________________________________________
41 AliGRPDCS::AliGRPDCS(TObjArray *dcsArray):
44 fDCSArray = new TObjArray();
48 //___________________________________________________________________________
49 AliGRPDCS::AliGRPDCS(const AliGRPDCS& grpDcs):
53 if (grpDcs.fDCSArray) fDCSArray = new TObjArray();
56 //_______________________________________________________________
57 const char* AliGRPDCS::ProcessDCS(TH1 *h) {
58 // process the dcs float values
59 Float_t fFDCSArraySum = 0.0, fFDCSArrayMean = 0.0;
60 for(Int_t i = 0; i < fDCSArray->GetEntries(); i++) {
61 AliDCSValue *v = (AliDCSValue *)fDCSArray->At(i);
62 h->Fill(v->GetFloat());
63 fFDCSArraySum += v->GetFloat();
65 fFDCSArrayMean = fFDCSArraySum/fDCSArray->GetEntries();
66 TString fDCSDataPointValue; fDCSDataPointValue += fFDCSArrayMean;
68 return fDCSDataPointValue.Data();