]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliGRPDCS.cxx
Removing semaphore .done files.
[u/mrichter/AliRoot.git] / STEER / AliGRPDCS.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, 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 //-----------------------------------------------------------------
17 //                AliGRPDCS class
18 //   This class deals with the DCS related info of the GRP
19 //   Origin: Panos Christakoglou, UOA-CERN, Panos.Christakoglou@cern.ch
20 //-----------------------------------------------------------------
21
22 #include "AliGRPDCS.h"
23
24 #include "AliDCSValue.h"
25
26 //#include <TObjString.h>
27 class TObjString;
28
29 #include <TH1.h>
30
31 ClassImp(AliGRPDCS)
32
33 //_______________________________________________________________
34 AliGRPDCS::AliGRPDCS():
35   TObject(), fDCSArray(new TObjArray()) {
36   // default constructor
37   
38 }
39
40 //_______________________________________________________________
41 AliGRPDCS::AliGRPDCS(TObjArray *dcsArray):
42   TObject() {
43   // constructor
44   fDCSArray = new TObjArray();
45   fDCSArray = dcsArray;
46 }
47
48 //___________________________________________________________________________
49 AliGRPDCS::AliGRPDCS(const AliGRPDCS& grpDcs):
50   TObject(grpDcs) {
51   //copy constructor
52
53   if (grpDcs.fDCSArray) fDCSArray = new TObjArray();
54 }
55
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();
64   }
65   fFDCSArrayMean = fFDCSArraySum/fDCSArray->GetEntries();
66   TString fDCSDataPointValue; fDCSDataPointValue += fFDCSArrayMean;
67
68   return fDCSDataPointValue.Data();
69 }
70