AliRoot Core  v5-06-15 (45dab64)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONDspHeader.cxx
Go to the documentation of this file.
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 #include <Riostream.h>
21 
22 //-----------------------------------------------------------------------------
31 //-----------------------------------------------------------------------------
32 
33 using std::cout;
34 using std::endl;
38 
39  const Int_t AliMUONDspHeader::fgkHeaderLength = 10;
40  const UInt_t AliMUONDspHeader::fgkDefaultDataKey = 0xF000000F;
41  const UInt_t AliMUONDspHeader::fgkDefaultPaddingWord = 0xBEEFFACE;
42 
43 //___________________________________________
44 AliMUONDspHeader::AliMUONDspHeader(TRootIOCtor* /*dummy*/)
45 : TObject(),
46 fDataKey(0),
47 fTotalLength(0),
48 fLength(0),
49 fDspId(0),
50 fBlkL1ATrigger(0),
51 fMiniEventId(0),
52 fL1ATrigger(0),
53 fL1RTrigger(0),
54 fPaddingWord(0),
55 fErrorWord(0),
56 fBusPatchArray(0x0)
57 {
61 
62 }
63 
64 //___________________________________________
66  : TObject(),
67  fDataKey(0),
68  fTotalLength(0),
69  fLength(0),
70  fDspId(0),
71  fBlkL1ATrigger(0),
72  fMiniEventId(0),
73  fL1ATrigger(0),
74  fL1RTrigger(0),
75  fPaddingWord(0),
76  fErrorWord(0),
77  fBusPatchArray(new TClonesArray("AliMUONBusStruct",5))
78 {
82 
83 }
84 
85 //___________________________________________
87 {
91  fBusPatchArray->Delete();
92  delete fBusPatchArray;
93 }
94 
95 //___________________________________________
97  : TObject(event),
98  fDataKey(event.fDataKey),
99  fTotalLength(event.fTotalLength),
100  fLength(event.fLength),
101  fDspId(event.fDspId),
102  fBlkL1ATrigger(event.fBlkL1ATrigger),
103  fMiniEventId(event.fMiniEventId),
104  fL1ATrigger(event.fL1ATrigger),
105  fL1RTrigger(event.fL1RTrigger),
106  fPaddingWord(event.fPaddingWord),
107  fErrorWord(event.fErrorWord),
108  fBusPatchArray(new TClonesArray("AliMUONBusStruct", 5))
109 {
113 
114  for (Int_t index = 0; index < (event.fBusPatchArray)->GetEntriesFast(); index++) {
115  {new ((*fBusPatchArray)[fBusPatchArray->GetEntriesFast()])
116  AliMUONBusStruct(*(AliMUONBusStruct*)(event.fBusPatchArray)->At(index));}
117  }
118  // fBusPatchArray->SetOwner();
119 
120 }
121 
122 //___________________________________________
124 {
128  if (this == &event) return *this;
129 
130  fDataKey = event.fDataKey;
131  fTotalLength = event.fTotalLength;
132  fLength = event.fLength;
133  fDspId = event.fDspId;
134  fBlkL1ATrigger = event.fBlkL1ATrigger;
135  fMiniEventId = event.fMiniEventId;
136  fL1ATrigger = event.fL1ATrigger;
137  fL1RTrigger = event.fL1RTrigger;
138  fPaddingWord = event.fPaddingWord;
139  fErrorWord = event.fErrorWord;
140 
141 
142  fBusPatchArray = new TClonesArray("AliMUONBusStruct", 5);
143  for (Int_t index = 0; index < (event.fBusPatchArray)->GetEntriesFast(); index++) {
144  {new ((*fBusPatchArray)[fBusPatchArray->GetEntriesFast()])
145  AliMUONBusStruct(*(AliMUONBusStruct*)(event.fBusPatchArray)->At(index));}
146  }
147  return *this;
148 }
149 //___________________________________________
151 {
156  TClonesArray &eventArray = *fBusPatchArray;
157  new(eventArray[eventArray.GetEntriesFast()]) AliMUONBusStruct(busPatch);
158 }
159 //___________________________________________
160 void AliMUONDspHeader::Clear(Option_t* )
161 {
165  fBusPatchArray->Clear("C");
166 
167 }
168 
169 //___________________________________________
170 void AliMUONDspHeader::Print(Option_t* /*opt*/) const
171 {
173 
174  cout << "FRT info" << endl;
175  cout << "DataKey: " << fDataKey << endl;
176  cout << "TotalLength: " << fTotalLength << endl;
177  cout << "Length : " << fLength << endl;
178  cout << "DspId: " << fDspId << endl;
179  cout << "BlkL1ATrigger: " << fBlkL1ATrigger << endl;
180  cout << "MiniEventId: " << fMiniEventId << endl;
181  cout << "L1ATrigger: " << fL1ATrigger << endl;
182  cout << "L1RTrigger: " << fL1RTrigger << endl;
183  cout << "PaddingWord: " << fPaddingWord << endl;
184  cout << "ErrorWord: " << fErrorWord << endl;
185 
186 }
Int_t fTotalLength
total length of block structure
AliMUONDspHeader & operator=(const AliMUONDspHeader &event)
Int_t fPaddingWord
padding dummy word for 64 bits transfer
void Print(Option_t *) const
MUON DSP header for tracker event.
Int_t fMiniEventId
Mini Event Id in bunch crossing.
TClonesArray * fBusPatchArray
array of buspatch structure
Int_t fLength
length of raw data
Int_t fBlkL1ATrigger
L1 accept in Block Structure (CRT)
ClassImp(TPCGenInfo)
Definition: AliTPCCmpNG.C:254
void AddBusPatch(const AliMUONBusStruct &busPatch)
Int_t fDspId
Dsp id.
Int_t fL1ATrigger
Number of L1 accept in DSP Structure (FRT)
Int_t fErrorWord
Error word.
void Clear(Option_t *opt)
Int_t fDataKey
Data key word for FRT header.
Int_t fL1RTrigger
Number of L1 reject in DSP Structure (FRT)
virtual ~AliMUONDspHeader()
MUON buspatch structure for tracker.