/*
$Log$
+Revision 1.4 2006/10/02 16:38:39 jgrosseo
+update (alberto):
+fixed memory leaks
+storing of objects that failed to be stored to the grid before
+interfacing of shuttle status table in daq system
+
+Revision 1.3 2006/08/29 09:16:05 jgrosseo
+small update
+
+Revision 1.2 2006/08/15 10:50:00 jgrosseo
+effc++ corrections (alberto)
+
+Revision 1.1 2006/07/20 13:20:13 jgrosseo
+introducing status management: The processing per subdetector is divided into several steps,
+after each step the status is stored on disk. If the system crashes in any of the steps the Shuttle
+can keep track of the number of failures and skips further processing after a certain threshold is
+exceeded. These thresholds can be configured in LDAP.
+
*/
//
ClassImp(AliShuttleStatus)
+//______________________________________________________________________________________________
AliShuttleStatus::AliShuttleStatus() : TObject(),
fTimeStamp(0),
fStatus(kInvalid),
// default constructor
}
+//______________________________________________________________________________________________
AliShuttleStatus::AliShuttleStatus(Status status) : TObject(),
fTimeStamp(0),
fStatus(status),
fTimeStamp = time(0);
}
-AliShuttleStatus::AliShuttleStatus(const AliShuttleStatus& c) : TObject(c)
+//______________________________________________________________________________________________
+AliShuttleStatus::AliShuttleStatus(const AliShuttleStatus& c) :
+TObject(c), fTimeStamp(0),
+fStatus(kInvalid),
+fCount(1)
{
// copy constructor
((AliShuttleStatus &)c).Copy(*this);
}
+//______________________________________________________________________________________________
AliShuttleStatus::~AliShuttleStatus()
{
// destructor
}
+//______________________________________________________________________________________________
AliShuttleStatus &AliShuttleStatus::operator=(const AliShuttleStatus &c)
{
// assigment operator
return *this;
}
+//______________________________________________________________________________________________
void AliShuttleStatus::Copy(TObject& c) const
{
// copy function
target.fCount = fCount;
}
+//______________________________________________________________________________________________
void AliShuttleStatus::SetStatus(Status status)
{
// sets a new status, add the same time the timestamp is set to now
fTimeStamp = time(0);
}
+//______________________________________________________________________________________________
const char* AliShuttleStatus::GetStatusName(Status status)
{
// returns a name (string) of the status
case kDCSStarted: return "DCSStarted";
case kDCSError: return "DCSError";
case kPPStarted: return "PPStarted";
+ case kPPTimeOut: return "PPTimeOut";
+ case kPPOutOfMemory: return "PPOutOfMemory";
case kPPError: return "PPError";
case kPPDone: return "PPDone";
+ case kStoreStarted: return "StoreStarted";
+ case kStoreError: return "StoreError";
case kDone: return "Done";
case kFailed: return "Failed";
+ case kStoreDelayed: return "StoreDelayed";
+ case kFXSError: return "FXSError";
+ case kSkipped: return "Skipped";
+ case kOCDBError: return "OCDBError";
}
return 0;