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

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

Detailed Description

Definition at line 37 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 41 of file XrdSource.cc.

References m_fh().

42  : m_fh(std::move(fh)),
43  m_id(id),
44  m_site(site)
45  {
46  if (m_fh && m_fh->IsOpen())
47  {
48  if (!m_fh->Close(this).IsOK())
49  {
50  delete this;
51  }
52  }
53  }
std::shared_ptr< XrdCl::File > m_fh
Definition: XrdSource.cc:74
std::string m_site
Definition: XrdSource.cc:76
std::string m_id
Definition: XrdSource.cc:75
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 59 of file XrdSource.cc.

References m_id(), and ntuplemaker::status.

60  {
61  if (!status->IsOK())
62  {
63 
64  edm::LogWarning("XrdFileWarning") << "Source delayed close failed with error '" << status->ToStr()
65  << "' (errno=" << status->errNo << ", code=" << status->code << ", server=" << m_id << ", site=" << m_site << ")";
66  }
67  delete status;
68  delete hostList;
69  delete this;
70  }
std::string m_site
Definition: XrdSource.cc:76
std::string m_id
Definition: XrdSource.cc:75
tuple status
Definition: ntuplemaker.py:245

Member Data Documentation

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

Definition at line 74 of file XrdSource.cc.

std::string DelayedClose::m_id
private

Definition at line 75 of file XrdSource.cc.

std::string DelayedClose::m_site
private

Definition at line 76 of file XrdSource.cc.