CMS 3D CMS Logo

LStoreStorageMaker.cc
Go to the documentation of this file.
7 #include <unistd.h>
8 #include <iostream>
9 
11 public:
14  std::unique_ptr<Storage> open(const std::string &proto,
15  const std::string &path,
16  int mode,
17  const AuxSettings &) const override {
18  std::string fullpath = proto + ":" + path;
19  return std::make_unique<LStoreFile>(fullpath, mode);
20  }
21 
22  /* I don't think this is necessary - Melo
23  virtual void stagein (const std::string &proto, const std::string &path)
24  {
25  std::string fullpath(proto + ":" + path);
26  XrdClientAdmin admin(fullpath.c_str());
27  if (admin.Connect())
28  {
29  XrdOucString str(fullpath.c_str());
30  XrdClientUrlSet url(str);
31  admin.Prepare(url.GetFile().c_str(), kXR_stage | kXR_noerrs, 0);
32  }
33  }
34 */
35 
36  bool check(const std::string &proto,
37  const std::string &path,
38  const AuxSettings &,
39  IOOffset *size = nullptr) const override {
40  std::string fullpath = proto + ":" + path;
41  try {
42  LStoreFile fileObj(fullpath); // = LStoreFile (fullpath);
43  *size = fileObj.position(0, Storage::END);
44  } catch (cms::Exception &e) {
45  return false;
46  }
47  return true;
48  }
49 };
MessageLogger.h
reco_skim_cfg_mod.fullpath
fullpath
Definition: reco_skim_cfg_mod.py:202
ALCARECOPromptCalibProdSiPixelAli0T_cff.mode
mode
Definition: ALCARECOPromptCalibProdSiPixelAli0T_cff.py:96
Storage::END
Definition: Storage.h:22
StorageMaker
Definition: StorageMaker.h:9
StorageMaker.h
DEFINE_EDM_PLUGIN
#define DEFINE_EDM_PLUGIN(factory, type, name)
Definition: PluginFactory.h:124
LStoreFile
Definition: LStoreFile.h:8
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition: AlCaHLTBitMon_QueryRunRegistry.py:256
LStoreStorageMaker::open
std::unique_ptr< Storage > open(const std::string &proto, const std::string &path, int mode, const AuxSettings &) const override
Definition: LStoreStorageMaker.cc:14
edmplugin::PluginFactory
Definition: PluginFactory.h:34
IOOffset
int64_t IOOffset
Definition: IOTypes.h:19
StorageFactory.h
LStoreFile.h
StorageMakerFactory.h
LStoreStorageMaker::check
bool check(const std::string &proto, const std::string &path, const AuxSettings &, IOOffset *size=nullptr) const override
Definition: LStoreStorageMaker.cc:36
LStoreFile::position
IOOffset position(IOOffset offset, Relative whence=SET) override
Definition: LStoreFile.cc:263
Exception.h
cms::Exception
Definition: Exception.h:70
castor_dqm_sourceclient_file_cfg.path
path
Definition: castor_dqm_sourceclient_file_cfg.py:37
LStoreStorageMaker
Definition: LStoreStorageMaker.cc:10
StorageMaker::AuxSettings
Definition: StorageMaker.h:11
findQualityFiles.size
size
Write out results.
Definition: findQualityFiles.py:443
MillePedeFileConverter_cfg.e
e
Definition: MillePedeFileConverter_cfg.py:37