FairRoot
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
FairCaptureOutputNew.h
Go to the documentation of this file.
1 /********************************************************************************
2  * Copyright (C) 2014 GSI Helmholtzzentrum fuer Schwerionenforschung GmbH *
3  * *
4  * This software is distributed under the terms of the *
5  * GNU Lesser General Public Licence (LGPL) version 3, *
6  * copied verbatim in the file "LICENSE" *
7  ********************************************************************************/
8 #ifndef FAIRCAPTUREOUTPUTNEW_H_
9 #define FAIRCAPTUREOUTPUTNEW_H_
10 #pragma once
11 
12 #include <string>
13 #include <vector>
14 
16 {
17  public:
18  FairCaptureOutputNew(bool captureStdErr = false, bool captureStdOut = true);
20 
21  void BeginCapture();
22  void EndCapture();
23 
24  std::string GetCaptureLine(int line);
25  int GetNumberOfLines();
26 
27  private:
28  std::vector<std::string> fLineVector;
29 
30  bool fCaptureStdOut;
31  bool fCaptureStdErr;
32 
33  void Split();
34 };
35 #endif
std::string GetCaptureLine(int line)
FairCaptureOutputNew(bool captureStdErr=false, bool captureStdOut=true)