Adding comment lines to class description needed for Root documentation,
[u/mrichter/AliRoot.git] / MUON / AliMUONDDLTracker.cxx
CommitLineData
f6762c71 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 **************************************************************************/
13985652 15
16 /* $Id$ */
17
f6762c71 18#include "AliMUONDDLTracker.h"
2cf44ef3 19#include "AliMUONBusStruct.h"
20#include "AliMUONDspHeader.h"
21#include "AliMUONBlockHeader.h"
f6762c71 22
3d1463c8 23
24//-----------------------------------------------------------------------------
85fec35d 25/// \class AliMUONDDLTracker
26///
27/// A wrapper object for 1 DDL of the MUON tracking chambers.
28///
29/// \author C. Finck
3d1463c8 30//-----------------------------------------------------------------------------
85fec35d 31
13985652 32/// \cond CLASSIMP
33ClassImp(AliMUONDDLTracker)
34/// \endcond
69be760c 35
f6762c71 36//___________________________________________
37AliMUONDDLTracker::AliMUONDDLTracker()
9f5dcca3 38 : TObject(),
39 fBlkHeaderArray(new TClonesArray("AliMUONBlockHeader", 2))
f6762c71 40{
00e86732 41 ///
42 ///ctor
43 ///
2cf44ef3 44
45}
46
47//___________________________________________
48AliMUONDDLTracker::~AliMUONDDLTracker()
49{
00e86732 50 ///
51 ///dtor
52 ///
2cf44ef3 53 fBlkHeaderArray->Delete();
54 delete fBlkHeaderArray;
55
56}
57
58//___________________________________________
59void AliMUONDDLTracker::AddBusPatch(const AliMUONBusStruct& busPatch, Int_t iBlock, Int_t iDsp )
60{
00e86732 61 /// adding bus patch informations
62 /// for a given block & Dsp structure
63 /// using TClonesArrays
2cf44ef3 64
65 AliMUONBlockHeader* blockHeader = (AliMUONBlockHeader*)fBlkHeaderArray->At(iBlock);
66 AliMUONDspHeader* dspHeader = (AliMUONDspHeader*)blockHeader->GetDspHeaderEntry(iDsp);
67
68 TClonesArray* busPatchArray = (TClonesArray*)dspHeader->GetBusPatchArray();
69
70 TClonesArray &eventArray = *busPatchArray;
71 new(eventArray[eventArray.GetEntriesFast()]) AliMUONBusStruct(busPatch);
72}
73
74//___________________________________________
75void AliMUONDDLTracker::AddDspHeader(const AliMUONDspHeader& dspHeader, Int_t iBlock)
76{
00e86732 77 /// adding DspHeader informations
78 /// for a given block structure
79 /// using TClonesArrays
2cf44ef3 80
81 AliMUONBlockHeader* blockHeader = (AliMUONBlockHeader*)fBlkHeaderArray->At(iBlock);
82
83 TClonesArray* dspHeaderArray = (TClonesArray*)blockHeader->GetDspHeaderArray();
84
85 TClonesArray &dspArray = *dspHeaderArray;
86 new(dspArray[dspArray.GetEntriesFast()]) AliMUONDspHeader(dspHeader);
87}
88
89//___________________________________________
90void AliMUONDDLTracker::AddBlkHeader(const AliMUONBlockHeader& blkHeader)
91{
00e86732 92 /// adding Block header informations
93 /// for a given block structure
94 /// using TClonesArrays
95
2cf44ef3 96 TClonesArray &blkArray = *fBlkHeaderArray;
97 new(blkArray[blkArray.GetEntriesFast()]) AliMUONBlockHeader(blkHeader);
98}
99
100//___________________________________________
101void AliMUONDDLTracker::Clear(Option_t* )
102{
00e86732 103 /// Clear TClones arrays
104 /// instead of deleting
105 ///
2cf44ef3 106 fBlkHeaderArray->Clear("C");
107
f6762c71 108}