Logo ROOT  
Reference Guide
 
Loading...
Searching...
No Matches
TDataSetManager Class Reference

Definition at line 38 of file TDataSetManager.h.

Public Types

enum  EDataSetStatusBits {
  kCheckQuota = (1ULL << ( 15 )) , kAllowRegister = (1ULL << ( 16 )) , kAllowVerify = (1ULL << ( 17 )) , kTrustInfo = (1ULL << ( 18 )) ,
  kIsSandbox = (1ULL << ( 19 )) , kUseCache = (1ULL << ( 20 )) , kDoNotUseCache = (1ULL << ( 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 = (1ULL << ( 0 )) , kOverwrite = (1ULL << ( 1 )) , kWriteDelete = (1ULL << ( 2 )) }
 
enum  EDeprecatedStatusBits { kObjInCanvas = (1ULL << ( 3 )) }
 
enum  EStatusBits {
  kCanDelete = (1ULL << ( 0 )) , kMustCleanup = (1ULL << ( 3 )) , kIsReferenced = (1ULL << ( 4 )) , kHasUUID = (1ULL << ( 5 )) ,
  kCannotPick = (1ULL << ( 6 )) , kNoContextMenu = (1ULL << ( 8 )) , kInvalidObject = (1ULL << ( 13 ))
}
 

Public Member Functions

 TDataSetManager (const char *group=0, const char *user=0, const char *options=0)
 Main constructor.
 
virtual ~TDataSetManager ()
 Destructor.
 
virtual Int_t ClearCache (const char *uri)
 Clear cached information matching uri.
 
virtual Bool_t ExistsDataSet (const char *uri)
 Checks if the indicated dataset exits.
 
virtual Long64_t GetAvgFileSize () const
 
virtual TFileCollectionGetDataSet (const char *uri, const char *server=0)
 Utility function used in various methods for user dataset upload.
 
virtual TMapGetDataSets (const char *uri, UInt_t=TDataSetManager::kExport)
 Returns all datasets for the <group> and <user> specified by <uri>.
 
virtual Long64_t GetGroupQuota (const char *group)
 returns the quota a group is allowed to have
 
virtual TMapGetGroupQuotaMap ()
 
virtual Long64_t GetGroupUsed (const char *group)
 Returns the used space of that group.
 
virtual TMapGetSubDataSets (const char *uri, const char *excludeservers)
 Partition dataset 'ds' accordingly to the servers.
 
virtual TClassIsA () const
 
virtual void MonitorUsedSpace (TVirtualMonitoringWriter *monitoring)
 Log info to the monitoring server.
 
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.
 
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.
 
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.
 
virtual Int_t RegisterDataSet (const char *uri, TFileCollection *dataSet, const char *opt)
 Register a dataset, perfoming quota checkings, if needed.
 
virtual Bool_t RemoveDataSet (const char *uri)
 Removes the indicated dataset.
 
Int_t ScanDataSet (const char *uri, const char *opt)
 Scans the dataset indicated by 'uri' following the 'opts' directives.
 
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.
 
void SetScanCounters (Int_t t=-1, Int_t o=-1, Int_t d=-1)
 Update scan counters.
 
virtual Int_t ShowCache (const char *uri)
 Show cached information matching uri.
 
virtual void ShowDataSets (const char *uri="*", const char *opt="")
 Prints formatted information about the dataset 'uri'.
 
virtual void ShowQuota (const char *opt)
 Display quota information.
 
virtual void Streamer (TBuffer &)
 Stream an object of class TObject.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
- Public Member Functions inherited from TObject
 TObject ()
 TObject constructor.
 
 TObject (const TObject &object)
 TObject copy ctor.
 
virtual ~TObject ()
 TObject destructor.
 
void AbstractMethod (const char *method) const
 Use this method to implement an "abstract" method that you don't want to leave purely abstract.
 
virtual void AppendPad (Option_t *option="")
 Append graphics object to current pad.
 
virtual void Browse (TBrowser *b)
 Browse object. May be overridden for another default action.
 
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.
 
virtual const char * ClassName () const
 Returns name of class to which the object belongs.
 
virtual void Clear (Option_t *="")
 
virtual TObjectClone (const char *newname="") const
 Make a clone of an object using the Streamer facility.
 
virtual Int_t Compare (const TObject *obj) const
 Compare abstract method.
 
virtual void Copy (TObject &object) const
 Copy this to obj.
 
virtual void Delete (Option_t *option="")
 Delete this object.
 
virtual Int_t DistancetoPrimitive (Int_t px, Int_t py)
 Computes distance from point (px,py) to the object.
 
virtual void Draw (Option_t *option="")
 Default Draw method for all objects.
 
virtual void DrawClass () const
 Draw class inheritance tree of the class to which this object belongs.
 
virtual TObjectDrawClone (Option_t *option="") const
 Draw a clone of this object in the current selected pad with: gROOT->SetSelectedPad(c1).
 
virtual void Dump () const
 Dump contents of object on stdout.
 
virtual void Error (const char *method, const char *msgfmt,...) const
 Issue error message.
 
virtual void Execute (const char *method, const char *params, Int_t *error=nullptr)
 Execute method on this object with the given parameter string, e.g.
 
virtual void Execute (TMethod *method, TObjArray *params, Int_t *error=nullptr)
 Execute method on this object with parameters stored in the TObjArray.
 
virtual void ExecuteEvent (Int_t event, Int_t px, Int_t py)
 Execute action corresponding to an event at (px,py).
 
virtual void Fatal (const char *method, const char *msgfmt,...) const
 Issue fatal error message.
 
virtual TObjectFindObject (const char *name) const
 Must be redefined in derived classes.
 
virtual TObjectFindObject (const TObject *obj) const
 Must be redefined in derived classes.
 
virtual Option_tGetDrawOption () const
 Get option used by the graphics system to draw this object.
 
virtual const char * GetIconName () const
 Returns mime type name of object.
 
virtual const char * GetName () const
 Returns name of object.
 
virtual char * GetObjectInfo (Int_t px, Int_t py) const
 Returns string containing info about the object at position (px,py).
 
virtual Option_tGetOption () const
 
virtual const char * GetTitle () const
 Returns title of object.
 
virtual UInt_t GetUniqueID () const
 Return the unique object id.
 
virtual Bool_t HandleTimer (TTimer *timer)
 Execute action in response of a timer timing out.
 
virtual ULong_t Hash () const
 Return hash value for this object.
 
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.
 
virtual void Info (const char *method, const char *msgfmt,...) const
 Issue info message.
 
virtual Bool_t InheritsFrom (const char *classname) const
 Returns kTRUE if object inherits from class "classname".
 
virtual Bool_t InheritsFrom (const TClass *cl) const
 Returns kTRUE if object inherits from TClass cl.
 
virtual void Inspect () const
 Dump contents of this object in a graphics canvas.
 
void InvertBit (UInt_t f)
 
Bool_t IsDestructed () const
 IsDestructed.
 
virtual Bool_t IsEqual (const TObject *obj) const
 Default equal comparison (objects are equal if they have the same address in memory).
 
virtual Bool_t IsFolder () const
 Returns kTRUE in case object contains browsable objects (like containers or lists of other objects).
 
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.
 
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).
 
virtual Bool_t Notify ()
 This method must be overridden to handle object notification.
 
void Obsolete (const char *method, const char *asOfVers, const char *removedFromVers) const
 Use this method to declare a method obsolete.
 
void operator delete (void *ptr)
 Operator delete.
 
void operator delete[] (void *ptr)
 Operator delete [].
 
void * operator new (size_t sz)
 
void * operator new (size_t sz, void *vp)
 
void * operator new[] (size_t sz)
 
void * operator new[] (size_t sz, void *vp)
 
TObjectoperator= (const TObject &rhs)
 TObject assignment operator.
 
virtual void Paint (Option_t *option="")
 This method must be overridden if a class wants to paint itself.
 
virtual void Pop ()
 Pop on object drawn in a pad to the top of the display list.
 
virtual void Print (Option_t *option="") const
 This method must be overridden when a class wants to print itself.
 
virtual Int_t Read (const char *name)
 Read contents of object with specified name from the current directory.
 
virtual void RecursiveRemove (TObject *obj)
 Recursively remove this object from a list.
 
void ResetBit (UInt_t f)
 
virtual void SaveAs (const char *filename="", Option_t *option="") const
 Save this object in the file specified by filename.
 
virtual void SavePrimitive (std::ostream &out, Option_t *option="")
 Save a primitive as a C++ statement(s) on output stream "out".
 
void SetBit (UInt_t f)
 
void SetBit (UInt_t f, Bool_t set)
 Set or unset the user status bits as specified in f.
 
virtual void SetDrawOption (Option_t *option="")
 Set drawing option for object.
 
virtual void SetUniqueID (UInt_t uid)
 Set the unique object id.
 
void StreamerNVirtual (TBuffer &ClassDef_StreamerNVirtual_b)
 
virtual void SysError (const char *method, const char *msgfmt,...) const
 Issue system error message.
 
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.
 
virtual void Warning (const char *method, const char *msgfmt,...) const
 Issue warning message.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0)
 Write this object to the current directory.
 
virtual Int_t Write (const char *name=nullptr, Int_t option=0, Int_t bufsize=0) const
 Write this object to the current directory.
 

Static Public Member Functions

static Bool_t CheckDataSetSrvMaps (TUrl *furl, TString &fn, TList *srvmaplist=0)
 Check if the dataset server mappings apply to the url defined by 'furl'.
 
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".
 
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
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]'.
 
static const char * DeclFileName ()
 
static Int_t FillMetaData (TFileInfo *fi, TDirectory *d, const char *rdir="/")
 Navigate the directory 'd' (and its subdirectories) looking for TTree objects.
 
static TListGetDataSetSrvMaps ()
 Static getter for server mapping list.
 
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)
 
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".
 
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'.
 
static Int_t ScanFile (TFileInfo *fileinfo, Bool_t notify)
 Open the file described by 'fileinfo' to extract the relevant meta-information.
 
- Static Public Member Functions inherited from TObject
static TClassClass ()
 
static const char * Class_Name ()
 
static constexpr Version_t Class_Version ()
 
static const char * DeclFileName ()
 
static Longptr_t GetDtorOnly ()
 Return destructor only flag.
 
static Bool_t GetObjectStat ()
 Get status of object stat flag.
 
static void SetDtorOnly (void *obj)
 Set destructor only flag.
 
static void SetObjectStat (Bool_t stat)
 Turn on/off tracking of objects in the TObjectTable.
 

Protected Member Functions

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.
 
virtual TMapGetUserUsedMap ()
 
void PrintDataSet (TFileCollection *fc, Int_t popt=0)
 Formatted printout of the content of TFileCollection 'fc'.
 
void PrintUsedSpace ()
 Prints the quota.
 
Bool_t ReadGroupConfig (const char *cf=0)
 Read group config file 'cf'.
 
virtual void UpdateUsedSpace ()
 updates the used space maps
 
- 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).
 
void MakeZombie ()
 

Static Protected Member Functions

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).
 

Protected Attributes

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

static TString fgCommonDataSetTag = "COMMON"
 
static TListfgDataSetSrvMaps = 0
 

Private Member Functions

 TDataSetManager (const TDataSetManager &)
 
TDataSetManageroperator= (const TDataSetManager &)
 

Additional Inherited Members

- Protected Types inherited from TObject
enum  { kOnlyPrepStep = (1ULL << ( 3 )) }
 

#include <TDataSetManager.h>

Inheritance diagram for TDataSetManager:
[legend]

Member Enumeration Documentation

◆ EDataSetStatusBits

Enumerator
kCheckQuota 
kAllowRegister 
kAllowVerify 
kTrustInfo 
kIsSandbox 
kUseCache 
kDoNotUseCache 

Definition at line 84 of file TDataSetManager.h.

◆ EDataSetWorkOpts

Enumerator
kDebug 
kShowDefault 
kPrint 
kExport 
kQuotaUpdate 
kSetDefaultTree 
kForceScan 
kNoHeaderPrint 
kReopen 
kTouch 
kMaxFiles 
kReadShort 
kFileMustExist 
kNoAction 
kLocateOnly 
kStageOnly 
kNoCacheUpdate 
kRefreshLs 
kList 
kAllFiles 
kStagedFiles 
kNoStagedCheck 

Definition at line 94 of file TDataSetManager.h.

Constructor & Destructor Documentation

◆ TDataSetManager() [1/2]

TDataSetManager::TDataSetManager ( const TDataSetManager )
private

◆ TDataSetManager() [2/2]

TDataSetManager::TDataSetManager ( const char *  group = 0,
const char *  user = 0,
const char *  options = 0 
)

Main constructor.

Definition at line 58 of file TDataSetManager.cxx.

◆ ~TDataSetManager()

TDataSetManager::~TDataSetManager ( )
virtual

Destructor.

Definition at line 127 of file TDataSetManager.cxx.

Member Function Documentation

◆ CheckDataSetSrvMaps()

Bool_t TDataSetManager::CheckDataSetSrvMaps ( TUrl furl,
TString file1,
TList srvmaplist = 0 
)
static

Check if the dataset server mappings apply to the url defined by 'furl'.

Use srvmaplist if defined, else use the default list. If yes, resolve the mapping into file1 and return kTRUE. Otherwise return kFALSE.

Definition at line 1930 of file TDataSetManager.cxx.

◆ CheckStagedStatus()

Bool_t TDataSetManager::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 
)
static

Check stage status of the file described by "fileInfo".

fopt is same as "fopt" in TDataSetManager::ScanDataSet, which is repeated below: The int fopt controls which files have to be processed (or added to the list if ropt is 1 - see below); 'fopt' is defined in term of csopt and fsopt: fopt = sign(fsopt) * csopt * 100 + fsopt where 'fsopt' controls the actual selection -1 all files in the dataset 0 process only files marked as 'non-staged' >=1 as 0 but files that are marked 'staged' are open >=2 as 1 but files that are marked 'staged' are touched 10 process only files marked as 'staged'; files marked as 'non-staged' are ignored and 'csopt' controls if an actual check on the staged status (via TFileStager) is done 0 check that the file is staged using TFileStager 1 do not hard check the staged status (example: use fopt = -101 to check the staged status of all the files, or fopt = 110 to re-check the stage status of all the files marked as staged)

If 'dbg' is true, some information about the ongoing operations is reguraly printed; this can be useful when processing very large datasets, an operation which can take a very long time.

If maxfiles > 0, select for processing a maximum of 'filesmax' files (but if fopt is 1 or 2 all files marked as 'staged' are still open or touched)

Return code kTRUE the file appears newly staged kFALSE otherwise

changed is true if the fileinfo is modified touched is true if the file is open and read disappeared is true if the file is marked staged but actually not staged

Definition at line 1414 of file TDataSetManager.cxx.

◆ Class()

static TClass * TDataSetManager::Class ( )
static
Returns
TClass describing this class

◆ Class_Name()

static const char * TDataSetManager::Class_Name ( )
static
Returns
Name of this class

◆ Class_Version()

static constexpr Version_t TDataSetManager::Class_Version ( )
inlinestaticconstexpr
Returns
Version of this class

Definition at line 158 of file TDataSetManager.h.

◆ ClearCache()

Int_t TDataSetManager::ClearCache ( const char *  uri)
virtual

Clear cached information matching uri.

Reimplemented in TDataSetManagerAliEn, and TDataSetManagerFile.

Definition at line 786 of file TDataSetManager.cxx.

◆ CreateUri()

TString TDataSetManager::CreateUri ( const char *  dsGroup = 0,
const char *  dsUser = 0,
const char *  dsName = 0,
const char *  dsTree = 0 
)
static

Creates URI for the dataset manger in the form '[[/dsGroup/]dsUser/]dsName[#dsObjPath]', The optional dsObjPath can be in the form [subdir/]objname]'.

Definition at line 805 of file TDataSetManager.cxx.

◆ DeclFileName()

static const char * TDataSetManager::DeclFileName ( )
inlinestatic
Returns
Name of the file containing the class declaration

Definition at line 158 of file TDataSetManager.h.

◆ ExistsDataSet()

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

Checks if the indicated dataset exits.

Reimplemented in TDataSetManagerAliEn, and TDataSetManagerFile.

Definition at line 439 of file TDataSetManager.cxx.

◆ FillMetaData()

Int_t TDataSetManager::FillMetaData ( TFileInfo fi,
TDirectory d,
const char *  rdir = "/" 
)
static

Navigate the directory 'd' (and its subdirectories) looking for TTree objects.

Fill in the relevant metadata information in 'fi'. The name of the TFileInfoMeta metadata entry will be "/dir1/dir2/.../tree_name". Return 0 on success, -1 if any problem happens (object found in keys cannot be read, for example)

Definition at line 1801 of file TDataSetManager.cxx.

◆ GetAvgFileSize()

virtual Long64_t TDataSetManager::GetAvgFileSize ( ) const
inlinevirtual

Definition at line 111 of file TDataSetManager.h.

◆ GetDataSet()

TFileCollection * TDataSetManager::GetDataSet ( const char *  uri,
const char *  server = 0 
)
virtual

Utility function used in various methods for user dataset upload.

Reimplemented in TDataSetManagerAliEn, and TDataSetManagerFile.

Definition at line 421 of file TDataSetManager.cxx.

◆ GetDataSets()

TMap * TDataSetManager::GetDataSets ( const char *  uri,
UInt_t  = 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 in TDataSetManagerAliEn, and TDataSetManagerFile.

Definition at line 464 of file TDataSetManager.cxx.

◆ GetDataSetSrvMaps()

TList * TDataSetManager::GetDataSetSrvMaps ( )
static

Static getter for server mapping list.

Definition at line 1919 of file TDataSetManager.cxx.

◆ GetGroupQuota()

Long64_t TDataSetManager::GetGroupQuota ( const char *  group)
virtual

returns the quota a group is allowed to have

Definition at line 734 of file TDataSetManager.cxx.

◆ GetGroupQuotaMap()

virtual TMap * TDataSetManager::GetGroupQuotaMap ( )
inlinevirtual

Definition at line 117 of file TDataSetManager.h.

◆ GetGroupUsed()

Long64_t TDataSetManager::GetGroupUsed ( const char *  group)
virtual

Returns the used space of that group.

Definition at line 714 of file TDataSetManager.cxx.

◆ GetGroupUsedMap()

virtual TMap * TDataSetManager::GetGroupUsedMap ( )
inlineprotectedvirtual

Definition at line 70 of file TDataSetManager.h.

◆ GetNDisapparedFiles()

Int_t TDataSetManager::GetNDisapparedFiles ( ) const
inlineprotected

Definition at line 74 of file TDataSetManager.h.

◆ GetNOpenedFiles()

Int_t TDataSetManager::GetNOpenedFiles ( ) const
inlineprotected

Definition at line 73 of file TDataSetManager.h.

◆ GetNTouchedFiles()

Int_t TDataSetManager::GetNTouchedFiles ( ) const
inlineprotected

Definition at line 72 of file TDataSetManager.h.

◆ GetQuota()

void TDataSetManager::GetQuota ( const char *  group,
const char *  user,
const char *  dsName,
TFileCollection dataset 
)
protected

Gets quota information from this dataset.

Definition at line 550 of file TDataSetManager.cxx.

◆ GetSubDataSets()

TMap * TDataSetManager::GetSubDataSets ( const char *  ds,
const char *  exclude 
)
virtual

Partition dataset 'ds' accordingly to the servers.

The returned TMap contains: <server> --> <subdataset> (TFileCollection) where <subdataset> is the subset of 'ds' on <server> The partitioning is done using all the URLs in the TFileInfo's, so the resulting datasets are not mutually exclusive. The string 'exclude' contains a comma-separated list of servers to exclude from the map.

Definition at line 1006 of file TDataSetManager.cxx.

◆ GetUserUsedMap()

virtual TMap * TDataSetManager::GetUserUsedMap ( )
inlineprotectedvirtual

Definition at line 71 of file TDataSetManager.h.

◆ IsA()

virtual TClass * TDataSetManager::IsA ( ) const
inlinevirtual
Returns
TClass describing current object

Reimplemented from TObject.

Reimplemented in TDataSetManagerAliEn, and TDataSetManagerFile.

Definition at line 158 of file TDataSetManager.h.

◆ MonitorUsedSpace()

void TDataSetManager::MonitorUsedSpace ( TVirtualMonitoringWriter monitoring)
virtual

Log info to the monitoring server.

Definition at line 673 of file TDataSetManager.cxx.

◆ NotifyUpdate()

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

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.

Reimplemented in TDataSetManagerFile.

Definition at line 773 of file TDataSetManager.cxx.

◆ operator=()

TDataSetManager & TDataSetManager::operator= ( const TDataSetManager )
private

◆ ParseDataSetSrvMaps()

TList * TDataSetManager::ParseDataSetSrvMaps ( const TString srvmaps)
static

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)

Definition at line 1867 of file TDataSetManager.cxx.

◆ ParseInitOpts()

void TDataSetManager::ParseInitOpts ( const char *  opts)
virtual

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.

if opts is "/tmp/dataset opt:Cq:-Ar: root://lxb6046.cern.ch" only the substring "Cq:-Ar:" will be parsed .

Reimplemented in TDataSetManagerFile.

Definition at line 149 of file TDataSetManager.cxx.

◆ ParseUri()

Bool_t TDataSetManager::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.

The input 'uri' should be in the form '[[/group/]user/]dsname[#[subdir/]objname]', where 'objname' is the name of the object (e.g. the tree name) and the 'subdir' is the directory in the file wher it should be looked for. After resolving against a base URI consisting of proof://masterhost/group/user/

  • meaning masterhost, group and user of the current session - the path is checked to contain exactly three elements separated by '/': group/user/dsname If wildcards, '*' is allowed in group and user and dsname is allowed to be empty. If onlyCurrent, only group and user of current session are allowed. Only non-null parameters are filled by this function. Returns kTRUE in case of success.

Definition at line 842 of file TDataSetManager.cxx.

◆ PrintDataSet()

void TDataSetManager::PrintDataSet ( TFileCollection fc,
Int_t  popt = 0 
)
protected

Formatted printout of the content of TFileCollection 'fc'.

Options in the form popt = u * 10 + f f 0 => header only, 1 => header + files when printing files u 0 => print file name only, 1 => print full URL

Definition at line 1043 of file TDataSetManager.cxx.

◆ PrintUsedSpace()

void TDataSetManager::PrintUsedSpace ( )
protected

Prints the quota.

Definition at line 638 of file TDataSetManager.cxx.

◆ ProcessFile()

void TDataSetManager::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 
)
static

Locate, stage, or fully validate file "fileInfo".

Definition at line 1560 of file TDataSetManager.cxx.

◆ ReadGroupConfig()

Bool_t TDataSetManager::ReadGroupConfig ( const char *  cf = 0)
protected

Read group config file 'cf'.

If cf == 0 re-read, if changed, the file pointed by fGroupConfigFile .

expects the following directives: Group definition: group <groupname> <user>+ disk quota property <groupname> diskquota <quota in GB> average filesize (to be used when the file size is not available) averagefilesize <average size>{G,g,M,m,K,k}

Definition at line 206 of file TDataSetManager.cxx.

◆ RegisterDataSet()

Int_t TDataSetManager::RegisterDataSet ( const char *  uri,
TFileCollection dataSet,
const char *  opt 
)
virtual

Register a dataset, perfoming quota checkings, if needed.

Returns 0 on success, -1 on failure

Reimplemented in TDataSetManagerAliEn, and TDataSetManagerFile.

Definition at line 761 of file TDataSetManager.cxx.

◆ RemoveDataSet()

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

Removes the indicated dataset.

Reimplemented in TDataSetManagerAliEn, and TDataSetManagerFile.

Definition at line 430 of file TDataSetManager.cxx.

◆ ScanDataSet() [1/3]

Int_t TDataSetManager::ScanDataSet ( const char *  uri,
const char *  opts 
)

Scans the dataset indicated by 'uri' following the 'opts' directives.

The 'opts' string contains up to 4 directive fields separated by ':'

'selection' field : A, allfiles: process all files D, staged: process only staged (on Disk) files (if 'allfiles:' is not specified the default is to process only files marked as non-staged) 'pre-action field': O, open: open the files marked as staged when processing only files marked as non-staged T, touch: open and touch the files marked as staged when processing only files marked as non-staged I, nostagedcheck: do not check the actual stage status on selected files

'process' field: N, noaction: do nothing on the selected files P, fullproc: open the selected files and extract the meta information L, locateonly: only locate the selected files S, stageonly: issue a stage request for the selected files not yet staged

'auxiliary' field V, verbose: notify the actions

Returns 0 on success, -1 if any failure occurs.

Definition at line 497 of file TDataSetManager.cxx.

◆ ScanDataSet() [2/3]

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

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

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

Reimplemented in TDataSetManagerAliEn, and TDataSetManagerFile.

Definition at line 539 of file TDataSetManager.cxx.

◆ ScanDataSet() [3/3]

Int_t TDataSetManager::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 
)
static

Go through the files in the specified dataset, selecting files according to 'fopt' and doing on these files the actions described by 'sopt'.

If required, the information in 'dataset' is updated.

The int fopt controls which files have to be processed (or added to the list if ropt is 1 - see below); 'fopt' is defined in term of csopt and fsopt: fopt = sign(fsopt) * csopt * 100 + fsopt where 'fsopt' controls the actual selection -1 all files in the dataset 0 process only files marked as 'non-staged' >=1 as 0 but files that are marked 'staged' are open >=2 as 1 but files that are marked 'staged' are touched 10 process only files marked as 'staged'; files marked as 'non-staged' are ignored and 'csopt' controls if an actual check on the staged status (via TFileStager) is done 0 check that the file is staged using TFileStager 1 do not hard check the staged status (example: use fopt = -101 to check the staged status of all the files, or fopt = 110 to re-check the stage status of all the files marked as staged)

If 'dbg' is true, some information about the ongoing operations is reguraly printed; this can be useful when processing very large datasets, an operation which can take a very long time.

The int 'sopt' controls what is done on the selected files (this is effective only if ropt is 0 or 2 - see below): -1 no action (fopt = 2 and sopt = -1 touches all staged files) 0 do the full process: open the files and fill the meta-information in the TFileInfo object, including the end-point URL 1 only locate the files, by updating the end-point URL (uses TFileStager::Locate which is must faster of an TFile::Open) 2 issue a stage request on the files

The int 'ropt' controls which actions are performed: 0 do the full process: get list of files to process and process them 1 get the list of files to be scanned and return it in flist 2 process the files in flist (according to sopt) When defined flist is under the responsability the caller.

If avgsz > 0 it is used for the final update of the dataset global counters.

If 'mss' is defined use it to initialize the stager (instead of the Url in the TFileInfo objects)

If maxfiles > 0, select for processing a maximum of 'filesmax' files (but if fopt is 1 or 2 all files marked as 'staged' are still open or touched)

Return code 1 dataset was not changed 2 dataset was changed

The number of touched, opened and disappeared files are returned in the respective variables, if these are defined.

Definition at line 1224 of file TDataSetManager.cxx.

◆ ScanFile()

Int_t TDataSetManager::ScanFile ( TFileInfo fileinfo,
Bool_t  dbg 
)
static

Open the file described by 'fileinfo' to extract the relevant meta-information.

Return 0 if OK, -2 if the file cannot be open, -1 if it is corrupted

Definition at line 1654 of file TDataSetManager.cxx.

◆ SetScanCounters()

void TDataSetManager::SetScanCounters ( Int_t  t = -1,
Int_t  o = -1,
Int_t  d = -1 
)

Update scan counters.

Definition at line 1981 of file TDataSetManager.cxx.

◆ ShowCache()

Int_t TDataSetManager::ShowCache ( const char *  uri)
virtual

Show cached information matching uri.

Reimplemented in TDataSetManagerAliEn, and TDataSetManagerFile.

Definition at line 795 of file TDataSetManager.cxx.

◆ ShowDataSets()

void TDataSetManager::ShowDataSets ( const char *  uri = "*",
const char *  opt = "" 
)
virtual

Prints formatted information about the dataset 'uri'.

The type and format of output is driven by 'opt':

  1. opt = "server:srv1[,srv2[,srv3[,...]]]" Print info about the subsets of 'uri' on servers srv1, srv2, ...
  2. opt = "servers[:exclude:srv1[,srv2[,srv3[,...]]]]" Print info about the subsets of 'uri' on all servers, except the ones in the exclude list srv1, srv2, ...
  3. opt = <any> Print info about all datasets matching 'uri'

If 'opt' contains 'full:' the list of files in the datasets are also printed. In case 3. this is enabled only if 'uri' matches a single dataset.

In case 3, if 'opt' contains 'full:' the list of files in the datasets are also printed. 'forcescan:' the dataset are open to get the information; otherwise the pre-processed information is used. 'noheader:' the labelling header is not printed; usefull when to chain several printouts 'noupdate:' do not update the cache (which may be slow on very remote servers) 'refresh:' refresh the information (requires appropriate credentials; typically it can be done only for owned datasets)

Reimplemented in TDataSetManagerAliEn.

Definition at line 1098 of file TDataSetManager.cxx.

◆ ShowQuota()

void TDataSetManager::ShowQuota ( const char *  opt)
virtual

Display quota information.

Definition at line 585 of file TDataSetManager.cxx.

◆ Streamer()

virtual void TDataSetManager::Streamer ( TBuffer R__b)
virtual

Stream an object of class TObject.

Reimplemented from TObject.

Reimplemented in TDataSetManagerAliEn, and TDataSetManagerFile.

◆ StreamerNVirtual()

void TDataSetManager::StreamerNVirtual ( TBuffer ClassDef_StreamerNVirtual_b)
inline

Definition at line 158 of file TDataSetManager.h.

◆ ToBytes()

Long64_t TDataSetManager::ToBytes ( const char *  size = 0)
staticprotected

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).

Returns -1 if the format is wrong.

Definition at line 387 of file TDataSetManager.cxx.

◆ UpdateUsedSpace()

void TDataSetManager::UpdateUsedSpace ( )
protectedvirtual

updates the used space maps

Reimplemented in TDataSetManagerFile.

Definition at line 752 of file TDataSetManager.cxx.

Member Data Documentation

◆ fAvgFileSize

Long64_t TDataSetManager::fAvgFileSize
protected

Definition at line 56 of file TDataSetManager.h.

◆ fBase

TUri TDataSetManager::fBase
protected

Definition at line 50 of file TDataSetManager.h.

◆ fCommonGroup

TString TDataSetManager::fCommonGroup
protected

Definition at line 48 of file TDataSetManager.h.

◆ fCommonUser

TString TDataSetManager::fCommonUser
protected

Definition at line 47 of file TDataSetManager.h.

◆ fgCommonDataSetTag

TString TDataSetManager::fgCommonDataSetTag = "COMMON"
staticprotected

Definition at line 65 of file TDataSetManager.h.

◆ fgDataSetSrvMaps

TList * TDataSetManager::fgDataSetSrvMaps = 0
staticprotected

Definition at line 67 of file TDataSetManager.h.

◆ fGroup

TString TDataSetManager::fGroup
protected

Definition at line 45 of file TDataSetManager.h.

◆ fGroupConfigFile

TString TDataSetManager::fGroupConfigFile
protected

Definition at line 62 of file TDataSetManager.h.

◆ fGroupQuota

TMap TDataSetManager::fGroupQuota
protected

Definition at line 52 of file TDataSetManager.h.

◆ fGroupUsed

TMap TDataSetManager::fGroupUsed
protected

Definition at line 53 of file TDataSetManager.h.

◆ fMTimeGroupConfig

Long_t TDataSetManager::fMTimeGroupConfig
protected

Definition at line 63 of file TDataSetManager.h.

◆ fNDisappearedFiles

Int_t TDataSetManager::fNDisappearedFiles
protected

Definition at line 60 of file TDataSetManager.h.

◆ fNOpenedFiles

Int_t TDataSetManager::fNOpenedFiles
protected

Definition at line 59 of file TDataSetManager.h.

◆ fNTouchedFiles

Int_t TDataSetManager::fNTouchedFiles
protected

Definition at line 58 of file TDataSetManager.h.

◆ fUser

TString TDataSetManager::fUser
protected

Definition at line 46 of file TDataSetManager.h.

◆ fUserUsed

TMap TDataSetManager::fUserUsed
protected

Definition at line 54 of file TDataSetManager.h.

Libraries for TDataSetManager:

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