42 :
TNamed(path,
""), fRunType(
type), fTypeOpt(opt)
69 const char *option,
const char *dsname)
81 if (option && strlen(option) > 0) {
122 if (dsname && strlen(dsname) > 0) {
150 Error(
"Init",
"problems asserting path '%s'", dirPath.
Data());
154 Warning(
"Init",
"not allowed to create files under '%s' - chrooting to '%s'",
156 dirPath.
Insert(0, dirData);
159 if (dirPath[0] !=
'/') dirPath.
Insert(0,
"/");
160 dirPath.
Insert(0, dirData);
161 }
else if (dirPath[0] ==
'.' || dirPath[0] ==
'~') {
163 if (dirPath[0] !=
'/') dirPath.
Insert(0,
"/");
164 dirPath.
Insert(0, dirData);
165 }
else if (dirPath.
IsNull()) {
174 if (!dirPath.
EndsWith(
"/")) dirPath +=
"/";
180 if (!dirPath.
EndsWith(
"/")) dirPath +=
"/";
184 if (!dirPath.
EndsWith(
"/")) dirPath +=
"/";
195 Error(
"Init",
"problems asserting path '%s'", dirPath.
Data());
214 if (!fileName.
EndsWith(
".root")) fileName +=
".root";
276 if (!
f || (
f &&
f->IsZombie())) {
277 Error(
"AdoptFile",
"file is undefined or zombie!");
280 const TUrl *u =
f->GetEndpointUrl();
282 Error(
"AdoptFile",
"file end-point url is undefined!");
319 if(!list || list->
IsEmpty())
return 0;
329 Error(
"Merge",
"could not instantiate the file merger");
342 while((o = next())) {
355 Error(
"Merge",
"could not instantiate the file collection");
388 while((o = next())) {
413 PDB(kOutput,2)
Info(
"Merge",
"Done");
429 Info(
"Print",
" run type: create a merged file");
430 Info(
"Print",
" merging option: %s",
437 Info(
"Print",
" run type: create dataset (name: '%s', opt: '%s')",
442 Info(
"Print",
"-------------- %s : done -------------",
GetName());
458 Info(
"NotifyError",
"called with empty message");
469 if (merger && path) {
472 " error from TFileMerger::AddFile(%s)", path));
485 " error from TSystem::Unlink(%s)", path));
527 TIter nxp(&subPaths);
533 ::Warning(
"TProofOutputFile::AssertDir",
"problems setting mode on '%s'", xpath.
Data());
535 ::Error(
"TProofOutputFile::AssertDir",
"problems creating path '%s'", xpath.
Data());
540 ::Warning(
"TProofOutputFile::AssertDir",
"could not get info for path '%s': will only try to create"
541 " the full path w/o trying to set the mode", existsPath.
Data());
543 ::Error(
"TProofOutputFile::AssertDir",
"problems creating path '%s'", existsPath.
Data());
R__EXTERN TProofServ * gProofServ
char * Form(const char *fmt,...)
void Printf(const char *fmt,...)
R__EXTERN TSystem * gSystem
Collection abstract base class.
virtual void SetOwner(Bool_t enable=kTRUE)
Set whether this collection is the owner (enable==true) of its content.
virtual Bool_t IsEmpty() const
virtual Int_t GetValue(const char *name, Int_t dflt) const
Returns the integer value for a resource.
virtual TEnvRec * Lookup(const char *n) const
Loop over all resource records and return the one with name.
Class that contains a list of TFileInfo's and accumulated meta data information about its entries.
Int_t Update(Long64_t avgsize=-1)
Update accumulated information about the elements of the collection (e.g.
Long64_t GetNFiles() const
Int_t Add(TFileInfo *info)
Add TFileInfo to the collection.
Class describing a generic file including meta information.
void Print(Option_t *options="") const
Print information about this object.
Bool_t AddUrl(const char *url, Bool_t infront=kFALSE)
Add a new URL.
TUrl * GetFirstUrl() const
This class provides file copy and merging services.
virtual Bool_t OutputFile(const char *url, Bool_t force)
Open merger output file.
virtual Bool_t AddFile(TFile *source, Bool_t own, Bool_t cpProgress)
Add the TFile to this file merger and give ownership of the TFile to this object (unless kFALSE is re...
A ROOT file is a suite of consecutive data records (TKey instances) with a well defined format.
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.
virtual void AddFirst(TObject *obj)
Add object at the beginning of the list.
The TNamed class is the base class for all named ROOT classes.
virtual void SetTitle(const char *title="")
Set the title of the TNamed.
virtual void SetName(const char *name)
Set the name of the TNamed.
virtual const char * GetTitle() const
Returns title of object.
virtual const char * GetName() const
Returns name of object.
Collectable string class.
const char * GetName() const
Returns name of object.
Mother of all ROOT objects.
virtual void Warning(const char *method, const char *msgfmt,...) const
Issue warning message.
void SetBit(UInt_t f, Bool_t set)
Set or unset the user status bits as specified in f.
virtual void Error(const char *method, const char *msgfmt,...) const
Issue error message.
virtual void Info(const char *method, const char *msgfmt,...) const
Issue info message.
Class to steer the merging of files produced on the workers.
void Unlink(const char *path)
Unlink path.
const char * GetDir(Bool_t raw=kFALSE) const
static Int_t AssertDir(const char *dirpath)
Assert directory path 'dirpath', with the ownership of the last already existing subpath.
const char * GetLocalHost() const
TFile * OpenFile(const char *opt)
Open the file using the unique temporary name.
const char * GetFileName() const
void AddFile(TFileMerger *merger, const char *path)
Add file to merger, checking the result.
TFileCollection * GetFileCollection()
Get instance of the file collection to be used in 'dataset' mode.
TFileCollection * fDataSet
Long64_t Merge(TCollection *list)
Merge objects from the list into this object.
void Init(const char *path, const char *dsname)
Initializer. Called by all constructors.
void SetOutputFileName(const char *name)
Set the name of the output file; in the form of an Url.
void Print(Option_t *option="") const
Dump the class content.
void NotifyError(const char *errmsg)
Notify error message.
Int_t AdoptFile(TFile *f)
Adopt a file already open.
TFileMerger * GetFileMerger(Bool_t local=kFALSE)
Get instance of the file merger to be used in 'merge' mode.
const char * GetOptionsAnchor() const
virtual ~TProofOutputFile()
Main destructor.
const char * GetOrdinal() const
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.
void SendAsynMessage(const char *msg, Bool_t lf=kTRUE)
Send an asychronous message to the master / client .
static void ResolveKeywords(TString &fname, const char *path=0)
Replace <ord>, <user>, <u>, <group>, <stag>, <qnum>, <file>, <rver> and <build> placeholders in fname...
const char * GetDataDir() const
const char * GetSessionTag() const
TString & Insert(Ssiz_t pos, const char *s)
Bool_t EndsWith(const char *pat, ECaseCompare cmp=kExact) const
Return true if string ends with the specified string.
const char * Data() const
TString & ReplaceAll(const TString &s1, const TString &s2)
Bool_t BeginsWith(const char *s, ECaseCompare cmp=kExact) const
TString & Remove(Ssiz_t pos)
static TString Format(const char *fmt,...)
Static method which formats a string using a printf style format descriptor and return a TString.
void Form(const char *fmt,...)
Formats a string using a printf style format descriptor.
Bool_t Contains(const char *pat, ECaseCompare cmp=kExact) const
Ssiz_t Index(const char *pat, Ssiz_t i=0, ECaseCompare cmp=kExact) const
virtual int Chmod(const char *file, UInt_t mode)
Set the file permission bits. Returns -1 in case or error, 0 otherwise.
virtual int mkdir(const char *name, Bool_t recursive=kFALSE)
Make a file system directory.
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.
virtual Bool_t AccessPathName(const char *path, EAccessMode mode=kFileExists)
Returns FALSE if one can access a file using the specified access mode.
virtual const char * BaseName(const char *pathname)
Base name of a file name. Base name of /user/root is root.
virtual const char * HostName()
Return the system's host name.
virtual const char * WorkingDirectory()
Return working directory.
virtual TString GetDirName(const char *pathname)
Return the directory name in pathname.
virtual int Unlink(const char *name)
Unlink, i.e.
This class represents a WWW compatible URL.
const char * GetAnchor() const
const char * GetUrl(Bool_t withDeflt=kFALSE) const
Return full URL.
const char * GetFile() const
void SetUser(const char *user)
void SetProtocol(const char *proto, Bool_t setDefaultPort=kFALSE)
Set protocol and, optionally, change the port accordingly.
const char * GetUser() const
const char * GetHost() const
const char * GetHostFQDN() const
Return fully qualified domain name of url host.
const char * GetOptions() const
void SetHost(const char *host)
const char * GetProtocol() const