1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
17 #include <TClonesArray.h>
19 #include "AliMUONRegHeader.h"
20 #include "AliMUONLocalStruct.h"
22 /// \class AliMUONRegHeader
23 /// Regional structure for trigger raw data.
24 /// Each Reg structure contains 16 (at most) local card structure.
25 /// The structure includes the information of the Reg. boards and
28 /// \author Christian Finck
31 ClassImp(AliMUONRegHeader)
34 const Int_t AliMUONRegHeader::fgkHeaderLength = 5;
35 const Int_t AliMUONRegHeader::fgkScalerLength = 10;
36 const UInt_t AliMUONRegHeader::fgkEndOfReg = 0xBEEFFACE;
38 //___________________________________________
39 AliMUONRegHeader::AliMUONRegHeader()
47 fLocalArray(new TClonesArray("AliMUONLocalStruct",16))
51 fInput[0] = fInput[1] = 0;
53 for (Int_t i = 0; i < 8; i++)
58 //___________________________________________
59 AliMUONRegHeader::~AliMUONRegHeader()
63 fLocalArray->Delete();
67 //___________________________________________
68 AliMUONRegHeader::AliMUONRegHeader(const AliMUONRegHeader& event)
70 fDarcWord(event.fDarcWord),
76 fLocalArray(new TClonesArray("AliMUONLocalStruct", 16))
82 fInput[0] = event.fInput[0];
83 fInput[1] = event.fInput[1];
85 for (Int_t i = 0; i < 8; i++)
86 fScaler[i] = event.fScaler[i];
88 for (Int_t index = 0; index < (event.fLocalArray)->GetEntriesFast(); index++) {
89 {new ((*fLocalArray)[fLocalArray->GetEntriesFast()])
90 AliMUONLocalStruct(*(AliMUONLocalStruct*)(event.fLocalArray)->At(index));}
94 //___________________________________________
95 AliMUONRegHeader& AliMUONRegHeader::operator=(const AliMUONRegHeader& event)
98 /// assignment operator
101 if (this == &event) return *this;
103 fDarcWord = event.fDarcWord;
110 fInput[0] = event.fInput[0];
111 fInput[1] = event.fInput[1];
113 for (Int_t i = 0; i < 8; i++)
114 fScaler[i] = event.fScaler[i];
116 fLocalArray = new TClonesArray("AliMUONLocalStruct", 16);
117 for (Int_t index = 0; index < (event.fLocalArray)->GetEntriesFast(); index++) {
118 {new ((*fLocalArray)[fLocalArray->GetEntriesFast()])
119 AliMUONLocalStruct(*(AliMUONLocalStruct*)(event.fLocalArray)->At(index));}
125 //___________________________________________
126 void AliMUONRegHeader::SetScalersNumbers()
128 /// set numbers for scaler events for Regional header
129 /// since this is provided by the experiment
130 /// put dummy numbers to check the monitoring
135 for (Int_t i = 0; i < 8; i++)
139 //___________________________________________
140 void AliMUONRegHeader::Clear(Option_t* )
142 /// Clear TClones arrays
143 /// instead of deleting
145 fLocalArray->Clear("C");