]> git.uio.no Git - u/mrichter/AliRoot.git/blob - TRD/AliTRDdetDigits.cxx
AliGenCocktailEntry.cxx added
[u/mrichter/AliRoot.git] / TRD / AliTRDdetDigits.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 /*
17 $Log$
18 */
19
20 ///////////////////////////////////////////////////////////////////////////////
21 //                                                                           //
22 //  Container class for the TRD digits of one detector segment (chamber).    //
23 //                                                                           //
24 ///////////////////////////////////////////////////////////////////////////////
25
26 #include "AliTRDdetDigits.h"
27
28 ClassImp(AliTRDdetDigits)
29
30 //_____________________________________________________________________________
31 AliTRDdetDigits::AliTRDdetDigits():AliDigits()
32 {
33   //
34   // Default constructor
35   //
36
37   fNrowTRD = 0;
38   fNcolTRD = 0;
39
40 }
41
42 //_____________________________________________________________________________
43 AliTRDdetDigits::Allocate(Int_t nrow, Int_t ncol, Int_t ntime)
44 {
45   //
46   // Allocates an empty buffer for the digits data of the size
47   // <nrow> * <ncol> * <ntime>
48   //
49
50   fNrowTRD = nrow;
51   fNcolTRD = ncol;
52   
53   // The two-dimensional row/column structure of the TRD gets mapped into 
54   // an one-dimensional row array which can be used inside AliDigits.
55   // The TRD timebins correspond to the columns in AliDigits.
56   AliDigits::Allocate(fNrowTRD*fNcolTRD,ntime);
57
58 }
59
60 //_____________________________________________________________________________
61 AliTRDdetDigits::SetDigits(Int_t row, Int_t col, Int_t time, Short_t value)
62 {
63   //
64   // Sets the value of one given digit
65   //
66
67   Int_t index = row * fNrowTRD + col;
68   AliDigits::SetDigitFast(value,index,time);
69
70 }