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 **************************************************************************/
18 ///////////////////////////////////////////////////////////////////////////////
20 /// This class provides access to PHOS digits in raw data.
22 /// It loops over all PHOS digits in the raw data given by the AliRawReader.
23 /// The Next method goes to the next digit. If there are no digits left
24 /// it returns kFALSE.
25 /// Several getters provide information about the current digit.
27 /// root > AliRawReaderFile rawReader ;
28 /// root > AliPHOSRawStream input(&rawReader) ;
29 /// root > while (input.Next()) .....
30 ///////////////////////////////////////////////////////////////////////////////
32 #include "AliPHOSRawStream.h"
33 #include "AliRawReader.h"
35 ClassImp(AliPHOSRawStream)
38 //_____________________________________________________________________________
39 AliPHOSRawStream::AliPHOSRawStream(AliRawReader* rawReader) :
40 AliAltroRawStream(rawReader),
48 // create an object to read PHOS raw digits
52 fNoAltroMapping = kTRUE;
55 //_____________________________________________________________________________
56 AliPHOSRawStream::AliPHOSRawStream(const AliPHOSRawStream& stream) :
57 AliAltroRawStream(stream),
65 Fatal("AliPHOSRawStream", "copy constructor not implemented");
68 //_____________________________________________________________________________
69 AliPHOSRawStream& AliPHOSRawStream::operator = (const AliPHOSRawStream&
72 Fatal("operator =", "assignment operator not implemented");
76 //_____________________________________________________________________________
77 AliPHOSRawStream::~AliPHOSRawStream()
82 //_____________________________________________________________________________
83 void AliPHOSRawStream::Reset()
85 // reset phos raw stream params
86 AliAltroRawStream::Reset();
87 fModule = fPrevModule = fRow = fPrevRow = fColumn = fPrevColumn = -1;
90 //_____________________________________________________________________________
91 Bool_t AliPHOSRawStream::Next()
93 // Read next PHOS signal
94 // Apply the PHOS altro mapping to get
95 // the module,row and column indeces
96 fPrevModule = fModule;
98 fPrevColumn = fColumn;
99 if (AliAltroRawStream::Next()) {
100 // if (IsNewHWAddress())
108 //_____________________________________________________________________________
109 void AliPHOSRawStream::ApplyAltroMapping()
111 // Take the DDL index, load
112 // the corresponding altro mapping
113 // object and fill the sector,row and pad indeces
114 fModule = fSegmentation[0];
115 fRow = fSegmentation[1];
116 fColumn = fSegmentation[2];