]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - VZERO/AliVZEROdigit.cxx
- add new classes
[u/mrichter/AliRoot.git] / VZERO / AliVZEROdigit.cxx
index 8f90f2c844e7389a5df69c944601364aed8b9daa..e2ca7099579b3c4ef05059ae1f254a2d6efdaad7 100644 (file)
 
 ClassImp(AliVZEROdigit)
 
-AliVZEROdigit::AliVZEROdigit(Int_t* tracks, Int_t *digits):
-  AliDigit(tracks){
-  
-  //
-  // Creates VZERO digits
-  //
-  // Fills the AliVZEROdigit data members from the array digits. 
-  //
-  
-  fTrack      = tracks[0];
-  fEvent      = digits[0];
-  
-}
-
+//__________________________________________________________________________
+AliVZEROdigit::AliVZEROdigit()
+   :AliDigit(),
+    fPMNumber(0),
+    fTime(0.),
+    fWidth(0.),
+    fIntegrator(0)
 
+{
+  // Standard default
+  // constructor 
+  for(Int_t iClock = 0; iClock < kNClocks; ++iClock) fChargeADC[iClock] = 0;
+}
 
+//__________________________________________________________________________
+AliVZEROdigit::AliVZEROdigit(Int_t   PMnumber, Float_t time, 
+                             Float_t width,
+                            Bool_t integrator,
+                            Short_t *chargeADC,
+                            Int_t *labels)
+:AliDigit(),
+fPMNumber(PMnumber),
+fTime(time),
+fWidth(width),
+fIntegrator(integrator)
+{  
+  // Constructor
+  // Used in the digitizer
+  if (chargeADC) {
+    for(Int_t iClock = 0; iClock < kNClocks; ++iClock)
+      fChargeADC[iClock] = chargeADC[iClock];
+  }
+  else {
+    for(Int_t iClock = 0; iClock < kNClocks; ++iClock)
+      fChargeADC[iClock] = 0;
+  }
 
+  if (labels)
+    for(Int_t iTrack = 0; iTrack < 3; ++iTrack) fTracks[iTrack] = labels[iTrack];
+}
 
+//__________________________________________________________________________
+void AliVZEROdigit::Print(const Option_t*) const
+{
+    // Dumps digit object
+    Dump();
+}