ATLAS Offline Software
DiskListSRM.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_SRM_H
6 #define SAMPLE_HANDLER__DISK_LIST_SRM_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 DiskListSRM : public DiskList
26  {
27  //
28  // public interface
29  //
30 
35  public:
36  void testInvariant () const;
37 
38 
46  public:
47  DiskListSRM (const std::string& val_dir);
48 
49 
64  public:
65  DiskListSRM (const std::string& val_dir, const std::string& val_prefix);
66 
67 
68 
69  //
70  // inherited interface
71  //
72 
74  protected:
75  virtual bool getNext ();
76 
77 
79  protected:
80  virtual std::string getPath () const;
81 
82 
84  protected:
85  virtual DiskList *doOpenDir () const;
86 
87 
89  protected:
90  virtual std::string getDirname () const;
91 
92 
93 
94  //
95  // private interface
96  //
97 
99  private:
100  std::string m_dir;
101 
103  private:
104  std::string m_prefix;
105 
107  private:
108  std::string m_list;
109 
111  private:
112  std::string m_file;
113 
115  private:
116  bool m_isDir;
117  };
118 }
119 
120 #endif
SH::DiskListSRM::m_dir
std::string m_dir
the directory we are reading
Definition: DiskListSRM.h:100
SH::DiskListSRM::getPath
virtual std::string getPath() const
the path for the current entry.
Definition: DiskListSRM.cxx:100
SH::DiskListSRM::m_list
std::string m_list
the result of the directory listing
Definition: DiskListSRM.h:108
SH::DiskListSRM::getDirname
virtual std::string getDirname() const
the base path for the directory listed
Definition: DiskListSRM.cxx:122
SH::DiskListSRM::m_isDir
bool m_isDir
whether this is a directory
Definition: DiskListSRM.h:116
SH::DiskListSRM::m_file
std::string m_file
the last file we read
Definition: DiskListSRM.h:112
SH::DiskList
an interface for listing directory contents, locally or on a file server
Definition: DiskList.h:32
DiskList.h
SH::DiskListSRM::doOpenDir
virtual DiskList * doOpenDir() const
make a new list object for the sub-directory
Definition: DiskListSRM.cxx:109
SH::DiskListSRM::m_prefix
std::string m_prefix
the directory from with to read actual files
Definition: DiskListSRM.h:104
SH::DiskListSRM::getNext
virtual bool getNext()
get the next list entry
Definition: DiskListSRM.cxx:57
SH
This module provides a lot of global definitions, forward declarations and includes that are used by ...
Definition: PrunDriver.h:15
Global.h
SH::DiskListSRM
a DiskList implementation for the SRM protocol
Definition: DiskListSRM.h:26
SH::DiskListSRM::DiskListSRM
DiskListSRM(const std::string &val_dir)
make the listing for the given directory
Definition: DiskListSRM.cxx:39
SH::DiskListSRM::testInvariant
void testInvariant() const
test the invariant of this object
Definition: DiskListSRM.cxx:32