]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONRegHeader.cxx
Removed usage of removed class AliMpManuList
[u/mrichter/AliRoot.git] / MUON / AliMUONRegHeader.cxx
CommitLineData
32def6aa 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
13985652 16/* $Id$ */
00e86732 17#include <TClonesArray.h>
13985652 18
32def6aa 19#include "AliMUONRegHeader.h"
20#include "AliMUONLocalStruct.h"
21
3d1463c8 22//-----------------------------------------------------------------------------
00e86732 23/// \class AliMUONRegHeader
32def6aa 24/// Regional structure for trigger raw data.
25/// Each Reg structure contains 16 (at most) local card structure.
26/// The structure includes the information of the Reg. boards and
27/// regional inputs
28///
00e86732 29/// \author Christian Finck
3d1463c8 30//-----------------------------------------------------------------------------
32def6aa 31
13985652 32/// \cond CLASSIMP
32def6aa 33ClassImp(AliMUONRegHeader)
13985652 34/// \endcond
32def6aa 35
d622a0ec 36 const Int_t AliMUONRegHeader::fgkHeaderLength = 5;
37 const Int_t AliMUONRegHeader::fgkScalerLength = 10;
32def6aa 38 const UInt_t AliMUONRegHeader::fgkEndOfReg = 0xBEEFFACE;
39
40//___________________________________________
41AliMUONRegHeader::AliMUONRegHeader()
42 : TObject(),
00f56161 43 fDarcWord(0),
32def6aa 44 fWord(0),
bebe0279 45 fMask(0),
46 fL0(0),
32def6aa 47 fClk(0),
9f5dcca3 48 fHold(0),
49 fLocalArray(new TClonesArray("AliMUONLocalStruct",16))
32def6aa 50{
00e86732 51 /// ctor
52
32def6aa 53 fInput[0] = fInput[1] = 0;
54
55 for (Int_t i = 0; i < 8; i++)
56 fScaler[i] = 0;
57
32def6aa 58}
59
60//___________________________________________
61AliMUONRegHeader::~AliMUONRegHeader()
62{
00e86732 63 /// dtor
64
32def6aa 65 fLocalArray->Delete();
66 delete fLocalArray;
67}
68
69//___________________________________________
70AliMUONRegHeader::AliMUONRegHeader(const AliMUONRegHeader& event)
9f5dcca3 71 : TObject(event),
72 fDarcWord(event.fDarcWord),
73 fWord(event.fWord),
74 fMask(event.fMask),
75 fL0(event.fL0),
76 fClk(event.fClk),
77 fHold(event.fHold),
78 fLocalArray(new TClonesArray("AliMUONLocalStruct", 16))
32def6aa 79{
00e86732 80 ///
81 /// copy ctor
82 ///
32def6aa 83
84 fInput[0] = event.fInput[0];
85 fInput[1] = event.fInput[1];
86
87 for (Int_t i = 0; i < 8; i++)
88 fScaler[i] = event.fScaler[i];
89
32def6aa 90 for (Int_t index = 0; index < (event.fLocalArray)->GetEntriesFast(); index++) {
91 {new ((*fLocalArray)[fLocalArray->GetEntriesFast()])
92 AliMUONLocalStruct(*(AliMUONLocalStruct*)(event.fLocalArray)->At(index));}
93 }
94}
95
96//___________________________________________
97AliMUONRegHeader& AliMUONRegHeader::operator=(const AliMUONRegHeader& event)
98{
00e86732 99 ///
100 /// assignment operator
101 ///
32def6aa 102
103 if (this == &event) return *this;
104
00f56161 105 fDarcWord = event.fDarcWord;
106 fWord = event.fWord;
00f56161 107 fClk = event.fClk;
108 fHold = event.fHold;
bebe0279 109 fL0 = event.fL0;
110 fMask = event.fMask;
32def6aa 111
112 fInput[0] = event.fInput[0];
113 fInput[1] = event.fInput[1];
114
115 for (Int_t i = 0; i < 8; i++)
116 fScaler[i] = event.fScaler[i];
117
118 fLocalArray = new TClonesArray("AliMUONLocalStruct", 16);
119 for (Int_t index = 0; index < (event.fLocalArray)->GetEntriesFast(); index++) {
120 {new ((*fLocalArray)[fLocalArray->GetEntriesFast()])
121 AliMUONLocalStruct(*(AliMUONLocalStruct*)(event.fLocalArray)->At(index));}
122 }
123
124 return *this;
125}
126
127//___________________________________________
128void AliMUONRegHeader::SetScalersNumbers()
129{
00e86732 130 /// set numbers for scaler events for Regional header
131 /// since this is provided by the experiment
132 /// put dummy numbers to check the monitoring
32def6aa 133
32def6aa 134 fClk = 10000;
135 fHold = 100;
136
137 for (Int_t i = 0; i < 8; i++)
138 fScaler[i] = i;
139}
140
141//___________________________________________
142void AliMUONRegHeader::Clear(Option_t* )
143{
00e86732 144 /// Clear TClones arrays
145 /// instead of deleting
146 ///
32def6aa 147 fLocalArray->Clear("C");
148
149}