]> git.uio.no Git - u/mrichter/AliRoot.git/blame - MUON/AliMUONCheckItemIterator.cxx
Add comments for Doxygen
[u/mrichter/AliRoot.git] / MUON / AliMUONCheckItemIterator.cxx
CommitLineData
ea199e33 1/**************************************************************************
2* Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
3* *
4* Author: The ALICE Off-line Project. *
5* Contributors are mentioned in the code where appropriate. *
6* *
7* Permission to use, copy, modify and distribute this software and its *
8* documentation strictly for non-commercial purposes is hereby granted *
9* without fee, provided that the above copyright notice appears in all *
10* copies and that both the copyright notice and this permission notice *
11* appear in the supporting documentation. The authors make no claims *
12* about the suitability of this software for any purpose. It is *
13* provided "as is" without express or implied warranty. *
14**************************************************************************/
15
16// $Id$
17
18#include "AliMUONCheckItemIterator.h"
19#include "TExMap.h"
20#include "AliMpExMap.h"
21#include "AliMUONCheckItem.h"
22
23/// \class AliMUONCheckItemIterator
24///
25/// Iterator on AliMUONCheckItem objects
26///
27///
28/// \author Laurent Aphecetche
29
30/// \cond CLASSIMP
31ClassImp(AliMUONCheckItemIterator)
32/// \endcond
33
34//_____________________________________________________________________________
35AliMUONCheckItemIterator::AliMUONCheckItemIterator() : TObject(), fIter(0x0)
36{
37 /// default ctor
38}
39
40//_____________________________________________________________________________
41AliMUONCheckItemIterator::AliMUONCheckItemIterator(const AliMUONCheckItem& item)
42: TObject(),
43fIter(0x0)
44{
45 /// ctor
46 AliMpExMap* m = item.fMissing;
47 fIter = new TExMapIter(m->GetIterator());
48}
49
50//_____________________________________________________________________________
51AliMUONCheckItemIterator::~AliMUONCheckItemIterator()
52{
53 /// dtor
54 delete fIter;
55}
56
57//_____________________________________________________________________________
58void
59AliMUONCheckItemIterator::First()
60{
61 /// Rewind the iterator
62 if ( fIter) fIter->Reset();
63}
64
65//_____________________________________________________________________________
66TObject*
67AliMUONCheckItemIterator::Next()
68{
69 /// Advance one object. Return 0 if ended.
70 if (!fIter) return 0x0;
71 Long_t key, value;
72 Bool_t ok = fIter->Next(key,value);
73 if (ok)
74 {
75 return reinterpret_cast<TObject*>(value);
76 }
77 else
78 {
79 return 0x0;
80 }
81}