]> git.uio.no Git - u/mrichter/AliRoot.git/blame_incremental - MUON/AliMUONDspHeader.cxx
Updated comments for Doxygen - corrected warnings
[u/mrichter/AliRoot.git] / MUON / AliMUONDspHeader.cxx
... / ...
CommitLineData
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/* $Id$ */
17
18#include "AliMUONDspHeader.h"
19#include "AliMUONBusStruct.h"
20
21///
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///
28
29/// \cond CLASSIMP
30ClassImp(AliMUONDspHeader)
31/// \endcond
32
33 const Int_t AliMUONDspHeader::fgkHeaderLength = 8;
34
35//___________________________________________
36AliMUONDspHeader::AliMUONDspHeader()
37 : TObject(),
38 fTotalLength(0),
39 fLength(0),
40 fDspId(0),
41 fEventWord(0)
42{
43 //
44 //ctor
45 //
46 for (Int_t i = 0; i < 4; i++)
47 fTriggerWord[i] = 0;
48
49 fBusPatchArray = new TClonesArray("AliMUONBusStruct",5);
50
51}
52
53//___________________________________________
54AliMUONDspHeader::~AliMUONDspHeader()
55{
56 //
57 // dtr
58 //
59 fBusPatchArray->Delete();
60 delete fBusPatchArray;
61}
62
63//___________________________________________
64AliMUONDspHeader::AliMUONDspHeader(const AliMUONDspHeader& event)
65 : TObject(event)
66{
67 //
68 // copy constructor
69 //
70 fTotalLength = event.fTotalLength;
71 fLength = event.fLength;
72 fDspId = event.fDspId;
73 fEventWord = event.fEventWord;
74
75 //ctor
76 for (Int_t i = 0; i < 4; i++)
77 fTriggerWord[i] = event.fTriggerWord[i];
78
79 fBusPatchArray = new TClonesArray("AliMUONBusStruct", 5);
80 for (Int_t index = 0; index < (event.fBusPatchArray)->GetEntriesFast(); index++) {
81 {new ((*fBusPatchArray)[fBusPatchArray->GetEntriesFast()])
82 AliMUONBusStruct(*(AliMUONBusStruct*)(event.fBusPatchArray)->At(index));}
83 }
84 // fBusPatchArray->SetOwner();
85
86}
87
88//___________________________________________
89AliMUONDspHeader& AliMUONDspHeader::operator=(const AliMUONDspHeader& event)
90{
91 //
92 // assignemnt constructor
93 //
94 if (this == &event) return *this;
95
96 fTotalLength = event.fTotalLength;
97 fLength = event.fLength;
98 fDspId = event.fDspId;
99 fEventWord = event.fEventWord;
100
101 //ctor
102 for (Int_t i = 0; i < 4; i++)
103 fTriggerWord[i] = event.fTriggerWord[i];
104
105 fBusPatchArray = new TClonesArray("AliMUONBusStruct", 5);
106 for (Int_t index = 0; index < (event.fBusPatchArray)->GetEntriesFast(); index++) {
107 {new ((*fBusPatchArray)[fBusPatchArray->GetEntriesFast()])
108 AliMUONBusStruct(*(AliMUONBusStruct*)(event.fBusPatchArray)->At(index));}
109 }
110 return *this;
111}
112//___________________________________________
113void AliMUONDspHeader::AddBusPatch(const AliMUONBusStruct& busPatch)
114{
115 //
116 // adding buspatch info
117 // into TClonesArray
118 //
119 TClonesArray &eventArray = *fBusPatchArray;
120 new(eventArray[eventArray.GetEntriesFast()]) AliMUONBusStruct(busPatch);
121}
122//___________________________________________
123void AliMUONDspHeader::Clear(Option_t* )
124{
125 // Clear TClones arrays
126 // instead of deleting
127 //
128 fBusPatchArray->Clear("C");
129
130}