ROOT logo
// @(#)root/proofplayer:$Id: TStatus.h 20882 2007-11-19 11:31:26Z rdm $
// Author: Maarten Ballintijn   12/03/2004

/*************************************************************************
 * Copyright (C) 1995-2000, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TStatus
#define ROOT_TStatus

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TStatus                                                              //
//                                                                      //
// This class holds the status of a ongoing operation and collects      //
// error messages. It provides a Merge() operation allowing it to       //
// be used in PROOF to monitor status in the slaves.                    //
// No messages indicates success.                                       //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#ifndef ROOT_TNamed
#include "TNamed.h"
#endif

#include <set>
#include <string>
#ifdef R__GLOBALSTL
namespace std { using ::set; using ::string; }
#endif


class TCollection;

class TStatus : public TNamed {

private:
   typedef std::set<std::string>                 MsgSet_t;
   typedef std::set<std::string>::const_iterator MsgIter_t;
   MsgSet_t    fMsgs;   // list of error messages
   MsgIter_t   fIter;   //!iterator in messages

public:
   TStatus();
   virtual ~TStatus() { }

   Bool_t         IsOk() const { return fMsgs.empty(); }
   void           Add(const char *mesg);
   virtual Int_t  Merge(TCollection *list);
   virtual void   Print(Option_t *option="") const;
   void           Reset();
   const char    *NextMesg();

   ClassDef(TStatus,1);  // Status class
};

#endif
 TStatus.h:1
 TStatus.h:2
 TStatus.h:3
 TStatus.h:4
 TStatus.h:5
 TStatus.h:6
 TStatus.h:7
 TStatus.h:8
 TStatus.h:9
 TStatus.h:10
 TStatus.h:11
 TStatus.h:12
 TStatus.h:13
 TStatus.h:14
 TStatus.h:15
 TStatus.h:16
 TStatus.h:17
 TStatus.h:18
 TStatus.h:19
 TStatus.h:20
 TStatus.h:21
 TStatus.h:22
 TStatus.h:23
 TStatus.h:24
 TStatus.h:25
 TStatus.h:26
 TStatus.h:27
 TStatus.h:28
 TStatus.h:29
 TStatus.h:30
 TStatus.h:31
 TStatus.h:32
 TStatus.h:33
 TStatus.h:34
 TStatus.h:35
 TStatus.h:36
 TStatus.h:37
 TStatus.h:38
 TStatus.h:39
 TStatus.h:40
 TStatus.h:41
 TStatus.h:42
 TStatus.h:43
 TStatus.h:44
 TStatus.h:45
 TStatus.h:46
 TStatus.h:47
 TStatus.h:48
 TStatus.h:49
 TStatus.h:50
 TStatus.h:51
 TStatus.h:52
 TStatus.h:53
 TStatus.h:54
 TStatus.h:55
 TStatus.h:56
 TStatus.h:57
 TStatus.h:58
 TStatus.h:59
 TStatus.h:60
 TStatus.h:61