]> git.uio.no Git - u/mrichter/AliRoot.git/blob - SHUTTLE/AliShuttleStatus.h
Formatting changes.
[u/mrichter/AliRoot.git] / SHUTTLE / AliShuttleStatus.h
1 #ifndef ALISHUTTLESTATUS_H
2 #define ALISHUTTLESTATUS_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 //
10 // This class stores the status of the Shuttle processing for a given run and a given detector
11 //
12
13 #include <TObject.h>
14
15 class AliShuttleStatus : public TObject
16 {
17 public:
18   enum Status {
19     kInvalid = 0,
20     kStarted,
21     kDCSStarted,
22     kDCSError,
23     kPPStarted,
24     kPPError,
25     kDone, // final
26     kFailed,  // final
27     kStoreFailed 
28   };
29
30   AliShuttleStatus();
31   AliShuttleStatus(const AliShuttleStatus& c);
32
33   ~AliShuttleStatus();
34
35   AliShuttleStatus& operator=(const AliShuttleStatus& c);
36   virtual void Copy(TObject& c) const;
37
38   AliShuttleStatus(Status status);
39
40   UInt_t GetTimeStamp() const { return fTimeStamp; }
41   void SetTimeStamp(UInt_t timeStamp) { fTimeStamp = timeStamp; }
42
43   Status GetStatus() const { return fStatus; }
44   const char* GetStatusName() const { return GetStatusName(fStatus); }
45   void SetStatus(Status status);
46
47   Int_t GetCount() const { return fCount; }
48   void SetCount(Int_t count) { fCount = count; }
49   void IncreaseCount() { fCount++; }
50
51   static const char* GetStatusName(Status status);
52
53 protected:
54   UInt_t fTimeStamp;    // timestamp of the last change
55   Status fStatus;       // status of the processing
56   Int_t fCount;         // number of retries
57
58   ClassDef(AliShuttleStatus, 1);
59 };
60
61 #endif