1 /**************************************************************************
2 * Copyright(c) 2008-2010, 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 ////////////////////////////////////////////////////////////////
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 ////////////////////////////////////////////////////////////////
24 #include "AliITSOnlineSPDfoInfo.h"
27 ClassImp(AliITSOnlineSPDfoInfo)
29 //_____________________________________________________________________
30 AliITSOnlineSPDfoInfo::AliITSOnlineSPDfoInfo():
31 fRunNumber(0), fRouter(999), fNumTriggers(0),
32 fDBversion(0), fNumDACindex(0), fDACindex(0),
35 for(Int_t i=0; i<60; i++) fActiveChipsAndHS.SetBitNumber(i,kFALSE);
37 //_____________________________________________________________________
38 AliITSOnlineSPDfoInfo::~AliITSOnlineSPDfoInfo()
40 //_____________________________________________________________________
41 void AliITSOnlineSPDfoInfo::ClearThis() {
42 // reset all values for this object
49 for(Int_t i=0; i<60; i++) fActiveChipsAndHS.SetBitNumber(i,kFALSE);
51 //_____________________________________________________________________
52 void AliITSOnlineSPDfoInfo::AddDACindex(Short_t index) {
53 // add a new DAC index, allocate space for TArrayS
55 fDACindex.Set(fNumDACindex);
56 fDACindex.AddAt(index, fNumDACindex-1);
58 //_____________________________________________________________________
59 Short_t AliITSOnlineSPDfoInfo::GetDACindex(UShort_t id) const {
60 // returns the DAC index at position id of TArrayS
61 if (id>=fNumDACindex) return -1;
62 else return fDACindex.At(id);
64 //_____________________________________________________________________
65 Bool_t AliITSOnlineSPDfoInfo::IsActiveHS(UInt_t hs) const {
67 for(Int_t iChip =0; iChip<10; iChip++) isHS = IsActiveChip(hs,iChip);
70 //_____________________________________________________________________
71 Bool_t AliITSOnlineSPDfoInfo::IsActiveChip(UInt_t hs, UInt_t chip) const {
72 if(hs > 5 || chip > 9) {
73 AliError(Form("hs %i or chip %i is out of range [hs=0-5 chip=0=9]\n",hs,chip));
76 return fActiveChipsAndHS.TestBitNumber(10*hs+chip);
78 //_____________________________________________________________________