CMS 3D CMS Logo

StorageMaker.cc
Go to the documentation of this file.
4 #include <cstdlib>
5 
6 void StorageMaker::stagein(const std::string & /*proto*/, const std::string & /*path*/, const AuxSettings &) const {}
7 
8 bool StorageMaker::check(const std::string &proto,
9  const std::string &path,
10  const AuxSettings &aux,
11  IOOffset *size /* = 0 */) const {
12  // Fallback method is to open the file and check its
13  // size. Because grid jobs run in a directory where
14  // there is usually more space than in /tmp, and that
15  // directory is automatically cleaned up, open up the
16  // temporary files in the current directory. If the
17  // file is downloaded, it will delete itself in the
18  // destructor or close method.
19  bool found = false;
21  if (auto s = open(proto, path, mode, aux)) {
22  if (size)
23  *size = s->size();
24 
25  s->close();
26 
27  found = true;
28  }
29 
30  return found;
31 }
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
Storage.h
newFWLiteAna.found
found
Definition: newFWLiteAna.py:118
alignCSCRings.s
s
Definition: alignCSCRings.py:92
IOFlags.h
IOFlags::OpenRead
Definition: IOFlags.h:7
StorageMaker.h
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
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
StorageMaker::stagein
virtual void stagein(const std::string &proto, const std::string &path, const AuxSettings &aux) const
Definition: StorageMaker.cc:6
IOFlags::OpenUnbuffered
Definition: IOFlags.h:20
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
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443