ATLAS Offline Software
DiskListXRD.h
Go to the documentation of this file.
1 /*
2  Copyright (C) 2002-2017 CERN for the benefit of the ATLAS collaboration
3 */
4 
5 #ifndef SAMPLE_HANDLER__DISK_LIST_XRD_H
6 #define SAMPLE_HANDLER__DISK_LIST_XRD_H
7 
8 //
9 // Distributed under the Boost Software License, Version 1.0.
10 // (See accompanying file LICENSE_1_0.txt or copy at
11 // http://www.boost.org/LICENSE_1_0.txt)
12 
13 // Please feel free to contact me (krumnack@iastate.edu) for bug
14 // reports, feature suggestions, praise and complaints.
15 
16 
17 
18 #include <SampleHandler/Global.h>
19 
20 #include <SampleHandler/DiskList.h>
21 
22 namespace SH
23 {
25  class DiskListXRD : public DiskList
26  {
27  //
28  // public interface
29  //
30 
35  public:
36  void testInvariant () const;
37 
38 
55  public:
56  DiskListXRD (const std::string& val_server, const std::string& val_dir,
57  bool val_laxParsing = false);
58 
59 
60 
61  //
62  // inherited interface
63  //
64 
66  protected:
67  virtual bool getNext ();
68 
69 
71  protected:
72  virtual std::string getPath () const;
73 
74 
76  protected:
77  virtual DiskList *doOpenDir () const;
78 
79 
81  protected:
82  virtual std::string getDirname () const;
83 
84 
85 
86  //
87  // private interface
88  //
89 
91  private:
92  std::string m_server;
93 
95  private:
96  std::string m_directory;
97 
99  private:
101 
103  private:
104  std::string m_context;
105 
107  private:
108  std::string m_list;
109 
111  private:
112  std::string m_file;
113 
115  private:
116  bool m_isDir;
117 
119  private:
120  bool m_isRead;
121  };
122 }
123 
124 #endif
SH::DiskListXRD::m_file
std::string m_file
the last file we read
Definition: DiskListXRD.h:112
SH::DiskListXRD::getNext
virtual bool getNext()
get the next list entry
Definition: DiskListXRD.cxx:54
SH::DiskListXRD::getPath
virtual std::string getPath() const
the path for the current entry.
Definition: DiskListXRD.cxx:105
SH::DiskListXRD::m_list
std::string m_list
the result of the directory listing
Definition: DiskListXRD.h:108
SH::DiskListXRD::m_isDir
bool m_isDir
whether this is a directory
Definition: DiskListXRD.h:116
SH::DiskListXRD::DiskListXRD
DiskListXRD(const std::string &val_server, const std::string &val_dir, bool val_laxParsing=false)
make the listing for the given directory, but replacing the directory with prefix for the path
Definition: DiskListXRD.cxx:43
SH::DiskListXRD::m_directory
std::string m_directory
the directory we are reading
Definition: DiskListXRD.h:96
SH::DiskListXRD::testInvariant
void testInvariant() const
test the invariant of this object
Definition: DiskListXRD.cxx:36
SH::DiskListXRD::doOpenDir
virtual DiskList * doOpenDir() const
make a new list object for the sub-directory
Definition: DiskListXRD.cxx:114
SH::DiskList
an interface for listing directory contents, locally or on a file server
Definition: DiskList.h:32
DiskList.h
SH::DiskListXRD::m_isRead
bool m_isRead
whether the directory has been read
Definition: DiskListXRD.h:120
SH::DiskListXRD::getDirname
virtual std::string getDirname() const
the base path for the directory listed
Definition: DiskListXRD.cxx:127
SH::DiskListXRD::m_server
std::string m_server
the server from which we are reading
Definition: DiskListXRD.h:92
SH::DiskListXRD::m_context
std::string m_context
the context (for error reporting)
Definition: DiskListXRD.h:104
SH::DiskListXRD::m_laxParser
bool m_laxParser
whether we employ lax parsing
Definition: DiskListXRD.h:100
SH
This module provides a lot of global definitions, forward declarations and includes that are used by ...
Definition: PrunDriver.h:15
SH::DiskListXRD
a DiskList implementation for the XRD protocol
Definition: DiskListXRD.h:26
Global.h