Back to home page

EIC code displayed by LXR

 
 

    


Warning, file /include/root/TGRedirectOutputGuard.h was not indexed or was modified since last indexation (in which case cross-reference links may be missing, inaccurate or erroneous).

0001 // @(#)root/gui:$Id$
0002 // Author: G. Ganis   10/10/2005
0003 
0004 /*************************************************************************
0005  * Copyright (C) 1995-2021, Rene Brun and Fons Rademakers.               *
0006  * All rights reserved.                                                  *
0007  *                                                                       *
0008  * For the licensing terms see $ROOTSYS/LICENSE.                         *
0009  * For the list of contributors see $ROOTSYS/README/CREDITS.             *
0010  *************************************************************************/
0011 
0012 #ifndef ROOT_TGRedirectOutputGuard
0013 #define ROOT_TGRedirectOutputGuard
0014 
0015 
0016 #include "TString.h"
0017 
0018 class TGTextView;
0019 
0020 class TGRedirectOutputGuard {
0021 
0022 private:
0023    TString      fLogFile;
0024    Bool_t       fTmpFile;
0025    TGTextView  *fTextView;
0026    FILE        *fLogFileRead;
0027 
0028 private:
0029    TGRedirectOutputGuard(const TGRedirectOutputGuard&) = delete;
0030    TGRedirectOutputGuard &operator=(const TGRedirectOutputGuard&) = delete;
0031 
0032 public:
0033    TGRedirectOutputGuard(TGTextView *tv,
0034                          const char *flog = nullptr, const char *mode = "a");
0035    virtual ~TGRedirectOutputGuard();
0036 
0037    void Update(); // Update window with file content
0038 
0039    ClassDef(TGRedirectOutputGuard,0)  // Exception safe output redirection
0040 };
0041 
0042 #endif