]>
Commit | Line | Data |
---|---|---|
bcdecbbe | 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 | **************************************************************************/ | |
15 | ||
16 | /* $Id$ */ | |
17 | ||
18 | //////////////////////////////////////////////// | |
19 | // class for EMCAL alignment parameters // | |
14ce0a6e | 20 | // |
21 | // A. Pavlinov | |
22 | // | |
23 | // JLK (21-Apr-2006): this should go away sometime | |
24 | // soon and EMCAL should use | |
25 | // official ALICE alignment classes | |
26 | // | |
bcdecbbe | 27 | //////////////////////////////////////////////// |
28 | ||
29 | #include "AliEMCALAlignData.h" | |
d434833b | 30 | #include "AliAlignObjMatrix.h" |
bcdecbbe | 31 | |
32 | ClassImp(AliEMCALAlignData) | |
33 | ||
34 | //________________________________________________________________ | |
35 | AliEMCALAlignData::AliEMCALAlignData() | |
36 | { | |
37 | // Default constructor | |
38 | Reset(); | |
39 | } | |
40 | ||
41 | //________________________________________________________________ | |
42 | AliEMCALAlignData::AliEMCALAlignData(const char* name) | |
43 | { | |
44 | // Constructor | |
45 | TString namst = "Align_"; | |
46 | namst += name; | |
47 | SetName(namst.Data()); | |
48 | SetTitle(namst.Data()); | |
49 | Reset(); | |
50 | } | |
51 | ||
52 | //________________________________________________________________ | |
53 | AliEMCALAlignData::AliEMCALAlignData(const AliEMCALAlignData& alignda) : | |
54 | TNamed(alignda) | |
55 | { | |
56 | // copy constructor | |
57 | SetName(alignda.GetName()); | |
58 | SetTitle(alignda.GetName()); | |
59 | Reset(); | |
60 | fNSuperModules = alignda.GetNSuperModules(); | |
61 | for(Int_t module=0; module<fNSuperModules; module++) { | |
d434833b | 62 | fSuperModuleMatrix[module] = alignda.fSuperModuleMatrix[module]; |
bcdecbbe | 63 | } |
64 | } | |
65 | ||
66 | //________________________________________________________________ | |
67 | AliEMCALAlignData &AliEMCALAlignData::operator =(const AliEMCALAlignData& alignda) | |
68 | { | |
69 | // assignment operator | |
70 | SetName(alignda.GetName()); | |
71 | SetTitle(alignda.GetName()); | |
72 | Reset(); | |
73 | fNSuperModules = alignda.GetNSuperModules(); | |
74 | for(Int_t module=0; module<fNSuperModules; module++) { | |
d434833b | 75 | fSuperModuleMatrix[module] = new AliAlignObjMatrix(*alignda.fSuperModuleMatrix[module]); |
bcdecbbe | 76 | } |
77 | return *this; | |
78 | } | |
79 | ||
80 | //________________________________________________________________ | |
81 | AliEMCALAlignData::~AliEMCALAlignData() | |
82 | { | |
83 | // Destructor | |
d434833b | 84 | for(Int_t module=0; module<fNSuperModules; module++) { |
85 | if(fSuperModuleMatrix[module]) delete fSuperModuleMatrix[module]; | |
86 | } | |
bcdecbbe | 87 | } |
88 | ||
89 | //________________________________________________________________ | |
90 | void AliEMCALAlignData::Reset() | |
91 | { | |
92 | // Set all to default values | |
93 | fNSuperModules = 12; | |
d434833b | 94 | memset(fSuperModuleMatrix,0,12*sizeof(AliAlignObjMatrix*)); |
95 | for(Int_t module=0; module<fNSuperModules; module++) fSuperModuleMatrix[module] = 0; | |
bcdecbbe | 96 | } |
97 | ||
98 | //________________________________________________________________ | |
99 | void AliEMCALAlignData::Print(Option_t */*option =""*/) const | |
100 | { | |
101 | // Print alignment data | |
102 | ||
103 | printf("EMCAL alignment object\n"); | |
104 | printf(" Number of modules: %d\n",fNSuperModules); | |
105 | } | |
bcdecbbe | 106 | //________________________________________________________________ |