]> git.uio.no Git - u/mrichter/AliRoot.git/blob - MUON/AliMUONStopwatchGroupElement.h
Managed the 234 local boards inside the class & simplified the code
[u/mrichter/AliRoot.git] / MUON / AliMUONStopwatchGroupElement.h
1 #ifndef ALIMUONSTOPWATCHGROUPELEMENT_H
2 #define ALIMUONSTOPWATCHGROUPELEMENT_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 base
10 /// \class AliMUONStopwatchGroupElement
11 /// \brief A class to group timers by name
12 /// 
13 // Author Laurent Aphecetche
14
15 #ifndef ALIMUONSTOPWATCHGROUP_H
16 #  include "AliMUONStopwatchGroup.h"
17 #endif
18
19 #ifndef ROOT_TString
20 #  include "TString.h"
21 #endif
22
23 class AliMUONStopwatchGroupElement
24 {
25 public:
26   AliMUONStopwatchGroupElement(AliMUONStopwatchGroup* group, const char* a, const char *b)
27   : fGroup(group), fA(a), fB(b)
28   { group->Start(a,b); }
29   AliMUONStopwatchGroupElement(const AliMUONStopwatchGroupElement& rhs) : fGroup(0),fA(),fB()
30   { fGroup = rhs.fGroup; fA = rhs.fA; fB=rhs.fB ; }
31   AliMUONStopwatchGroupElement& operator=(const AliMUONStopwatchGroupElement& rhs)
32   { if ( this != &rhs ) { fGroup = rhs.fGroup; fA = rhs.fA; fB=rhs.fB ; } return *this; }
33   
34   ~AliMUONStopwatchGroupElement()
35   { fGroup->Stop(fA.Data(),fB.Data()); }
36   
37 private:
38   AliMUONStopwatchGroup* fGroup; // the group for which we're just a proxy
39   TString fA; // first parameter
40   TString fB; // second parameter
41 };
42
43 #endif