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

          Line data    Source code
       1             : /* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
       2             :  * See cxx source for full Copyright notice                               */
       3             : 
       4             : // $Id$
       5             : 
       6             : /// \ingroup core
       7             : /// \class AliMpStringObjMap
       8             : /// \brief Substitutes map <string, TObject> which ALICE does not allow to use 
       9             : ///
      10             : /// The map is not optimised for large data size
      11             : ///
      12             : /// \author Ivana Hrivnacova, IPN Orsay
      13             : 
      14             : #ifndef ALI_MP_STRING_OBJ_MAP_H
      15             : #define ALI_MP_STRING_OBJ_MAP_H
      16             : 
      17             : #include <TObject.h>
      18             : #include <TObjArray.h>
      19             : #include <TArrayI.h>
      20             : 
      21             : using std::ofstream;
      22             : 
      23             : class AliMpStringObjMap : public TObject
      24             : {
      25             :   public:
      26             :     AliMpStringObjMap(Bool_t isOwner = false);
      27             :     virtual ~AliMpStringObjMap();
      28             :     
      29             :     // methods
      30             :     Bool_t    Add(const TString& first, TObject* second);
      31             :     TObject*  Get(const TString& first) const;
      32             :     Int_t     GetNofItems() const;
      33             :     virtual void Clear(Option_t* /*option*/ ="");
      34             :     virtual void Print(const char* /*option*/ = "") const;
      35             :     void Print(const TString& key, ofstream& out) const;
      36             :     
      37             :     // iterating over elements
      38             :     void  First();
      39             :     void  Next();
      40             :     TObject*  CurrentItem();
      41             :     TString   CurrentKey();
      42             :     Bool_t  IsDone() const;
      43             :     
      44             :   private:
      45             :     /// Not implemented
      46             :     AliMpStringObjMap(const AliMpStringObjMap& rhs);
      47             :     /// Not implemented
      48             :     AliMpStringObjMap& operator = (const AliMpStringObjMap& rhs);
      49             :     
      50             :     // static methods
      51             :     static const TString& GetUndefinedKey(); 
      52             : 
      53             :     // data members
      54             :     Int_t      fNofItems;     ///<  number of items
      55             :     TObjArray  fFirstArray;   ///<  first item array
      56             :     TObjArray  fSecondArray;  ///<  second item array
      57             :     Int_t      fCurrentIndex; ///<  current item index (for iteration)
      58             :  
      59          18 :   ClassDef(AliMpStringObjMap,1)  // motif map
      60             : };    
      61             : 
      62             : #endif //ALI_MP_STRING_OBJ_MAP_H

Generated by: LCOV version 1.11