Main Page
Namespaces
Classes
Package Documentation
Utilities
StorageFactory
plugins
GsiFTPStorageMaker.cc
Go to the documentation of this file.
1
#include "
Utilities/StorageFactory/interface/StorageMaker.h
"
2
#include "
Utilities/StorageFactory/interface/StorageMakerFactory.h
"
3
#include "
Utilities/StorageFactory/interface/StorageFactory.h
"
4
#include "
Utilities/StorageFactory/interface/RemoteFile.h
"
5
6
class
GsiFTPStorageMaker
:
public
StorageMaker
7
{
8
public
:
9
virtual
std::unique_ptr<Storage>
open
(
const
std::string
&proto,
10
const
std::string
&
path
,
11
int
mode
,
12
const
AuxSettings
&)
const override
13
{
14
std::string
temp
;
15
const
StorageFactory
*
f
=
StorageFactory::get
();
16
int
localfd =
RemoteFile::local
(f->
tempDir
(),
temp
);
17
std::string
lurl =
"file://"
+
temp
;
18
std::string
newurl ((proto ==
"sfn"
?
"gsiftp"
: proto) +
":"
+ path);
19
const
char
*ftpopts [] = {
"globus-url-copy"
, newurl.c_str (), lurl.c_str (), 0 };
20
return
RemoteFile::get
(localfd, temp, (
char
**) ftpopts, mode);
21
}
22
};
23
24
DEFINE_EDM_PLUGIN
(
StorageMakerFactory
,
GsiFTPStorageMaker
,
"gsiftp"
);
25
DEFINE_EDM_PLUGIN
(
StorageMakerFactory
,
GsiFTPStorageMaker
,
"sfn"
);
GsiFTPStorageMaker
Definition:
GsiFTPStorageMaker.cc:6
callgraph.path
path
Definition:
callgraph.py:38
StorageFactory
Definition:
StorageFactory.h:13
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:255
StorageMakerFactory.h
groupFilesInBlocks.temp
temp
Definition:
groupFilesInBlocks.py:140
StorageMaker::AuxSettings
Definition:
StorageMaker.h:12
StorageMaker
Definition:
StorageMaker.h:9
RemoteFile::get
static std::unique_ptr< Storage > get(int localfd, const std::string &name, char **cmd, int mode)
Definition:
RemoteFile.cc:90
RemoteFile::local
static int local(const std::string &tmpdir, std::string &temp)
Definition:
RemoteFile.cc:55
RemoteFile.h
StorageFactory::get
static const StorageFactory * get(void)
Definition:
StorageFactory.cc:30
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition:
ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
edmplugin::PluginFactory
Definition:
PluginFactory.h:31
StorageFactory::tempDir
std::string tempDir(void) const
Definition:
StorageFactory.cc:122
f
double f[11][100]
Definition:
MuScleFitUtils.cc:78
StorageFactory.h
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:101
GsiFTPStorageMaker::open
virtual std::unique_ptr< Storage > open(const std::string &proto, const std::string &path, int mode, const AuxSettings &) const override
Definition:
GsiFTPStorageMaker.cc:9
StorageMaker.h
Generated for CMSSW Reference Manual by
1.8.11