AliRoot Core  v5-06-15 (45dab64)
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AliMUONDDLTracker.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 "AliMUONDDLTracker.h"
19 #include "AliMUONBusStruct.h"
20 #include "AliMUONDspHeader.h"
21 #include "AliMUONBlockHeader.h"
22 
23 
24 //-----------------------------------------------------------------------------
30 //-----------------------------------------------------------------------------
31 
35 
36 //___________________________________________
37 AliMUONDDLTracker::AliMUONDDLTracker(TRootIOCtor* /*dummy*/)
38 : TObject(),
39 fBlkHeaderArray(0x0)
40 {
44 }
45 
46 //___________________________________________
48  : TObject(),
49  fBlkHeaderArray(new TClonesArray("AliMUONBlockHeader", 2))
50 {
54 
55 }
56 
57 //___________________________________________
59 {
63  fBlkHeaderArray->Delete();
64  delete fBlkHeaderArray;
65 
66 }
67 
68 //___________________________________________
69 void AliMUONDDLTracker::AddBusPatch(const AliMUONBusStruct& busPatch, Int_t iBlock, Int_t iDsp )
70 {
74 
75  AliMUONBlockHeader* blockHeader = (AliMUONBlockHeader*)fBlkHeaderArray->At(iBlock);
76  AliMUONDspHeader* dspHeader = (AliMUONDspHeader*)blockHeader->GetDspHeaderEntry(iDsp);
77 
78  TClonesArray* busPatchArray = (TClonesArray*)dspHeader->GetBusPatchArray();
79 
80  TClonesArray &eventArray = *busPatchArray;
81  new(eventArray[eventArray.GetEntriesFast()]) AliMUONBusStruct(busPatch);
82 }
83 
84 //___________________________________________
85 void AliMUONDDLTracker::AddDspHeader(const AliMUONDspHeader& dspHeader, Int_t iBlock)
86 {
90 
91  AliMUONBlockHeader* blockHeader = (AliMUONBlockHeader*)fBlkHeaderArray->At(iBlock);
92 
93  TClonesArray* dspHeaderArray = (TClonesArray*)blockHeader->GetDspHeaderArray();
94 
95  TClonesArray &dspArray = *dspHeaderArray;
96  new(dspArray[dspArray.GetEntriesFast()]) AliMUONDspHeader(dspHeader);
97 }
98 
99 //___________________________________________
101 {
105 
106  TClonesArray &blkArray = *fBlkHeaderArray;
107  new(blkArray[blkArray.GetEntriesFast()]) AliMUONBlockHeader(blkHeader);
108 }
109 
110 //___________________________________________
111 void AliMUONDDLTracker::Clear(Option_t* )
112 {
116  fBlkHeaderArray->Clear("C");
117 
118 }
MUON DDL tracker.
TClonesArray * GetBusPatchArray() const
get TClonesArray
MUON DSP header for tracker event.
void AddBusPatch(const AliMUONBusStruct &busPatch, Int_t iBlock, Int_t iDsp)
ClassImp(TPCGenInfo)
Definition: AliTPCCmpNG.C:254
AliMUONDspHeader * GetDspHeaderEntry(Int_t i) const
get entry
void Clear(Option_t *opt)
void AddBlkHeader(const AliMUONBlockHeader &blkHeader)
MUON block (Crocus CRT) header for tracker event.
TClonesArray * fBlkHeaderArray
array of block header
void AddDspHeader(const AliMUONDspHeader &dspHeader, Int_t iBlock)
MUON buspatch structure for tracker.
TClonesArray * GetDspHeaderArray() const
get TClonesArray