LCOV - code coverage report
Current view: top level - EMCAL/EMCALTriggerBase - AliEMCALTriggerRawPatch.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 15 6.7 %
Date: 2016-06-14 17:26:59 Functions: 1 23 4.3 %

          Line data    Source code
       1             : /**
       2             :  * @file AliEMCALTriggerRawPatch.h
       3             :  * @since Oct 23, 2015
       4             :  * @author Markus Fasel <markus.fasel@cern.ch>, Lawrence Berkeley National Laboratory
       5             :  */
       6             : #ifndef AliEMCALTriggerRawPatch_H
       7             : #define AliEMCALTriggerRawPatch_H
       8             : /* Copyright(c) 1998-2015, ALICE Experiment at CERN, All rights reserved. *
       9             :  * See cxx source for full Copyright notice                               */
      10             : 
      11             : #include <Riosfwd.h>
      12             : #include <TObject.h>
      13             : 
      14             : /**
      15             :  * @class AliEMCALTriggerRawPatch
      16             :  * @brief Raw patch information used inside the trigger maker kernel
      17             :  * for the offline trigger and trigger recalculator
      18             :  *
      19             :  * Within the EMCAL trigger maker patches can be found by the offline trigger
      20             :  * or by the trigger patch recalculator. The trigger raw patch is supposed to
      21             :  * keep a minimum information needed with trigger patch information in order
      22             :  * to calculated the more detailed AliEMCALTriggerPatchInfo from it.
      23             :  */
      24           0 : class AliEMCALTriggerRawPatch : public TObject {
      25             : public:
      26             :   /**
      27             :    * Dummy constructor
      28             :    */
      29             :   AliEMCALTriggerRawPatch();
      30             : 
      31             :   /**
      32             :    * Main constructor
      33             :    * @param col0 Starting column
      34             :    * @param row0 Starting row
      35             :    * @param size Patch size
      36             :    * @param adc ADC value
      37             :    */
      38             :   AliEMCALTriggerRawPatch(Int_t col0, Int_t row0, Int_t size, Double_t adc, Double_t offlineADC);
      39             : 
      40             :   /**
      41             :    * Destructor
      42             :    */
      43           0 :   virtual ~AliEMCALTriggerRawPatch() {}
      44             : 
      45             :   /**
      46             :    * Comparison operator for equalness: Patches are equal if they have the same position and
      47             :    * the same trigger bit mask.
      48             :    * @param other Patch to compare to
      49             :    * @return True if the patches share the same position and trigger bit mask, false otherwise
      50             :    */
      51             :   bool operator==(const AliEMCALTriggerRawPatch &other) const;
      52             : 
      53             :   /**
      54             :    * Comparison operator for smaller. As this is used in sorting algorithms, the comparison
      55             :    * is made based on the patch ADC.
      56             :    * @param other Patch to compate to
      57             :    * @return True if the patch ADC of this patch is smaller, false otherwise
      58             :    */
      59             :   bool operator<(const AliEMCALTriggerRawPatch &other) const;
      60             : 
      61           0 :   void SetColStart(Int_t col0) { fCol0 = col0; }
      62           0 :   void SetRowStart(Int_t row0) { fRow0 = row0; }
      63           0 :   void SetPatchSize(Int_t patchsize) { fSize = patchsize; }
      64           0 :   void SetADC(Double_t adc) { fADC = adc; }
      65           0 :   void SetOfflineADC(Double_t adc) { fOfflineADC = adc; }
      66           0 :   void SetBitmask(ULong_t bitmask) { fBitMask = bitmask; }
      67             : 
      68           0 :   Int_t GetColStart() const { return fCol0; }
      69           0 :   Int_t GetRowStart() const { return fRow0; }
      70           0 :   Int_t GetPatchSize() const { return fSize; }
      71           0 :   Double_t GetADC() const { return fADC; }
      72           0 :   Double_t GetOfflineADC() const { return fOfflineADC; }
      73           0 :   ULong_t GetBitmask() const { return fBitMask; }
      74             : 
      75             :   /**
      76             :    * Print trigger patch information to a stream
      77             :    * @param stream Output stream
      78             :    */
      79             :   void PrintStream(std::ostream &stream) const;
      80             : 
      81             : protected:
      82             :   ULong_t                       fBitMask;         ///< Trigger bit mask
      83             :   Int_t                         fCol0;            ///< Start column of the patch
      84             :   Int_t                         fRow0;            ///< Start row of the patch
      85             :   Int_t                         fSize;            ///< Patch size in number of FAST-ors
      86             :   Double_t                      fADC;             ///< Patch ADC
      87             :   Double_t                      fOfflineADC;      ///< Patch ADC
      88             : 
      89             :   /// \cond CLASSIMP
      90          22 :   ClassDef(AliEMCALTriggerRawPatch, 2);
      91             :   /// \endcond
      92             : };
      93             : 
      94             : /**
      95             :  * output stream operator
      96             :  */
      97             : std::ostream &operator<<(std::ostream &in, const AliEMCALTriggerRawPatch &patch);
      98             : 
      99             : #endif

Generated by: LCOV version 1.11