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
StorageMaker::StorageMaker
(
void
)
7
{}
8
9
StorageMaker::~StorageMaker
(
void
)
10
{}
11
12
void
13
StorageMaker::stagein
(
const
std::string
&
/*proto*/
,
14
const
std::string
&
/*path*/
)
15
{}
16
17
void
18
StorageMaker::setTimeout
(
unsigned
int
/*timeout*/
)
19
{}
20
21
void
22
StorageMaker::setDebugLevel
(
unsigned
int
/*level*/
)
23
{}
24
25
bool
26
StorageMaker::check
(
const
std::string
&proto,
27
const
std::string
&
path
,
28
IOOffset
*
size
/* = 0 */
)
29
{
30
// Fallback method is to open the file and check its
31
// size. Because grid jobs run in a directory where
32
// there is usually more space than in /tmp, and that
33
// directory is automatically cleaned up, open up the
34
// temporary files in the current directory. If the
35
// file is downloaded, it will delete itself in the
36
// destructor or close method.
37
bool
found
=
false
;
38
int
mode
=
IOFlags::OpenRead
|
IOFlags::OpenUnbuffered
;
39
if
(
Storage
*
s
=
open
(proto, path, mode))
40
{
41
if
(size)
42
*size =
s
->size ();
43
44
s
->close ();
45
delete
s
;
46
47
found =
true
;
48
}
49
50
return
found
;
51
}
IOFlags::OpenUnbuffered
Definition:
IOFlags.h:22
Storage
Definition:
Storage.h:20
alignBH_cfg.mode
list mode
Definition:
alignBH_cfg.py:7
StorageMaker::open
virtual Storage * open(const std::string &proto, const std::string &path, int mode)=0
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
StorageMaker::check
virtual bool check(const std::string &proto, const std::string &path, IOOffset *size=0)
Definition:
StorageMaker.cc:26
Storage.h
StorageMaker::setDebugLevel
virtual void setDebugLevel(unsigned int debugLevel)
Definition:
StorageMaker.cc:22
StorageMaker::setTimeout
virtual void setTimeout(unsigned int timeout)
Definition:
StorageMaker.cc:18
StorageMaker::StorageMaker
StorageMaker(void)
Definition:
StorageMaker.cc:6
StorageMaker::stagein
virtual void stagein(const std::string &proto, const std::string &path)
Definition:
StorageMaker.cc:13
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
StorageMaker::~StorageMaker
virtual ~StorageMaker(void)
Definition:
StorageMaker.cc:9
Generated for CMSSW Reference Manual by
1.8.5