LCOV - code coverage report
Current view: top level - MUON/MUONmapping - AliMpSegmentation.h (source / functions) Hit Total Coverage
Test: coverage.info Lines: 1 1 100.0 %
Date: 2016-06-14 17:26:59 Functions: 2 5 40.0 %

          Line data    Source code
       1             : #ifndef ALI_MP_SEGMENTATION_H
       2             : #define ALI_MP_SEGMENTATION_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             : // $MpId: AliMpSegmentation.h,v 1.7 2006/05/24 13:58:16 ivana Exp $ 
       9             : 
      10             : /// \ingroup management
      11             : /// \class AliMpSegmentation
      12             : /// \brief Singleton container class for mapping segmentations
      13             : ///
      14             : /// It provides access to mapping segmentations based on the
      15             : /// AliMpVSegmentation interface and to segmentations underlying
      16             : /// detectors (sector, slat, trigger).                                  \n
      17             : /// Mapping segmentations for all detection elements
      18             : /// are created at the first call to AliMpSegmentation::Instance().
      19             : /// The class is a singleton, it has all constructors
      20             : /// private, except for the special constructor for Root I/O.
      21             : ///
      22             : /// \author Ivana Hrivnacova, IPN Orsay; Laurent Aphecetche, SUBATECH
      23             : 
      24             : #ifndef ROOT_TObject
      25             : #  include <TObject.h>
      26             : #endif
      27             : 
      28             : #ifndef ALI_MP_STRING_OBJ_MAP_H
      29             : #  include "AliMpStringObjMap.h"
      30             : #endif
      31             : 
      32             : #ifndef ALI_MP_EX_MAP_H
      33             : #  include "AliMpExMap.h"
      34             : #endif
      35             : 
      36             : #ifndef ALI_MP_CATHOD_TYPE_H
      37             : #  include "AliMpCathodType.h"
      38             : #endif
      39             : 
      40             : class AliMpDEStore;
      41             : class AliMpSegmentation;
      42             : class AliMpVSegmentation;
      43             : class AliMpSlatMotifMap;
      44             : class AliMpDataStreams;
      45             : class AliMpSector;
      46             : class AliMpSlat;
      47             : class AliMpTrigger;
      48             : class TRootIOCtor;
      49             : 
      50             : using std::ofstream;
      51             : 
      52             : class AliMpSegmentation : public  TObject {
      53             : 
      54             :   public:
      55             :     AliMpSegmentation(TRootIOCtor* ioCtor);
      56             :     virtual ~AliMpSegmentation();
      57             :     
      58             :     // static methods
      59             :     static AliMpSegmentation* Instance(Bool_t warn = true);
      60             :     static AliMpSegmentation* ReadData(const AliMpDataStreams& dataStreams, 
      61             :                                        Bool_t warn = true);
      62             : 
      63             :     // methods
      64             :     
      65             :     //
      66             :     // Access to segmentations
      67             :     //
      68             :     
      69             :     const AliMpVSegmentation* GetMpSegmentation(
      70             :                                  Int_t detElemId, AliMp::CathodType cath, 
      71             :                                  Bool_t warn = true) const;
      72             : 
      73             :     const AliMpVSegmentation* GetMpSegmentationByElectronics(
      74             :                                  Int_t detElemId, Int_t elCardID, 
      75             :                                  Bool_t warn = true) const;
      76             :     //
      77             :     // Access to sectors, slats, triggers
      78             :     //
      79             : 
      80             :     const AliMpSector*  GetSector(const AliMpVSegmentation* kSegmentation, 
      81             :                                   Bool_t warn = true) const;
      82             :     const AliMpSector*  GetSector(Int_t detElemId, AliMp::CathodType cath, 
      83             :                                   Bool_t warn = true) const;
      84             :     const AliMpSector*  GetSectorByElectronics(Int_t detElemId, Int_t elCardID, 
      85             :                                   Bool_t warn = true) const;
      86             :   
      87             :     const AliMpSlat*    GetSlat(const AliMpVSegmentation* kSegmentation, 
      88             :                                   Bool_t warn = true) const;
      89             :     const AliMpSlat*    GetSlat(Int_t detElemId, AliMp::CathodType cath, 
      90             :                                   Bool_t warn = true) const;
      91             :     const AliMpSlat*    GetSlatByElectronics(Int_t detElemId, Int_t elCardID, 
      92             :                                   Bool_t warn = true) const;
      93             :   
      94             :     const AliMpTrigger* GetTrigger(const AliMpVSegmentation* kSegmentation, 
      95             :                                   Bool_t warn = true) const;
      96             :     const AliMpTrigger* GetTrigger(Int_t detElemId, AliMp::CathodType cath, 
      97             :                                   Bool_t warn = true) const;
      98             :     const AliMpTrigger* GetTriggerByElectronics(Int_t detElemId, Int_t elCardID, 
      99             :                                   Bool_t warn = true) const;
     100             :   
     101             :   private:
     102             :     AliMpSegmentation(const AliMpDataStreams& dataStreams);
     103             :     /// Not implemented
     104             :     AliMpSegmentation(const AliMpSegmentation& rhs);
     105             :     /// Not implemented
     106             :     AliMpSegmentation& operator=(const AliMpSegmentation& rhs);
     107             : 
     108             :     AliMpVSegmentation* CreateMpSegmentation(
     109             :                               const AliMpDataStreams& dataStreams,
     110             :                               Int_t detElemId, AliMp::CathodType cath);
     111             :                               
     112             : 
     113             :     AliMpExMap* FillElCardsMap(Int_t detElemId);
     114             : 
     115             :     // static data members
     116             :     static AliMpSegmentation* fgInstance; ///< Singleton instance
     117             : 
     118             :     // data members
     119             :     AliMpDEStore*      fDetElements;    ///< Detection element store
     120             :     AliMpStringObjMap  fMpSegmentations;///< Map of mapping segmentations to DE seg names
     121             :     AliMpExMap         fElCardsMap;     ///< Map of el. cards IDs to segmentations
     122             :     AliMpSlatMotifMap* fSlatMotifMap;   ///< Map of motif, motifTypes to avoid duplications and allow proper deletion
     123             :     
     124        2080 :   ClassDef(AliMpSegmentation,3)  // The factory for building mapping segmentations
     125             : };
     126             : 
     127             : #endif //ALI_MP_SEGMENTATION_H
     128             : 
     129             : 
     130             : 
     131             : 
     132             : 
     133             : 
     134             : 
     135             : 
     136             : 
     137             : 
     138             : 
     139             : 
     140             : 
     141             : 
     142             : 

Generated by: LCOV version 1.11