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
7
StorageMaker::stagein
(
const
std::string
&
/*proto*/
,
8
const
std::string
&
/*path*/
,
9
const
AuxSettings
& )
const
10
{}
11
12
bool
13
StorageMaker::check
(
const
std::string
&proto,
14
const
std::string
&
path
,
15
const
AuxSettings
&
aux
,
16
IOOffset
*
size
/* = 0 */
)
const
17
{
18
// Fallback method is to open the file and check its
19
// size. Because grid jobs run in a directory where
20
// there is usually more space than in /tmp, and that
21
// directory is automatically cleaned up, open up the
22
// temporary files in the current directory. If the
23
// file is downloaded, it will delete itself in the
24
// destructor or close method.
25
bool
found
=
false
;
26
int
mode
=
IOFlags::OpenRead
|
IOFlags::OpenUnbuffered
;
27
if
(
auto
s
=
open
(proto, path, mode, aux))
28
{
29
if
(size)
30
*size =
s
->size ();
31
32
s
->close ();
33
34
found =
true
;
35
}
36
37
return
found
;
38
}
findQualityFiles.size
size
Write out results.
Definition:
findQualityFiles.py:441
callgraph.path
path
Definition:
callgraph.py:38
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:7
IOFlags::OpenUnbuffered
Definition:
IOFlags.h:22
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
alignCSCRings.s
s
Definition:
alignCSCRings.py:91
StorageMaker::AuxSettings
Definition:
StorageMaker.h:12
StorageMaker::check
virtual bool check(const std::string &proto, const std::string &path, const AuxSettings &aux, IOOffset *size=0) const
Definition:
StorageMaker.cc:13
runEdmFileComparison.found
found
Definition:
runEdmFileComparison.py:164
Storage.h
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition:
ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
IOFlags::OpenRead
Definition:
IOFlags.h:9
printConversionInfo.aux
aux
Definition:
printConversionInfo.py:18
IOFlags.h
IOOffset
int64_t IOOffset
Definition:
IOTypes.h:19
StorageMaker.h
Generated for CMSSW Reference Manual by
1.8.11