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 **************************************************************************/
16 #include "AliMUONDDLTrigger.h"
17 #include "AliMUONLocalStruct.h"
18 #include "AliMUONRegHeader.h"
19 #include "AliMUONDarcHeader.h"
21 ClassImp(AliMUONDDLTrigger)
24 /// \class AliMUONDDLTrigger
26 /// One DDL for trigger part of the MUON spectrometer.
32 //___________________________________________
33 AliMUONDDLTrigger::AliMUONDDLTrigger()
39 fDarcHeader = new AliMUONDarcHeader();
42 //___________________________________________
43 AliMUONDDLTrigger::~AliMUONDDLTrigger()
52 //___________________________________________
53 void AliMUONDDLTrigger::AddRegHeader(const AliMUONRegHeader& regHeader)
55 // adding regional header informations
56 // in the given TClonesArray
58 TClonesArray* regHeaderArray = (TClonesArray*)fDarcHeader->GetRegHeaderArray();
60 TClonesArray &eventArray = *regHeaderArray;
61 new(eventArray[eventArray.GetEntriesFast()]) AliMUONRegHeader(regHeader);
64 //___________________________________________
65 void AliMUONDDLTrigger::AddLocStruct(const AliMUONLocalStruct& loc, Int_t iReg)
67 // adding local card informations
68 // for a given regional structure
69 // using TClonesArrays
71 AliMUONRegHeader* regHeader = (AliMUONRegHeader*)fDarcHeader->GetRegHeaderEntry(iReg);
73 TClonesArray* localArray = (TClonesArray*)regHeader->GetLocalArray();
75 TClonesArray &locArray = *localArray;
76 new(locArray[locArray.GetEntriesFast()]) AliMUONLocalStruct(loc);