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 **************************************************************************/
17 #include "AliLHCClockPhase.h"
18 #include "AliDCSValue.h"
21 ClassImp(AliLHCClockPhase)
23 //______________________________________________________________________________
24 AliLHCClockPhase::AliLHCClockPhase():
29 // default constructor
35 //______________________________________________________________________________
36 void AliLHCClockPhase::AddPhaseB1DP(UInt_t timestamp, Float_t phase)
38 // Add a phase beam1 measurement
39 // to the array of data-points
41 fPhaseB1.AddLast(new AliDCSValue(phase,timestamp));
44 //______________________________________________________________________________
45 void AliLHCClockPhase::AddPhaseB2DP(UInt_t timestamp, Float_t phase)
47 // Add a phase beam2 measurement
48 // to the array of data-points
50 fPhaseB2.AddLast(new AliDCSValue(phase,timestamp));
53 //______________________________________________________________________________
54 const AliDCSValue* AliLHCClockPhase::GetPhaseB1DP(Int_t index) const
56 // Get the value of the phase
57 // The argument is the DP index
58 AliDCSValue *value = (AliDCSValue*)fPhaseB1.At(index);
60 AliFatal(Form("Invalid index of the beam1 data point: %d (0 -> %d)",
61 index,fPhaseB1.GetEntries()));
67 //______________________________________________________________________________
68 const AliDCSValue* AliLHCClockPhase::GetPhaseB2DP(Int_t index) const
70 // Get the value of the phase
71 // The argument is the DP index
72 AliDCSValue *value = (AliDCSValue*)fPhaseB2.At(index);
74 AliFatal(Form("Invalid index of the beam2 data point: %d (0 -> %d)",
75 index,fPhaseB2.GetEntries()));