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 **************************************************************************/
18 #include <TClonesArray.h>
20 #include "AliMUONDDLTrigger.h"
21 #include "AliMUONLocalStruct.h"
22 #include "AliMUONRegHeader.h"
23 #include "AliMUONDarcHeader.h"
26 //-----------------------------------------------------------------------------
27 /// \class AliMUONDDLTrigger
29 /// One DDL for trigger part of the MUON spectrometer.
32 //-----------------------------------------------------------------------------
35 ClassImp(AliMUONDDLTrigger)
38 //___________________________________________
39 AliMUONDDLTrigger::AliMUONDDLTrigger()
41 fDarcHeader(new AliMUONDarcHeader())
48 //___________________________________________
49 AliMUONDDLTrigger::~AliMUONDDLTrigger()
56 //___________________________________________
57 void AliMUONDDLTrigger::AddRegHeader(const AliMUONRegHeader& regHeader)
59 /// adding regional header informations
60 /// in the given TClonesArray
62 TClonesArray* regHeaderArray = (TClonesArray*)fDarcHeader->GetRegHeaderArray();
64 TClonesArray &eventArray = *regHeaderArray;
65 new(eventArray[eventArray.GetEntriesFast()]) AliMUONRegHeader(regHeader);
68 //___________________________________________
69 void AliMUONDDLTrigger::AddLocStruct(const AliMUONLocalStruct& loc, Int_t iReg)
71 /// adding local card informations
72 /// for a given regional structure
73 /// using TClonesArrays
75 AliMUONRegHeader* regHeader = (AliMUONRegHeader*)fDarcHeader->GetRegHeaderEntry(iReg);
77 TClonesArray* localArray = (TClonesArray*)regHeader->GetLocalArray();
79 TClonesArray &locArray = *localArray;
80 new(locArray[locArray.GetEntriesFast()]) AliMUONLocalStruct(loc);