1 /**************************************************************************
2 * Copyright(c) 1998-1999, ALICE Experiment at CERN, All rights reserved. *
4 * Author: The ALICE Off-line Project. *
5 * Contributors are mentioned in the code where appropriate. *
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 **************************************************************************/
18 Revision 1.4 2006/10/02 16:38:39 jgrosseo
21 storing of objects that failed to be stored to the grid before
22 interfacing of shuttle status table in daq system
24 Revision 1.3 2006/08/29 09:16:05 jgrosseo
27 Revision 1.2 2006/08/15 10:50:00 jgrosseo
28 effc++ corrections (alberto)
30 Revision 1.1 2006/07/20 13:20:13 jgrosseo
31 introducing status management: The processing per subdetector is divided into several steps,
32 after each step the status is stored on disk. If the system crashes in any of the steps the Shuttle
33 can keep track of the number of failures and skips further processing after a certain threshold is
34 exceeded. These thresholds can be configured in LDAP.
39 // This class stores the status of the Shuttle processing for a given run and a given detector
41 // This class stores the status of the processing, the number of retries and the timestamp of the last action
42 // The detector and run number are stored using the CDB framework
46 #include "AliShuttleStatus.h"
48 ClassImp(AliShuttleStatus)
50 //______________________________________________________________________________________________
51 AliShuttleStatus::AliShuttleStatus() : TObject(),
56 // default constructor
59 //______________________________________________________________________________________________
60 AliShuttleStatus::AliShuttleStatus(Status status) : TObject(),
70 //______________________________________________________________________________________________
71 AliShuttleStatus::AliShuttleStatus(const AliShuttleStatus& c) :
72 TObject(c), fTimeStamp(0),
78 ((AliShuttleStatus &)c).Copy(*this);
81 //______________________________________________________________________________________________
82 AliShuttleStatus::~AliShuttleStatus()
87 //______________________________________________________________________________________________
88 AliShuttleStatus &AliShuttleStatus::operator=(const AliShuttleStatus &c)
93 ((AliShuttleStatus &) c).Copy(*this);
98 //______________________________________________________________________________________________
99 void AliShuttleStatus::Copy(TObject& c) const
103 AliShuttleStatus& target = (AliShuttleStatus &) c;
105 target.fTimeStamp = fTimeStamp;
106 target.fStatus = fStatus;
107 target.fCount = fCount;
110 //______________________________________________________________________________________________
111 void AliShuttleStatus::SetStatus(Status status)
113 // sets a new status, add the same time the timestamp is set to now
116 fTimeStamp = time(0);
119 //______________________________________________________________________________________________
120 const char* AliShuttleStatus::GetStatusName(Status status)
122 // returns a name (string) of the status
126 case kInvalid: return "Invalid";
127 case kStarted: return "Started";
128 case kDCSStarted: return "DCSStarted";
129 case kDCSError: return "DCSError";
130 case kPPStarted: return "PPStarted";
131 case kPPTimeOut: return "PPTimeOut";
132 case kPPOutOfMemory: return "PPOutOfMemory";
133 case kPPError: return "PPError";
134 case kPPDone: return "PPDone";
135 case kStoreStarted: return "StoreStarted";
136 case kStoreError: return "StoreError";
137 case kDone: return "Done";
138 case kFailed: return "Failed";
139 case kStoreDelayed: return "StoreDelayed";
140 case kFXSError: return "FXSError";
141 case kSkipped: return "Skipped";
142 case kOCDBError: return "OCDBError";