1 /**************************************************************************
2 * This file is property of and copyright by the ALICE HLT Project *
3 * All rights reserved. *
5 * Primary Author: Per Thomas Hille <perthi@fys.uio.no> *
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 **************************************************************************/
16 #include "AliAltroData.h"
17 #include "AliAltroBunch.h"
19 ClassImp(AliAltroData)
21 AliAltroData::AliAltroData(): fData(0),
36 AliAltroData::~AliAltroData()
43 Bool_t AliAltroData::NextBunch(AliAltroBunch *altroBunch)
45 if(fIsComplete == kTRUE)
48 if(fBunchCounter == 0)
50 fBunchData = &fData[fDataSize - 1];
55 if(*fBunchData == 0){ fWc += 1;};
57 altroBunch->SetData(fData + fDataSize - fWc);
58 altroBunch->SetBunchSize(*fBunchData -2);
60 altroBunch->SetEndTimeBin( *fBunchData );
61 // altroBunch->SetStartTimeBin(*fBunchData - fBunchSize);
62 fBunchData -= (altroBunch->GetBunchSize() +1);
75 printf("\nAliAltroData::NextBunch: WARNING, dataset is not complet. 2AAA endmarker is missing ");
76 printf("\nfor branch %d, card %d, chip %d, channel %d\n", GetBranch(), GetCard(), GetChip(), GetChannel());
82 void AliAltroData::Reset()
89 Int_t AliAltroData::GetChannel() const
94 Int_t AliAltroData::GetChip() const
96 return (fHadd & 0x70) >> 4 ;
99 Int_t AliAltroData::GetCard() const
101 return (fHadd & 0x780) >> 7;
105 Int_t AliAltroData::GetBranch() const
107 return (fHadd & 0x800 ) >> 11;