]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RAW/AliRawEquipmentHeader.cxx
Unused variable i removed
[u/mrichter/AliRoot.git] / RAW / AliRawEquipmentHeader.cxx
1 /**************************************************************************
2  * Copyright(c) 1998-2003, 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 // @(#)alimdc:$Name$:$Id$
17 // Author: Fons Rademakers  26/11/99
18
19 //////////////////////////////////////////////////////////////////////////
20 //                                                                      //
21 // AliRawEquipmentHeader                                                //
22 //                                                                      //
23 //////////////////////////////////////////////////////////////////////////
24
25 #include <Bytes.h>
26
27 #include "AliRawEquipmentHeader.h"
28
29 ClassImp(AliRawEquipmentHeader)
30
31 //______________________________________________________________________________
32 AliRawEquipmentHeader::AliRawEquipmentHeader():
33   fSize(0),
34   fEquipmentType(0),
35   fEquipmentID(0xffffffff),
36   fBasicElementSizeType(0)
37 {
38   // Default constructor
39   for(Int_t i = 0; i < kAttributeWords; i++)
40     fTypeAttribute[i] = 0;
41 }
42
43 //______________________________________________________________________________
44 void AliRawEquipmentHeader::Swap()
45 {
46    // Swap equipment header data. There is no way to see if the data
47    // has already been swapped. This method is only called when the
48    // header is read from the DATE event builder (GDC).
49
50    fSize                 = net2host(fSize);
51    fEquipmentType        = net2host(fEquipmentType);
52    fEquipmentID          = net2host(fEquipmentID);
53    fBasicElementSizeType = net2host(fBasicElementSizeType);
54    for (int i = 0; i < kAttributeWords; i++)
55       fTypeAttribute[i] = net2host(fTypeAttribute[i]);
56 }
57
58 //______________________________________________________________________________
59 void AliRawEquipmentHeader::Reset()
60 {
61   // Reset the contents of the equipment
62   // header data
63   fSize = fEquipmentType = fBasicElementSizeType = 0;
64   fEquipmentID = 0xffffffff;
65
66   for(Int_t i = 0; i < kAttributeWords; i++)
67     fTypeAttribute[i] = 0;
68 }