Add possibility to rotate event
[u/mrichter/AliRoot.git] / RALICE / AliAttribObj.cxx
CommitLineData
ff19c7ae 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"
da94fdbd 48#include "Riostream.h"
ff19c7ae 49
50ClassImp(AliAttribObj) // Class implementation to enable ROOT I/O
51
52AliAttribObj::AliAttribObj() : TObject(),AliAttrib()
53{
54// Creation of an AliAttrib object and initialisation of parameters.
55// Several values of the same type (e.g. gain) can be stored in different slots.
56// If needed, the storage for values will be expanded automatically
57// when entering values.
58}
59///////////////////////////////////////////////////////////////////////////
60AliAttribObj::AliAttribObj(AliAttrib& a) : TObject(),AliAttrib(a)
61{
62// Creation of an AliAttrib object and initialisation of parameters.
63// All attributes are initialised to the values of the input AliAttrib.
64}
65///////////////////////////////////////////////////////////////////////////
66AliAttribObj::~AliAttribObj()
67{
68// Destructor to delete dynamically allocated memory
69}
70///////////////////////////////////////////////////////////////////////////
64b63904 71AliAttribObj::AliAttribObj(const AliAttribObj& a) : TObject(a),AliAttrib(a)
ff19c7ae 72{
73// Copy constructor
74}
75///////////////////////////////////////////////////////////////////////////
64b63904 76TObject* AliAttribObj::Clone(const char* name) const
ff19c7ae 77{
1c01b4f8 78// Make a deep copy of the current object and provide the pointer to the copy.
ff19c7ae 79// This memberfunction enables automatic creation of new objects of the
1c01b4f8 80// correct type depending on the object type, a feature which may be very useful
ff19c7ae 81// for containers when adding objects in case the container owns the objects.
82
1c01b4f8 83 AliAttribObj* att=new AliAttribObj(*this);
da94fdbd 84 if (name)
85 {
86 if (strlen(name))
87 {
88 cout << " *" << ClassName() << "::Clone* No support for SetName." << endl;
89 }
90 }
ff19c7ae 91 return att;
92}
93///////////////////////////////////////////////////////////////////////////