Logo ROOT   6.16/01
Reference Guide
List of all members | Public Member Functions | Protected Member Functions | Private Member Functions | Private Attributes | List of all members
TDataSetManagerFile Class Reference

Definition at line 30 of file TDataSetManagerFile.h.

Public Member Functions

 TDataSetManagerFile ()
 
 TDataSetManagerFile (const char *group, const char *user, const char *ins)
 Main constructor. More...
 
 TDataSetManagerFile (const char *ins)
 Main constructor. More...
 
virtual ~TDataSetManagerFile ()
 
Int_t ClearCache (const char *uri=0)
 Clear cached information matching uri. More...
 
Bool_t ExistsDataSet (const char *uri)
 Checks if the indicated dataset exits. More...
 
TFileCollectionGetDataSet (const char *group, const char *user, const char *dsName, UInt_t option=0, TMD5 **checksum=0)
 Returns the dataset <dsName> of user <user> in group <group> . More...
 
TFileCollectionGetDataSet (const char *uri, const char *srv=0)
 Utility function used in various methods for user dataset upload. More...
 
TMapGetDataSets (const char *group, const char *user, const char *dsName=0, UInt_t option=0)
 General purpose call to go through the existing datasets. More...
 
TMapGetDataSets (const char *uri, UInt_t option=TDataSetManager::kExport)
 Returns all datasets for the <group> and <user> specified by <uri>. More...
 
Long_t GetModTime (const char *uri)
 Gets last dataset modification time. More...
 
const char * GetMSSUrl () const
 
const char * GetStageOpts () const
 
Int_t NotifyUpdate (const char *group, const char *user, const char *dspath, Long_t mtime, const char *checksum=0)
 Save into the <datasetdir>/kDataSet_DataSetList file the name of the updated or created or modified dataset. More...
 
void ParseInitOpts (const char *opts)
 Parse the input string and set the init bits accordingly Format is dir:<datasetdir> [mss:<mss-url>] [opt:<base-options>] The <datasetdir> is mandatory. More...
 
Int_t RegisterDataSet (const char *uri, TFileCollection *dataSet, const char *opt)
 Register a dataset, perfoming quota checkings and verification, if required. More...
 
Bool_t RemoveDataSet (const char *uri)
 Removes the indicated dataset. More...
 
Int_t ScanDataSet (const char *uri, UInt_t option=kReopen|kDebug)
 Scans the dataset indicated by <uri> and returns the number of missing files. More...
 
Int_t ShowCache (const char *uri=0)
 Show cached information matching uri. More...
 
Int_t WriteDataSet (const char *group, const char *user, const char *dsName, TFileCollection *dataset, UInt_t option=0, TMD5 *checksum=0)
 Writes indicated dataset. More...
 
- Public Member Functions inherited from TDataSetManager
 TDataSetManager (const char *group=0, const char *user=0, const char *options=0)
 Main constructor. More...
 
virtual ~TDataSetManager ()
 Destructor. More...
 
virtual Int_t ClearCache (const char *uri)
 Clear cached information matching uri. More...
 
virtual Bool_t ExistsDataSet (const char *uri)
 Checks if the indicated dataset exits. More...
 
virtual Long64_t GetAvgFileSize () const
 
virtual TFileCollectionGetDataSet (const char *uri, const char *server=0)
 Utility function used in various methods for user dataset upload. More...
 
virtual TMapGetDataSets (const char *uri, UInt_t=TDataSetManager::kExport)
 Returns all datasets for the <group> and <user> specified by <uri>. More...
 
virtual Long64_t GetGroupQuota (const char *group)
 returns the quota a group is allowed to have More...
 
virtual TMapGetGroupQuotaMap ()
 
virtual Long64_t GetGroupUsed (const char *group)
 Returns the used space of that group. More...
 
virtual TMapGetSubDataSets (const char *uri, const char *excludeservers)
 Partition dataset 'ds' accordingly to the servers. More...
 
virtual void MonitorUsedSpace (TVirtualMonitoringWriter *monitoring)
 Log info to the monitoring server. More...
 
virtual Int_t NotifyUpdate (const char *group=0, const char *user=0, const char *dspath=0, Long_t mtime=0, const char *checksum=0)
 Save into the <datasetdir>/dataset.list file the name of the last updated or created or modified dataset Returns 0 on success, -1 on error. More...
 
virtual void ParseInitOpts (const char *opts)
 Parse the opts string and set the init bits accordingly Available options: Cq: set kCheckQuota Ar: set kAllowRegister Av: set kAllowVerify Ti: set kTrustInfo Sb: set kIsSandbox Ca: set kUseCache or kDoNotUseCache The opts string may also contain additional unrelated info: in such a case the field delimited by the prefix "opt:" is analyzed, e.g. More...
 
Bool_t ParseUri (const char *uri, TString *dsGroup=0, TString *dsUser=0, TString *dsName=0, TString *dsTree=0, Bool_t onlyCurrent=kFALSE, Bool_t wildcards=kFALSE)
 Parses a (relative) URI that describes a DataSet on the cluster. More...
 
virtual Int_t RegisterDataSet (const char *uri, TFileCollection *dataSet, const char *opt)
 Register a dataset, perfoming quota checkings, if needed. More...
 
virtual Bool_t RemoveDataSet (const char *uri)
 Removes the indicated dataset. More...
 
Int_t ScanDataSet (const char *uri, const char *opt)
 Scans the dataset indicated by 'uri' following the 'opts' directives. More...
 
virtual Int_t ScanDataSet (const char *uri, UInt_t option=kReopen|kDebug)
 Scans the dataset indicated by <uri> and returns the number of missing files. More...
 
void SetScanCounters (Int_t t=-1, Int_t o=-1, Int_t d=-1)
 Update scan counters. More...
 
virtual Int_t ShowCache (const char *uri)
 Show cached information matching uri. More...
 
virtual void ShowDataSets (const char *uri="*", const char *opt="")
 Prints formatted information about the dataset 'uri'. More...
 
virtual void ShowQuota (const char *opt)
 Display quota information. More...
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor. More...
 
 TObject (const TObject &object)
 TObject copy ctor. More...
 
virtual ~TObject ()
 TObject destructor. More...
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract. More...
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad. More...
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action. More...
 
ULong_t CheckedHash ()
 Check and record whether this class has a consistent Hash/RecursiveRemove setup (*) and then return the regular Hash value for this object. More...
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs. More...
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility. More...
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method. More...
 
virtual void Copy (TObject &object) const
 Copy this to obj. More...
 
virtual void Delete (Option_t *option="")
 Delete this object. More...
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object. More...
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects. More...
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs. More...
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad for instance with: gROOT->SetSelectedPad(gPad). More...
 
virtual void Dump () const
 Dump contents of object on stdout. More...
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message. More...
 
virtual void Execute (const char *method, const char *params, Int_t *error=0)
 Execute method on this object with the given parameter string, e.g. More...
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=0)
 Execute method on this object with parameters stored in the TObjArray. More...
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py). More...
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message. More...
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes. More...
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes. More...
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object. More...
 
virtual const char * GetIconName () const
 Returns mime type name of object. More...
 
virtual const char * GetName () const
 Returns name of object. More...
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py). More...
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object. More...
 
virtual UInt_t GetUniqueID () const
 Return the unique object id. More...
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out. More...
 
virtual ULong_t Hash () const
 Return hash value for this object. More...
 
Bool_t HasInconsistentHash () const
 Return true is the type of this object is known to have an inconsistent setup for Hash and RecursiveRemove (i.e. More...
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message. More...
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname". More...
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl. More...
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas. More...
 
void InvertBit (UInt_t f)
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory). More...
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects). More...
 
R__ALWAYS_INLINE Bool_t IsOnHeap () const
 
virtual Bool_t IsSortable () const
 
R__ALWAYS_INLINE Bool_t IsZombie () const
 
virtual void ls (Option_t *option="") const
 The ls function lists the contents of a class on stdout. More...
 
void MayNotUse (const char *method) const
 Use this method to signal that a method (defined in a base class) may not be called in a derived class (in principle against good design since a child class should not provide less functionality than its parent, however, sometimes it is necessary). More...
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification. More...
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete. More...
 
void operator delete (void *ptr)
 Operator delete. More...
 
void operator delete[] (void *ptr)
 Operator delete []. More...
 
voidoperator new (size_t sz)
 
voidoperator new (size_t sz, void *vp)
 
voidoperator new[] (size_t sz)
 
voidoperator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator. More...
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself. More...
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list. More...
 
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself. More...
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory. More...
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list. More...
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename. More...
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out". More...
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f. More...
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object. More...
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id. More...
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message. More...
 
R__ALWAYS_INLINE Bool_t TestBit (UInt_t f) const
 
Int_t TestBits (UInt_t f) const
 
virtual void UseCurrentStyle ()
 Set current style settings in this object This function is called when either TCanvas::UseCurrentStyle or TROOT::ForceStyle have been invoked. More...
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory. More...
 
virtual Int_t Write (const char *name=0, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory. More...
 

Protected Member Functions

Bool_t BrowseDataSets (const char *group, const char *user, const char *dsName, UInt_t option, TObject *target)
 Adds the dataset in the folder of group, user to the list in target. More...
 
Int_t ChecksumDataSet (const char *path, const char *md5path, TString &checksum)
 Calculate the checksum of the indicated dataset at 'path' and save it to the appropriate file 'md5path'. More...
 
Int_t CreateLsFile (const char *group, const char *user, Long_t &mtime, TString &checksum)
 Create or recreate the dataset lists for 'uri'. More...
 
Bool_t ExistsDataSet (const char *group, const char *user, const char *dsName)
 Checks if the indicated dataset exits. More...
 
Int_t FillLsDataSet (const char *group, const char *user, const char *dsName, TList *out, UInt_t option)
 Check for the 'ls.txt' for 'group' and 'user' and fill the path for the ls file in 'out'. More...
 
const char * GetDataSetPath (const char *group, const char *user, const char *dsName)
 
const char * GetDataSetPath (const char *group, const char *user, const char *dsName, TString &md5path, Bool_t local=kFALSE)
 Returns path of the indicated dataset. More...
 
void Init ()
 Do the real inititialization. More...
 
Bool_t RemoveDataSet (const char *group, const char *user, const char *dsName)
 Removes the indicated dataset. More...
 
Int_t ScanDataSet (const char *group, const char *user, const char *dsName, UInt_t option=kReopen|kDebug)
 See documentation of ScanDataSet(TFileCollection *dataset, UInt_t option) More...
 
void UpdateUsedSpace ()
 updates the used space maps More...
 
- Protected Member Functions inherited from TDataSetManager
virtual TMapGetGroupUsedMap ()
 
Int_t GetNDisapparedFiles () const
 
Int_t GetNOpenedFiles () const
 
Int_t GetNTouchedFiles () const
 
void GetQuota (const char *group, const char *user, const char *dsName, TFileCollection *dataset)
 Gets quota information from this dataset. More...
 
virtual TMapGetUserUsedMap ()
 
void PrintDataSet (TFileCollection *fc, Int_t popt=0)
 Formatted printout of the content of TFileCollection 'fc'. More...
 
void PrintUsedSpace ()
 Prints the quota. More...
 
Bool_t ReadGroupConfig (const char *cf=0)
 Read group config file 'cf'. More...
 
virtual void UpdateUsedSpace ()
 updates the used space maps More...
 
- Protected Member Functions inherited from TObject
virtual void DoError (int level, const char *location, const char *fmt, va_list va) const
 Interface to ErrorHandler (protected). More...
 
void MakeZombie ()
 

Private Member Functions

Int_t CheckLocalCache (const char *group, const char *user, const char *dsName="ls", UInt_t option=0)
 Check if the local cache information for group, user, dsName is up-to-date If not, make the relevant updates Return 0 if OK, 1 if the dataset does not exists anymore, -1 on failure. More...
 
void InitLocalCache ()
 Init the local cache if required. More...
 

Private Attributes

Int_t fCacheUpdatePeriod
 
TString fDataSetDir
 
TString fDataSetLockFile
 
Bool_t fIsRemote
 
TString fListFile
 
TString fLocalCacheDir
 
Int_t fLockFileTimeLimit
 
TString fMSSUrl
 
Bool_t fOpenPerms
 
TString fStageOpts
 
Bool_t fUseCache
 

Additional Inherited Members

- Public Types inherited from TDataSetManager
enum  EDataSetStatusBits {
  kCheckQuota = BIT(15) , kAllowRegister = BIT(16) , kAllowVerify = BIT(17) , kTrustInfo = BIT(18) ,
  kIsSandbox = BIT(19) , kUseCache = BIT(20) , kDoNotUseCache = BIT(21)
}
 
enum  EDataSetWorkOpts {
  kDebug = 0x1 , kShowDefault = 0x2 , kPrint = 0x4 , kExport = 0x8 ,
  kQuotaUpdate = 0x10 , kSetDefaultTree = 0x20 , kForceScan = 0x40 , kNoHeaderPrint = 0x80 ,
  kReopen = 0x100 , kTouch = 0x200 , kMaxFiles = 0x400 , kReadShort = 0x800 ,
  kFileMustExist = 0x1000 , kNoAction = 0x2000 , kLocateOnly = 0x4000 , kStageOnly = 0x8000 ,
  kNoCacheUpdate = 0x10000 , kRefreshLs = 0x20000 , kList = 0x40000 , kAllFiles = 0x80000 ,
  kStagedFiles = 0x100000 , kNoStagedCheck = 0x200000
}
 
- Public Types inherited from TObject
enum  {
  kIsOnHeap = 0x01000000 , kNotDeleted = 0x02000000 , kZombie = 0x04000000 , kInconsistent = 0x08000000 ,
  kBitMask = 0x00ffffff
}
 
enum  { kSingleKey = BIT(0) , kOverwrite = BIT(1) , kWriteDelete = BIT(2) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = BIT(3) }
 
enum  EStatusBits {
  kCanDelete = BIT(0) , kMustCleanup = BIT(3) , kIsReferenced = BIT(4) , kHasUUID = BIT(5) ,
  kCannotPick = BIT(6) , kNoContextMenu = BIT(8) , kInvalidObject = BIT(13)
}
 
- Static Public Member Functions inherited from TDataSetManager
static Bool_t CheckDataSetSrvMaps (TUrl *furl, TString &fn, TList *srvmaplist=0)
 Check if the dataset server mappings apply to the url defined by 'furl'. More...
 
static Bool_t CheckStagedStatus (TFileInfo *fileInfo, Int_t fopt, Int_t maxfiles, Int_t newstagedfiles, TFileStager *stager, Bool_t createStager, Bool_t dbg, Bool_t &changed, Bool_t &touched, Bool_t &disappeared)
 Check stage status of the file described by "fileInfo". More...
 
static TString CreateUri (const char *dsGroup=0, const char *dsUser=0, const char *dsName=0, const char *dsTree=0)
 Creates URI for the dataset manger in the form '[[/dsGroup/]dsUser/]dsName[#dsObjPath]', The optional dsObjPath can be in the form [subdir/]objname]'. More...
 
static Int_t FillMetaData (TFileInfo *fi, TDirectory *d, const char *rdir="/")
 Navigate the directory 'd' (and its subdirectories) looking for TTree objects. More...
 
static TListGetDataSetSrvMaps ()
 Static getter for server mapping list. More...
 
static TListParseDataSetSrvMaps (const TString &srvmaps)
 Create a server mapping list from the content of 'srvmaps' Return the list (owned by the caller) or 0 if no valid info could be found) More...
 
static void ProcessFile (TFileInfo *fileInfo, Int_t sopt, Bool_t checkstg, Bool_t doall, TFileStager *stager, Bool_t createStager, const char *stageopts, Bool_t dbg, Bool_t &changed, Bool_t &opened)
 Locate, stage, or fully validate file "fileInfo". More...
 
static Int_t ScanDataSet (TFileCollection *dataset, Int_t fopt, Int_t sopt=0, Int_t ropt=0, Bool_t dbg=kFALSE, Int_t *touched=0, Int_t *opened=0, Int_t *disappeared=0, TList *flist=0, Long64_t avgsz=-1, const char *mss=0, Int_t maxfiles=-1, const char *stageopts=0)
 Go through the files in the specified dataset, selecting files according to 'fopt' and doing on these files the actions described by 'sopt'. More...
 
static Int_t ScanFile (TFileInfo *fileinfo, Bool_t notify)
 Open the file described by 'fileinfo' to extract the relevant meta-information. More...
 
- Static Public Member Functions inherited from TObject
static Long_t GetDtorOnly ()
 Return destructor only flag. More...
 
static Bool_t GetObjectStat ()
 Get status of object stat flag. More...
 
static void SetDtorOnly (void *obj)
 Set destructor only flag. More...
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable. More...
 
- Static Protected Member Functions inherited from TDataSetManager
static Long64_t ToBytes (const char *size=0)
 Static utility function to gt the number of bytes from a string representation in the form "<digit><sfx>" with <sfx> = {"", "k", "M", "G", "T", "P"} (case insensitive). More...
 
- Protected Attributes inherited from TDataSetManager
Long64_t fAvgFileSize
 
TUri fBase
 
TString fCommonGroup
 
TString fCommonUser
 
TString fGroup
 
TString fGroupConfigFile
 
TMap fGroupQuota
 
TMap fGroupUsed
 
Long_t fMTimeGroupConfig
 
Int_t fNDisappearedFiles
 
Int_t fNOpenedFiles
 
Int_t fNTouchedFiles
 
TString fUser
 
TMap fUserUsed
 
- Static Protected Attributes inherited from TDataSetManager
static TString fgCommonDataSetTag = "COMMON"
 
static TListfgDataSetSrvMaps = 0
 

#include <TDataSetManagerFile.h>

Inheritance diagram for TDataSetManagerFile:
[legend]

Constructor & Destructor Documentation

◆ TDataSetManagerFile() [1/3]

TDataSetManagerFile::TDataSetManagerFile ( )
inline

Definition at line 70 of file TDataSetManagerFile.h.

◆ TDataSetManagerFile() [2/3]

TDataSetManagerFile::TDataSetManagerFile ( const char *  group,
const char *  user,
const char *  ins 
)

Main constructor.

Definition at line 65 of file TDataSetManagerFile.cxx.

◆ TDataSetManagerFile() [3/3]

TDataSetManagerFile::TDataSetManagerFile ( const char *  ins)

Main constructor.

Definition at line 80 of file TDataSetManagerFile.cxx.

◆ ~TDataSetManagerFile()

virtual TDataSetManagerFile::~TDataSetManagerFile ( )
inlinevirtual

Definition at line 73 of file TDataSetManagerFile.h.

Member Function Documentation

◆ BrowseDataSets()

Bool_t TDataSetManagerFile::BrowseDataSets ( const char *  group,
const char *  user,
const char *  dsName,
UInt_t  option,
TObject target 
)
protected

Adds the dataset in the folder of group, user to the list in target.

If dsName is defined, only the information about the specified dataset is processed.

The unsigned int 'option' is forwarded to GetDataSet and BrowseDataSet. Available options (to be .or.ed): kPrint print the dataset content kQuotaUpdate update quotas kExport use export naming kList get a list of dataset names

NB1: options "kPrint", "kQuoatUpdate" and "kExport" are mutually exclusive NB2: for options "kPrint" and "kQuotaUpdate" return is null.

Definition at line 577 of file TDataSetManagerFile.cxx.

◆ CheckLocalCache()

Int_t TDataSetManagerFile::CheckLocalCache ( const char *  group,
const char *  user,
const char *  dsName = "ls",
UInt_t  option = 0 
)
private

Check if the local cache information for group, user, dsName is up-to-date If not, make the relevant updates Return 0 if OK, 1 if the dataset does not exists anymore, -1 on failure.

Definition at line 1085 of file TDataSetManagerFile.cxx.

◆ ChecksumDataSet()

Int_t TDataSetManagerFile::ChecksumDataSet ( const char *  path,
const char *  md5path,
TString checksum 
)
protected

Calculate the checksum of the indicated dataset at 'path' and save it to the appropriate file 'md5path'.

The MD5 string is returned in 'md5sum'. Return 0 on success, -1 on error.

Definition at line 1512 of file TDataSetManagerFile.cxx.

◆ ClearCache()

Int_t TDataSetManagerFile::ClearCache ( const char *  uri = 0)
virtual

Clear cached information matching uri.

Reimplemented from TDataSetManager.

Definition at line 1253 of file TDataSetManagerFile.cxx.

◆ CreateLsFile()

Int_t TDataSetManagerFile::CreateLsFile ( const char *  group,
const char *  user,
Long_t mtime,
TString checksum 
)
protected

Create or recreate the dataset lists for 'uri'.

The list are saved in text form in 'uri'/ls.txt for fast browsing and in 'uri'/ls.root in form of TMacro for optimized and portable transfer. Return 0 on success, 1 if the file was empty, -1 on error

Definition at line 474 of file TDataSetManagerFile.cxx.

◆ ExistsDataSet() [1/2]

Bool_t TDataSetManagerFile::ExistsDataSet ( const char *  group,
const char *  user,
const char *  dsName 
)
protected

Checks if the indicated dataset exits.

Definition at line 1576 of file TDataSetManagerFile.cxx.

◆ ExistsDataSet() [2/2]

Bool_t TDataSetManagerFile::ExistsDataSet ( const char *  uri)
virtual

Checks if the indicated dataset exits.

Reimplemented from TDataSetManager.

Definition at line 1947 of file TDataSetManagerFile.cxx.

◆ FillLsDataSet()

Int_t TDataSetManagerFile::FillLsDataSet ( const char *  group,
const char *  user,
const char *  dsname,
TList out,
UInt_t  option 
)
protected

Check for the 'ls.txt' for 'group' and 'user' and fill the path for the ls file in 'out'.

If 'dsname' is defined, open the file and extract the relevant line. Return 0 on success, -1 on failure

Definition at line 943 of file TDataSetManagerFile.cxx.

◆ GetDataSet() [1/2]

TFileCollection * TDataSetManagerFile::GetDataSet ( const char *  group,
const char *  user,
const char *  dsName,
UInt_t  option = 0,
TMD5 **  checksum = 0 
)

Returns the dataset <dsName> of user <user> in group <group> .

If checksum is non-zero, it will contain the pointer to a TMD5 sum object with the checksum of the file, has to be deleted by the user. If option has the bi kReadShort set, the shortobject is read, that does not contain the list of files. This is much faster.

Definition at line 1015 of file TDataSetManagerFile.cxx.

◆ GetDataSet() [2/2]

TFileCollection * TDataSetManagerFile::GetDataSet ( const char *  uri,
const char *  srv = 0 
)
virtual

Utility function used in various methods for user dataset upload.

Reimplemented from TDataSetManager.

Definition at line 1874 of file TDataSetManagerFile.cxx.

◆ GetDataSetPath() [1/2]

const char * TDataSetManagerFile::GetDataSetPath ( const char *  group,
const char *  user,
const char *  dsName 
)
protected

◆ GetDataSetPath() [2/2]

const char * TDataSetManagerFile::GetDataSetPath ( const char *  group,
const char *  user,
const char *  dsName,
TString md5path,
Bool_t  local = kFALSE 
)
protected

Returns path of the indicated dataset.

The extension is '.root' for all files except for 'dsName==ls' which have extension '.txt'. If 'local' is kTRUE the local cache path is returned instead in the form <cachedir>/<group>.<user>.<dsName>.<ext>. NB: contains a static TString for result, so copy result before using twice.

Definition at line 351 of file TDataSetManagerFile.cxx.

◆ GetDataSets() [1/2]

TMap * TDataSetManagerFile::GetDataSets ( const char *  group,
const char *  user,
const char *  dsName = 0,
UInt_t  option = 0 
)

General purpose call to go through the existing datasets.

If <user> is 0 or "*", act on all datasets for the given <group>. If <group> is 0 or "*", act on all datasets. If <dsName> is defined, only the information about the specified dataset is processed. Action depends on option; available options:

kExport Return a TMap object containing all the information about datasets in the form: { <group>, <map of users> } | { <map of datasets>, <dataset>} (<dataset> are TFileCollection objects) kShowDefault as kExport with in addition a default selection including the datasets from the current user, the ones from the group and the common ones

kPrint print the dataset content; no output is returned kList get a list of available dataset names kForceScan Re-open files while processing kPrint (do not use the pre-processed information) kNoHeaderPrint Labelling header is not printed kQuotaUpdate update {group, user} quotas; no output is returned

NB1: options "kPrint", "kQuoatUpdate" and "kExport" are mutually exclusive NB2: for options "kPrint" and "kQuoatUpdate" return is null.

Definition at line 742 of file TDataSetManagerFile.cxx.

◆ GetDataSets() [2/2]

TMap * TDataSetManagerFile::GetDataSets ( const char *  uri,
UInt_t  option = TDataSetManager::kExport 
)
virtual

Returns all datasets for the <group> and <user> specified by <uri>.

If <user> is 0, it returns all datasets for the given <group>. If <group> is 0, it returns all datasets. The returned TMap contains: <group> --> <map of users> --> <map of datasets> --> <dataset> (TFileCollection)

The unsigned int 'option' is forwarded to GetDataSet and BrowseDataSet. Available options (to be .or.ed): kShowDefault a default selection is shown that include the ones from the current user, the ones from the group and the common ones kPrint print the dataset content kQuotaUpdate update quotas kExport use export naming

NB1: options "kPrint", "kQuoatUpdate" and "kExport" are mutually exclusive NB2: for options "kPrint" and "kQuoatUpdate" return is null.

Reimplemented from TDataSetManager.

Definition at line 1859 of file TDataSetManagerFile.cxx.

◆ GetModTime()

Long_t TDataSetManagerFile::GetModTime ( const char *  uri)

Gets last dataset modification time.

Returns -1 on error, or number of seconds since epoch on success

Definition at line 1973 of file TDataSetManagerFile.cxx.

◆ GetMSSUrl()

const char * TDataSetManagerFile::GetMSSUrl ( ) const
inline

Definition at line 94 of file TDataSetManagerFile.h.

◆ GetStageOpts()

const char * TDataSetManagerFile::GetStageOpts ( ) const
inline

Definition at line 95 of file TDataSetManagerFile.h.

◆ Init()

void TDataSetManagerFile::Init ( )
protected

Do the real inititialization.

Definition at line 93 of file TDataSetManagerFile.cxx.

◆ InitLocalCache()

void TDataSetManagerFile::InitLocalCache ( )
private

Init the local cache if required.

Definition at line 234 of file TDataSetManagerFile.cxx.

◆ NotifyUpdate()

Int_t TDataSetManagerFile::NotifyUpdate ( const char *  group,
const char *  user,
const char *  dsName,
Long_t  mtime,
const char *  checksum = 0 
)
virtual

Save into the <datasetdir>/kDataSet_DataSetList file the name of the updated or created or modified dataset.

For still existing datasets, fill the modification date in seconds anf the checksum. Returns 0 on success, -1 on error

Reimplemented from TDataSetManager.

Definition at line 382 of file TDataSetManagerFile.cxx.

◆ ParseInitOpts()

void TDataSetManagerFile::ParseInitOpts ( const char *  ins)
virtual

Parse the input string and set the init bits accordingly Format is dir:<datasetdir> [mss:<mss-url>] [opt:<base-options>] The <datasetdir> is mandatory.

See TDataSetManager::ParseInitOpts for the available base options. The base options are already initialized by the base constructor

Reimplemented from TDataSetManager.

Definition at line 317 of file TDataSetManagerFile.cxx.

◆ RegisterDataSet()

Int_t TDataSetManagerFile::RegisterDataSet ( const char *  uri,
TFileCollection newDataSet,
const char *  opts 
)
virtual

Register a dataset, perfoming quota checkings and verification, if required.

If a dataset with the same name already exists the action fails unless 'opts' contains 'O', in which case the old dataset is overwritten, or contains 'U', in which case 'newDataSet' is added to the existing dataset (duplications are ignored, if any). If 'opts' contains 'V' the dataset files are also verified (if the dataset manager is configured to allow so). By default the dataset is not verified. If 'opts' contains 'T' the in the dataset object (status bits, meta,...) is trusted, i.e. not reset (if the dataset manager is configured to allow so). Returns 0 on success, -1 on failure

Reimplemented from TDataSetManager.

Definition at line 1598 of file TDataSetManagerFile.cxx.

◆ RemoveDataSet() [1/2]

Bool_t TDataSetManagerFile::RemoveDataSet ( const char *  group,
const char *  user,
const char *  dsName 
)
protected

Removes the indicated dataset.

Definition at line 1544 of file TDataSetManagerFile.cxx.

◆ RemoveDataSet() [2/2]

Bool_t TDataSetManagerFile::RemoveDataSet ( const char *  uri)
virtual

Removes the indicated dataset.

Reimplemented from TDataSetManager.

Definition at line 1930 of file TDataSetManagerFile.cxx.

◆ ScanDataSet() [1/2]

Int_t TDataSetManagerFile::ScanDataSet ( const char *  group,
const char *  user,
const char *  dsName,
UInt_t  option = kReopen | kDebug 
)
protected

See documentation of ScanDataSet(TFileCollection *dataset, UInt_t option)

Definition at line 1783 of file TDataSetManagerFile.cxx.

◆ ScanDataSet() [2/2]

Int_t TDataSetManagerFile::ScanDataSet ( const char *  uri,
UInt_t  opt = kReopen | kDebug 
)
virtual

Scans the dataset indicated by <uri> and returns the number of missing files.

Returns -1 if any failure occurs, >= 0 on success. For more details, see documentation of ScanDataSet(TFileCollection *dataset, const char *option)

Reimplemented from TDataSetManager.

Definition at line 1730 of file TDataSetManagerFile.cxx.

◆ ShowCache()

Int_t TDataSetManagerFile::ShowCache ( const char *  uri = 0)
virtual

Show cached information matching uri.

Reimplemented from TDataSetManager.

Definition at line 1319 of file TDataSetManagerFile.cxx.

◆ UpdateUsedSpace()

void TDataSetManagerFile::UpdateUsedSpace ( )
protectedvirtual

updates the used space maps

Reimplemented from TDataSetManager.

Definition at line 1959 of file TDataSetManagerFile.cxx.

◆ WriteDataSet()

Int_t TDataSetManagerFile::WriteDataSet ( const char *  group,
const char *  user,
const char *  dsName,
TFileCollection dataset,
UInt_t  option = 0,
TMD5 checksum = 0 
)

Writes indicated dataset.

If option has the bit kFileMustExist set, the file must still exist, otherwise the new dataset is not written (returns 3 in this case). If checksum is non-zero the files current checksum is checked against it, if it does not match the file is not written (the function returns 2 in this case, if the file has disappeared it is also not written (i.e. checksum implies the bit kFileMustExist set in option). Returns != 0 for success, 0 for error

Definition at line 1394 of file TDataSetManagerFile.cxx.

Member Data Documentation

◆ fCacheUpdatePeriod

Int_t TDataSetManagerFile::fCacheUpdatePeriod
private

Definition at line 42 of file TDataSetManagerFile.h.

◆ fDataSetDir

TString TDataSetManagerFile::fDataSetDir
private

Definition at line 33 of file TDataSetManagerFile.h.

◆ fDataSetLockFile

TString TDataSetManagerFile::fDataSetLockFile
private

Definition at line 36 of file TDataSetManagerFile.h.

◆ fIsRemote

Bool_t TDataSetManagerFile::fIsRemote
private

Definition at line 39 of file TDataSetManagerFile.h.

◆ fListFile

TString TDataSetManagerFile::fListFile
private

Definition at line 38 of file TDataSetManagerFile.h.

◆ fLocalCacheDir

TString TDataSetManagerFile::fLocalCacheDir
private

Definition at line 41 of file TDataSetManagerFile.h.

◆ fLockFileTimeLimit

Int_t TDataSetManagerFile::fLockFileTimeLimit
private

Definition at line 37 of file TDataSetManagerFile.h.

◆ fMSSUrl

TString TDataSetManagerFile::fMSSUrl
private

Definition at line 34 of file TDataSetManagerFile.h.

◆ fOpenPerms

Bool_t TDataSetManagerFile::fOpenPerms
private

Definition at line 43 of file TDataSetManagerFile.h.

◆ fStageOpts

TString TDataSetManagerFile::fStageOpts
private

Definition at line 35 of file TDataSetManagerFile.h.

◆ fUseCache

Bool_t TDataSetManagerFile::fUseCache
private

Definition at line 40 of file TDataSetManagerFile.h.

Libraries for TDataSetManagerFile:
[legend]

The documentation for this class was generated from the following files: