42 :
TNamed(path,
""), fRunType(
type), fTypeOpt(opt)
69 const char *
option,
const char *dsname)
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");
363 PDB(kOutput,2)
Info(
"Merge",
"dataset: %s (nfiles: %lld)", dataset->GetName(), dataset->GetNFiles());
364 if (dataset->GetNFiles() == 0) {
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());
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 Pixmap_t Pixmap_t PictureAttributes_t attr const char char ret_data h unsigned char height h Atom_t Int_t ULong_t ULong_t unsigned char prop_list Atom_t Atom_t Atom_t Time_t type
R__EXTERN TProofServ * gProofServ
char * Form(const char *fmt,...)
Formats a string in a circular formatting buffer.
void Printf(const char *fmt,...)
Formats a string in a circular formatting buffer and prints the string.
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.
Class describing a generic file including meta information.
Bool_t AddUrl(const char *url, Bool_t infront=kFALSE)
Add a new URL.
TUrl * GetFirstUrl() const
void Print(Option_t *options="") const override
Print information about this object.
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 an on-disk file, usually with extension .root, that stores objects in a file-system-li...
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.
void AddFirst(TObject *obj) override
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.
const char * GetName() const override
Returns name of object.
const char * GetTitle() const override
Returns title of object.
virtual void SetName(const char *name)
Set the name of the TNamed.
Collectable string class.
const char * GetName() const override
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.
void Print(Option_t *option="") const override
Dump the class content.
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 NotifyError(const char *errmsg)
Notify error message.
Int_t AdoptFile(TFile *f)
Adopt a file already open.
~TProofOutputFile() override
Main destructor.
TFileMerger * GetFileMerger(Bool_t local=kFALSE)
Get instance of the file merger to be used in 'merge' mode.
const char * GetOptionsAnchor() const
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