]> git.uio.no Git - u/mrichter/AliRoot.git/blobdiff - FMD/AliFMDHitDigitizer.h
Fixes for Coverity issues: 21876, 21795, 21786, 21782, 21781
[u/mrichter/AliRoot.git] / FMD / AliFMDHitDigitizer.h
index 614c36d904048f5aaea315a2640ae6cf8f57fa6d..828b3076a66ea4b1624ae191eefcc3fed133da91 100644 (file)
@@ -30,6 +30,7 @@ class AliFMD;
 class AliLoader;
 class AliRunLoader;
 class AliFMDDigit;
+class AliStack;
 
 
 
@@ -50,7 +51,9 @@ public:
   /** CTOR */
   AliFMDHitDigitizer() 
     : AliFMDBaseDigitizer(), 
-      fOutput(kDigits) 
+      fOutput(kDigits), 
+      fHoldTime(2e-6),
+      fStack(0)
   {}
   /** CTOR 
       @param name Name */
@@ -58,26 +61,42 @@ public:
   /** DTOR */
   virtual ~AliFMDHitDigitizer() {}
   /** Run over the input events (retrieved via run loader) */
-  void Exec(Option_t* option="");
+  void Digitize(Option_t* option="");
+  /** 
+   * Set the end of integration
+   * 
+   * @param holdT Time when integration ends (nominally @f$
+   *        2\mu{}s@f$) 
+   */
+  void SetHoldTime(Double_t holdT=2e-6) { fHoldTime = holdT; }
+  /** 
+   * Get the hold time 
+   * 
+   * @return Hold time in seconds
+   */
+  Double_t GetHoldTime() const { return fHoldTime; }
 protected:
   /** Copy constructor 
       @param o Object to copy from */
   AliFMDHitDigitizer(const AliFMDHitDigitizer& o) 
     : AliFMDBaseDigitizer(o),
-      fOutput(o.fOutput)
+      fOutput(o.fOutput), 
+      fHoldTime(2e-6),
+      fStack(o.fStack)
   {}
-  /** Assignment operator
-      @param o Object to assign from 
-      @return Reference to this */
-  AliFMDHitDigitizer& operator=(const AliFMDHitDigitizer& o) 
-  {
-    AliFMDBaseDigitizer::operator=(o);
-    fOutput      = o.fOutput;
-    return *this;
-  }
-  /** Make the output tree using the passed loader 
-      @param loader 
-      @return The generated tree. */
+  /** 
+   * Assignment operator
+   *
+   * @param o Object to assign from 
+   * @return Reference to this 
+   */
+  AliFMDHitDigitizer& operator=(const AliFMDHitDigitizer& o); 
+  /** 
+   * Make the output tree using the passed loader 
+   *
+   * @param loader 
+   * @return The generated tree. 
+   */
   TTree* MakeOutputTree(AliLoader* loader);
   /** Sum energy deposited contributions from each hit in a cache
       @param hitsBranch Branch in input tree */
@@ -103,15 +122,18 @@ protected:
       @param count2   ADC count 2 (-1 if not used)
       @param count3   ADC count 3 (-1 if not used) 
       @param count4   ADC count 4 (-1 if not used) */
-  void AddDigit(UShort_t  detector, 
-               Char_t    ring,
-               UShort_t  sector, 
-               UShort_t  strip, 
-               Float_t   edep, 
-               UShort_t  count1, 
-               Short_t   count2, 
-               Short_t   count3,
-               Short_t   count4) const;
+  void AddDigit(UShort_t       detector, 
+               Char_t         ring,
+               UShort_t       sector, 
+               UShort_t       strip, 
+               Float_t        edep, 
+               UShort_t       count1, 
+               Short_t        count2, 
+               Short_t        count3,
+               Short_t        count4, 
+               UShort_t       ntot, 
+               UShort_t       nprim,
+               const TArrayI& trackrefs) const;
   /** Check that digit data is consistent
       @param digit   Digit
       @param nhits   Number of hits
@@ -119,12 +141,17 @@ protected:
   void CheckDigit(AliFMDDigit*    digit,
                  UShort_t        nhits,
                  const TArrayI&  counts);
-  /** Store the data using the loader 
-      @param loader The loader */
-  void StoreDigits(AliLoader* loader);
+  /** 
+   * Store the data using the loader 
+   *
+   * @param loader The loader 
+   */
+  void StoreDigits(const AliLoader* loader);
   
 
   Output_t      fOutput;           // Output mode
+  Double_t      fHoldTime;         // Stop of integration
+  AliStack*     fStack;            // Kinematics
 
   ClassDef(AliFMDHitDigitizer,1) // Make Digits from Hits
 };