]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONDDLTrigger.cxx
Modified for new raw data interface
[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 **************************************************************************/
8c343c7c 15
69be760c 16#include "AliMUONDDLTrigger.h"
2cf44ef3 17#include "AliMUONLocalStruct.h"
18#include "AliMUONRegHeader.h"
19#include "AliMUONDarcHeader.h"
69be760c 20
21ClassImp(AliMUONDDLTrigger)
85fec35d 22
23///
24/// \class AliMUONDDLTrigger
25///
26/// One DDL for trigger part of the MUON spectrometer.
27///
28/// \author C. Finck
29///
30
c8f4be1a 31
69be760c 32//___________________________________________
33AliMUONDDLTrigger::AliMUONDDLTrigger()
2cf44ef3 34 : TObject()
69be760c 35{
2cf44ef3 36 //
69be760c 37 //ctor
2cf44ef3 38 //
39 fDarcHeader = new AliMUONDarcHeader();
69be760c 40}
41
42//___________________________________________
43AliMUONDDLTrigger::~AliMUONDDLTrigger()
44{
2cf44ef3 45 //
69be760c 46 //dtor
2cf44ef3 47 //
48 delete fDarcHeader;
49
50}
51
52//___________________________________________
53void AliMUONDDLTrigger::AddRegHeader(const AliMUONRegHeader& regHeader)
54{
55 // adding regional header informations
56 // in the given TClonesArray
57 //
58 TClonesArray* regHeaderArray = (TClonesArray*)fDarcHeader->GetRegHeaderArray();
59
60 TClonesArray &eventArray = *regHeaderArray;
61 new(eventArray[eventArray.GetEntriesFast()]) AliMUONRegHeader(regHeader);
62}
63
64//___________________________________________
65void AliMUONDDLTrigger::AddLocStruct(const AliMUONLocalStruct& loc, Int_t iReg)
66{
67 // adding local card informations
68 // for a given regional structure
69 // using TClonesArrays
70
71 AliMUONRegHeader* regHeader = (AliMUONRegHeader*)fDarcHeader->GetRegHeaderEntry(iReg);
72
73 TClonesArray* localArray = (TClonesArray*)regHeader->GetLocalArray();
74
75 TClonesArray &locArray = *localArray;
76 new(locArray[locArray.GetEntriesFast()]) AliMUONLocalStruct(loc);
69be760c 77}