52df42318be434afc11af496f5f07124fd49e447
[u/mrichter/AliRoot.git] / PMD / AliPMDPatchBusHeader.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3  *                                                                        *
4  * Author: The ALICE Off-line Project.                                    *
5  * Contributors are mentioned in the code where appropriate.              *
6  *                                                                        *
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  **************************************************************************/
15
16  
17 #include "AliPMDPatchBusHeader.h"
18
19
20
21 ClassImp(AliPMDPatchBusHeader)
22
23
24 const Int_t  AliPMDPatchBusHeader::fgkHeaderLength = 4;
25
26 //------------------------------------------------------------
27 AliPMDPatchBusHeader::AliPMDPatchBusHeader()
28   :  TObject(),
29      fTotalLength(0),
30      fRawDataLength(0),
31      fPatchBusId(0),
32      fTrWord(0)
33 {
34   //
35   // ctor
36   //
37
38 }
39
40 //___________________________________________
41 AliPMDPatchBusHeader::~AliPMDPatchBusHeader()
42 {
43   // 
44   // dtor
45   //
46 }
47
48 //___________________________________________
49 AliPMDPatchBusHeader::AliPMDPatchBusHeader(const AliPMDPatchBusHeader & pbush):
50   TObject(),
51   fTotalLength(pbush.fTotalLength),
52   fRawDataLength(pbush.fRawDataLength),
53   fPatchBusId(pbush.fPatchBusId),
54   fTrWord(pbush.fTrWord)
55 {
56   //
57   // copy ctor
58   //
59 }
60
61 //___________________________________________
62 AliPMDPatchBusHeader&
63 AliPMDPatchBusHeader::operator=(const AliPMDPatchBusHeader &pbush)
64 {
65   // 
66   // assignment operator
67   //
68   if (this != &pbush)
69     {
70       fTotalLength   = pbush.fTotalLength;
71       fRawDataLength = pbush.fRawDataLength;
72       fPatchBusId    = pbush.fPatchBusId;
73       fTrWord        = pbush.fTrWord;
74     }
75   return *this;
76 }
77 void AliPMDPatchBusHeader::SetHeader(Int_t *header)
78 {
79   fTotalLength   = header[0];
80   fRawDataLength = header[1];
81   fPatchBusId    = header[2];
82   fTrWord        = header[3];
83 }
84