69 const char *
option,
const char *dsname)
104 Int_t port =
gEnv->GetValue(
"ProofServ.XpdPort", -1);
122 if (dsname && strlen(dsname) > 0) {
142 if (
fDir.BeginsWith(
"file:")) {
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());
208 if (
gEnv->Lookup(
"Proof.OutputFile")) {
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!");
304 fDir.Insert(0, localDS);
319 if(!list || list->IsEmpty())
return 0;
329 Error(
"Merge",
"could not instantiate the file merger");
342 while((o = next())) {
351 TUrl mssUrl(
gEnv->GetValue(
"ProofServ.PoolUrl",
""));
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");
425 Info(
"Print",
" dir: %s",
fDir.Data());
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));
482 if (!
gSystem->AccessPathName(path)) {
483 if (
gSystem->Unlink(path) != 0)
485 " error from TSystem::Unlink(%s)", path));
519 while (existsPath !=
"/" && existsPath !=
"." &&
gSystem->AccessPathName(existsPath)) {
521 existsPath =
gSystem->GetDirName(existsPath);
525 if (
gSystem->GetPathInfo(existsPath, st) == 0) {
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.
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 file, usually with extension .root, that stores data and code in the form of serialized objects in ...
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.
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.
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.
TObject()
TObject constructor.
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
TProofOutputFile(const TProofOutputFile &)
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
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.
static void ResolveKeywords(TString &fname, const char *path=0)
Replace <ord>, <user>, <u>, <group>, <stag>, <qnum>, <file>, <rver> and <build> placeholders in fname...
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
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