]>
Commit | Line | Data |
---|---|---|
a197a4ce | 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 | ||
9edefa04 | 16 | // @(#)alimdc:$Name$:$Id$ |
17 | // Author: Fons Rademakers 26/11/99 | |
18 | ||
a197a4ce | 19 | ////////////////////////////////////////////////////////////////////////// |
20 | // // | |
21 | // AliRawEquipmentHeader // | |
22 | // // | |
23 | ////////////////////////////////////////////////////////////////////////// | |
24 | ||
9edefa04 | 25 | #include <Bytes.h> |
a197a4ce | 26 | |
9edefa04 | 27 | #include "AliRawEquipmentHeader.h" |
a197a4ce | 28 | |
29 | ClassImp(AliRawEquipmentHeader) | |
30 | ||
c53ff744 | 31 | //______________________________________________________________________________ |
32 | AliRawEquipmentHeader::AliRawEquipmentHeader(): | |
33 | fSize(0), | |
34 | fEquipmentType(0), | |
58d3c7c2 | 35 | fEquipmentID(0xffffffff), |
c53ff744 | 36 | fBasicElementSizeType(0) |
37 | { | |
38 | // Default constructor | |
39 | for(Int_t i = 0; i < kAttributeWords; i++) | |
40 | fTypeAttribute[i] = 0; | |
41 | } | |
a197a4ce | 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 | } | |
6bc85955 | 57 | |
58 | //______________________________________________________________________________ | |
59 | void AliRawEquipmentHeader::Reset() | |
60 | { | |
61 | // Reset the contents of the equipment | |
62 | // header data | |
58d3c7c2 | 63 | fSize = fEquipmentType = fBasicElementSizeType = 0; |
64 | fEquipmentID = 0xffffffff; | |
6bc85955 | 65 | |
66 | for(Int_t i = 0; i < kAttributeWords; i++) | |
67 | fTypeAttribute[i] = 0; | |
68 | } |