]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONDigitStoreV2S.cxx
Small fix
[u/mrichter/AliRoot.git] / MUON / AliMUONDigitStoreV2S.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 #include "AliMUONDigitStoreV2S.h"
19
20 //-----------------------------------------------------------------------------
21 /// \class AliMUONDigitStoreV2S
22 ///
23 /// Concrete implementation of AliMUONVDigitStore for simulated digits, using
24 /// the AliMUONDigitStoreVImpl base implementation
25 /// 
26 /// \author Laurent Aphecetche
27 //-----------------------------------------------------------------------------
28
29
30 #include "AliMUONDigit.h"
31 #include <TClonesArray.h>
32
33 /// \cond CLASSIMP
34 ClassImp(AliMUONDigitStoreV2S)
35 /// \endcond
36
37 //_____________________________________________________________________________
38 AliMUONDigitStoreV2S::AliMUONDigitStoreV2S()
39 : AliMUONDigitStoreVImpl("AliMUONDigit")
40 {
41   /// ctor
42 }
43
44 //_____________________________________________________________________________
45 AliMUONDigitStoreV2S::~AliMUONDigitStoreV2S()
46 {
47   /// dtor
48 }
49
50 //_____________________________________________________________________________
51 AliMUONVDigit*
52 AliMUONDigitStoreV2S::AddConcreteDigit(TClonesArray& a, 
53                                        const AliMUONVDigit& digit,
54                                        Int_t index)
55 {
56   /// add a digit to this store
57   const AliMUONDigit* d = dynamic_cast<const AliMUONDigit*>(&digit);
58   
59   if ( !d ) return 0x0;
60   
61   return new(a[index]) AliMUONDigit(*d);
62 }
63
64 //_____________________________________________________________________________
65 AliMUONVDigitStore* 
66 AliMUONDigitStoreV2S::Create() const
67 {
68   /// create an empty store
69   return new AliMUONDigitStoreV2S;
70 }
71
72 //_____________________________________________________________________________
73 AliMUONVDigit* 
74 AliMUONDigitStoreV2S::CreateDigit(Int_t detElemId, Int_t manuId,                                 
75                                   Int_t manuChannel, Int_t cathode) const
76 {
77   /// create a digit, compatible with this store
78   return new AliMUONDigit(detElemId,manuId,manuChannel,cathode);
79 }
80
81