CMS 3D CMS Logo

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;
9 class StorageMaker {
10 public:
11  struct AuxSettings {
12  unsigned int timeout = 0;
13  unsigned int debugLevel = 0;
14 
15  AuxSettings &setDebugLevel(unsigned int iLevel) {
16  debugLevel = iLevel;
17  return *this;
18  }
19 
20  AuxSettings &setTimeout(unsigned int iTime) {
21  timeout = iTime;
22  return *this;
23  }
24  };
25 
26  StorageMaker() = default;
27  virtual ~StorageMaker() = default;
28  // implicit copy constructor
29  // implicit assignment operator
30 
31  virtual void stagein(const std::string &proto, const std::string &path, const AuxSettings &aux) const;
32  virtual std::unique_ptr<Storage> open(const std::string &proto,
33  const std::string &path,
34  int mode,
35  const AuxSettings &aux) const = 0;
36  virtual bool check(const std::string &proto,
37  const std::string &path,
38  const AuxSettings &aux,
39  IOOffset *size = nullptr) const;
40 };
41 
42 #endif // STORAGE_FACTORY_STORAGE_MAKER_H
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
StorageMaker
Definition: StorageMaker.h:9
StorageMaker::AuxSettings::setTimeout
AuxSettings & setTimeout(unsigned int iTime)
Definition: StorageMaker.h:20
StorageMaker::AuxSettings::debugLevel
unsigned int debugLevel
Definition: StorageMaker.h:13
StorageMaker::StorageMaker
StorageMaker()=default
IOOffset
int64_t IOOffset
Definition: IOTypes.h:19
StorageMaker::open
virtual std::unique_ptr< Storage > open(const std::string &proto, const std::string &path, int mode, const AuxSettings &aux) const =0
printConversionInfo.aux
aux
Definition: printConversionInfo.py:19
IOTypes.h
StorageMaker::AuxSettings::setDebugLevel
AuxSettings & setDebugLevel(unsigned int iLevel)
Definition: StorageMaker.h:15
timeout
Definition: timeout.py:1
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
StorageMaker::stagein
virtual void stagein(const std::string &proto, const std::string &path, const AuxSettings &aux) const
Definition: StorageMaker.cc:6
StorageMaker::~StorageMaker
virtual ~StorageMaker()=default
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
StorageMaker::check
virtual bool check(const std::string &proto, const std::string &path, const AuxSettings &aux, IOOffset *size=nullptr) const
Definition: StorageMaker.cc:8
StorageMaker::AuxSettings
Definition: StorageMaker.h:11
Storage
Definition: Storage.h:20
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443