]> git.uio.no Git - u/mrichter/AliRoot.git/blob - PMD/AliPMDBlockHeader.cxx
implementation of effc++
[u/mrichter/AliRoot.git] / PMD / AliPMDBlockHeader.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 "AliPMDBlockHeader.h"
18
19
20
21 ClassImp(AliPMDBlockHeader)
22
23
24 const Int_t  AliPMDBlockHeader::fgkHeaderLength = 8;
25
26 //------------------------------------------------------------
27 AliPMDBlockHeader::AliPMDBlockHeader()
28   :  TObject(),
29      fTotalLength(0),
30      fRawDataLength(0),
31      fDspId(0),
32      fTrWord1(0),
33      fTrWord2(0),
34      fTrWord3(0),
35      fTrWord4(0),
36      fPadWord(0)
37 {
38   //
39   // ctor
40   //
41
42 }
43
44 //___________________________________________
45 AliPMDBlockHeader::~AliPMDBlockHeader()
46 {
47   // 
48   // dtor
49   //
50 }
51
52 //___________________________________________
53 AliPMDBlockHeader::AliPMDBlockHeader(const AliPMDBlockHeader & blockh):
54   TObject(),
55   fTotalLength(blockh.fTotalLength),
56   fRawDataLength(blockh.fRawDataLength),
57   fDspId(blockh.fDspId),
58   fTrWord1(blockh.fTrWord1),
59   fTrWord2(blockh.fTrWord2),
60   fTrWord3(blockh.fTrWord3),
61   fTrWord4(blockh.fTrWord4),
62   fPadWord(blockh.fPadWord)
63 {
64   //
65   // copy ctor
66   //
67
68 }
69
70 //___________________________________________
71 AliPMDBlockHeader&
72 AliPMDBlockHeader::operator=(const AliPMDBlockHeader &blockh)
73 {
74   // 
75   // assignment operator
76   //
77   if (this != &blockh)
78     {
79       fTotalLength   = blockh.fTotalLength;
80       fRawDataLength = blockh.fRawDataLength;
81       fDspId         = blockh.fDspId;
82       fTrWord1       = blockh.fTrWord1;
83       fTrWord2       = blockh.fTrWord2;
84       fTrWord3       = blockh.fTrWord3;
85       fTrWord4       = blockh.fTrWord4;
86       fPadWord       = blockh.fPadWord;
87     }
88   return *this;
89 }
90 void AliPMDBlockHeader::SetHeader(Int_t *header)
91 {
92   fTotalLength   = header[0];
93   fRawDataLength = header[1];
94   fDspId         = header[2];
95   fTrWord1       = header[3];
96   fTrWord2       = header[4];
97   fTrWord3       = header[5];
98   fTrWord4       = header[6];
99   fPadWord       = header[7];
100
101 }
102