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 **************************************************************************/
16 #include "AliMUONRegHeader.h"
17 #include "AliMUONLocalStruct.h"
22 /// Regional structure for trigger raw data.
23 /// Each Reg structure contains 16 (at most) local card structure.
24 /// The structure includes the information of the Reg. boards and
28 ClassImp(AliMUONRegHeader)
30 const Int_t AliMUONRegHeader::fgkHeaderLength = 3;
31 const Int_t AliMUONRegHeader::fgkScalerLength = 8;
32 const UInt_t AliMUONRegHeader::fgkEndOfReg = 0xBEEFFACE;
34 //___________________________________________
35 AliMUONRegHeader::AliMUONRegHeader()
46 fInput[0] = fInput[1] = 0;
48 for (Int_t i = 0; i < 8; i++)
51 fLocalArray = new TClonesArray("AliMUONLocalStruct",16);
55 //___________________________________________
56 AliMUONRegHeader::~AliMUONRegHeader()
61 fLocalArray->Delete();
65 //___________________________________________
66 AliMUONRegHeader::AliMUONRegHeader(const AliMUONRegHeader& event)
77 fInput[0] = event.fInput[0];
78 fInput[1] = event.fInput[1];
80 for (Int_t i = 0; i < 8; i++)
81 fScaler[i] = event.fScaler[i];
83 fLocalArray = new TClonesArray("AliMUONLocalStruct", 16);
84 for (Int_t index = 0; index < (event.fLocalArray)->GetEntriesFast(); index++) {
85 {new ((*fLocalArray)[fLocalArray->GetEntriesFast()])
86 AliMUONLocalStruct(*(AliMUONLocalStruct*)(event.fLocalArray)->At(index));}
90 //___________________________________________
91 AliMUONRegHeader& AliMUONRegHeader::operator=(const AliMUONRegHeader& event)
94 // assignment operator
97 if (this == &event) return *this;
104 fInput[0] = event.fInput[0];
105 fInput[1] = event.fInput[1];
107 for (Int_t i = 0; i < 8; i++)
108 fScaler[i] = event.fScaler[i];
110 fLocalArray = new TClonesArray("AliMUONLocalStruct", 16);
111 for (Int_t index = 0; index < (event.fLocalArray)->GetEntriesFast(); index++) {
112 {new ((*fLocalArray)[fLocalArray->GetEntriesFast()])
113 AliMUONLocalStruct(*(AliMUONLocalStruct*)(event.fLocalArray)->At(index));}
119 //___________________________________________
120 void AliMUONRegHeader::SetScalersNumbers()
122 // set numbers for scaler events for Regional header
123 // since this is provided by the experiment
124 // put dummy numbers to check the monitoring
130 for (Int_t i = 0; i < 8; i++)
134 //___________________________________________
135 void AliMUONRegHeader::Clear(Option_t* )
137 // Clear TClones arrays
138 // instead of deleting
140 fLocalArray->Clear("C");