ATLAS Offline Software
DiskListLocal.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_LOCAL_H
6 #define SAMPLE_HANDLER__DISK_LIST_LOCAL_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 <string>
21 #include <SampleHandler/DiskList.h>
22 
23 namespace SH
24 {
26  class DiskListLocal : public DiskList
27  {
28  //
29  // public interface
30  //
31 
36  public:
37  void testInvariant () const;
38 
39 
47  public:
48  DiskListLocal (const std::string& val_dir);
49 
50 
65  public:
66  DiskListLocal (const std::string& val_dir, const std::string& val_prefix);
67 
68 
73  public:
74  virtual ~DiskListLocal ();
75 
76 
77 
78  //
79  // inherited interface
80  //
81 
83  protected:
84  virtual bool getNext ();
85 
86 
88  protected:
89  virtual std::string getPath () const;
90 
91 
93  protected:
94  virtual DiskList *doOpenDir () const;
95 
96 
98  protected:
99  virtual std::string getDirname () const;
100 
101 
102 
103  //
104  // private interface
105  //
106 
108  private:
109  std::string m_dir;
110 
112  private:
113  std::string m_prefix;
114 
116  private:
117  void *m_dirp;
118 
120  private:
121  std::string m_file;
122  };
123 }
124 
125 #endif
SH::DiskListLocal::m_dirp
void * m_dirp
the directory pointer used
Definition: DiskListLocal.h:117
SH::DiskListLocal::m_file
std::string m_file
the file we last fetched
Definition: DiskListLocal.h:121
SH::DiskListLocal::m_prefix
std::string m_prefix
the directory from with to read actual files
Definition: DiskListLocal.h:113
SH::DiskListLocal::doOpenDir
virtual DiskList * doOpenDir() const
make a new list object for the sub-directory
Definition: DiskListLocal.cxx:110
SH::DiskListLocal::testInvariant
void testInvariant() const
test the invariant of this object
Definition: DiskListLocal.cxx:32
SH::DiskList
an interface for listing directory contents, locally or on a file server
Definition: DiskList.h:32
DiskList.h
SH::DiskListLocal::DiskListLocal
DiskListLocal(const std::string &val_dir)
make the listing for the given directory
Definition: DiskListLocal.cxx:39
SH::DiskListLocal::~DiskListLocal
virtual ~DiskListLocal()
standard destructor
Definition: DiskListLocal.cxx:57
SH::DiskListLocal::getDirname
virtual std::string getDirname() const
the base path for the directory listed
Definition: DiskListLocal.cxx:125
SH::DiskListLocal::getPath
virtual std::string getPath() const
the path for the current entry.
Definition: DiskListLocal.cxx:101
SH::DiskListLocal
a DiskList implementation for local directories
Definition: DiskListLocal.h:27
SH::DiskListLocal::getNext
virtual bool getNext()
get the next list entry
Definition: DiskListLocal.cxx:71
SH::DiskListLocal::m_dir
std::string m_dir
the directory we are reading
Definition: DiskListLocal.h:109
SH
This module provides a lot of global definitions, forward declarations and includes that are used by ...
Definition: PrunDriver.h:15
Global.h