]> git.uio.no Git - u/mrichter/AliRoot.git/blob - STEER/AliLHCClockPhase.cxx
fix codding violation in AliTRDseedV1 class
[u/mrichter/AliRoot.git] / STEER / AliLHCClockPhase.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 #include "AliLHCClockPhase.h"
18 #include "AliDCSValue.h"
19 #include "AliLog.h"
20
21 ClassImp(AliLHCClockPhase)
22
23 //______________________________________________________________________________
24 AliLHCClockPhase::AliLHCClockPhase():
25   TObject(),
26   fPhaseB1(),
27   fPhaseB2()
28 {
29   // default constructor
30   // ...
31   fPhaseB1.SetOwner();
32   fPhaseB2.SetOwner();
33 }
34
35 //______________________________________________________________________________
36 void AliLHCClockPhase::AddPhaseB1DP(UInt_t timestamp, Float_t phase)
37 {
38   // Add a phase beam1 measurement
39   // to the array of data-points
40
41   fPhaseB1.AddLast(new AliDCSValue(phase,timestamp));
42 }
43
44 //______________________________________________________________________________
45 void AliLHCClockPhase::AddPhaseB2DP(UInt_t timestamp, Float_t phase)
46 {
47   // Add a phase beam2 measurement
48   // to the array of data-points
49
50   fPhaseB2.AddLast(new AliDCSValue(phase,timestamp));
51 }
52
53 //______________________________________________________________________________
54 const AliDCSValue* AliLHCClockPhase::GetPhaseB1DP(Int_t index) const
55 {
56   // Get the value of the phase
57   // The argument is the DP index
58   AliDCSValue *value = (AliDCSValue*)fPhaseB1.At(index);
59   if (!value) {
60     AliFatal(Form("Invalid index of the beam1 data point: %d (0 -> %d)",
61                   index,fPhaseB1.GetEntries()));
62     return NULL;
63   }
64   return value;
65 }
66
67 //______________________________________________________________________________
68 const AliDCSValue* AliLHCClockPhase::GetPhaseB2DP(Int_t index) const
69 {
70   // Get the value of the phase
71   // The argument is the DP index
72   AliDCSValue *value = (AliDCSValue*)fPhaseB2.At(index);
73   if (!value) {
74     AliFatal(Form("Invalid index of the beam2 data point: %d (0 -> %d)",
75                   index,fPhaseB2.GetEntries()));
76     return NULL;
77   }
78   return value;
79 }