CMS 3D CMS Logo

List of all members | Public Member Functions | Private Attributes
DelayedClose Class Reference
Inheritance diagram for DelayedClose:

Public Member Functions

 DelayedClose (const DelayedClose &)=delete
 
 DelayedClose (std::shared_ptr< XrdCl::File > fh, const std::string &id, const std::string &site)
 
void HandleResponseWithHosts (XrdCl::XRootDStatus *status, XrdCl::AnyObject *response, XrdCl::HostList *hostList) override
 
DelayedCloseoperator= (const DelayedClose &)=delete
 
 ~DelayedClose () override=default
 

Private Attributes

edm::propagate_const< std::shared_ptr< XrdCl::File > > m_fh
 
std::string m_id
 
std::string m_site
 

Detailed Description

Definition at line 41 of file XrdSource.cc.

Constructor & Destructor Documentation

◆ DelayedClose() [1/2]

DelayedClose::DelayedClose ( const DelayedClose )
delete

◆ DelayedClose() [2/2]

DelayedClose::DelayedClose ( std::shared_ptr< XrdCl::File >  fh,
const std::string &  id,
const std::string &  site 
)
inline

Definition at line 46 of file XrdSource.cc.

47  : m_fh(std::move(fh)), m_id(id), m_site(site) {
48  if (m_fh && m_fh->IsOpen()) {
49  if (!m_fh->Close(this).IsOK()) {
50  delete this;
51  }
52  }
53  }

◆ ~DelayedClose()

DelayedClose::~DelayedClose ( )
overridedefault

Member Function Documentation

◆ HandleResponseWithHosts()

void DelayedClose::HandleResponseWithHosts ( XrdCl::XRootDStatus *  status,
XrdCl::AnyObject *  response,
XrdCl::HostList *  hostList 
)
inlineoverride

Definition at line 57 of file XrdSource.cc.

59  {
60  if (status && !status->IsOK()) {
61  edm::LogWarning("XrdFileWarning") << "Source delayed close failed with error '" << status->ToStr()
62  << "' (errno=" << status->errNo << ", code=" << status->code
63  << ", server=" << m_id << ", site=" << m_site << ")";
64  }
65  delete status;
66  delete hostList;
67  // NOTE: we do not delete response (copying behavior from XrdCl).
68  delete this;
69  }

References mps_update::status.

◆ operator=()

DelayedClose& DelayedClose::operator= ( const DelayedClose )
delete

Member Data Documentation

◆ m_fh

edm::propagate_const<std::shared_ptr<XrdCl::File> > DelayedClose::m_fh
private

Definition at line 72 of file XrdSource.cc.

◆ m_id

std::string DelayedClose::m_id
private

Definition at line 73 of file XrdSource.cc.

◆ m_site

std::string DelayedClose::m_site
private

Definition at line 74 of file XrdSource.cc.

mps_update.status
status
Definition: mps_update.py:68
edm::LogWarning
Log< level::Warning, false > LogWarning
Definition: MessageLogger.h:122
DelayedClose::m_fh
edm::propagate_const< std::shared_ptr< XrdCl::File > > m_fh
Definition: XrdSource.cc:72
DelayedClose::m_id
std::string m_id
Definition: XrdSource.cc:73
DelayedClose::m_site
std::string m_site
Definition: XrdSource.cc:74
eostools.move
def move(src, dest)
Definition: eostools.py:511