Skip to content

Commit 25f8bfb

Browse files
committed
[net] deprecate TNetFile
1 parent 40f6836 commit 25f8bfb

7 files changed

Lines changed: 16 additions & 12 deletions

File tree

io/io/src/TFile.cxx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3963,7 +3963,7 @@ TFile *TFile::Open(const char *url, Option_t *options, const char *ftitle,
39633963
if (h->LoadPlugin() == -1)
39643964
return nullptr;
39653965
TClass *cl = TClass::GetClass(h->GetClass());
3966-
if (cl && cl->InheritsFrom("TNetFile"))
3966+
if (cl && cl->InheritsFrom("ROOT::Deprecated::TNetFile"))
39673967
f = (TFile*) h->ExecPlugin(5, name.Data(), option, ftitle, compress, netopt);
39683968
else
39693969
f = (TFile*) h->ExecPlugin(4, name.Data(), option, ftitle, compress);

net/net/inc/LinkDef.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
#pragma link C++ class TPSocket;
2424
#pragma link C++ class TMessage;
2525
#pragma link C++ class TMonitor;
26-
#pragma link C++ class TNetFile;
26+
#pragma link C++ class ROOT::Deprecated::TNetFile;
2727
#pragma link C++ class ROOT::Deprecated::TNetFileStager;
2828
#pragma link C++ class ROOT::Deprecated::TNetSystem;
2929
#pragma link C++ class TWebFile;

net/net/inc/TNetFile.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,7 @@
3030

3131
class TSocket;
3232

33+
namespace ROOT::Deprecated {
3334

3435
class TNetFile : public TFile {
3536

@@ -81,8 +82,6 @@ class TNetFile : public TFile {
8182
ClassDefOverride(TNetFile,1) //A ROOT file that reads/writes via a rootd server
8283
};
8384

84-
namespace ROOT::Deprecated {
85-
8685
class TNetSystem : public TSystem {
8786

8887
private:
@@ -125,6 +124,7 @@ class TNetSystem : public TSystem {
125124

126125
} // namespace ROOT::Deprecated
127126

127+
using TNetFile R__DEPRECATED(6, 42, "TNetFile is deprecated") = ROOT::Deprecated::TNetFile;
128128
using TNetSystem R__DEPRECATED(6, 42, "TNetSystem is deprecated") = ROOT::Deprecated::TNetSystem;
129129

130130
#endif

roottest/root/io/event/MainEvent.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -180,7 +180,7 @@ int main(int argc, char** argv)
180180
// -- Read case
181181
TFile* hfile = nullptr;
182182
if (netf) {
183-
hfile = new TNetFile("root://localhost/root/test/EventNet.root");
183+
hfile = new ROOT::Deprecated::TNetFile("root://localhost/root/test/EventNet.root");
184184
} else {
185185
hfile = new TFile(gFilename);
186186
}
@@ -226,7 +226,8 @@ int main(int argc, char** argv)
226226
// This file is now becoming the current directory.
227227
TFile* hfile = 0;
228228
if (netf) {
229-
hfile = new TNetFile("root://localhost/root/test/EventNet.root", "RECREATE", "TTree benchmark ROOT file");
229+
hfile = new ROOT::Deprecated::TNetFile("root://localhost/root/test/EventNet.root", "RECREATE",
230+
"TTree benchmark ROOT file");
230231
} else {
231232
hfile = new TFile(gFilename, "RECREATE", "TTree benchmark ROOT file");
232233
}

roottest/root/treeformula/references/TreeFormulaReferencesGenerator.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -154,7 +154,7 @@ int main(int argc, char **argv)
154154
// Read case
155155
if (read) {
156156
if (netf) {
157-
hfile = new TNetFile("root://localhost/root/test/EventNet.root");
157+
hfile = new ROOT::Deprecated::TNetFile("root://localhost/root/test/EventNet.root");
158158
} else
159159
hfile = new TFile(filename);
160160
TTree *tree = (TTree*)hfile->Get("T");
@@ -187,7 +187,8 @@ int main(int argc, char **argv)
187187
// pictures, graphics objects, detector geometries, tracks, events, etc..
188188
// This file is now becoming the current directory.
189189
if (netf) {
190-
hfile = new TNetFile("root://localhost/root/test/EventNet.root","RECREATE","TTree benchmark ROOT file");
190+
hfile = new ROOT::Deprecated::TNetFile("root://localhost/root/test/EventNet.root","RECREATE",
191+
"TTree benchmark ROOT file");
191192
} else
192193
hfile = new TFile(filename,"RECREATE","TTree benchmark ROOT file");
193194
hfile->SetCompressionLevel(comp);

roottest/root/treeformula/schemaEvolution/MainEvent.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ int main(int argc, char **argv)
153153
// Read case
154154
if (read) {
155155
if (netf) {
156-
hfile = new TNetFile("root://localhost/root/test/EventNet.root");
156+
hfile = new ROOT::Deprecated::TNetFile("root://localhost/root/test/EventNet.root");
157157
} else
158158
hfile = new TFile("Event.root");
159159
tree = (TTree*)hfile->Get("T");
@@ -186,7 +186,8 @@ int main(int argc, char **argv)
186186
// pictures, graphics objects, detector geometries, tracks, events, etc..
187187
// This file is now becoming the current directory.
188188
if (netf) {
189-
hfile = new TNetFile("root://localhost/root/test/EventNet.root","RECREATE","TTree benchmark ROOT file");
189+
hfile = new ROOT::Deprecated::TNetFile("root://localhost/root/test/EventNet.root","RECREATE",
190+
"TTree benchmark ROOT file");
190191
} else
191192
hfile = new TFile("Event.root","RECREATE","TTree benchmark ROOT file");
192193
hfile->SetCompressionLevel(comp);

test/MainEvent.cxx

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -176,7 +176,7 @@ int MainEvent(int nevent, int comp, int split, int arg4, int arg5, int enable_im
176176
// Read case
177177
if (read) {
178178
if (netf) {
179-
hfile = new TNetFile("root://localhost/root/test/EventNet.root");
179+
hfile = new ROOT::Deprecated::TNetFile("root://localhost/root/test/EventNet.root");
180180
} else
181181
hfile = new TFile(outFiles.back().c_str());
182182
tree = (TTree*)hfile->Get("T");
@@ -220,7 +220,8 @@ int MainEvent(int nevent, int comp, int split, int arg4, int arg5, int enable_im
220220
// pictures, graphics objects, detector geometries, tracks, events, etc..
221221
// This file is now becoming the current directory.
222222
if (netf) {
223-
hfile = new TNetFile("root://localhost/root/test/EventNet.root","RECREATE","TTree benchmark ROOT file");
223+
hfile = new ROOT::Deprecated::TNetFile("root://localhost/root/test/EventNet.root","RECREATE",
224+
"TTree benchmark ROOT file");
224225
} else
225226
hfile = new TFile(outFiles.back().c_str(),"RECREATE","TTree benchmark ROOT file");
226227
hfile->SetCompressionLevel(comp);

0 commit comments

Comments
 (0)