ROOT » PROOF » PROOF » TDataSetManagerFile

class TDataSetManagerFile: public TDataSetManager


TDataSetManagerFile

Implementation of TDataSetManager handling datasets from root
files under a specific directory path


Function Members (Methods)

public:
virtual~TDataSetManagerFile()
voidTObject::AbstractMethod(const char* method) const
virtual voidTObject::AppendPad(Option_t* option = "")
virtual voidTObject::Browse(TBrowser* b)
static Bool_tTDataSetManager::CheckDataSetSrvMaps(TUrl* furl, TString& fn, TList* srvmaplist = 0)
static Bool_tTDataSetManager::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 TClass*Class()
virtual const char*TObject::ClassName() const
virtual voidTObject::Clear(Option_t* = "")
virtual Int_tClearCache(const char* uri = 0)
virtual TObject*TObject::Clone(const char* newname = "") const
virtual Int_tTObject::Compare(const TObject* obj) const
virtual voidTObject::Copy(TObject& object) const
static TStringTDataSetManager::CreateUri(const char* dsGroup = 0, const char* dsUser = 0, const char* dsName = 0, const char* dsTree = 0)
virtual voidTObject::Delete(Option_t* option = "")MENU
virtual Int_tTObject::DistancetoPrimitive(Int_t px, Int_t py)
virtual voidTObject::Draw(Option_t* option = "")
virtual voidTObject::DrawClass() constMENU
virtual TObject*TObject::DrawClone(Option_t* option = "") constMENU
virtual voidTObject::Dump() constMENU
virtual voidTObject::Error(const char* method, const char* msgfmt) const
virtual voidTObject::Execute(const char* method, const char* params, Int_t* error = 0)
virtual voidTObject::Execute(TMethod* method, TObjArray* params, Int_t* error = 0)
virtual voidTObject::ExecuteEvent(Int_t event, Int_t px, Int_t py)
virtual Bool_tExistsDataSet(const char* uri)
virtual voidTObject::Fatal(const char* method, const char* msgfmt) const
static Int_tTDataSetManager::FillMetaData(TFileInfo* fi, TDirectory* d, const char* rdir = "/")
virtual TObject*TObject::FindObject(const char* name) const
virtual TObject*TObject::FindObject(const TObject* obj) const
virtual Long64_tTDataSetManager::GetAvgFileSize() const
virtual TFileCollection*GetDataSet(const char* uri, const char* srv = 0)
TFileCollection*GetDataSet(const char* group, const char* user, const char* dsName, UInt_t option = 0, TMD5** checksum = 0)
virtual TMap*GetDataSets(const char* uri, UInt_t option = TDataSetManager::kExport)
TMap*GetDataSets(const char* group, const char* user, const char* dsName = 0, UInt_t option = 0)
static TList*TDataSetManager::GetDataSetSrvMaps()
virtual Option_t*TObject::GetDrawOption() const
static Long_tTObject::GetDtorOnly()
virtual Long64_tTDataSetManager::GetGroupQuota(const char* group)
virtual TMap*TDataSetManager::GetGroupQuotaMap()
virtual Long64_tTDataSetManager::GetGroupUsed(const char* group)
virtual const char*TObject::GetIconName() const
Long_tGetModTime(const char* uri)
const char*GetMSSUrl() const
virtual const char*TObject::GetName() const
virtual char*TObject::GetObjectInfo(Int_t px, Int_t py) const
static Bool_tTObject::GetObjectStat()
virtual Option_t*TObject::GetOption() const
const char*GetStageOpts() const
virtual TMap*TDataSetManager::GetSubDataSets(const char* uri, const char* excludeservers)
virtual const char*TObject::GetTitle() const
virtual UInt_tTObject::GetUniqueID() const
virtual Bool_tTObject::HandleTimer(TTimer* timer)
virtual ULong_tTObject::Hash() const
virtual voidTObject::Info(const char* method, const char* msgfmt) const
virtual Bool_tTObject::InheritsFrom(const char* classname) const
virtual Bool_tTObject::InheritsFrom(const TClass* cl) const
virtual voidTObject::Inspect() constMENU
voidTObject::InvertBit(UInt_t f)
virtual TClass*IsA() const
virtual Bool_tTObject::IsEqual(const TObject* obj) const
virtual Bool_tTObject::IsFolder() const
Bool_tTObject::IsOnHeap() const
virtual Bool_tTObject::IsSortable() const
Bool_tTObject::IsZombie() const
virtual voidTObject::ls(Option_t* option = "") const
voidTObject::MayNotUse(const char* method) const
virtual voidTDataSetManager::MonitorUsedSpace(TVirtualMonitoringWriter* monitoring)
virtual Bool_tTObject::Notify()
virtual Int_tNotifyUpdate(const char* group, const char* user, const char* dspath, Long_t mtime, const char* checksum = 0)
voidTObject::Obsolete(const char* method, const char* asOfVers, const char* removedFromVers) const
voidTObject::operator delete(void* ptr)
voidTObject::operator delete(void* ptr, void* vp)
voidTObject::operator delete[](void* ptr)
voidTObject::operator delete[](void* ptr, void* vp)
void*TObject::operator new(size_t sz)
void*TObject::operator new(size_t sz, void* vp)
void*TObject::operator new[](size_t sz)
void*TObject::operator new[](size_t sz, void* vp)
TDataSetManagerFile&operator=(const TDataSetManagerFile&)
virtual voidTObject::Paint(Option_t* option = "")
static TList*TDataSetManager::ParseDataSetSrvMaps(const TString& srvmaps)
virtual voidParseInitOpts(const char* opts)
Bool_tTDataSetManager::ParseUri(const char* uri, TString* dsGroup = 0, TString* dsUser = 0, TString* dsName = 0, TString* dsTree = 0, Bool_t onlyCurrent = kFALSE, Bool_t wildcards = kFALSE)
virtual voidTObject::Pop()
virtual voidTObject::Print(Option_t* option = "") const
static voidTDataSetManager::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)
virtual Int_tTObject::Read(const char* name)
virtual voidTObject::RecursiveRemove(TObject* obj)
virtual Int_tRegisterDataSet(const char* uri, TFileCollection* dataSet, const char* opt)
virtual Bool_tRemoveDataSet(const char* uri)
voidTObject::ResetBit(UInt_t f)
virtual voidTObject::SaveAs(const char* filename = "", Option_t* option = "") constMENU
virtual voidTObject::SavePrimitive(ostream& out, Option_t* option = "")
virtual Int_tScanDataSet(const char* uri, UInt_t option = kReopen | kDebug)
static Int_tTDataSetManager::ScanFile(TFileInfo* fileinfo, Bool_t notify)
voidTObject::SetBit(UInt_t f)
voidTObject::SetBit(UInt_t f, Bool_t set)
virtual voidTObject::SetDrawOption(Option_t* option = "")MENU
static voidTObject::SetDtorOnly(void* obj)
static voidTObject::SetObjectStat(Bool_t stat)
voidTDataSetManager::SetScanCounters(Int_t t = -1, Int_t o = -1, Int_t d = -1)
virtual voidTObject::SetUniqueID(UInt_t uid)
virtual Int_tShowCache(const char* uri = 0)
virtual voidTDataSetManager::ShowDataSets(const char* uri = "*", const char* opt = "")
virtual voidShowMembers(TMemberInspector& insp) const
virtual voidTDataSetManager::ShowQuota(const char* opt)
virtual voidStreamer(TBuffer&)
voidStreamerNVirtual(TBuffer& ClassDef_StreamerNVirtual_b)
virtual voidTObject::SysError(const char* method, const char* msgfmt) const
TDataSetManagerFile()
TDataSetManagerFile(const char* ins)
TDataSetManagerFile(const TDataSetManagerFile&)
TDataSetManagerFile(const char* group, const char* user, const char* ins)
Bool_tTObject::TestBit(UInt_t f) const
Int_tTObject::TestBits(UInt_t f) const
virtual voidTObject::UseCurrentStyle()
virtual voidTObject::Warning(const char* method, const char* msgfmt) const
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0)
virtual Int_tTObject::Write(const char* name = 0, Int_t option = 0, Int_t bufsize = 0) const
Int_tWriteDataSet(const char* group, const char* user, const char* dsName, TFileCollection* dataset, UInt_t option = 0, TMD5* checksum = 0)
protected:
Bool_tBrowseDataSets(const char* group, const char* user, const char* dsName, UInt_t option, TObject* target)
Int_tChecksumDataSet(const char* path, const char* md5path, TString& checksum)
Int_tCreateLsFile(const char* group, const char* user, Long_t& mtime, TString& checksum)
virtual voidTObject::DoError(int level, const char* location, const char* fmt, va_list va) const
Bool_tExistsDataSet(const char* group, const char* user, const char* dsName)
Int_tFillLsDataSet(const char* group, const char* user, const char* dsName, TList* out, UInt_t option)
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)
virtual TMap*TDataSetManager::GetGroupUsedMap()
Int_tTDataSetManager::GetNDisapparedFiles() const
Int_tTDataSetManager::GetNOpenedFiles() const
Int_tTDataSetManager::GetNTouchedFiles() const
voidTDataSetManager::GetQuota(const char* group, const char* user, const char* dsName, TFileCollection* dataset)
virtual TMap*TDataSetManager::GetUserUsedMap()
voidInit()
voidTObject::MakeZombie()
voidTDataSetManager::PrintDataSet(TFileCollection* fc, Int_t popt = 0)
voidTDataSetManager::PrintUsedSpace()
Bool_tTDataSetManager::ReadGroupConfig(const char* cf = 0)
Bool_tRemoveDataSet(const char* group, const char* user, const char* dsName)
Int_tScanDataSet(const char* group, const char* user, const char* dsName, UInt_t option = kReopen | kDebug)
static Long64_tTDataSetManager::ToBytes(const char* size = 0)
virtual voidUpdateUsedSpace()
private:
Int_tCheckLocalCache(const char* group, const char* user, const char* dsName = "ls", UInt_t option = 0)
voidInitLocalCache()

Data Members

public:
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kAllFiles
static TDataSetManager::EDataSetStatusBitsTDataSetManager::kAllowRegister
static TDataSetManager::EDataSetStatusBitsTDataSetManager::kAllowVerify
static TObject::(anonymous)TObject::kBitMask
static TObject::EStatusBitsTObject::kCanDelete
static TObject::EStatusBitsTObject::kCannotPick
static TDataSetManager::EDataSetStatusBitsTDataSetManager::kCheckQuota
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kDebug
static TDataSetManager::EDataSetStatusBitsTDataSetManager::kDoNotUseCache
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kExport
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kFileMustExist
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kForceScan
static TObject::EStatusBitsTObject::kHasUUID
static TObject::EStatusBitsTObject::kInvalidObject
static TObject::(anonymous)TObject::kIsOnHeap
static TObject::EStatusBitsTObject::kIsReferenced
static TDataSetManager::EDataSetStatusBitsTDataSetManager::kIsSandbox
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kList
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kLocateOnly
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kMaxFiles
static TObject::EStatusBitsTObject::kMustCleanup
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kNoAction
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kNoCacheUpdate
static TObject::EStatusBitsTObject::kNoContextMenu
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kNoHeaderPrint
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kNoStagedCheck
static TObject::(anonymous)TObject::kNotDeleted
static TObject::EStatusBitsTObject::kObjInCanvas
static TObject::(anonymous)TObject::kOverwrite
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kPrint
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kQuotaUpdate
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kReadShort
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kRefreshLs
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kReopen
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kSetDefaultTree
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kShowDefault
static TObject::(anonymous)TObject::kSingleKey
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kStageOnly
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kStagedFiles
static TDataSetManager::EDataSetWorkOptsTDataSetManager::kTouch
static TDataSetManager::EDataSetStatusBitsTDataSetManager::kTrustInfo
static TDataSetManager::EDataSetStatusBitsTDataSetManager::kUseCache
static TObject::(anonymous)TObject::kWriteDelete
static TObject::(anonymous)TObject::kZombie
protected:
Long64_tTDataSetManager::fAvgFileSizeAverage file size to be used to estimate the dataset size (in MB)
TUriTDataSetManager::fBaseBase URI used to parse dataset names
TStringTDataSetManager::fCommonGroupGroup that stores the COMMON datasets
TStringTDataSetManager::fCommonUserUser that stores the COMMON datasets
TStringTDataSetManager::fGroupGroup to which the owner of this session belongs
TStringTDataSetManager::fGroupConfigFilePath to the group config file
TMapTDataSetManager::fGroupQuotaGroup quotas (read from config file)
TMapTDataSetManager::fGroupUsed<group> --> <used bytes> (TParameter)
Long_tTDataSetManager::fMTimeGroupConfigLast modification of the group config file
Int_tTDataSetManager::fNDisappearedFilesNumber of files disappared in the last ScanDataSet operation
Int_tTDataSetManager::fNOpenedFilesNumber of files opened in the last ScanDataSet operation
Int_tTDataSetManager::fNTouchedFilesNumber of files touched in the last ScanDataSet operation
TStringTDataSetManager::fUserOwner of the session
TMapTDataSetManager::fUserUsed<group> --> <map of users> --> <value>
static TStringTDataSetManager::fgCommonDataSetTagName for common datasets, default: COMMON
static TList*TDataSetManager::fgDataSetSrvMapsList of TPair(TRegexp, TObjString) for mapping server coordinates
private:
Int_tfCacheUpdatePeriodPeriod for checking for new updated information
TStringfDataSetDirLocation of datasets
TStringfDataSetLockFileDataset lock file
Bool_tfIsRemoteTrue if the repository is remote
TStringfListFileFile to check repository updates
TStringfLocalCacheDirLocal cache when the repository is remote
Int_tfLockFileTimeLimitLimit in seconds after a lock automatically expires
TStringfMSSUrlURL for the Mass Storage System
Bool_tfOpenPermsTrue if file permissions must be open
TStringfStageOptsOption string to be used in issuing staging requests
Bool_tfUseCacheTrue if the cache is used for browsing remote repositories

Class Charts

Inheritance Inherited Members Includes Libraries
Class Charts

Function documentation

TDataSetManagerFile(const char* group, const char* user, const char* ins)
 Main constructor
TDataSetManagerFile(const char* ins)
 Main constructor
void Init()
 Do the real inititialization
void InitLocalCache()
 Init the local cache if required
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.
 See TDataSetManager::ParseInitOpts for the available
 base options.
 The base options are already initialized by the base constructor
const char * GetDataSetPath(const char* group, const char* user, const char* dsName, TString& md5path, Bool_t local = kFALSE)
 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.
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. For still existing datasets, fill the
 modification date in seconds anf the checksum.
 Returns 0 on success, -1 on error
Int_t CreateLsFile(const char* group, const char* user, Long_t& mtime, TString& checksum)
 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
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.
 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.
TMap * 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.
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'.
 If 'dsname' is defined, open the file and extract the relevant line.
 Return 0 on success, -1 on failure
TFileCollection * 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.
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
Int_t ClearCache(const char* uri = 0)
 Clear cached information matching uri
Int_t ShowCache(const char* uri = 0)
 Show cached information matching uri
Int_t 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
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'. The MD5 string is returned in 'md5sum'.
 Return 0 on success, -1 on error.
Bool_t RemoveDataSet(const char* group, const char* user, const char* dsName)
 Removes the indicated dataset
Bool_t ExistsDataSet(const char* group, const char* user, const char* dsName)
 Checks if the indicated dataset exits
Int_t RegisterDataSet(const char* uri, TFileCollection* dataSet, const char* opt)
 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
Int_t ScanDataSet(const char* uri, UInt_t option = kReopen | kDebug)
 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)
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)
TMap * GetDataSets(const char* uri, UInt_t option = TDataSetManager::kExport)
 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.
TFileCollection * GetDataSet(const char* uri, const char* srv = 0)
 Utility function used in various methods for user dataset upload.
Bool_t RemoveDataSet(const char* uri)
 Removes the indicated dataset
Bool_t ExistsDataSet(const char* uri)
 Checks if the indicated dataset exits
void UpdateUsedSpace()
 updates the used space maps
Long_t GetModTime(const char* uri)
 Gets last dataset modification time. Returns -1 on error, or number of
 seconds since epoch on success
const char * GetDataSetPath(const char* group, const char* user, const char* dsName)
TDataSetManagerFile()
{ }
TDataSetManagerFile(const char* group, const char* user, const char* ins)
virtual ~TDataSetManagerFile()
{ }
const char * GetMSSUrl() const
{ return fMSSUrl; }
const char * GetStageOpts() const
{ return fStageOpts; }