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 **************************************************************************/
16 /* $Id: AliTRDdigitsParam.cxx 34070 2009-08-04 15:34:53Z cblume $ */
18 ///////////////////////////////////////////////////////////////////////////////
20 // Class containing parameters for digits //
22 ///////////////////////////////////////////////////////////////////////////////
26 #include "AliTRDdigitsParam.h"
27 #include "AliTRDcalibDB.h"
29 ClassImp(AliTRDdigitsParam)
31 //_____________________________________________________________________________
32 AliTRDdigitsParam::AliTRDdigitsParam()
38 // Default constructor
43 //_____________________________________________________________________________
44 AliTRDdigitsParam::~AliTRDdigitsParam()
52 //_____________________________________________________________________________
53 AliTRDdigitsParam::AliTRDdigitsParam(const AliTRDdigitsParam &p)
55 ,fCheckOCDB(p.fCheckOCDB)
56 ,fNTimeBins(p.fNTimeBins)
64 //_____________________________________________________________________________
65 AliTRDdigitsParam &AliTRDdigitsParam::operator=(const AliTRDdigitsParam &p)
68 // Assignment operator
72 ((AliTRDdigitsParam &) p).Copy(*this);
79 //_____________________________________________________________________________
80 void AliTRDdigitsParam::Copy(TObject &p) const
86 AliTRDdigitsParam *target = dynamic_cast<AliTRDdigitsParam*> (&p);
91 target->fCheckOCDB = fCheckOCDB;
92 target->fNTimeBins = fNTimeBins;
96 //_____________________________________________________________________________
97 Bool_t AliTRDdigitsParam::SetNTimeBins(Int_t ntb)
100 // Sets the number of time bins
101 // Per default an automatic consistency check with the corresponding
102 // OCDB entry is performed. This check can be disabled by setting
103 // SetCheckOCDB(kFALSE)
109 Int_t nTimeBinsOCDB = AliTRDcalibDB::Instance()->GetNumberOfTimeBins();
110 if (fNTimeBins == nTimeBinsOCDB) {
114 AliWarning(Form("Number of timebins does not match OCDB value (%d, %d)"
115 ,fNTimeBins,nTimeBinsOCDB));