xrootd
Loading...
Searching...
No Matches
XrdPfcPrint.hh
Go to the documentation of this file.
1#ifndef __XRDFILECACHE_PRINT_HH__
2#define __XRDFILECACHE_PRINT_HH__
3//----------------------------------------------------------------------------------
4// Copyright (c) 2014 by Board of Trustees of the Leland Stanford, Jr., University
5// Author: Alja Mrak-Tadel
6//----------------------------------------------------------------------------------
7// XRootD is free software: you can redistribute it and/or modify
8// it under the terms of the GNU Lesser General Public License as published by
9// the Free Software Foundation, either version 3 of the License, or
10// (at your option) any later version.
11//
12// XRootD is distributed in the hope that it will be useful,
13// but WITHOUT ANY WARRANTY; without even the implied warranty of
14// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
15// GNU General Public License for more details.
16//
17// You should have received a copy of the GNU Lesser General Public License
18// along with XRootD. If not, see <http://www.gnu.org/licenses/>.
19//----------------------------------------------------------------------------------
20
21#include "XrdOuc/XrdOucEnv.hh"
22
23class XrdOss;
24class XrdOssDF;
25
26namespace XrdPfc
27{
28class Print {
29public:
30 //------------------------------------------------------------------------
32 //------------------------------------------------------------------------
33 Print(XrdOss* oss, char u, bool v, bool j, int i, const char* path);
34
35private:
40 char m_unit[3];
41 bool m_verbose;
42 bool m_json;
44 const char* m_ossUser;
45
46 //---------------------------------------------------------------------
48 //---------------------------------------------------------------------
49 bool isInfoFile(const char* path);
50
51 //---------------------------------------------------------------------
53 //---------------------------------------------------------------------
54 void printFileJson(const std::string& path);
55
56 //---------------------------------------------------------------------
58 //---------------------------------------------------------------------
59 void printFile(const std::string& path);
60
61 //---------------------------------------------------------------------
63 //---------------------------------------------------------------------
64 void printDir(XrdOssDF* iOssDF, const std::string& path);
65};
66}
67
68#endif
Definition XrdOss.hh:63
Definition XrdOss.hh:498
Definition XrdOucEnv.hh:42
Definition XrdPfcPrint.hh:28
void printFile(const std::string &path)
Print information in meta-data file.
bool m_verbose
unit for regular printout (not JSON)
Definition XrdPfcPrint.hh:41
void printFileJson(const std::string &path)
Print information in meta-data file in json format.
XrdOss * m_oss
Definition XrdPfcPrint.hh:36
int m_indent
print in json format
Definition XrdPfcPrint.hh:43
bool m_json
print each block
Definition XrdPfcPrint.hh:42
XrdOucEnv m_env
file system
Definition XrdPfcPrint.hh:37
char m_unit[3]
width of byte-size fields
Definition XrdPfcPrint.hh:40
const char * m_ossUser
indent for json dump
Definition XrdPfcPrint.hh:44
bool isInfoFile(const char *path)
file system user
int m_unit_width
bitshift for byte-size fields
Definition XrdPfcPrint.hh:39
int m_unit_shift
env used by file system
Definition XrdPfcPrint.hh:38
void printDir(XrdOssDF *iOssDF, const std::string &path)
Print information in meta-data file recursivly.
Print(XrdOss *oss, char u, bool v, bool j, int i, const char *path)
Constructor.
Definition XrdPfc.hh:41