LCOV - code coverage report
Current view: top level - HMPID/HMPIDbase - AliHMPID.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 12 17 70.6 %
Date: 2016-06-14 17:26:59 Functions: 11 19 57.9 %

          Line data    Source code
       1             : #ifndef AliHMPID_h
       2             : #define AliHMPID_h
       3             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       4             :  * See cxx source for full Copyright notice                               */
       5             : 
       6             : #include <AliDetector.h>  //base class
       7             : #include <TClonesArray.h> //XxxCreate() 
       8             : #include <TObjArray.h>    //fDig,fClu field
       9             : 
      10             : //.
      11             : //HMPID base class
      12             : //.
      13             : 
      14             : class AliHMPID : public AliDetector //TObject-TNamed-AliModule-AliDetector-AliHMPID
      15             : {
      16             : public:
      17             : //ctor & dtor    
      18             :             AliHMPID(const char *nm,const char *ttl);                                                           //named ctor
      19          24 :             AliHMPID(                              ):AliDetector(    ),fDoFeed(kTRUE),fSdi(0),fDig(0),fClu(0) {}  //default ctor          
      20             :   virtual  ~AliHMPID();                                            
      21             : //framework part  
      22             :   virtual void  CreateMaterials (                )=0;          //from AliModule invoked from AliMC::ConstructGeometry() to define detector materials
      23             :   virtual void  CreateGeometry  (                )=0;          //from AliModule invoked from AliMC::ConstructGeometry() to build detector for simulation
      24             : 
      25             :   virtual Int_t IsVersion       (                )const=0;     //from AliModule not used        
      26             :   virtual void  Init            (                )=0;          //from AliModule invoked from AliMC::InitGeometry() after CreateGeometry() to do VolID initialization
      27           0 :   virtual void  DefineOpticalProperties() {}                   //from AliModule invoked from AliMC::ConstructOpGeometry() to set Cerenkov properties
      28             :           void  MakeBranch      (Option_t *opt="");            //from AliModule invokde from AliRun::Tree2Tree() to make requested HMPID branch
      29             :           void  SetTreeAddress  (                );            //from AliModule invoked from AliRun::GetEvent(), AliLoader::SetTAddrInDet()
      30             :   virtual void  StepManager     (                )=0;          //from AliModule invoked from AliMC
      31             : //private part +++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++ 
      32         102 :   void          HitCreate(         )     {if(fHits)return; fHits=new TClonesArray("AliHMPIDHit"); fNhits=0;     }//create hits list
      33             :               
      34       10696 :   TClonesArray* SdiLst   (         )const{return fSdi;                                                          }//get sdigits list 
      35          75 :   void          SdiCreate(         )     {if(fSdi)return; fSdi=new TClonesArray("AliHMPIDDigit");               }//create sdigits list
      36          32 :   void          SdiReset (         )     {if(fSdi)  fSdi ->Clear();                                             }//clean sdigits list
      37             :          
      38          16 :   TObjArray*    DigLst   (         )const{return fDig;                                                          }//get digits list for all chambers
      39           0 :   TClonesArray* DigLst   (Int_t c  )const{return fDig ? (TClonesArray *)fDig->At(c):0;                          }//get digits list for chamber
      40             :   void          DigCreate(         )     {
      41          46 :     if (fDig) return; //PH do not recreate existing containers
      42         119 :     fDig=new TObjArray(7);for(Int_t i=0;i<7;i++)fDig->AddAt(new TClonesArray("AliHMPIDDigit"),i);               }//create digits list
      43          80 :   void          DigReset (         )     {if(fDig)for(int i=0;i<7;i++)fDig->At(i)->Clear();                     }//clean digits list 
      44             :           
      45           0 :   TObjArray*    CluLst   (         )const{return fClu;                                                          }//get clusters list for all chambers
      46           0 :   TClonesArray* CluLst   (Int_t c  )const{return fClu ? (TClonesArray *)fClu->At(c):0;                          }//get clusters list for chamber
      47             :   void          CluCreate(         )     {
      48          24 :     if (fClu) return; //PH do not recreate existing containers
      49          36 :     fClu=new TObjArray(7); for(Int_t i=0;i<7;i++)fClu->AddAt(new TClonesArray("AliHMPIDCluster"),i);            }//create clusters list
      50           0 :          void   CluReset (         )     {if(fClu)for(int i=0;i<7;i++)fClu->At(i)->Clear();                     }//clean clusters list
      51             : protected:  
      52             :   Bool_t                fDoFeed;                  //! Flag to switch on/off Feedback photon creation
      53             :   TClonesArray         *fSdi;                     //! list of sdigits  
      54             :   TObjArray            *fDig;                     //! each chamber holds it's one list of digits
      55             :   TObjArray            *fClu;                     //! each chamber holds it's one list of clusters 
      56             :   
      57             : private:
      58             :   AliHMPID(const AliHMPID &rich           );
      59             :   AliHMPID&  operator=(const AliHMPID&);
      60             : 
      61          80 :   ClassDef(AliHMPID,11)                            //Main HMPID class 
      62             : };//class AliHMPID  
      63             : 
      64             : //++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
      65             : #endif

Generated by: LCOV version 1.11