ALIROOT-5420 Changes for CDH v3
[u/mrichter/AliRoot.git] / MUON / AliMUONDDLTrigger.cxx
CommitLineData
69be760c 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$ */
8c343c7c 17
00e86732 18#include <TClonesArray.h>
19
69be760c 20#include "AliMUONDDLTrigger.h"
2cf44ef3 21#include "AliMUONLocalStruct.h"
22#include "AliMUONRegHeader.h"
23#include "AliMUONDarcHeader.h"
69be760c 24
3d1463c8 25
26//-----------------------------------------------------------------------------
85fec35d 27/// \class AliMUONDDLTrigger
28///
29/// One DDL for trigger part of the MUON spectrometer.
30///
31/// \author C. Finck
3d1463c8 32//-----------------------------------------------------------------------------
85fec35d 33
13985652 34/// \cond CLASSIMP
35ClassImp(AliMUONDDLTrigger)
36/// \endcond
c8f4be1a 37
ce350193 38
39//___________________________________________
40AliMUONDDLTrigger::AliMUONDDLTrigger(TRootIOCtor* /*dummy*/)
41: TObject(),
42fDarcHeader(0x0)
43{
44 ///ctor
45}
46
69be760c 47//___________________________________________
48AliMUONDDLTrigger::AliMUONDDLTrigger()
9f5dcca3 49 : TObject(),
50 fDarcHeader(new AliMUONDarcHeader())
69be760c 51{
00e86732 52
53 ///ctor
54
69be760c 55}
56
57//___________________________________________
58AliMUONDDLTrigger::~AliMUONDDLTrigger()
59{
00e86732 60 ///dtor
2cf44ef3 61 delete fDarcHeader;
62
63}
64
65//___________________________________________
66void AliMUONDDLTrigger::AddRegHeader(const AliMUONRegHeader& regHeader)
67{
00e86732 68 /// adding regional header informations
69 /// in the given TClonesArray
70 ///
2cf44ef3 71 TClonesArray* regHeaderArray = (TClonesArray*)fDarcHeader->GetRegHeaderArray();
72
73 TClonesArray &eventArray = *regHeaderArray;
74 new(eventArray[eventArray.GetEntriesFast()]) AliMUONRegHeader(regHeader);
75}
76
77//___________________________________________
78void AliMUONDDLTrigger::AddLocStruct(const AliMUONLocalStruct& loc, Int_t iReg)
79{
00e86732 80 /// adding local card informations
81 /// for a given regional structure
82 /// using TClonesArrays
2cf44ef3 83
84 AliMUONRegHeader* regHeader = (AliMUONRegHeader*)fDarcHeader->GetRegHeaderEntry(iReg);
85
86 TClonesArray* localArray = (TClonesArray*)regHeader->GetLocalArray();
87
88 TClonesArray &locArray = *localArray;
89 new(locArray[locArray.GetEntriesFast()]) AliMUONLocalStruct(loc);
69be760c 90}