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 ////////////////////////////////////////////////
19 // class for EMCAL alignment parameters //
20 ////////////////////////////////////////////////
22 #include "AliEMCALAlignData.h"
24 ClassImp(AliEMCALAlignData)
26 //________________________________________________________________
27 AliEMCALAlignData::AliEMCALAlignData()
29 // Default constructor
33 //________________________________________________________________
34 AliEMCALAlignData::AliEMCALAlignData(const char* name)
37 TString namst = "Align_";
39 SetName(namst.Data());
40 SetTitle(namst.Data());
44 //________________________________________________________________
45 AliEMCALAlignData::AliEMCALAlignData(const AliEMCALAlignData& alignda) :
49 SetName(alignda.GetName());
50 SetTitle(alignda.GetName());
52 fNSuperModules = alignda.GetNSuperModules();
53 for(Int_t module=0; module<fNSuperModules; module++) {
54 for (Int_t axis=0; axis<3; axis++) {
55 fSuperModuleCenter[module][axis] =
56 alignda.GetSuperModuleCenter(module,axis);
57 for (Int_t angle=0; angle<2; angle++) {
58 fSuperModuleAngle[module][axis][angle] =
59 alignda.GetSuperModuleAngle(module,axis,angle);
65 //________________________________________________________________
66 AliEMCALAlignData &AliEMCALAlignData::operator =(const AliEMCALAlignData& alignda)
68 // assignment operator
69 SetName(alignda.GetName());
70 SetTitle(alignda.GetName());
72 fNSuperModules = alignda.GetNSuperModules();
73 for(Int_t module=0; module<fNSuperModules; module++) {
74 for (Int_t axis=0; axis<3; axis++) {
75 fSuperModuleCenter[module][axis] =
76 alignda.GetSuperModuleCenter(module,axis);
77 for (Int_t angle=0; angle<2; angle++) {
78 fSuperModuleAngle[module][axis][angle] =
79 alignda.GetSuperModuleAngle(module,axis,angle);
86 //________________________________________________________________
87 AliEMCALAlignData::~AliEMCALAlignData()
92 //________________________________________________________________
93 void AliEMCALAlignData::Reset()
95 // Set all to default values
97 memset(fSuperModuleCenter,0,12*3*sizeof(Float_t));
98 memset(fSuperModuleAngle ,0,12*3*2*sizeof(Float_t));
101 //________________________________________________________________
102 void AliEMCALAlignData::Print(Option_t */*option =""*/) const
104 // Print alignment data
106 printf("EMCAL alignment object\n");
107 printf(" Number of modules: %d\n",fNSuperModules);
110 //________________________________________________________________