Main Page
Namespaces
Classes
Package Documentation
All
Classes
Namespaces
Files
Functions
Variables
Typedefs
Enumerations
Enumerator
Properties
Friends
Macros
Groups
Pages
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
namespace
edm::storage {
7
class
GsiFTPStorageMaker
:
public
StorageMaker
{
8
public
:
9
std::unique_ptr<Storage>
open
(
const
std::string
&proto,
10
const
std::string
&
path
,
11
int
mode
,
12
const
AuxSettings
&)
const override
{
13
std::string
temp
;
14
const
StorageFactory
*
f
=
StorageFactory::get
();
15
int
localfd =
RemoteFile::local
(f->
tempDir
(),
temp
);
16
std::string
lurl =
"file://"
+
temp
;
17
std::string
newurl((proto ==
"sfn"
?
"gsiftp"
: proto) +
":"
+ path);
18
const
char
*ftpopts[] = {
"globus-url-copy"
, newurl.c_str(), lurl.c_str(),
nullptr
};
19
return
RemoteFile::get
(localfd, temp, (
char
**)ftpopts, mode);
20
}
21
};
22
}
// namespace edm::storage
23
24
using namespace
edm::storage;
25
26
DEFINE_EDM_PLUGIN
(
StorageMakerFactory
,
GsiFTPStorageMaker
,
"gsiftp"
);
27
DEFINE_EDM_PLUGIN
(
StorageMakerFactory
,
GsiFTPStorageMaker
,
"sfn"
);
edm::storage::StorageFactory::tempDir
std::string tempDir(void) const
Definition:
StorageFactory.cc:92
edm::storage::RemoteFile::get
static std::unique_ptr< Storage > get(int localfd, const std::string &name, char **cmd, int mode)
Definition:
RemoteFile.cc:80
edm::storage::StorageMaker::AuxSettings
Definition:
StorageMaker.h:12
StorageMakerFactory.h
groupFilesInBlocks.temp
temp
Definition:
groupFilesInBlocks.py:142
edm::storage::StorageMaker
Definition:
StorageMaker.h:10
edm::storage::GsiFTPStorageMaker::open
std::unique_ptr< Storage > open(const std::string &proto, const std::string &path, int mode, const AuxSettings &) const override
Definition:
GsiFTPStorageMaker.cc:9
AlCaHLTBitMon_QueryRunRegistry.string
string string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
universalConfigTemplate.mode
mode
Definition:
universalConfigTemplate.py:82
RemoteFile.h
edmplugin::PluginFactory
Definition:
PluginFactory.h:34
edm::storage::StorageFactory
Definition:
StorageFactory.h:14
edm::storage::RemoteFile::local
static int local(const std::string &tmpdir, std::string &temp)
Definition:
RemoteFile.cc:50
fed_dqm_sourceclient-live_cfg.path
string path
Definition:
fed_dqm_sourceclient-live_cfg.py:46
StorageFactory.h
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition:
PluginFactory.h:124
edm::storage::GsiFTPStorageMaker
Definition:
GsiFTPStorageMaker.cc:7
edm::storage::StorageFactory::get
static const StorageFactory * get(void)
Definition:
StorageFactory.cc:30
StorageMaker.h
validate-o2o-wbm.f
tuple f
Definition:
validate-o2o-wbm.py:27
Generated for CMSSW Reference Manual by
1.8.5