+Bool_t AliITSRawStreamSPD::IsEventCounterFullConsistent() const {
+ // checks if the event counter values are consistent within the event
+ Short_t reference = -1;
+ for (UInt_t eq=0; eq<20; eq++) {
+ if (IsActiveEq(eq)) {
+ for (UInt_t hs=0; hs<6; hs++) {
+ if (IsActiveHS(eq,hs)) {
+ for (UInt_t chip=0; chip<10; chip++) {
+ if (fEventCounterFull[eq][hs][chip]!=-1) {
+ if (reference==-1) reference = fEventCounterFull[eq][hs][chip];
+ if (fEventCounterFull[eq][hs][chip] != reference) return kFALSE;
+ }
+ }
+ }
+ }
+ }
+ }
+ return kTRUE;
+}
+//__________________________________________________________________________
+Short_t AliITSRawStreamSPD::GetEventCounterFullEq(UInt_t eq) const {
+ // if the eq is active; returns the event counter value
+ if (eq>=20) {
+ TString errMess = Form("eq (%d) out of bounds",eq);
+ AliError(errMess.Data());
+ return -1;
+ }
+ if (IsActiveEq(eq)) {
+ for (UInt_t hs=0; hs<6; hs++) {
+ if (IsActiveHS(eq,hs)) {
+ for (UInt_t chip=0; chip<10; chip++) {
+ if (fEventCounterFull[eq][hs][chip]!=-1) {
+ return fEventCounterFull[eq][hs][chip];
+ }
+ }
+ }
+ }
+ }
+ return -1;
+}
+//__________________________________________________________________________
+Short_t AliITSRawStreamSPD::GetEventCounterFullHS(UInt_t eq, UInt_t hs) const {
+ // if the eq,hs is active; returns the event counter value
+ if (eq>=20 || hs>=6) {
+ TString errMess = Form("eq,hs (%d,%d) out of bounds",eq,hs);
+ AliError(errMess.Data());
+ return -1;
+ }
+ if (IsActiveEq(eq)) {
+ if (IsActiveHS(eq,hs)) {
+ for (UInt_t chip=0; chip<10; chip++) {
+ if (fEventCounterFull[eq][hs][chip]!=-1) {
+ return fEventCounterFull[eq][hs][chip];
+ }
+ }
+ }
+ }
+ return -1;
+}
+//__________________________________________________________________________
+Short_t AliITSRawStreamSPD::GetEventCounterFullChip(UInt_t eq, UInt_t hs, UInt_t chip) const {
+ // if the eq,hs,chip is active; returns the event counter value
+ if (eq>=20 || hs>=6 || chip>=10) {
+ TString errMess = Form("eq,hs,chip (%d,%d,%d) out of bounds",eq,hs,chip);
+ AliError(errMess.Data());
+ return -1;
+ }
+ if (IsActiveEq(eq)) {
+ if (IsActiveHS(eq,hs)) {
+ if (IsActiveChip(eq,hs,chip)) {
+ return fEventCounterFull[eq][hs][chip];
+ }
+ }
+ }
+ return -1;
+}
+//__________________________________________________________________________
+Int_t AliITSRawStreamSPD::GetHword(UInt_t index) {
+ if (index<kCalHeadLenMax) return fCalHeadWord[index];
+ else return 0;
+}