AliRoot Core  v5-06-15 (45dab64)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONBlockHeader.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 "AliMUONBlockHeader.h"
19 #include "AliMUONDspHeader.h"
20 
21 #include <Riostream.h>
22 
23 //-----------------------------------------------------------------------------
32 //-----------------------------------------------------------------------------
33 
34 using std::cout;
35 using std::endl;
39 
40 const Int_t AliMUONBlockHeader::fgkHeaderLength = 8;
41 const UInt_t AliMUONBlockHeader::fgkDefaultDataKey = 0xFC0000FC;
42 const UInt_t AliMUONBlockHeader::fgkDdlDataKey = 0xD000000D;
43 
44 //___________________________________________
45 AliMUONBlockHeader::AliMUONBlockHeader(TRootIOCtor* /*dummy*/)
46 : TObject(),
47 fDataKey(0),
48 fTotalLength(0),
49 fLength(0),
50 fDspId(0),
51 fL0Trigger(0),
52 fMiniEventId(0),
53 fEventId1(0),
54 fEventId2(0),
55 fDspHeaderArray(0x0)
56 {
60 
61 }
62 
63 //___________________________________________
65  : TObject(),
66  fDataKey(0),
67  fTotalLength(0),
68  fLength(0),
69  fDspId(0),
70  fL0Trigger(0),
71  fMiniEventId(0),
72  fEventId1(0),
73  fEventId2(0),
74  fDspHeaderArray(new TClonesArray("AliMUONDspHeader", 5))
75 
76 {
80 
81 }
82 
83 //___________________________________________
85 {
89  fDspHeaderArray->Delete();
90  delete fDspHeaderArray;
91 }
92 
93 //___________________________________________
95  : TObject(event),
96  fDataKey(event.fDataKey),
97  fTotalLength(event.fTotalLength),
98  fLength(event.fLength),
99  fDspId(event.fDspId),
100  fL0Trigger(event.fL0Trigger),
101  fMiniEventId(event.fMiniEventId),
102  fEventId1(event.fEventId1),
103  fEventId2(event.fEventId2),
104  fDspHeaderArray(new TClonesArray("AliMUONDspHeader", 5))
105 {
109 
110  for (Int_t index = 0; index < (event.fDspHeaderArray)->GetEntriesFast(); index++) {
111  {new ((*fDspHeaderArray)[fDspHeaderArray->GetEntriesFast()])
112  AliMUONDspHeader(*(AliMUONDspHeader*)(event.fDspHeaderArray)->At(index));}
113  }
114  // fDspHeaderArray->SetOwner();
115 }
116 
117 //___________________________________________
120 {
124  if (this == &event) return *this;
125 
126  fDataKey = event.fDataKey;
127  fTotalLength = event.fTotalLength;
128  fLength = event.fLength;
129  fDspId = event.fDspId;
130 
131  fL0Trigger = event.fL0Trigger;
132  fMiniEventId = event.fMiniEventId;
133  fEventId1 = event.fEventId1;
134  fEventId2 = event.fEventId2;
135 
136  fDspHeaderArray = new TClonesArray("AliMUONDspHeader", 5);
137  for (Int_t index = 0; index < (event.fDspHeaderArray)->GetEntriesFast(); index++) {
138  new ((*fDspHeaderArray)[fDspHeaderArray->GetEntriesFast()])
139  AliMUONDspHeader(*(AliMUONDspHeader*)(event.fDspHeaderArray)->At(index));
140  }
141 
142  return *this;
143 
144 }
145 //___________________________________________
147 {
152  TClonesArray &dspArray = *fDspHeaderArray;
153  new(dspArray[dspArray.GetEntriesFast()]) AliMUONDspHeader(dspHeader);
154 
155 }
156 //___________________________________________
158 {
162  fDspHeaderArray->Clear("C");
163 
164 }
165 
166 //___________________________________________
167 void AliMUONBlockHeader::Print(Option_t* /*opt*/) const
168 {
170 
171  cout << "CRT info" << endl;
172  cout << "DataKey: " << fDataKey << endl;
173  cout << "TotalLength: " << fTotalLength << endl;
174  cout << "Length: " << fLength << endl;
175  cout << "DspId: " << fDspId << endl;
176 
177  cout << "L0Trigger: " << fL0Trigger << endl;
178  cout << "MiniEventId: " << fMiniEventId<< endl;
179  cout << "EventId1: " << fEventId1 << endl;
180  cout << "EventId2: " << fEventId2 << endl;;
181 
182 }
Int_t fDataKey
Data key word for CRT header.
MUON DSP header for tracker event.
Int_t fEventId2
Event Id in orbit number.
Int_t fL0Trigger
L0 trigger word.
ClassImp(TPCGenInfo)
Definition: AliTPCCmpNG.C:254
TClonesArray * fDspHeaderArray
array of block header
void Print(Option_t *) const
Int_t fTotalLength
total length of block structure (w/o padding word)
Int_t fLength
length of raw data
Int_t fEventId1
Event Id in bunch crossing.
void AddDspHeader(const AliMUONDspHeader &dspHeader)
MUON block (Crocus CRT) header for tracker event.
AliMUONBlockHeader & operator=(const AliMUONBlockHeader &event)
Int_t fMiniEventId
Bunch Crossing for mini-event id (see TDR chapter 8)
void Clear(Option_t *opt)