CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Public Member Functions | Private Attributes
DelayedClose Class Reference
Inheritance diagram for DelayedClose:

Public Member Functions

 DelayedClose (std::shared_ptr< XrdCl::File > fh, const std::string &id, const std::string &site)
 
virtual void HandleResponseWithHosts (XrdCl::XRootDStatus *status, XrdCl::AnyObject *response, XrdCl::HostList *hostList) override
 
virtual ~DelayedClose ()=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 39 of file XrdSource.cc.

Constructor & Destructor Documentation

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

Definition at line 43 of file XrdSource.cc.

References m_fh().

44  : m_fh(std::move(fh)),
45  m_id(id),
46  m_site(site)
47  {
48  if (m_fh && m_fh->IsOpen())
49  {
50  if (!m_fh->Close(this).IsOK())
51  {
52  delete this;
53  }
54  }
55  }
std::string m_site
Definition: XrdSource.cc:79
std::string m_id
Definition: XrdSource.cc:78
edm::propagate_const< std::shared_ptr< XrdCl::File > > m_fh
Definition: XrdSource.cc:77
def move
Definition: eostools.py:510
virtual DelayedClose::~DelayedClose ( )
virtualdefault

Member Function Documentation

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

Definition at line 61 of file XrdSource.cc.

References m_id(), and ntuplemaker::status.

62  {
63  if (status && !status->IsOK())
64  {
65 
66  edm::LogWarning("XrdFileWarning") << "Source delayed close failed with error '" << status->ToStr()
67  << "' (errno=" << status->errNo << ", code=" << status->code << ", server=" << m_id << ", site=" << m_site << ")";
68  }
69  delete status;
70  delete hostList;
71  // NOTE: we do not delete response (copying behavior from XrdCl).
72  delete this;
73  }
std::string m_site
Definition: XrdSource.cc:79
std::string m_id
Definition: XrdSource.cc:78
tuple status
Definition: ntuplemaker.py:245

Member Data Documentation

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

Definition at line 77 of file XrdSource.cc.

std::string DelayedClose::m_id
private

Definition at line 78 of file XrdSource.cc.

std::string DelayedClose::m_site
private

Definition at line 79 of file XrdSource.cc.