Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TSelEventGen.cxx
Go to the documentation of this file.
1// @(#)root/proof:$Id$
2// Author: Sangsu Ryu 22/06/2010
3
4/*************************************************************************
5 * Copyright (C) 1995-2005, Rene Brun and Fons Rademakers. *
6 * All rights reserved. *
7 * *
8 * For the licensing terms see $ROOTSYS/LICENSE. *
9 * For the list of contributors see $ROOTSYS/README/CREDITS. *
10 *************************************************************************/
11
12/** \class TSelEventGen
13\ingroup proofbench
14
15Selector for event file generation.
16List of files to be generated for each node is provided by client.
17And list of files generated is sent back.
18Existing files are reused if not forced to be regenerated.
19
20*/
21
22#define TSelEventGen_cxx
23
24#include "TSelEventGen.h"
25#include "TParameter.h"
26#include "TProofNodeInfo.h"
27#include "TProofBenchTypes.h"
28#include "TProof.h"
29#include "TMap.h"
30#include "TDSet.h"
31#include "TFileInfo.h"
32#include "TFile.h"
33#include "TSortedList.h"
34#include "TRandom.h"
35#include "Event.h"
36#include "TProofServ.h"
37#include "TMacro.h"
38
40
41////////////////////////////////////////////////////////////////////////////////
42/// Constructor
43
45 : fBaseDir(""), fNEvents(100000), fNTracks(100), fNTracksMax(-1),
46 fRegenerate(kFALSE), fTotalGen(0), fFilesGenerated(0),
47 fGenerateFun(0), fChain(0)
48{
49 if (gProofServ){
51 // Two directories up
54 }
55 else{
56 fBaseDir="";
57 }
58}
59
60////////////////////////////////////////////////////////////////////////////////
61/// The Begin() function is called at the start of the query.
62/// When running with PROOF Begin() is only called on the client.
63/// The tree argument is deprecated (on PROOF 0 is passed).
64
66{
68 // Determine the test type
69 TMap *filemap = dynamic_cast<TMap *>
70 (fInput->FindObject("PROOF_FilesToProcess"));
71 if (filemap) {
72 //Info("Begin", "dumping the file map:");
73 //filemap->Print();
74 } else {
75 if (fInput->FindObject("PROOF_FilesToProcess")) {
76 Error("Begin", "object 'PROOF_FilesToProcess' found but not a map"
77 " (%s)", fInput->FindObject("PROOF_FilesToProcess")->ClassName());
78 } else {
79 Error("Begin", "object 'PROOF_FilesToProcess' not found");
80 }
81 }
82}
83
84////////////////////////////////////////////////////////////////////////////////
85/// The SlaveBegin() function is called after the Begin() function.
86/// When running with PROOF SlaveBegin() is called on each slave server.
87/// The tree argument is deprecated (on PROOF 0 is passed).
88
90{
91 Init(tree);
92
94
95 //get parameters
96
97 Bool_t found_basedir=kFALSE;
98 Bool_t found_nevents=kFALSE;
99 Bool_t found_ntracks=kFALSE;
100 Bool_t found_ntrkmax=kFALSE;
101 Bool_t found_regenerate=kFALSE;
102
103 TIter nxt(fInput);
104 TString sinput;
105 TObject *obj;
106
107 while ((obj = nxt())){
108
109 sinput=obj->GetName();
110 //Info("SlaveBegin", "Input list: %s", sinput.Data());
111
112 if (sinput.Contains("PROOF_BenchmarkBaseDir")){
113 TNamed* a = dynamic_cast<TNamed*>(obj);
114 if (a){
115 TString bdir = a->GetTitle();
116 if (!bdir.IsNull()){
117 TUrl u(bdir, kTRUE);
118 Bool_t isLocal = !strcmp(u.GetProtocol(), "file") ? kTRUE : kFALSE;
119 if (isLocal && !gSystem->IsAbsoluteFileName(u.GetFile()))
120 u.SetFile(TString::Format("%s/%s", fBaseDir.Data(), u.GetFile()));
121 if (isLocal) {
122 if ((gSystem->AccessPathName(u.GetFile()) &&
123 gSystem->mkdir(u.GetFile(), kTRUE) == 0) ||
125 // Directory is writable
126 fBaseDir = u.GetFile();
127 Info("SlaveBegin", "using base directory \"%s\"", fBaseDir.Data());
128 } else{
129 // Directory is not writable or not available, use default directory
130 Warning("SlaveBegin", "\"%s\" directory is not writable or not existing,"
131 " using default directory: %s",
132 bdir.Data(), fBaseDir.Data());
133 }
134 } else {
135 // We assume the user knows what it does
136 fBaseDir = bdir;
137 Info("SlaveBegin", "using non local base directory \"%s\"", fBaseDir.Data());
138 }
139 } else{
140 Info("SlaveBegin", "using default directory: %s",
141 fBaseDir.Data());
142 }
143 found_basedir=kTRUE;
144 }
145 else{
146 Error("SlaveBegin", "PROOF_BenchmarkBaseDir not type TNamed");
147 }
148 continue;
149 }
150 if (sinput.Contains("PROOF_BenchmarkNEvents")){
151 TParameter<Long64_t>* a=dynamic_cast<TParameter<Long64_t>*>(obj);
152 if (a){
153 fNEvents= a->GetVal();
154 found_nevents=kTRUE;
155 }
156 else{
157 Error("SlaveBegin", "PROOF_BenchmarkEvents not type TParameter"
158 "<Long64_t>*");
159 }
160 continue;
161 }
162 if (sinput.Contains("PROOF_BenchmarkNTracks")){
163 TParameter<Int_t>* a=dynamic_cast<TParameter<Int_t>*>(obj);
164 if (a){
165 fNTracks=a->GetVal();
166 found_ntracks=kTRUE;
167 }
168 else{
169 Error("SlaveBegin", "PROOF_BenchmarkNTracks not type TParameter"
170 "<Int_t>*");
171 }
172 continue;
173 }
174 if (sinput.Contains("PROOF_BenchmarkNTracksMax")){
175 TParameter<Int_t>* a=dynamic_cast<TParameter<Int_t>*>(obj);
176 if (a){
177 fNTracksMax=a->GetVal();
178 found_ntrkmax=kTRUE;
179 }
180 else{
181 Error("SlaveBegin", "PROOF_BenchmarkNTracksMax not type TParameter"
182 "<Int_t>*");
183 }
184 continue;
185 }
186 if (sinput.Contains("PROOF_BenchmarkRegenerate")){
187 TParameter<Int_t>* a=dynamic_cast<TParameter<Int_t>*>(obj);
188 if (a){
189 fRegenerate=a->GetVal();
190 found_regenerate=kTRUE;
191 }
192 else{
193 Error("SlaveBegin", "PROOF_BenchmarkRegenerate not type TParameter"
194 "<Int_t>*");
195 }
196 continue;
197 }
198 if (sinput.Contains("PROOF_GenerateFun")){
199 TNamed *a = dynamic_cast<TNamed*>(obj);
200 if (!(fGenerateFun = dynamic_cast<TMacro *>(fInput->FindObject(a->GetTitle())))) {
201 Error("SlaveBegin", "PROOF_GenerateFun requires the TMacro object in the input list");
202 }
203 continue;
204 }
205 }
206
207 if (!found_basedir){
208 Warning("SlaveBegin", "PROOF_BenchmarkBaseDir not found; using default:"
209 " %s", fBaseDir.Data());
210 }
211 if (!found_nevents){
212 Warning("SlaveBegin", "PROOF_BenchmarkNEvents not found; using default:"
213 " %lld", fNEvents);
214 }
215 if (!found_ntracks){
216 Warning("SlaveBegin", "PROOF_BenchmarkNTracks not found; using default:"
217 " %d", fNTracks);
218 }
219 if (!found_ntrkmax){
220 Warning("SlaveBegin", "PROOF_BenchmarkNTracksMax not found; using default:"
221 " %d", fNTracksMax);
222 } else if (fNTracksMax <= fNTracks) {
223 Warning("SlaveBegin", "PROOF_BenchmarkNTracksMax must be larger then"
224 " fNTracks=%d ; ignoring", fNTracks);
225 fNTracksMax = -1;
226 found_ntrkmax = kFALSE;
227 }
228 if (!found_regenerate){
229 Warning("SlaveBegin", "PROOF_BenchmarkRegenerate not found; using"
230 " default: %d", fRegenerate);
231 }
232
233 fFilesGenerated = new TList();
234
235 TString hostname(TUrl(gSystem->HostName()).GetHostFQDN());
236 TString thisordinal = gProofServ ? gProofServ->GetOrdinal() : "n.d";
237 TString sfilegenerated =
238 TString::Format("PROOF_FilesGenerated_%s_%s", hostname.Data(), thisordinal.Data());
239 fFilesGenerated->SetName(sfilegenerated);
241}
242
243////////////////////////////////////////////////////////////////////////////////
244///Generate files for IO-bound run
245///Input parameters
246/// filename: The name of the file to be generated
247/// sizenevents: Either the number of events to generate when
248/// filetype==kPBFileBenchmark
249/// or the size of the file to generate when
250/// filetype==kPBFileCleanup
251///Returns
252/// Either Number of entries in the file when
253/// filetype==kPBFileBenchmark
254/// or bytes written when filetype==kPBFileCleanup
255///return 0 in case error
256
258{
260 TDirectory* savedir = gDirectory;
261 //printf("current dir=%s\n", gDirectory->GetPath());
262
263 TFile *f = TFile::Open(filename, "RECREATE");
264
265 savedir->cd();
266
267 if (!f || f->IsZombie()) return 0;
268
269 Event *event=new Event();
270 Event *ep = event;
271 TTree* eventtree= new TTree("EventTree", "Event Tree");
272 eventtree->SetDirectory(f);
273
274 const Int_t buffersize=32000;
275 eventtree->Branch("event", "Event", &ep, buffersize, 1);
276 eventtree->AutoSave();
277
278 Long64_t i=0;
279 Long64_t size_generated=0;
280
281// f->SetCompressionLevel(0); //no compression
282 Int_t ntrks = fNTracks;
283
284 Info("GenerateFiles", "Generating %s", filename);
285 while (sizenevents--){
286 //event->Build(i++,fNTracksBench,0);
287 if (fNTracksMax > fNTracks) {
288 // Required to smear the number of tracks between [min,max]
290 }
291 event->Build(i++, ntrks, 0);
292 size_generated+=eventtree->Fill();
293 }
294 nentries=eventtree->GetEntries();
295 Info("GenerateFiles", "%s generated with %lld entries", filename, nentries);
296 savedir = gDirectory;
297
298 f = eventtree->GetCurrentFile();
299 f->cd();
300 eventtree->Write();
301 eventtree->SetDirectory(0);
302
303 f->Close();
304 delete f;
305 f = 0;
306 eventtree->Delete();
307 event->Delete();
308 savedir->cd();
309
310 return nentries;
311}
312
313////////////////////////////////////////////////////////////////////////////////
314/// The Process() function is called for each entry in the tree (or possibly
315/// keyed object in the case of PROOF) to be processed. The entry argument
316/// specifies which entry in the currently loaded tree is to be processed.
317/// It can be passed to either TTree::GetEntry() or TBranch::GetEntry()
318/// to read either all or the required parts of the data. When processing
319/// keyed objects with PROOF, the object is already loaded and is available
320/// via the fObject pointer.
321///
322/// This function should contain the "body" of the analysis. It can contain
323/// simple or elaborate selection criteria, run algorithms on the data
324/// of the event and typically fill histograms.
325
327{
328 // WARNING when a selector is used with a TChain, you must use
329 // the pointer to the current TTree to call GetEntry(entry).
330 // The entry is always the local entry number in the current tree.
331 // Assuming that fChain is the pointer to the TChain being processed,
332 // use fChain->GetTree()->GetEntry(entry).
333
334 TDSetElement *fCurrent = 0;
335 TPair *elemPair = 0;
336 if (fInput && (elemPair = dynamic_cast<TPair *>
337 (fInput->FindObject("PROOF_CurrentElement")))) {
338 if ((fCurrent = dynamic_cast<TDSetElement *>(elemPair->Value()))) {
339 Info("Process", "entry %lld: file: '%s'", entry, fCurrent->GetName());
340 } else {
341 Error("Process", "entry %lld: no file specified!", entry);
342 return kFALSE;
343 }
344 }
345
346 // Generate
347 TString filename(fCurrent->GetName());
348 if (!fBaseDir.IsNull()) {
349 if (fBaseDir.Contains("<fn>")) {
351 filename.ReplaceAll("<fn>", fCurrent->GetName());
352 } else {
353 filename.Form("%s/%s", fBaseDir.Data(), fCurrent->GetName());
354 }
355 }
356 TString fndset(filename);
357
358 // Set the Url for remote access
359 TString seed = TString::Format("%s/%s", gSystem->HostName(), filename.Data()), dsrv;
360 TUrl basedirurl(filename, kTRUE);
361 if (!strcmp(basedirurl.GetProtocol(), "file")) {
363 TProofServ::FilterLocalroot(fndset, dsrv);
364 }
365
366 //generate files
367 Long64_t neventstogenerate = fNEvents;
368
369 Long64_t entries_file=0;
370 Long64_t filesize=0;
371 Bool_t filefound=kFALSE;
372 FileStat_t filestat;
373 TUUID uuid;
374 if (!fRegenerate && !gSystem->GetPathInfo(filename, filestat)) { //stat'ed
376 if (f && !f->IsZombie()){
377 TTree* t = (TTree *) f->Get("EventTree");
378 if (t) {
379 entries_file = t->GetEntries();
380 if (entries_file == neventstogenerate) {
381 // File size seems to be correct, skip generation
382 Info("Process", "bench file (%s, entries=%lld) exists:"
383 " skipping generation.", filename.Data(), entries_file);
384 filesize = f->GetSize();
385 uuid = f->GetUUID();
386 filefound = kTRUE;
387 }
388 }
389 f->Close();
390 }
391 SafeDelete(f);
392 }
393
394 // Make sure there is enough space left of the device, if local
395 TString bdir(fBaseDir);
396 bdir.ReplaceAll("<fn>", "");
397 if (!gSystem->AccessPathName(bdir)) {
398 Long_t devid, devbsz, devbtot, devbfree;
399 gSystem->GetFsInfo(bdir, &devid, &devbsz, &devbtot, &devbfree);
400 // Must be more than 10% of space and at least 1 GB
401 Long_t szneed = 1024 * 1024 * 1024, tomb = 1024 * 1024;
402 if (devbfree * devbsz < szneed || devbfree < 0.1 * devbtot) {
403 Error("Process", "not enough free space on device (%ld MB < {%ld, %ld} MB):"
404 " skipping generation of: %s",
405 (devbfree * devbsz) / tomb,
406 szneed / tomb, (Long_t) (0.1 * devbtot * devbsz / tomb),
407 filename.Data());
409 }
410 }
411
412 if (!filefound) { // Generate
413 gRandom->SetSeed(static_cast<UInt_t>(TMath::Hash(seed)));
414 if (fGenerateFun) {
415 TString fargs = TString::Format("\"%s\",%lld", filename.Data(), neventstogenerate);
416 entries_file = (Long64_t) fGenerateFun->Exec(fargs);
417 } else {
418 entries_file = GenerateFiles(filename, neventstogenerate);
419 }
420
422 if (f && !f->IsZombie()) {
423 filesize = f->GetSize();
424 uuid = f->GetUUID();
425 f->Close();
426 } else {
427 Error("Process", "can not open generated file: %s", filename.Data());
429 return kFALSE;
430 }
431
432 SafeDelete(f);
433 }
434
435 // Add meta data to the file info
436 TFileInfoMeta* fimeta = new TFileInfoMeta("/EventTree", "TTree", entries_file);
437 TMD5* md5 = 0;
438 if (!strcmp(TUrl(filename,kTRUE).GetProtocol(), "file"))
440 TString md5s = (md5) ? md5->AsString() : "";
441 TFileInfo *fi = new TFileInfo(TString::Format("%s%s", dsrv.Data(), fndset.Data()),
442 filesize, uuid.AsString(), md5s.Data(), fimeta);
443 SafeDelete(md5);
444
445 // Mark it as staged
447
448 // Add the fileinfo to the list
450
451 return kTRUE;
452}
453
454////////////////////////////////////////////////////////////////////////////////
455/// The SlaveTerminate() function is called after all entries or objects
456/// have been processed. When running with PROOF SlaveTerminate() is called
457/// on each slave server
458
460{
463 Info("SlaveTerminate",
464 "list '%s' of files generated by this worker added to the output list",
466 } else {
467 if (!fFilesGenerated) {
468 Warning("SlaveTerminate", "no list of generated files defined!");
469 } else {
470 Warning("SlaveTerminate", "list of generated files is empty!");
471 }
472 }
473}
474
475////////////////////////////////////////////////////////////////////////////////
476/// The Terminate() function is the last function to be called during
477/// a query. It always runs on the client, it can be used to present
478/// the results graphically or save the results to file.
479
481{
482}
483
484////////////////////////////////////////////////////////////////////////////////
485
487{
488 Printf("fNEvents=%lld", fNEvents);
489 Printf("fBaseDir=%s", fBaseDir.Data());
490 Printf("fNTracks=%d", fNTracks);
491 Printf("fRegenerate=%d", fRegenerate);
492}
493
#define SafeDelete(p)
Definition RConfig.hxx:533
#define f(i)
Definition RSha256.hxx:104
#define a(i)
Definition RSha256.hxx:99
long Long_t
Definition RtypesCore.h:54
constexpr Bool_t kFALSE
Definition RtypesCore.h:94
long long Long64_t
Definition RtypesCore.h:69
constexpr Bool_t kTRUE
Definition RtypesCore.h:93
const char Option_t
Definition RtypesCore.h:66
#define ClassImp(name)
Definition Rtypes.h:382
#define gDirectory
Definition TDirectory.h:384
Option_t Option_t option
Option_t Option_t TPoint TPoint const char GetTextMagnitude GetFillStyle GetLineColor GetLineWidth GetMarkerStyle GetTextAlign GetTextColor GetTextSize void char Point_t Rectangle_t WindowAttributes_t Float_t Float_t Float_t Int_t Int_t UInt_t UInt_t Rectangle_t Int_t Int_t Window_t TString Int_t GCValues_t GetPrimarySelectionOwner GetDisplay GetScreen GetColormap GetNativeEvent const char const char dpyName wid window const char font_name cursor keysym reg const char only_if_exist regb h Point_t winding char text const char depth char const char Int_t count const char ColorStruct_t color const char filename
int nentries
R__EXTERN TProofServ * gProofServ
Definition TProofServ.h:347
R__EXTERN TRandom * gRandom
Definition TRandom.h:62
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
Definition TString.cxx:2503
@ kWritePermission
Definition TSystem.h:44
R__EXTERN TSystem * gSystem
Definition TSystem.h:561
void SetName(const char *name)
const char * GetName() const override
Return name of this collection.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual Int_t GetSize() const
Return the capacity of the collection, i.e.
Manages an element of a TDSet.
Definition TDSet.h:66
Bool_t cd() override
Change current directory to "this" directory.
Describe directory structure in memory.
Definition TDirectory.h:45
virtual Bool_t cd()
Change current directory to "this" directory.
Class describing a generic file including meta information.
Definition TFileInfo.h:39
A ROOT file is an on-disk file, usually with extension .root, that stores objects in a file-system-li...
Definition TFile.h:53
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=ROOT::RCompressionSetting::EDefaults::kUseCompiledDefault, Int_t netopt=0)
Create / open a file.
Definition TFile.cxx:4086
A doubly linked list.
Definition TList.h:38
TObject * FindObject(const char *name) const override
Find an object in this list using its name.
Definition TList.cxx:576
void Add(TObject *obj) override
Definition TList.h:81
This code implements the MD5 message-digest algorithm.
Definition TMD5.h:44
const char * AsString() const
Return message digest as string.
Definition TMD5.cxx:220
static TMD5 * FileChecksum(const char *file)
Returns checksum of specified file.
Definition TMD5.cxx:474
Class supporting a collection of lines with C++ code.
Definition TMacro.h:31
virtual Longptr_t Exec(const char *params=nullptr, Int_t *error=nullptr)
Execute this macro with params, if params is 0, default parameters (set via SetParams) are used.
Definition TMacro.cxx:262
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
Definition TMap.h:40
The TNamed class is the base class for all named ROOT classes.
Definition TNamed.h:29
const char * GetName() const override
Returns name of object.
Definition TNamed.h:47
Mother of all ROOT objects.
Definition TObject.h:41
virtual const char * GetName() const
Returns name of object.
Definition TObject.cxx:456
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Definition TObject.cxx:225
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition TObject.cxx:991
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition TObject.cxx:798
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition TObject.cxx:1005
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition TObject.cxx:979
Class used by TMap to store (key,value) pairs.
Definition TMap.h:102
TObject * Value() const
Definition TMap.h:121
Named parameter, streamable and storable.
Definition TParameter.h:35
const AParamType & GetVal() const
Definition TParameter.h:67
const char * GetOrdinal() const
Definition TProofServ.h:253
static void GetLocalServer(TString &dsrv)
Extract LOCALDATASERVER info in 'dsrv'.
static void FilterLocalroot(TString &path, const char *url="root://dum/")
If 'path' is local and 'dsrv' is Xrootd, apply 'path.Localroot' settings, if any.
const char * GetDataDir() const
Definition TProofServ.h:250
virtual void SetSeed(ULong_t seed=0)
Set the random generator seed.
Definition TRandom.cxx:615
virtual UInt_t Integer(UInt_t imax)
Returns a random integer uniformly distributed on the interval [ 0, imax-1 ].
Definition TRandom.cxx:361
Selector for event file generation.
void SlaveBegin(TTree *tree) override
The SlaveBegin() function is called after the Begin() function.
Int_t fRegenerate
TSelEventGen()
pointer to the analyzed TTree or TChain
Long64_t fNEvents
void Begin(TTree *) override
The Begin() function is called at the start of the query.
TString fBaseDir
Long64_t GenerateFiles(const char *filename, Long64_t sizenevents)
Generate files for IO-bound run Input parameters filename: The name of the file to be generated sizen...
TMacro * fGenerateFun
Bool_t Process(Long64_t entry) override
The Process() function is called for each entry in the tree (or possibly keyed object in the case of ...
void SlaveTerminate() override
The SlaveTerminate() function is called after all entries or objects have been processed.
void Init(TTree *tree) override
void Print(Option_t *option="") const override
This method must be overridden when a class wants to print itself.
void Terminate() override
The Terminate() function is the last function to be called during a query.
TList * fFilesGenerated
Int_t fNTracksMax
TList * fInput
List of objects available during processing.
Definition TSelector.h:41
TSelectorList * fOutput
! List of objects created during processing
Definition TSelector.h:42
Long64_t fStatus
Selector status.
Definition TSelector.h:37
const char * GetOption() const override
Definition TSelector.h:57
Basic string class.
Definition TString.h:139
const char * Data() const
Definition TString.h:376
TString & ReplaceAll(const TString &s1, const TString &s2)
Definition TString.h:704
Ssiz_t Last(char c) const
Find last occurrence of a character c.
Definition TString.cxx:931
Bool_t IsNull() const
Definition TString.h:414
TString & Remove(Ssiz_t pos)
Definition TString.h:685
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
Definition TString.cxx:2378
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition TString.h:632
virtual int GetFsInfo(const char *path, Long_t *id, Long_t *bsize, Long_t *blocks, Long_t *bfree)
Get info about a file system: fs type, block size, number of blocks, number of free blocks.
Definition TSystem.cxx:1472
virtual int mkdir(const char *name, Bool_t recursive=kFALSE)
Make a file system directory.
Definition TSystem.cxx:906
int GetPathInfo(const char *path, Long_t *id, Long_t *size, Long_t *flags, Long_t *modtime)
Get info about a file: id, size, flags, modification time.
Definition TSystem.cxx:1398
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
Definition TSystem.cxx:1296
virtual const char * HostName()
Return the system's host name.
Definition TSystem.cxx:303
virtual Bool_t IsAbsoluteFileName(const char *dir)
Return true if dir is an absolute pathname.
Definition TSystem.cxx:951
A TTree represents a columnar dataset.
Definition TTree.h:79
virtual Int_t Fill()
Fill all branches.
Definition TTree.cxx:4593
TFile * GetCurrentFile() const
Return pointer to the current file.
Definition TTree.cxx:5469
virtual void SetDirectory(TDirectory *dir)
Change the tree's directory.
Definition TTree.cxx:8956
void Delete(Option_t *option="") override
Delete this tree from memory or/and disk.
Definition TTree.cxx:3737
virtual Long64_t GetEntries() const
Definition TTree.h:463
virtual Long64_t AutoSave(Option_t *option="")
AutoSave tree header every fAutoSave bytes.
Definition TTree.cxx:1490
TBranch * Branch(const char *name, T *obj, Int_t bufsize=32000, Int_t splitlevel=99)
Add a new branch, and infer the data type from the type of obj being passed.
Definition TTree.h:353
Int_t Write(const char *name=nullptr, Int_t option=0, Int_t bufsize=0) override
Write this object to the current directory.
Definition TTree.cxx:9743
This class defines a UUID (Universally Unique IDentifier), also known as GUIDs (Globally Unique IDent...
Definition TUUID.h:42
const char * AsString() const
Return UUID as string. Copy string immediately since it will be reused.
Definition TUUID.cxx:571
void GetUUID(UChar_t uuid[16]) const
Return uuid in specified buffer (16 byte = 128 bits).
Definition TUUID.cxx:695
This class represents a WWW compatible URL.
Definition TUrl.h:33
const char * GetFile() const
Definition TUrl.h:69
const char * GetHostFQDN() const
Return fully qualified domain name of url host.
Definition TUrl.cxx:472
const char * GetProtocol() const
Definition TUrl.h:64
void SetFile(const char *file)
Definition TUrl.h:85
ULong_t Hash(const void *txt, Int_t ntxt)
Calculates hash index from any char string.
Definition TMath.cxx:1408