]> git.uio.no Git - u/mrichter/AliRoot.git/blame - RALICE/icepack/IceGOM.cxx
17-jun-2005 NvE New class AliJob introduced to provide a flexible (physics) analysis...
[u/mrichter/AliRoot.git] / RALICE / icepack / IceGOM.cxx
CommitLineData
8026dac6 1/*******************************************************************************
2 * Copyright(c) 2003, IceCube Experiment at the South Pole. All rights reserved.
3 *
4 * Author: The IceCube RALICE-based Offline 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.
12 * The authors make no claims about the suitability of this software for
13 * any purpose. It is provided "as is" without express or implied warranty.
14 *******************************************************************************/
00b6d74f 15
16// $Id$
17
18///////////////////////////////////////////////////////////////////////////
19// Class IceGOM
20// Signal/Hit handling of a generic IceCube Optical Module (GOM).
21// Basically this class provides an IceCube tailored user interface
22// to the functionality of the class AliDevice.
23// This class is meant to provide a base class for more specific OM's
24// (i.e. Amanda analog OM's or IceCube digital OM's).
25// To specifically address Amanda OM's, In-ice DOM's or IceTop DOM's
26// please refer to the derived classes IceAOM, IceIDOM and IceTDOM resp.
27//
28// Example :
29// =========
30//
31// Creation and filling of a generic Icecube module with fictituous data
32// ---------------------------------------------------------------------
33//
34// For further functionality please refer to AliDevice, AliSignal and AliAttrib.
35//
36// IceGOM m;
37// m.SetUniqueID(123);
38// m.SetNameTitle("OM123","Generic IceCube module");
39//
40// // Indicate status (e.g. version of readout electronics)
41// // via a user definable status word.
42// Int_t stat=20031;
43// m.SetStatus(stat);
44//
45// Float_t pos[3]={1,2,3};
46// m.SetPosition(pos,"car");
47//
48// // The starting unique signal ID.
49// // In this example it will be increased automatically
50// // whenever a new signal is created.
51// Int_t sid=10;
52//
53// AliSignal s;
54//
55// s.SetSlotName("ADC",1);
56// s.SetSlotName("LE",2);
57// s.SetSlotName("TOT",3);
58//
59// s.Reset();
60// s.SetName("OM123 Hit 1");
61// s.SetUniqueID(sid++);
62// s.SetSignal(100,"ADC");
63// s.SetSignal(-100,"LE");
64// s.SetSignal(-1000,"TOT");
65// m.AddHit(s);
66//
67// s.Reset();
68// s.SetName("OM123 Hit 2");
69// s.SetUniqueID(sid++);
70// s.SetSignal(110,"ADC");
71// s.SetSignal(-101,"LE");
72// s.SetSignal(1001,"TOT");
73// m.AddHit(s);
74//
75// s.Reset();
76// s.SetName("OM123 Hit 3");
77// s.SetUniqueID(sid++);
78// s.SetSignal(120,"ADC");
79// s.SetSignal(-102,"LE");
80// s.SetSignal(-1002,"TOT");
81// m.AddHit(s);
82//
83// // Provide module data overview
84// m.Data();
85//
86// // Accessing the 3rd stored hit
87// AliSignal* sx=m.GetHit(3);
88// if (sx) sx->Data();
89//
90// // Explicit hit selection via unique ID
91// AliSignal* sx=m.GetIdHit(12);
92// if (sx) sx->Data();
93//
94// // Obtain the minimum and maximum recorded TOT value
95// Float_t vmin,vmax;
96// m.GetExtremes(vmin,vmax,"TOT");
97// cout << " Extreme values : vmin = " << vmin << " vmax = " << vmax << endl;
98//
99// // Ordered hits w.r.t. decreasing TOT
100// TObjArray* ordered=m.SortHits("TOT",-1);
101// Int_t nhits=0;
102// if (ordered) nhits=ordered->GetEntries();
103// for (Int_t i=0; i<nhits; i++)
104// {
105// AliSignal* sx=(AliSignal*)ordered->At(i);
106// if (sx) sx->Data();
107// }
108//
109//--- Author: Nick van Eijndhoven 23-jun-2004 Utrecht University
110//- Modified: NvE $Date$ Utrecht University
111///////////////////////////////////////////////////////////////////////////
112
113#include "IceGOM.h"
114#include "Riostream.h"
115
116ClassImp(IceGOM) // Class implementation to enable ROOT I/O
117
118IceGOM::IceGOM() : AliDevice()
119{
120// Default constructor.
121}
122///////////////////////////////////////////////////////////////////////////
123IceGOM::~IceGOM()
124{
125// Default destructor.
126}
127///////////////////////////////////////////////////////////////////////////
128IceGOM::IceGOM(const IceGOM& m) : AliDevice(m)
129{
130// Copy constructor.
131}
132///////////////////////////////////////////////////////////////////////////
133TObject* IceGOM::Clone(const char* name) const
134{
135// Make a deep copy of the current object and provide the pointer to the copy.
136// This memberfunction enables automatic creation of new objects of the
137// correct type depending on the object type, a feature which may be very useful
138// for containers like AliEvent when adding objects in case the
139// container owns the objects. This feature allows e.g. AliEvent
140// to store either IceGOM objects or objects derived from IceGOM
141// via tha AddDevice memberfunction, provided these derived classes also have
142// a proper Clone memberfunction.
143
144 IceGOM* m=new IceGOM(*this);
145 if (name)
146 {
147 if (strlen(name)) m->SetName(name);
148 }
149 return m;
150}
151///////////////////////////////////////////////////////////////////////////