LCOV - code coverage report
Current view: top level - MUON/MUONgraphics - AliMUONAttPainter.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 15 6.7 %
Date: 2016-06-14 17:26:59 Functions: 1 21 4.8 %

          Line data    Source code
       1             : #ifndef ALIMUONATTPAINTER_H
       2             : #define ALIMUONATTPAINTER_H
       3             : 
       4             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       5             : * See cxx source for full Copyright notice                               */
       6             : 
       7             : // $Id$
       8             : 
       9             : /// \ingroup graphics
      10             : /// \class AliMUONAttPainter
      11             : /// \brief Basic attributes shared by all painters
      12             : /// 
      13             : // Author Laurent Aphecetche, Subatech
      14             : 
      15             : #ifndef ROOT_TObject
      16             : #  include "TObject.h"
      17             : #endif
      18             : #ifndef ROOT_TString
      19             : #  include "TString.h"
      20             : #endif
      21             : 
      22           0 : class AliMUONAttPainter : public TObject
      23             : {
      24             : public:
      25             :   
      26             :   /// Internal status bits
      27             :   enum EBits {
      28             :     kIsCathode0         = BIT(14),
      29             :     kIsCathode1         = BIT(15),
      30             :     kIsBendingPlane     = BIT(16),
      31             :     kIsNonBendingPlane  = BIT(17),
      32             :     kIsFrontView        = BIT(18),
      33             :     kIsBackView         = BIT(19),
      34             :     kIsCathodeAndPlaneMutuallyExclusive = BIT(20),
      35             :     kIsValid            = BIT(21),
      36             :     kIsSinglePainter    = BIT(22),
      37             :     kIsCathodeAndPlaneDisabled = BIT(23)
      38             :   };
      39             :   
      40             :   AliMUONAttPainter();
      41             :   virtual ~AliMUONAttPainter();
      42             :   
      43             :   /// Return our name
      44           0 :   virtual const char* GetName() const { return fName.Data(); }
      45             :   
      46             :   TString CathodeName() const;
      47             :   
      48             :   TString ViewPointName() const;
      49             : 
      50             :   TString PlaneName() const;
      51             :   
      52             :   /// Whether cathode & plane are disabled
      53           0 :   Bool_t IsCathodeAndPlaneDisabled() const { return TestBit(kIsCathodeAndPlaneDisabled); }
      54             :   
      55             :   /// Whether we are representing bending plane
      56           0 :   Bool_t IsBendingPlane() const { return TestBit(kIsBendingPlane); }
      57             :   
      58             :   /// Whether we are representing cathode 0
      59           0 :   Bool_t IsCathode0() const { return TestBit(kIsCathode0); }
      60             :   
      61             :   /// Whether we are representing cathode 1
      62           0 :   Bool_t IsCathode1() const { return TestBit(kIsCathode1); }
      63             :   
      64             :   /// Whether we can select both cathode and plane
      65           0 :   Bool_t IsCathodeAndPlaneMutuallyExclusive() const { return TestBit(kIsCathodeAndPlaneMutuallyExclusive); }
      66             :   
      67             :   /// Whether we are defined by cathode
      68           0 :   Bool_t IsCathodeDefined() const { return IsCathode0() || IsCathode1(); }
      69             :   
      70             :   /// Whether we are representing non bending plane
      71           0 :   Bool_t IsNonBendingPlane() const { return TestBit(kIsNonBendingPlane); }
      72             :   
      73             :   /// Whether we are defined by plane
      74           0 :   Bool_t IsPlaneDefined() const { return IsBendingPlane() || IsNonBendingPlane(); }
      75             :   
      76             :   /// Whether we are valid
      77           0 :   Bool_t IsValid() const { return TestBit(kIsValid); }
      78             :   
      79             :   void Invert();
      80             :   
      81             : 
      82             :   /// Whether the painter is to be represented from front (as seen from IP)
      83           0 :   Bool_t IsFrontView() const { return TestBit(kIsFrontView); }
      84             :   
      85             :   /// Whether the painter is to be represented from back (as seen from IP)
      86           0 :   Bool_t IsBackView() const { return TestBit(kIsBackView); }
      87             :   
      88             : 
      89             :   /// Whether we represent attributes of a single painter (if false, means it's a painter group)
      90           0 :   Bool_t IsSinglePainter() const { return TestBit(kIsSinglePainter); }
      91             :   
      92             : 
      93             :   void Print(Option_t* opt="") const;
      94             :   
      95             :     void SetCathode(Bool_t cath0, Bool_t cath1);
      96             : 
      97             :     void SetPlane(Bool_t bending, Bool_t nonBending);
      98             : 
      99             :     void SetSingle(Bool_t value);
     100             : 
     101             :      void SetViewPoint(Bool_t front, Bool_t back);
     102             : 
     103             :      void SetCathodeAndPlaneMutuallyExclusive(Bool_t value);
     104             : 
     105             :      void SetValid(Bool_t value);
     106             : 
     107             :       void SetCathodeAndPlaneDisabled(Bool_t value);
     108             : 
     109             : private:
     110             :   void SetName();
     111             : 
     112             : private:
     113             :   TString fName; ///< name of the attributes
     114             : 
     115          12 :   ClassDef(AliMUONAttPainter,2) // Basic attributes of painters
     116             : };
     117             : 
     118             : #endif

Generated by: LCOV version 1.11