test
Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Pages
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
}
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
StorageMaker::open
virtual std::unique_ptr< Storage > open(const std::string &proto, const std::string &path, int mode, const AuxSettings &aux) const =0
StorageMaker::AuxSettings
Definition:
StorageMaker.h:12
printConversionInfo.aux
tuple aux
Definition:
printConversionInfo.py:18
alignBH_cfg.mode
list mode
Definition:
alignBH_cfg.py:7
StorageMaker::check
virtual bool check(const std::string &proto, const std::string &path, const AuxSettings &aux, IOOffset *size=0) const
Definition:
StorageMaker.cc:13
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
Storage.h
IOFlags::OpenRead
Definition:
IOFlags.h:9
IOFlags.h
fed_dqm_sourceclient-live_cfg.path
string path
Definition:
fed_dqm_sourceclient-live_cfg.py:33
alignCSCRings.s
list s
Definition:
alignCSCRings.py:91
IOOffset
int64_t IOOffset
Definition:
IOTypes.h:19
newFWLiteAna.found
found
Definition:
newFWLiteAna.py:118
StorageMaker.h
findQualityFiles.size
tuple size
Write out results.
Definition:
findQualityFiles.py:442
Generated for CMSSW Reference Manual by
1.8.5