]> git.uio.no Git - u/mrichter/AliRoot.git/blob - HLT/rec/AliHLTOUTRawReader.cxx
Caching of field param.patch is requested on compilation time by #define _MAGCHEB_CAC...
[u/mrichter/AliRoot.git] / HLT / rec / AliHLTOUTRawReader.cxx
1 // $Id$
2
3 //**************************************************************************
4 //* This file is property of and copyright by the                          * 
5 //* ALICE Experiment at CERN, All rights reserved.                         *
6 //*                                                                        *
7 //* Primary Authors: Matthias Richter <Matthias.Richter@ift.uib.no>        *
8 //*                                                                        *
9 //* Permission to use, copy, modify and distribute this software and its   *
10 //* documentation strictly for non-commercial purposes is hereby granted   *
11 //* without fee, provided that the above copyright notice appears in all   *
12 //* copies and that both the copyright notice and this permission notice   *
13 //* appear in the supporting documentation. The authors make no claims     *
14 //* about the suitability of this software for any purpose. It is          *
15 //* provided "as is" without express or implied warranty.                  *
16 //**************************************************************************
17
18 /// @file   AliHLTOUTRawReader.cxx
19 /// @author Matthias Richter
20 /// @date   
21 /// @brief  HLTOUT data wrapper for AliRawReader.
22 ///
23
24 #include "AliHLTOUTRawReader.h"
25 #include "AliRawReader.h"
26
27 /** ROOT macro for the implementation of ROOT specific class methods */
28 ClassImp(AliHLTOUTRawReader)
29
30 AliHLTOUTRawReader::AliHLTOUTRawReader()
31   :
32   AliHLTOUTHomerCollection(),
33   fpRawreader(NULL)
34 {
35   // constructor
36   //
37   // HLTOUT data wrapper for AliRawReader
38   // 
39   // see header file for class documentation
40 }
41
42 AliHLTOUTRawReader::AliHLTOUTRawReader(AliRawReader* pRawreader, int event, AliHLTEsdManager* pEsdManager)
43   :
44   AliHLTOUTHomerCollection(event, pEsdManager),
45   fpRawreader(pRawreader)
46 {
47   // see header file for class documentation
48   // or
49   // refer to README to build package
50   // or
51   // visit http://web.ift.uib.no/~kjeks/doc/alice-hlt
52 }
53
54 AliHLTOUTRawReader::~AliHLTOUTRawReader()
55 {
56   // destructor
57 }
58
59 Bool_t AliHLTOUTRawReader::ReadNextData(UChar_t*& data)
60 {
61   // overloaded from AliHLTOUTHomerCollection: switch to next DDL
62   if (!fpRawreader) return kFALSE;
63   return fpRawreader->ReadNextData(data);
64 }
65
66 int AliHLTOUTRawReader::Reset()
67 {
68   // overloaded from AliHLTOUTHomerCollection: reset DDL position
69   if (fpRawreader) return fpRawreader->Reset();
70   return 0;
71 }
72
73 int AliHLTOUTRawReader::GetDataSize()
74 {
75   // overloaded from AliHLTOUTHomerCollection: get size of current DDL
76   if (fpRawreader) return fpRawreader->GetDataSize();
77   return 0;
78 }
79
80 AliHLTCDHWrapper AliHLTOUTRawReader::GetDataHeader()
81 {
82   // overloaded from AliHLTOUTHomerCollection: get data header of current DDL
83   if (fpRawreader) return fpRawreader->GetDataHeader();
84   return NULL;
85 }
86
87 void AliHLTOUTRawReader::SelectEquipment(int equipmentType, int minEquipmentId, int maxEquipmentId)
88 {
89   // overloaded from AliHLTOUTHomerCollection: select equipment range
90   if (fpRawreader) fpRawreader->SelectEquipment(equipmentType, minEquipmentId, maxEquipmentId);
91 }
92
93 int AliHLTOUTRawReader::GetEquipmentId()
94 {
95   // overloaded from AliHLTOUTHomerCollection: get id of current DDL
96   if (fpRawreader) return fpRawreader->GetEquipmentId();
97   return -1;
98 }