ROOT  6.06/09
Reference Guide
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 //////////////////////////////////////////////////////////////////////////
13 // //
14 // TSelEventGen //
15 // //
16 // PROOF selector for event file generation. //
17 // List of files to be generated for each node is provided by client. //
18 // And list of files generated is sent back. //
19 // Existing files are reused if not forced to be regenerated. //
20 // //
21 //////////////////////////////////////////////////////////////////////////
22 
23 #define TSelEventGen_cxx
24 
25 #include "TSelEventGen.h"
26 #include "TParameter.h"
27 #include "TProofNodeInfo.h"
28 #include "TProofBenchTypes.h"
29 #include "TProof.h"
30 #include "TMap.h"
31 #include "TDSet.h"
32 #include "TEnv.h"
33 #include "TFileInfo.h"
34 #include "TFile.h"
35 #include "TSortedList.h"
36 #include "TRandom.h"
37 #include "Event.h"
38 #include "TProofServ.h"
39 #include "TMacro.h"
40 
42 
43 ////////////////////////////////////////////////////////////////////////////////
44 /// Constructor
45 
47  : fBaseDir(""), fNEvents(100000), fNTracks(100), fNTracksMax(-1),
48  fRegenerate(kFALSE), fTotalGen(0), fFilesGenerated(0),
49  fGenerateFun(0), fChain(0)
50 {
51  if (gProofServ){
52  fBaseDir=gProofServ->GetDataDir();
53  // Two directories up
54  fBaseDir.Remove(fBaseDir.Last('/'));
55  fBaseDir.Remove(fBaseDir.Last('/'));
56  }
57  else{
58  fBaseDir="";
59  }
60 }
61 
62 ////////////////////////////////////////////////////////////////////////////////
63 /// The Begin() function is called at the start of the query.
64 /// When running with PROOF Begin() is only called on the client.
65 /// The tree argument is deprecated (on PROOF 0 is passed).
66 
68 {
69  TString option = GetOption();
70  // Determine the test type
71  TMap *filemap = dynamic_cast<TMap *>
72  (fInput->FindObject("PROOF_FilesToProcess"));
73  if (filemap) {
74  //Info("Begin", "dumping the file map:");
75  //filemap->Print();
76  } else {
77  if (fInput->FindObject("PROOF_FilesToProcess")) {
78  Error("Begin", "object 'PROOF_FilesToProcess' found but not a map"
79  " (%s)", fInput->FindObject("PROOF_FilesToProcess")->ClassName());
80  } else {
81  Error("Begin", "object 'PROOF_FilesToProcess' not found");
82  }
83  }
84 }
85 
86 ////////////////////////////////////////////////////////////////////////////////
87 /// The SlaveBegin() function is called after the Begin() function.
88 /// When running with PROOF SlaveBegin() is called on each slave server.
89 /// The tree argument is deprecated (on PROOF 0 is passed).
90 
92 {
93  Init(tree);
94 
95  TString option = GetOption();
96 
97  //get parameters
98 
99  Bool_t found_basedir=kFALSE;
100  Bool_t found_nevents=kFALSE;
101  Bool_t found_ntracks=kFALSE;
102  Bool_t found_ntrkmax=kFALSE;
103  Bool_t found_regenerate=kFALSE;
104 
105  TIter nxt(fInput);
106  TString sinput;
107  TObject *obj;
108 
109  while ((obj = nxt())){
110 
111  sinput=obj->GetName();
112  //Info("SlaveBegin", "Input list: %s", sinput.Data());
113 
114  if (sinput.Contains("PROOF_BenchmarkBaseDir")){
115  TNamed* a = dynamic_cast<TNamed*>(obj);
116  if (a){
117  TString bdir = a->GetTitle();
118  if (!bdir.IsNull()){
119  TUrl u(bdir, kTRUE);
120  Bool_t isLocal = !strcmp(u.GetProtocol(), "file") ? kTRUE : kFALSE;
121  if (isLocal && !gSystem->IsAbsoluteFileName(u.GetFile()))
122  u.SetFile(TString::Format("%s/%s", fBaseDir.Data(), u.GetFile()));
123  if (isLocal) {
124  if ((gSystem->AccessPathName(u.GetFile()) &&
125  gSystem->mkdir(u.GetFile(), kTRUE) == 0) ||
127  // Directory is writable
128  fBaseDir = u.GetFile();
129  Info("SlaveBegin", "using base directory \"%s\"", fBaseDir.Data());
130  } else{
131  // Directory is not writable or not available, use default directory
132  Warning("SlaveBegin", "\"%s\" directory is not writable or not existing,"
133  " using default directory: %s",
134  bdir.Data(), fBaseDir.Data());
135  }
136  } else {
137  // We assume the user knows what it does
138  fBaseDir = bdir;
139  Info("SlaveBegin", "using non local base directory \"%s\"", fBaseDir.Data());
140  }
141  } else{
142  Info("SlaveBegin", "using default directory: %s",
143  fBaseDir.Data());
144  }
145  found_basedir=kTRUE;
146  }
147  else{
148  Error("SlaveBegin", "PROOF_BenchmarkBaseDir not type TNamed");
149  }
150  continue;
151  }
152  if (sinput.Contains("PROOF_BenchmarkNEvents")){
154  if (a){
155  fNEvents= a->GetVal();
156  found_nevents=kTRUE;
157  }
158  else{
159  Error("SlaveBegin", "PROOF_BenchmarkEvents not type TParameter"
160  "<Long64_t>*");
161  }
162  continue;
163  }
164  if (sinput.Contains("PROOF_BenchmarkNTracks")){
165  TParameter<Int_t>* a=dynamic_cast<TParameter<Int_t>*>(obj);
166  if (a){
167  fNTracks=a->GetVal();
168  found_ntracks=kTRUE;
169  }
170  else{
171  Error("SlaveBegin", "PROOF_BenchmarkNTracks not type TParameter"
172  "<Int_t>*");
173  }
174  continue;
175  }
176  if (sinput.Contains("PROOF_BenchmarkNTracksMax")){
177  TParameter<Int_t>* a=dynamic_cast<TParameter<Int_t>*>(obj);
178  if (a){
179  fNTracksMax=a->GetVal();
180  found_ntrkmax=kTRUE;
181  }
182  else{
183  Error("SlaveBegin", "PROOF_BenchmarkNTracksMax not type TParameter"
184  "<Int_t>*");
185  }
186  continue;
187  }
188  if (sinput.Contains("PROOF_BenchmarkRegenerate")){
189  TParameter<Int_t>* a=dynamic_cast<TParameter<Int_t>*>(obj);
190  if (a){
191  fRegenerate=a->GetVal();
192  found_regenerate=kTRUE;
193  }
194  else{
195  Error("SlaveBegin", "PROOF_BenchmarkRegenerate not type TParameter"
196  "<Int_t>*");
197  }
198  continue;
199  }
200  if (sinput.Contains("PROOF_GenerateFun")){
201  TNamed *a = dynamic_cast<TNamed*>(obj);
202  if (!(fGenerateFun = dynamic_cast<TMacro *>(fInput->FindObject(a->GetTitle())))) {
203  Error("SlaveBegin", "PROOF_GenerateFun requires the TMacro object in the input list");
204  }
205  continue;
206  }
207  }
208 
209  if (!found_basedir){
210  Warning("SlaveBegin", "PROOF_BenchmarkBaseDir not found; using default:"
211  " %s", fBaseDir.Data());
212  }
213  if (!found_nevents){
214  Warning("SlaveBegin", "PROOF_BenchmarkNEvents not found; using default:"
215  " %lld", fNEvents);
216  }
217  if (!found_ntracks){
218  Warning("SlaveBegin", "PROOF_BenchmarkNTracks not found; using default:"
219  " %d", fNTracks);
220  }
221  if (!found_ntrkmax){
222  Warning("SlaveBegin", "PROOF_BenchmarkNTracksMax not found; using default:"
223  " %d", fNTracksMax);
224  } else if (fNTracksMax <= fNTracks) {
225  Warning("SlaveBegin", "PROOF_BenchmarkNTracksMax must be larger then"
226  " fNTracks=%d ; ignoring", fNTracks);
227  fNTracksMax = -1;
228  found_ntrkmax = kFALSE;
229  }
230  if (!found_regenerate){
231  Warning("SlaveBegin", "PROOF_BenchmarkRegenerate not found; using"
232  " default: %d", fRegenerate);
233  }
234 
235  fFilesGenerated = new TList();
236 
237  TString hostname(TUrl(gSystem->HostName()).GetHostFQDN());
238  TString thisordinal = gProofServ ? gProofServ->GetOrdinal() : "n.d";
239  TString sfilegenerated =
240  TString::Format("PROOF_FilesGenerated_%s_%s", hostname.Data(), thisordinal.Data());
241  fFilesGenerated->SetName(sfilegenerated);
243 }
244 
245 ////////////////////////////////////////////////////////////////////////////////
246 ///Generate files for IO-bound run
247 ///Input parameters
248 /// filename: The name of the file to be generated
249 /// sizenevents: Either the number of events to generate when
250 /// filetype==kPBFileBenchmark
251 /// or the size of the file to generate when
252 /// filetype==kPBFileCleanup
253 ///Returns
254 /// Either Number of entries in the file when
255 /// filetype==kPBFileBenchmark
256 /// or bytes written when filetype==kPBFileCleanup
257 ///return 0 in case error
258 
260 {
261  Long64_t nentries=0;
262  TDirectory* savedir = gDirectory;
263  //printf("current dir=%s\n", gDirectory->GetPath());
264 
265  TFile *f = TFile::Open(filename, "RECREATE");
266 
267  savedir->cd();
268 
269  if (!f || f->IsZombie()) return 0;
270 
271  Event *event=new Event();
272  Event *ep = event;
273  TTree* eventtree= new TTree("EventTree", "Event Tree");
274  eventtree->SetDirectory(f);
275 
276  const Int_t buffersize=32000;
277  eventtree->Branch("event", "Event", &ep, buffersize, 1);
278  eventtree->AutoSave();
279 
280  Long64_t i=0;
281  Long64_t size_generated=0;
282 
283 // f->SetCompressionLevel(0); //no compression
284  Int_t ntrks = fNTracks;
285 
286  Info("GenerateFiles", "Generating %s", filename);
287  while (sizenevents--){
288  //event->Build(i++,fNTracksBench,0);
289  if (fNTracksMax > fNTracks) {
290  // Required to smear the number of tracks between [min,max]
292  }
293  event->Build(i++, ntrks, 0);
294  size_generated+=eventtree->Fill();
295  }
296  nentries=eventtree->GetEntries();
297  Info("GenerateFiles", "%s generated with %lld entries", filename, nentries);
298  savedir = gDirectory;
299 
300  f = eventtree->GetCurrentFile();
301  f->cd();
302  eventtree->Write();
303  eventtree->SetDirectory(0);
304 
305  f->Close();
306  delete f;
307  f = 0;
308  eventtree->Delete();
309  event->Delete();
310  savedir->cd();
311 
312  return nentries;
313 }
314 
315 ////////////////////////////////////////////////////////////////////////////////
316 /// The Process() function is called for each entry in the tree (or possibly
317 /// keyed object in the case of PROOF) to be processed. The entry argument
318 /// specifies which entry in the currently loaded tree is to be processed.
319 /// It can be passed to either TTree::GetEntry() or TBranch::GetEntry()
320 /// to read either all or the required parts of the data. When processing
321 /// keyed objects with PROOF, the object is already loaded and is available
322 /// via the fObject pointer.
323 ///
324 /// This function should contain the "body" of the analysis. It can contain
325 /// simple or elaborate selection criteria, run algorithms on the data
326 /// of the event and typically fill histograms.
327 
329 {
330  // WARNING when a selector is used with a TChain, you must use
331  // the pointer to the current TTree to call GetEntry(entry).
332  // The entry is always the local entry number in the current tree.
333  // Assuming that fChain is the pointer to the TChain being processed,
334  // use fChain->GetTree()->GetEntry(entry).
335 
336  TDSetElement *fCurrent = 0;
337  TPair *elemPair = 0;
338  if (fInput && (elemPair = dynamic_cast<TPair *>
339  (fInput->FindObject("PROOF_CurrentElement")))) {
340  if ((fCurrent = dynamic_cast<TDSetElement *>(elemPair->Value()))) {
341  Info("Process", "entry %lld: file: '%s'", entry, fCurrent->GetName());
342  } else {
343  Error("Process", "entry %lld: no file specified!", entry);
344  return kFALSE;
345  }
346  }
347 
348  // Generate
349  TString filename(fCurrent->GetName());
350  if (!fBaseDir.IsNull()) {
351  if (fBaseDir.Contains("<fn>")) {
352  filename = fBaseDir;
353  filename.ReplaceAll("<fn>", fCurrent->GetName());
354  } else {
355  filename.Form("%s/%s", fBaseDir.Data(), fCurrent->GetName());
356  }
357  }
358  TString fndset(filename);
359 
360  // Set the Url for remote access
361  TString seed = TString::Format("%s/%s", gSystem->HostName(), filename.Data()), dsrv;
362  TUrl basedirurl(filename, kTRUE);
363  if (!strcmp(basedirurl.GetProtocol(), "file")) {
365  TProofServ::FilterLocalroot(fndset, dsrv);
366  }
367 
368  //generate files
369  Long64_t neventstogenerate = fNEvents;
370 
371  Long64_t entries_file=0;
372  Long64_t filesize=0;
373  Bool_t filefound=kFALSE;
374  FileStat_t filestat;
375  TUUID uuid;
376  if (!fRegenerate && !gSystem->GetPathInfo(filename, filestat)) { //stat'ed
378  if (f && !f->IsZombie()){
379  TTree* t = (TTree *) f->Get("EventTree");
380  if (t) {
381  entries_file = t->GetEntries();
382  if (entries_file == neventstogenerate) {
383  // File size seems to be correct, skip generation
384  Info("Process", "bench file (%s, entries=%lld) exists:"
385  " skipping generation.", filename.Data(), entries_file);
386  filesize = f->GetSize();
387  uuid = f->GetUUID();
388  filefound = kTRUE;
389  }
390  }
391  f->Close();
392  }
393  SafeDelete(f);
394  }
395 
396  // Make sure there is enough space left of the device, if local
397  TString bdir(fBaseDir);
398  bdir.ReplaceAll("<fn>", "");
399  if (!gSystem->AccessPathName(bdir)) {
400  Long_t devid, devbsz, devbtot, devbfree;
401  gSystem->GetFsInfo(bdir, &devid, &devbsz, &devbtot, &devbfree);
402  // Must be more than 10% of space and at least 1 GB
403  Long_t szneed = 1024 * 1024 * 1024, tomb = 1024 * 1024;
404  if (devbfree * devbsz < szneed || devbfree < 0.1 * devbtot) {
405  Error("Process", "not enough free space on device (%ld MB < {%ld, %ld} MB):"
406  " skipping generation of: %s",
407  (devbfree * devbsz) / tomb,
408  szneed / tomb, (Long_t) (0.1 * devbtot * devbsz / tomb),
409  filename.Data());
411  }
412  }
413 
414  if (!filefound) { // Generate
415  gRandom->SetSeed(static_cast<UInt_t>(TMath::Hash(seed)));
416  if (fGenerateFun) {
417  TString fargs = TString::Format("\"%s\",%lld", filename.Data(), neventstogenerate);
418  entries_file = (Long64_t) fGenerateFun->Exec(fargs);
419  } else {
420  entries_file = GenerateFiles(filename, neventstogenerate);
421  }
422 
424  if (f && !f->IsZombie()) {
425  filesize = f->GetSize();
426  uuid = f->GetUUID();
427  f->Close();
428  } else {
429  Error("Process", "can not open generated file: %s", filename.Data());
431  return kFALSE;
432  }
433 
434  SafeDelete(f);
435  }
436 
437  // Add meta data to the file info
438  TFileInfoMeta* fimeta = new TFileInfoMeta("/EventTree", "TTree", entries_file);
439  TMD5* md5 = 0;
440  if (!strcmp(TUrl(filename,kTRUE).GetProtocol(), "file"))
442  TString md5s = (md5) ? md5->AsString() : "";
443  TFileInfo *fi = new TFileInfo(TString::Format("%s%s", dsrv.Data(), fndset.Data()),
444  filesize, uuid.AsString(), md5s.Data(), fimeta);
445  SafeDelete(md5);
446 
447  // Mark it as staged
449 
450  // Add the fileinfo to the list
452 
453  return kTRUE;
454 }
455 
456 ////////////////////////////////////////////////////////////////////////////////
457 /// The SlaveTerminate() function is called after all entries or objects
458 /// have been processed. When running with PROOF SlaveTerminate() is called
459 /// on each slave server
460 
462 {
463  if (fFilesGenerated && fFilesGenerated->GetSize() > 0) {
465  Info("SlaveTerminate",
466  "list '%s' of files generated by this worker added to the output list",
468  } else {
469  if (!fFilesGenerated) {
470  Warning("SlaveTerminate", "no list of generated files defined!");
471  } else {
472  Warning("SlaveTerminate", "list of generated files is empty!");
473  }
474  }
475 }
476 
477 ////////////////////////////////////////////////////////////////////////////////
478 /// The Terminate() function is the last function to be called during
479 /// a query. It always runs on the client, it can be used to present
480 /// the results graphically or save the results to file.
481 
483 {
484 }
485 
486 ////////////////////////////////////////////////////////////////////////////////
487 
489 {
490  Printf("fNEvents=%lld", fNEvents);
491  Printf("fBaseDir=%s", fBaseDir.Data());
492  Printf("fNTracks=%d", fNTracks);
493  Printf("fRegenerate=%d", fRegenerate);
494 }
495 
virtual const char * GetOption() const
Definition: TSelector.h:65
void SetFile(const char *file)
Definition: TUrl.h:94
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
TString fBaseDir
Definition: TSelEventGen.h:43
virtual const char * GetTitle() const
Returns title of object.
Definition: TNamed.h:52
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:1265
virtual Bool_t IsAbsoluteFileName(const char *dir)
Return true if dir is an absolute pathname.
Definition: TSystem.cxx:945
virtual Long64_t GetSize() const
Returns the current file size.
Definition: TFile.cxx:1279
TSelectorList * fOutput
Definition: TSelector.h:50
long long Long64_t
Definition: RtypesCore.h:69
virtual const char * GetName() const
Return name of this collection.
static TMD5 * FileChecksum(const char *file)
Returns checksum of specified file.
Definition: TMD5.cxx:472
virtual void Delete(Option_t *option="")
Delete this tree from memory or/and disk.
Definition: TTree.cxx:3520
const char Option_t
Definition: RtypesCore.h:62
This class represents a WWW compatible URL.
Definition: TUrl.h:41
TString & ReplaceAll(const TString &s1, const TString &s2)
Definition: TString.h:635
const char * GetDataDir() const
Definition: TProofServ.h:262
static void FilterLocalroot(TString &path, const char *url="root://dum/")
If 'path' is local and 'dsrv' is Xrootd, apply 'path.Localroot' settings, if any. ...
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:1363
#define gDirectory
Definition: TDirectory.h:218
virtual Int_t Fill()
Fill all branches.
Definition: TTree.cxx:4328
Long64_t fNEvents
Definition: TSelEventGen.h:45
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
const char * GetProtocol() const
Definition: TUrl.h:73
virtual void SlaveBegin(TTree *tree)
The SlaveBegin() function is called after the Begin() function.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Definition: TObject.cxx:892
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format...
Definition: TFile.h:45
virtual TObject * Get(const char *namecycle)
Return pointer to object identified by namecycle.
static const char * filename()
virtual Long_t Exec(const char *params=0, Int_t *error=0)
Execute this macro with params, if params is 0, default parameters (set via SetParams) are used...
Definition: TMacro.cxx:264
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:1437
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...
Bool_t IsZombie() const
Definition: TObject.h:141
Basic string class.
Definition: TString.h:137
int Int_t
Definition: RtypesCore.h:41
bool Bool_t
Definition: RtypesCore.h:59
TArc * a
Definition: textangle.C:12
const Bool_t kFALSE
Definition: Rtypes.h:92
virtual TObject * FindObject(const char *name) const
Find an object in this list using its name.
Definition: TList.cxx:496
virtual void SetSeed(UInt_t seed=0)
Set the random generator seed.
Definition: TRandom.cxx:568
TFile * GetCurrentFile() const
Return pointer to the current file.
Definition: TTree.cxx:5006
virtual void SlaveTerminate()
The SlaveTerminate() function is called after all entries or objects have been processed.
virtual int mkdir(const char *name, Bool_t recursive=kFALSE)
Make a file system directory.
Definition: TSystem.cxx:900
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
Definition: TObject.cxx:732
Int_t fRegenerate
Definition: TSelEventGen.h:48
static TFile * Open(const char *name, Option_t *option="", const char *ftitle="", Int_t compress=1, Int_t netopt=0)
Create / open a file.
Definition: TFile.cxx:3851
This class defines a UUID (Universally Unique IDentifier), also known as GUIDs (Globally Unique IDent...
Definition: TUUID.h:44
virtual void Print(Option_t *option="") const
This method must be overridden when a class wants to print itself.
const char * Data() const
Definition: TString.h:349
#define SafeDelete(p)
Definition: RConfig.h:436
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:2334
const char * AsString() const
Return message digest as string.
Definition: TMD5.cxx:218
virtual void Terminate()
The Terminate() function is the last function to be called during a query.
This code implements the MD5 message-digest algorithm.
Definition: TMD5.h:46
The TNamed class is the base class for all named ROOT classes.
Definition: TNamed.h:33
ClassImp(TSelEventGen) TSelEventGen
Constructor.
virtual UInt_t Integer(UInt_t imax)
Returns a random integer on [ 0, imax-1 ].
Definition: TRandom.cxx:320
TList * fFilesGenerated
Definition: TSelEventGen.h:51
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
Definition: TObject.cxx:918
A doubly linked list.
Definition: TList.h:47
virtual Int_t Write(const char *name=0, Int_t option=0, Int_t bufsize=0)
Write this object to the current directory.
Definition: TTree.cxx:8811
TMacro * fGenerateFun
Definition: TSelEventGen.h:53
R__EXTERN TSystem * gSystem
Definition: TSystem.h:549
Long64_t fStatus
Definition: TSelector.h:45
static void GetLocalServer(TString &dsrv)
Extract LOCALDATASERVER info in 'dsrv'.
virtual const char * ClassName() const
Returns name of class to which the object belongs.
Definition: TObject.cxx:187
TObject * Value() const
Definition: TMap.h:125
const char * AsString() const
Return UUID as string. Copy string immediately since it will be reused.
Definition: TUUID.cxx:531
virtual const char * GetName() const
Returns name of object.
Definition: TNamed.h:51
Bool_t IsNull() const
Definition: TString.h:387
void SetName(const char *name)
Definition: TCollection.h:116
R__EXTERN TRandom * gRandom
Definition: TRandom.h:62
Long64_t entry
ULong_t Hash(const void *txt, Int_t ntxt)
Calculates hash index from any char string.
Definition: TMath.cxx:1371
#define Printf
Definition: TGeoToOCC.h:18
long Long_t
Definition: RtypesCore.h:50
Class used by TMap to store (key,value) pairs.
Definition: TMap.h:106
virtual Int_t GetSize() const
Definition: TCollection.h:95
virtual void SetDirectory(TDirectory *dir)
Change the tree's directory.
Definition: TTree.cxx:8095
double f(double x)
virtual const char * GetName() const
Returns name of object.
Definition: TObject.cxx:415
virtual const char * HostName()
Return the system's host name.
Definition: TSystem.cxx:307
Describe directory structure in memory.
Definition: TDirectory.h:41
TMap implements an associative array of (key,value) pairs using a THashTable for efficient retrieval ...
Definition: TMap.h:44
virtual Bool_t Process(Long64_t entry)
The Process() function is called for each entry in the tree (or possibly keyed object in the case of ...
const char * GetOrdinal() const
Definition: TProofServ.h:265
int nentries
Definition: THbookFile.cxx:89
Int_t fNTracksMax
Definition: TSelEventGen.h:47
Int_t fNTracks
Definition: TSelEventGen.h:46
Mother of all ROOT objects.
Definition: TObject.h:58
virtual Int_t Branch(TCollection *list, Int_t bufsize=32000, Int_t splitlevel=99, const char *name="")
Create one branch for each element in the collection.
Definition: TTree.cxx:1624
TList * fInput
Current object if processing object (vs. TTree)
Definition: TSelector.h:49
virtual Bool_t cd(const char *path=0)
Change current directory to "this" directory.
Definition: TDirectory.cxx:433
R__EXTERN TProofServ * gProofServ
Definition: TProofServ.h:359
virtual void Add(TObject *obj)
Definition: TList.h:81
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Definition: TString.h:567
virtual void Init(TTree *tree)
virtual Long64_t GetEntries() const
Definition: TTree.h:382
A TTree object has a header with a name and a title.
Definition: TTree.h:94
Class describing a generic file including meta information.
Definition: TFileInfo.h:50
const AParamType & GetVal() const
Definition: TParameter.h:77
virtual void Begin(TTree *)
The Begin() function is called at the start of the query.
const Bool_t kTRUE
Definition: Rtypes.h:91
TObject * obj
const char * GetFile() const
Definition: TUrl.h:78
TUUID GetUUID() const
Definition: TDirectory.h:165
virtual void Close(Option_t *option="")
Close a file.
Definition: TFile.cxx:898
virtual Long64_t AutoSave(Option_t *option="")
AutoSave tree header every fAutoSave bytes.
Definition: TTree.cxx:1309
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
Definition: TObject.cxx:904