Main Page
Namespaces
Classes
Package Documentation
Utilities
StorageFactory
src
StorageMaker.cc
Go to the documentation of this file.
1
#include "
Utilities/StorageFactory/interface/StorageMaker.h
"
2
#include "
Utilities/StorageFactory/interface/Storage.h
"
3
#include "
Utilities/StorageFactory/interface/IOFlags.h
"
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
;
20
int
mode
=
IOFlags::OpenRead
|
IOFlags::OpenUnbuffered
;
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
}
findQualityFiles.size
size
Write out results.
Definition:
findQualityFiles.py:443
StorageMaker::check
virtual bool check(const std::string &proto, const std::string &path, const AuxSettings &aux, IOOffset *size=nullptr) const
Definition:
StorageMaker.cc:8
castor_dqm_sourceclient_file_cfg.path
path
Definition:
castor_dqm_sourceclient_file_cfg.py:37
StorageMaker::open
virtual std::unique_ptr< Storage > open(const std::string &proto, const std::string &path, int mode, const AuxSettings &aux) const =0
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
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
alignCSCRings.s
s
Definition:
alignCSCRings.py:92
StorageMaker::AuxSettings
Definition:
StorageMaker.h:11
Storage.h
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition:
ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
IOFlags::OpenRead
Definition:
IOFlags.h:7
printConversionInfo.aux
aux
Definition:
printConversionInfo.py:19
IOFlags.h
IOOffset
int64_t IOOffset
Definition:
IOTypes.h:19
newFWLiteAna.found
found
Definition:
newFWLiteAna.py:118
StorageMaker.h
Generated for CMSSW Reference Manual by
1.8.11