Modifying comments for Doxygen and/or
[u/mrichter/AliRoot.git] / MUON / AliMUONDspHeader.cxx
CommitLineData
47c194a6 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 **************************************************************************/
13985652 15
16/* $Id$ */
47c194a6 17
18#include "AliMUONDspHeader.h"
19#include "AliMUONBusStruct.h"
20
00e86732 21/// \class AliMUONDspHeader
47c194a6 22/// DSP structure for tracker raw data.
23/// Each block contains at most 5 Dsp structures.
24/// Beside the total length and length of the below data
25/// the header of the Dsp contains the front end DSP id, trigger words
26/// and event word (1 for nb of word is odd and 0 if not
27///
00e86732 28/// \author Christian Finck
47c194a6 29
13985652 30/// \cond CLASSIMP
47c194a6 31ClassImp(AliMUONDspHeader)
13985652 32/// \endcond
47c194a6 33
84ceeb06 34 const Int_t AliMUONDspHeader::fgkHeaderLength = 10;
35 const UInt_t AliMUONDspHeader::fgkDefaultDataKey = 0xF000000F;
36 const UInt_t AliMUONDspHeader::fgkDefaultPaddingWord = 0xBEEFFACE;
47c194a6 37
38//___________________________________________
39AliMUONDspHeader::AliMUONDspHeader()
40 : TObject(),
84ceeb06 41 fDataKey(0),
47c194a6 42 fTotalLength(0),
43 fLength(0),
44 fDspId(0),
84ceeb06 45 fBlkL1ATrigger(0),
46 fMiniEventId(0),
47 fL1ATrigger(0),
48 fL1RTrigger(0),
49 fPaddingWord(0),
9f5dcca3 50 fErrorWord(0),
51 fBusPatchArray(new TClonesArray("AliMUONBusStruct",5))
47c194a6 52{
00e86732 53 ///
54 ///ctor
55 ///
47c194a6 56
47c194a6 57}
58
59//___________________________________________
60AliMUONDspHeader::~AliMUONDspHeader()
61{
00e86732 62 ///
63 /// dtr
64 ///
47c194a6 65 fBusPatchArray->Delete();
66 delete fBusPatchArray;
67}
68
69//___________________________________________
70AliMUONDspHeader::AliMUONDspHeader(const AliMUONDspHeader& event)
9f5dcca3 71 : TObject(event),
72 fDataKey(event.fDataKey),
73 fTotalLength(event.fTotalLength),
74 fLength(event.fLength),
75 fDspId(event.fDspId),
76 fBlkL1ATrigger(event.fBlkL1ATrigger),
77 fMiniEventId(event.fMiniEventId),
78 fL1ATrigger(event.fL1ATrigger),
79 fL1RTrigger(event.fL1RTrigger),
80 fPaddingWord(event.fPaddingWord),
81 fErrorWord(event.fErrorWord),
82 fBusPatchArray(new TClonesArray("AliMUONBusStruct", 5))
47c194a6 83{
00e86732 84 ///
85 /// copy constructor
86 ///
47c194a6 87
47c194a6 88 for (Int_t index = 0; index < (event.fBusPatchArray)->GetEntriesFast(); index++) {
89 {new ((*fBusPatchArray)[fBusPatchArray->GetEntriesFast()])
90 AliMUONBusStruct(*(AliMUONBusStruct*)(event.fBusPatchArray)->At(index));}
91 }
92 // fBusPatchArray->SetOwner();
93
94}
95
96//___________________________________________
97AliMUONDspHeader& AliMUONDspHeader::operator=(const AliMUONDspHeader& event)
98{
00e86732 99 ///
100 /// assignemnt constructor
101 ///
47c194a6 102 if (this == &event) return *this;
103
9f5dcca3 104 fDataKey = event.fDataKey;
105 fTotalLength = event.fTotalLength;
106 fLength = event.fLength;
107 fDspId = event.fDspId;
84ceeb06 108 fBlkL1ATrigger = event.fBlkL1ATrigger;
109 fMiniEventId = event.fMiniEventId;
110 fL1ATrigger = event.fL1ATrigger;
111 fL1RTrigger = event.fL1RTrigger;
112 fPaddingWord = event.fPaddingWord;
113 fErrorWord = event.fErrorWord;
47c194a6 114
47c194a6 115
116 fBusPatchArray = new TClonesArray("AliMUONBusStruct", 5);
117 for (Int_t index = 0; index < (event.fBusPatchArray)->GetEntriesFast(); index++) {
118 {new ((*fBusPatchArray)[fBusPatchArray->GetEntriesFast()])
119 AliMUONBusStruct(*(AliMUONBusStruct*)(event.fBusPatchArray)->At(index));}
120 }
121 return *this;
122}
123//___________________________________________
124void AliMUONDspHeader::AddBusPatch(const AliMUONBusStruct& busPatch)
125{
00e86732 126 ///
127 /// adding buspatch info
128 /// into TClonesArray
129 ///
47c194a6 130 TClonesArray &eventArray = *fBusPatchArray;
131 new(eventArray[eventArray.GetEntriesFast()]) AliMUONBusStruct(busPatch);
132}
133//___________________________________________
134void AliMUONDspHeader::Clear(Option_t* )
135{
00e86732 136 /// Clear TClones arrays
137 /// instead of deleting
138 ///
47c194a6 139 fBusPatchArray->Clear("C");
140
141}