]> git.uio.no Git - u/mrichter/AliRoot.git/blame - STEER/AliRecoParam.cxx
First prototype of the reco-param classes. Removal of static instance in the muon...
[u/mrichter/AliRoot.git] / STEER / AliRecoParam.cxx
CommitLineData
242b332c 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
17///////////////////////////////////////////////////////////////////////////////
18// //
6769d914 19// ALICE Reconstruction parameterization: //
20// //
21// //
22// Base Class for Detector reconstruction parameters //
23// Revision: cvetan.cheshkov@cern.ch 12/06/2008 //
24// Its structure has been revised and it is interfaced to AliEventInfo. //
242b332c 25// //
26///////////////////////////////////////////////////////////////////////////////
27
28#include "TObjArray.h"
29#include "AliDetectorRecoParam.h"
30
31#include "AliRecoParam.h"
32
33
34ClassImp(AliRecoParam)
35
6769d914 36AliRecoParam::AliRecoParam():
37 TNamed("",""),
38 fRecoParamArray(0)
242b332c 39{
6769d914 40 // Default constructor
41 // ...
242b332c 42}
43
6769d914 44AliRecoParam::AliRecoParam(const char *detector):
45 TNamed(detector,detector),
242b332c 46 fRecoParamArray(0)
47{
6769d914 48 // Default constructor
49 // ...
242b332c 50}
51
52AliRecoParam::~AliRecoParam(){
6769d914 53 // Destructor
54 // ...
55 // Delete the array with the reco-param objects
242b332c 56 if (fRecoParamArray){
57 fRecoParamArray->Delete();
58 delete fRecoParamArray;
59 }
60}
61
6769d914 62void AliRecoParam::Print(Option_t *option) const {
242b332c 63 //
64 // Print reconstruction setup
65 //
6769d914 66 printf("AliRecoParam object for %s\n",GetName());
242b332c 67 if (!fRecoParamArray) return;
68 Int_t nparam = fRecoParamArray->GetEntriesFast();
69 for (Int_t iparam=0; iparam<nparam; iparam++){
70 AliDetectorRecoParam * param = (AliDetectorRecoParam *)fRecoParamArray->At(iparam);
71 if (!param) continue;
72 param->Print(option);
73 }
74}
75
6769d914 76void AliRecoParam::AddRecoParam(AliDetectorRecoParam* param){
77 // Add an instance of reco params object into
78 // the fRecoParamArray
242b332c 79 //
80 if (!fRecoParamArray) fRecoParamArray = new TObjArray;
81 fRecoParamArray->AddLast(param);
82}