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 **************************************************************************/
18 //-----------------------------------------------------------------
20 // This class deals with the DCS related info of the GRP
21 // Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
22 //-----------------------------------------------------------------
24 #include "AliGRPDCS.h"
26 #include "AliDCSValue.h"
28 //#include <TObjString.h>
32 #include <TObjArray.h>
36 //_______________________________________________________________
37 AliGRPDCS::AliGRPDCS():
38 TObject(), fDCSArray(new TObjArray()) {
39 // default constructor
43 //_______________________________________________________________
44 AliGRPDCS::AliGRPDCS(TObjArray *dcsArray):
47 fDCSArray = new TObjArray();
51 //___________________________________________________________________________
52 AliGRPDCS::AliGRPDCS(const AliGRPDCS& grpDcs):
56 if (grpDcs.fDCSArray) fDCSArray = new TObjArray();
59 //_______________________________________________________________
60 const char* AliGRPDCS::ProcessDCS(TH1 *h) {
61 // process the dcs float values
62 Float_t fFDCSArraySum = 0.0, fFDCSArrayMean = 0.0;
63 for(Int_t i = 0; i < fDCSArray->GetEntries(); i++) {
64 AliDCSValue *v = (AliDCSValue *)fDCSArray->At(i);
65 h->Fill(v->GetFloat());
66 fFDCSArraySum += v->GetFloat();
68 fFDCSArrayMean = fFDCSArraySum/fDCSArray->GetEntries();
69 TString fDCSDataPointValue; fDCSDataPointValue += fFDCSArrayMean;
71 return fDCSDataPointValue.Data();