]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/TPCLib/AliHLTTPCDigitReader.cxx
- use_newio switch removed from libAliHLTTPC, always on; not removed in
[u/mrichter/AliRoot.git] / HLT / TPCLib / AliHLTTPCDigitReader.cxx
1 // $Id$
2
3 /**************************************************************************
4  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
5  *                                                                        *
6  * Authors: Matthias Richter <Matthias.Richter@ift.uib.no>                *
7  *          Timm Steinbeck <timm@kip.uni-heidelberg.de>                   *
8  *          Jochen Thaeder <thaeder@kip.uni-heidelberg.de>                *
9  *          for The ALICE Off-line Project.                               *
10  *                                                                        *
11  * Permission to use, copy, modify and distribute this software and its   *
12  * documentation strictly for non-commercial purposes is hereby granted   *
13  * without fee, provided that the above copyright notice appears in all   *
14  * copies and that both the copyright notice and this permission notice   *
15  * appear in the supporting documentation. The authors make no claims     *
16  * about the suitability of this software for any purpose. It is          *
17  * provided "as is" without express or implied warranty.                  *
18  **************************************************************************/
19
20 /** @file   AliHLTTPCDigitReader.cxx
21     @author Timm Steinbeck, Jochen Thaeder, Matthias Richter
22     @date   
23     @brief  An abstract reader class for TPC data.
24 */
25
26 #if __GNUC__>= 3
27 using namespace std;
28 #endif
29
30 #include "AliHLTTPCDigitReader.h"
31 #include "AliHLTTPCTransform.h"
32 #include "AliHLTStdIncludes.h"
33
34 ClassImp(AliHLTTPCDigitReader)
35
36 AliHLTTPCDigitReader::AliHLTTPCDigitReader(){
37 }
38
39 AliHLTTPCDigitReader::~AliHLTTPCDigitReader(){
40 }
41
42 int AliHLTTPCDigitReader::InitBlock(void* ptr,unsigned long size,Int_t firstrow,Int_t lastrow, Int_t patch, Int_t slice){
43   if (patch<0 || patch>=AliHLTTPCTransform::GetNumberOfPatches()) {
44     HLTError("invalid readout partition number %d", patch);
45     return -EINVAL;
46   }
47   if (firstrow!=AliHLTTPCTransform::GetFirstRow(patch)) {
48     HLTWarning("The firstrow parameter does not match the layout of the readout partition %d "
49                "(firstrow=%d). Parameter is ignored", patch, AliHLTTPCTransform::GetFirstRow(patch));
50   }
51   if (lastrow!=AliHLTTPCTransform::GetLastRow(patch)) {
52     HLTWarning("The lastrow parameter does not match the layout of the readout partition %d "
53                "(lastrow=%d). Parameter is ignored", patch, AliHLTTPCTransform::GetLastRow(patch));
54   }
55   return InitBlock(ptr, size, patch, slice);
56 }
57