Skip to content

Commit 650a236

Browse files
committed
[net] deprecate TNetFileStager
1 parent 6396c0d commit 650a236

3 files changed

Lines changed: 14 additions & 8 deletions

File tree

net/net/inc/LinkDef.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
#pragma link C++ class TMessage;
2525
#pragma link C++ class TMonitor;
2626
#pragma link C++ class TNetFile;
27-
#pragma link C++ class TNetFileStager;
27+
#pragma link C++ class ROOT::Deprecated::TNetFileStager;
2828
#pragma link C++ class TNetSystem;
2929
#pragma link C++ class TWebFile;
3030
#pragma link C++ class TWebSystem;

net/net/inc/TNetFileStager.h

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,8 @@
2525
class TCollection;
2626
class TNetSystem;
2727

28+
namespace ROOT::Deprecated {
29+
2830
class TNetFileStager : public TFileStager {
2931

3032
private:
@@ -48,4 +50,8 @@ class TNetFileStager : public TFileStager {
4850
ClassDefOverride(TNetFileStager,0) // Implementation for a 'rootd' backend
4951
};
5052

53+
} // namespace ROOT::Deprecated
54+
55+
using TNetFileStager R__DEPRECATED(6, 42, "TNetFileStager is deprecated") = ROOT::Deprecated::TNetFileStager;
56+
5157
#endif

net/net/src/TNetFileStager.cxx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,7 @@
2525
////////////////////////////////////////////////////////////////////////////////
2626
/// Constructor. Init a TNetSystem instance to the remote rootd.
2727

28-
TNetFileStager::TNetFileStager(const char *url) : TFileStager("net")
28+
ROOT::Deprecated::TNetFileStager::TNetFileStager(const char *url) : TFileStager("net")
2929
{
3030
fSystem = 0;
3131
if (url && strlen(url) > 0) {
@@ -38,7 +38,7 @@ TNetFileStager::TNetFileStager(const char *url) : TFileStager("net")
3838
////////////////////////////////////////////////////////////////////////////////
3939
/// Destructor
4040

41-
TNetFileStager::~TNetFileStager()
41+
ROOT::Deprecated::TNetFileStager::~TNetFileStager()
4242
{
4343
SafeDelete(fSystem);
4444
fPrefix = "";
@@ -47,7 +47,7 @@ TNetFileStager::~TNetFileStager()
4747
////////////////////////////////////////////////////////////////////////////////
4848
/// Check if the file defined by 'path' is ready to be used.
4949

50-
Bool_t TNetFileStager::IsStaged(const char *path)
50+
Bool_t ROOT::Deprecated::TNetFileStager::IsStaged(const char *path)
5151
{
5252
if (!IsValid()) {
5353
GetPrefix(path, fPrefix);
@@ -68,7 +68,7 @@ Bool_t TNetFileStager::IsStaged(const char *path)
6868
////////////////////////////////////////////////////////////////////////////////
6969
/// Isolate prefix in url
7070

71-
void TNetFileStager::GetPrefix(const char *url, TString &pfx)
71+
void ROOT::Deprecated::TNetFileStager::GetPrefix(const char *url, TString &pfx)
7272
{
7373
if (gDebug > 1)
7474
::Info("TNetFileStager::GetPrefix", "enter: %s", url);
@@ -89,7 +89,7 @@ void TNetFileStager::GetPrefix(const char *url, TString &pfx)
8989
////////////////////////////////////////////////////////////////////////////////
9090
/// Print basic info about this stager
9191

92-
void TNetFileStager::Print(Option_t *) const
92+
void ROOT::Deprecated::TNetFileStager::Print(Option_t *) const
9393
{
9494
Printf("+++ stager: %s %s", GetName(), fPrefix.Data());
9595
}
@@ -98,7 +98,7 @@ void TNetFileStager::Print(Option_t *) const
9898
/// Get actual end-point url for a path
9999
/// Returns 0 in case of success and 1 if any error occurred
100100

101-
Int_t TNetFileStager::Locate(const char *path, TString &eurl)
101+
Int_t ROOT::Deprecated::TNetFileStager::Locate(const char *path, TString &eurl)
102102
{
103103
if (!IsValid()) {
104104
GetPrefix(path, fPrefix);
@@ -122,7 +122,7 @@ Int_t TNetFileStager::Locate(const char *path, TString &eurl)
122122
/// Returns kTRUE if stager 's' is compatible with current stager.
123123
/// Avoids multiple instantiations of the potentially the same TNetSystem.
124124

125-
Bool_t TNetFileStager::Matches(const char *s)
125+
Bool_t ROOT::Deprecated::TNetFileStager::Matches(const char *s)
126126
{
127127
if (IsValid()) {
128128
TString pfx;

0 commit comments

Comments
 (0)