Updated comments for Doxygen - corrected warnings
[u/mrichter/AliRoot.git] / MUON / AliMUONBlockHeader.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 "AliMUONBlockHeader.h"
19#include "AliMUONDspHeader.h"
20
47c194a6 21///
22/// Block structure for tracker raw data
23/// each DDL contains two blocks,
24/// each block contains at most 5 dsp structure.
25/// Beside the total length and length of the below data
26/// the header of the block contains the front end DSP id, trigger words and paddind word
27///
28
13985652 29/// \cond CLASSIMP
47c194a6 30ClassImp(AliMUONBlockHeader)
13985652 31/// \endcond
47c194a6 32
13985652 33const Int_t AliMUONBlockHeader::fgkHeaderLength = 7;
47c194a6 34
35//___________________________________________
36AliMUONBlockHeader::AliMUONBlockHeader()
37 : TObject(),
38 fTotalLength(0),
39 fLength(0),
40 fDspId(0),
41 fPadding(0x0DEADDEAD)
42{
43 //
44 // ctor
45 //
46 for (Int_t i = 0; i < 4; i++)
47 fTriggerWord[i] = 0;
48
49 fDspHeaderArray = new TClonesArray("AliMUONDspHeader", 5);
50
51}
52
53//___________________________________________
54AliMUONBlockHeader::~AliMUONBlockHeader()
55{
56 //
57 // dtor
58 //
59 fDspHeaderArray->Delete();
60 delete fDspHeaderArray;
61}
62
63//___________________________________________
64AliMUONBlockHeader::AliMUONBlockHeader(const AliMUONBlockHeader& event)
65 : TObject(event)
66{
67 //
68 // copy ctor
69 //
70 fTotalLength = event.fTotalLength;
71 fLength = event.fLength;
72 fDspId = event.fDspId;
73 fPadding = event.fPadding;
74
75 for (Int_t i = 0; i < 4; i++)
76 fTriggerWord[i] = event.fTriggerWord[i];
77
78 fDspHeaderArray = new TClonesArray("AliMUONDspHeader", 5);
79 for (Int_t index = 0; index < (event.fDspHeaderArray)->GetEntriesFast(); index++) {
80 {new ((*fDspHeaderArray)[fDspHeaderArray->GetEntriesFast()])
81 AliMUONDspHeader(*(AliMUONDspHeader*)(event.fDspHeaderArray)->At(index));}
82 }
83 // fDspHeaderArray->SetOwner();
84}
85
86//___________________________________________
87AliMUONBlockHeader&
88AliMUONBlockHeader::operator=(const AliMUONBlockHeader &event)
89{
90 //
91 // assignment operator
92 //
93 if (this == &event) return *this;
94
95 fTotalLength = event.fTotalLength;
96 fLength = event.fLength;
97 fDspId = event.fDspId;
98 fPadding = event.fPadding;
99
100 //copy ctor
101 for (Int_t i = 0; i < 4; i++)
102 fTriggerWord[i] = event.fTriggerWord[i];
103
104
105 fDspHeaderArray = new TClonesArray("AliMUONDspHeader", 5);
106 for (Int_t index = 0; index < (event.fDspHeaderArray)->GetEntriesFast(); index++) {
107 new ((*fDspHeaderArray)[fDspHeaderArray->GetEntriesFast()])
108 AliMUONDspHeader(*(AliMUONDspHeader*)(event.fDspHeaderArray)->At(index));
109 }
110
111 return *this;
112
113}
114//___________________________________________
115void AliMUONBlockHeader::AddDspHeader(const AliMUONDspHeader& dspHeader)
116{
117 //
118 // adding the dsp structure
119 // into the TClonesArray
120 //
121 TClonesArray &dspArray = *fDspHeaderArray;
122 new(dspArray[dspArray.GetEntriesFast()]) AliMUONDspHeader(dspHeader);
123
124}
125//___________________________________________
126void AliMUONBlockHeader::Clear(Option_t* )
127{
128 // Clear TClones arrays
129 // instead of deleting
130 //
131 fDspHeaderArray->Clear("C");
132
133}