CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
StorageMaker.h
Go to the documentation of this file.
1 #ifndef STORAGE_FACTORY_STORAGE_MAKER_H
2 # define STORAGE_FACTORY_STORAGE_MAKER_H
3 
5 # include <string>
6 #include <memory>
7 
8 class Storage;
10 {
11 public:
12  struct AuxSettings {
13  unsigned int timeout = 0;
14  unsigned int debugLevel = 0;
15 
16  AuxSettings& setDebugLevel(unsigned int iLevel) {
17  debugLevel = iLevel;
18  return *this;
19  }
20 
21  AuxSettings& setTimeout(unsigned int iTime) {
22  timeout = iTime;
23  return *this;
24  }
25  };
26 
27  StorageMaker() = default;
28  virtual ~StorageMaker () = default;
29  // implicit copy constructor
30  // implicit assignment operator
31 
32  virtual void stagein (const std::string &proto,
33  const std::string &path,
34  const AuxSettings& aux) const;
35  virtual std::unique_ptr<Storage> open (const std::string &proto,
36  const std::string &path,
37  int mode,
38  const AuxSettings& aux) const = 0;
39  virtual bool check (const std::string &proto,
40  const std::string &path,
41  const AuxSettings& aux,
42  IOOffset *size = 0) const;
43 };
44 
45 #endif // STORAGE_FACTORY_STORAGE_MAKER_H
virtual ~StorageMaker()=default
virtual void stagein(const std::string &proto, const std::string &path, const AuxSettings &aux) const
Definition: StorageMaker.cc:7
virtual std::unique_ptr< Storage > open(const std::string &proto, const std::string &path, int mode, const AuxSettings &aux) const =0
virtual bool check(const std::string &proto, const std::string &path, const AuxSettings &aux, IOOffset *size=0) const
Definition: StorageMaker.cc:13
int64_t IOOffset
Definition: IOTypes.h:19
StorageMaker()=default
AuxSettings & setDebugLevel(unsigned int iLevel)
Definition: StorageMaker.h:16
tuple size
Write out results.
AuxSettings & setTimeout(unsigned int iTime)
Definition: StorageMaker.h:21