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 ///////////////////////////////////////////////////////////////////////////////
20 // Class containing constant common parameters //
22 // Request an instance with AliTRDCommonParam::Instance() //
23 // Then request the needed values //
25 ///////////////////////////////////////////////////////////////////////////////
27 #include <TObjArray.h>
29 #include "AliTracker.h"
32 #include "AliTRDCommonParam.h"
34 ClassImp(AliTRDCommonParam)
36 AliTRDCommonParam *AliTRDCommonParam::fgInstance = 0;
37 Bool_t AliTRDCommonParam::fgTerminated = kFALSE;
39 //_ singleton implementation __________________________________________________
40 AliTRDCommonParam* AliTRDCommonParam::Instance()
43 // Singleton implementation
44 // Returns an instance of this class, it is created if neccessary
47 if (fgTerminated != kFALSE) {
51 if (fgInstance == 0) {
52 fgInstance = new AliTRDCommonParam();
59 //_____________________________________________________________________________
60 void AliTRDCommonParam::Terminate()
63 // Singleton implementation
64 // Deletes the instance of this class and sets the terminated flag,
65 // instances cannot be requested anymore
66 // This function can be called several times.
71 if (fgInstance != 0) {
78 //_____________________________________________________________________________
79 AliTRDCommonParam::AliTRDCommonParam()
82 ,fSamplingFrequency(0.0)
85 // Default constructor
92 //_____________________________________________________________________________
93 AliTRDCommonParam::AliTRDCommonParam(TRootIoCtor *)
96 ,fSamplingFrequency(0.0)
104 //_____________________________________________________________________________
105 void AliTRDCommonParam::Init()
114 // Sampling Frequency in MHz
115 fSamplingFrequency = 10.0;
119 //_____________________________________________________________________________
120 AliTRDCommonParam::~AliTRDCommonParam()
128 //_____________________________________________________________________________
129 AliTRDCommonParam::AliTRDCommonParam(const AliTRDCommonParam &p)
132 ,fSamplingFrequency(p.fSamplingFrequency)
140 //_____________________________________________________________________________
141 AliTRDCommonParam &AliTRDCommonParam::operator=(const AliTRDCommonParam &p)
144 // Assignment operator
148 ((AliTRDCommonParam &) p).Copy(*this);
155 //_____________________________________________________________________________
156 void AliTRDCommonParam::Copy(TObject &p) const
162 AliTRDCommonParam *target = dynamic_cast<AliTRDCommonParam*> (&p);
167 target->fExBOn = fExBOn;
168 target->fSamplingFrequency = fSamplingFrequency;