Updated comments for Doxygen - corrected warnings
[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
85fec35d 23///
24/// \class AliMUONDDLTracker
25///
26/// A wrapper object for 1 DDL of the MUON tracking chambers.
27///
28/// \author C. Finck
29
13985652 30/// \cond CLASSIMP
31ClassImp(AliMUONDDLTracker)
32/// \endcond
69be760c 33
f6762c71 34//___________________________________________
35AliMUONDDLTracker::AliMUONDDLTracker()
2cf44ef3 36 : TObject()
f6762c71 37{
2cf44ef3 38 //
f6762c71 39 //ctor
2cf44ef3 40 //
41 fBlkHeaderArray = new TClonesArray("AliMUONBlockHeader", 2);
42
43}
44
45//___________________________________________
46AliMUONDDLTracker::~AliMUONDDLTracker()
47{
48 //
49 //dtor
50 //
51 fBlkHeaderArray->Delete();
52 delete fBlkHeaderArray;
53
54}
55
56//___________________________________________
57void AliMUONDDLTracker::AddBusPatch(const AliMUONBusStruct& busPatch, Int_t iBlock, Int_t iDsp )
58{
59 // adding bus patch informations
60 // for a given block & Dsp structure
61 // using TClonesArrays
62
63 AliMUONBlockHeader* blockHeader = (AliMUONBlockHeader*)fBlkHeaderArray->At(iBlock);
64 AliMUONDspHeader* dspHeader = (AliMUONDspHeader*)blockHeader->GetDspHeaderEntry(iDsp);
65
66 TClonesArray* busPatchArray = (TClonesArray*)dspHeader->GetBusPatchArray();
67
68 TClonesArray &eventArray = *busPatchArray;
69 new(eventArray[eventArray.GetEntriesFast()]) AliMUONBusStruct(busPatch);
70}
71
72//___________________________________________
73void AliMUONDDLTracker::AddDspHeader(const AliMUONDspHeader& dspHeader, Int_t iBlock)
74{
75 // adding DspHeader informations
76 // for a given block structure
77 // using TClonesArrays
78
79 AliMUONBlockHeader* blockHeader = (AliMUONBlockHeader*)fBlkHeaderArray->At(iBlock);
80
81 TClonesArray* dspHeaderArray = (TClonesArray*)blockHeader->GetDspHeaderArray();
82
83 TClonesArray &dspArray = *dspHeaderArray;
84 new(dspArray[dspArray.GetEntriesFast()]) AliMUONDspHeader(dspHeader);
85}
86
87//___________________________________________
88void AliMUONDDLTracker::AddBlkHeader(const AliMUONBlockHeader& blkHeader)
89{
90 TClonesArray &blkArray = *fBlkHeaderArray;
91 new(blkArray[blkArray.GetEntriesFast()]) AliMUONBlockHeader(blkHeader);
92}
93
94//___________________________________________
95void AliMUONDDLTracker::Clear(Option_t* )
96{
97 // Clear TClones arrays
98 // instead of deleting
99 //
100 fBlkHeaderArray->Clear("C");
101
f6762c71 102}