]> git.uio.no Git - u/mrichter/AliRoot.git/blob - RALICE/AliAttribObj.cxx
AliAttribObj.h and AliAttribObj.cxx added into CVS (I forgot them in the
[u/mrichter/AliRoot.git] / RALICE / AliAttribObj.cxx
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 AliAttribObj
20 // Generic handling of detector signal (calibration) attributes.
21 //
22 // This class is meant to provide an AliAttrib object which is derived
23 // from TObject such that it can be stored in e.g. TObjArray etc...
24 // and that it can be written out using the ROOT I/O machinery.
25 //
26 // Example :
27 // ---------
28 // AliAttrib a;
29 // a.SetGain(250.7);
30 // a.SetGain(1340,3);
31 // a.SetEdgeOn(3);
32 // a.SetOffset(-22.5,2);
33 // a.SetDead(1);
34 // a.Data();
35 //
36 // AliAttribObj b(a);
37 // b.Data();
38 //
39 // AliAttribObj c;
40 // c.Load(a);
41 // c.Data();
42 //
43 //--- Author: Nick van Eijndhoven 18-sep-2003 Utrecht University
44 //- Modified: NvE $Date$ Utrecht University
45 ///////////////////////////////////////////////////////////////////////////
46
47 #include "AliAttribObj.h"
48  
49 ClassImp(AliAttribObj) // Class implementation to enable ROOT I/O
50  
51 AliAttribObj::AliAttribObj() : TObject(),AliAttrib()
52 {
53 // Creation of an AliAttrib object and initialisation of parameters.
54 // Several values of the same type (e.g. gain) can be stored in different slots.
55 // If needed, the storage for values will be expanded automatically
56 // when entering values.
57 }
58 ///////////////////////////////////////////////////////////////////////////
59 AliAttribObj::AliAttribObj(AliAttrib& a) : TObject(),AliAttrib(a)
60 {
61 // Creation of an AliAttrib object and initialisation of parameters.
62 // All attributes are initialised to the values of the input AliAttrib.
63 }
64 ///////////////////////////////////////////////////////////////////////////
65 AliAttribObj::~AliAttribObj()
66 {
67 // Destructor to delete dynamically allocated memory
68 }
69 ///////////////////////////////////////////////////////////////////////////
70 AliAttribObj::AliAttribObj(AliAttribObj& a) : TObject(a),AliAttrib(a)
71 {
72 // Copy constructor
73 }
74 ///////////////////////////////////////////////////////////////////////////
75 AliAttribObj* AliAttribObj::MakeCopy(AliAttribObj& a)
76 {
77 // Make a deep copy of the input object and provide the pointer to the copy.
78 // This memberfunction enables automatic creation of new objects of the
79 // correct type depending on the argument type, a feature which may be very useful
80 // for containers when adding objects in case the container owns the objects.
81
82  AliAttribObj* att=new AliAttribObj(a);
83  return att;
84 }
85 ///////////////////////////////////////////////////////////////////////////