Line data Source code
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 6 : ClassImp(AliHLTOUTRawReader)
29 :
30 : AliHLTOUTRawReader::AliHLTOUTRawReader()
31 : :
32 0 : AliHLTOUTHomerCollection(),
33 0 : fpRawreader(NULL)
34 0 : {
35 : // constructor
36 : //
37 : // HLTOUT data wrapper for AliRawReader
38 : //
39 : // see header file for class documentation
40 0 : }
41 :
42 : AliHLTOUTRawReader::AliHLTOUTRawReader(AliRawReader* pRawreader, int event, AliHLTEsdManager* pEsdManager)
43 : :
44 0 : AliHLTOUTHomerCollection(event, pEsdManager),
45 0 : fpRawreader(pRawreader)
46 0 : {
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 0 : }
53 :
54 0 : AliHLTOUTRawReader::~AliHLTOUTRawReader()
55 0 : {
56 : // destructor
57 0 : }
58 :
59 : Bool_t AliHLTOUTRawReader::ReadNextData(UChar_t*& data)
60 : {
61 : // overloaded from AliHLTOUTHomerCollection: switch to next DDL
62 0 : if (!fpRawreader) return kFALSE;
63 0 : return fpRawreader->ReadNextData(data);
64 0 : }
65 :
66 : int AliHLTOUTRawReader::Reset()
67 : {
68 : // overloaded from AliHLTOUTHomerCollection: reset DDL position
69 0 : if (fpRawreader) return fpRawreader->Reset();
70 0 : return 0;
71 0 : }
72 :
73 : int AliHLTOUTRawReader::GetDataSize()
74 : {
75 : // overloaded from AliHLTOUTHomerCollection: get size of current DDL
76 0 : if (fpRawreader) return fpRawreader->GetDataSize();
77 0 : return 0;
78 0 : }
79 :
80 : AliHLTCDHWrapper AliHLTOUTRawReader::GetDataHeader()
81 : {
82 : // overloaded from AliHLTOUTHomerCollection: get data header of current DDL
83 0 : if (fpRawreader) {
84 0 : if(fpRawreader->GetDataHeader())
85 0 : return fpRawreader->GetDataHeader();
86 0 : if(fpRawreader->GetDataHeaderV3())
87 0 : return fpRawreader->GetDataHeaderV3();
88 : }
89 0 : return NULL;
90 0 : }
91 :
92 : void AliHLTOUTRawReader::SelectEquipment(int equipmentType, int minEquipmentId, int maxEquipmentId)
93 : {
94 : // overloaded from AliHLTOUTHomerCollection: select equipment range
95 0 : if (fpRawreader) fpRawreader->SelectEquipment(equipmentType, minEquipmentId, maxEquipmentId);
96 0 : }
97 :
98 : int AliHLTOUTRawReader::GetEquipmentId()
99 : {
100 : // overloaded from AliHLTOUTHomerCollection: get id of current DDL
101 0 : if (fpRawreader) return fpRawreader->GetEquipmentId();
102 0 : return -1;
103 0 : }
|