Correct formula for phi, in case of current local X <0, in GetLocalXat and GetPhiZat
[u/mrichter/AliRoot.git] / ITS / AliITSOnlineSPDfoInfo.cxx
1 /**************************************************************************
2  * Copyright(c) 2008-2010, 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 /* $Id$ */
17
18 ////////////////////////////////////////////////////////////////
19 // Author: A. Mastroserio                                     // 
20 // This class is used within the detector algorithm framework //
21 // to collect information on how the scan was arranged.       //
22 ////////////////////////////////////////////////////////////////
23
24 #include "AliITSOnlineSPDfoInfo.h"
25
26 ClassImp(AliITSOnlineSPDfoInfo)
27   
28 //_____________________________________________________________________
29 AliITSOnlineSPDfoInfo::AliITSOnlineSPDfoInfo(): 
30  fRunNumber(0), fRouter(999), fNumTriggers(0),
31  fDBversion(0), fNumDACindex(0), fDACindex(0)
32 {}
33 //_____________________________________________________________________
34 AliITSOnlineSPDfoInfo::~AliITSOnlineSPDfoInfo() 
35 {}
36 //_____________________________________________________________________
37 void AliITSOnlineSPDfoInfo::ClearThis() {
38   // reset all values for this object
39   fRunNumber=0;
40   fRouter=999;
41   fNumTriggers=0;
42   fDBversion=0;
43   fNumDACindex=0;
44   fDACindex.Reset();
45 }
46 //_____________________________________________________________________
47 void AliITSOnlineSPDfoInfo::AddDACindex(Short_t index) {
48   // add a new DAC index, allocate space for TArrayS
49   fNumDACindex++;
50   fDACindex.Set(fNumDACindex);
51   fDACindex.AddAt(index, fNumDACindex-1);
52 }
53 //_____________________________________________________________________
54 Short_t AliITSOnlineSPDfoInfo::GetDACindex(UShort_t id) const {
55   // returns the DAC index at position id of TArrayS
56   if (id>=fNumDACindex) return -1;
57   else                  return fDACindex.At(id);
58 }