<commit_before>// @(#)root/proof:$Id$
// Author: <NAME>, 08.08.07

/*************************************************************************
 * Copyright (C) 1995-2000, <NAME> and <NAME>.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TProofDataSetManagerFile
#define ROOT_TProofDataSetManagerFile

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TProofDataSetManagerFile                                             //
//                                                                      //
// Implementation of TProofDataSetManager handling datasets from root   //
// files under a specific directory path                                //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "TProofDataSetManager.h"

class TProofDataSetManagerFile : public TProofDataSetManager
{

private:
   TString fDataSetDir;   // location of datasets
   TString fMSSUrl;       // URL for the Mass Storage System
   TString fDataSetLockFile;   // dataset lock file
   Int_t   fLockFileTimeLimit; // limit in seconds after a lock automatically expires

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

   TFileCollection *GetDataSet(const char *group, const char *user, const char *dsName,
                               UInt_t option = 0, TMD5 **checksum = 0);
   TMap *GetDataSets(const char *group, const char *user, UInt_t option = 0);

   Bool_t RemoveDataSet(const char *group, const char *user, const char *dsName);
   Bool_t ExistsDataSet(const char *group, const char *user, const char *dsName);

   Int_t  ScanDataSet(TFileCollection *dataset, UInt_t option, Int_t filesmax = -1);
   Int_t  ScanDataSet(const char *group, const char *user, const char *dsName, UInt_t option);

   void UpdateUsedSpace();

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

public:
   TProofDataSetManagerFile(const char *group = 0, const char *user = 0, const char *ins = 0);
   virtual ~TProofDataSetManagerFile() { }

   void ParseInitOpts(const char *opts);

   TFileCollection *GetDataSet(const char *uri);
   TMap *GetDataSets(const char *uri, UInt_t /*option*/ = 0);
   Bool_t ExistsDataSet(const char *uri);
   Bool_t RemoveDataSet(const char *uri);

   Int_t RegisterDataSet(const char *uri, TFileCollection *dataSet, const char *opt);
   Int_t ScanDataSet(const char *uri, UInt_t /*option*/ = 0);

   ClassDef(TProofDataSetManagerFile, 0) // DataSet manager for files
};

#endif<commit_msg>Make 'public' the functions used directly the external ALICE daemon<commit_after>// @(#)root/proof:$Id$
// Author: <NAME>, 08.08.07

/*************************************************************************
 * Copyright (C) 1995-2000, <NAME> and <NAME>.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#ifndef ROOT_TProofDataSetManagerFile
#define ROOT_TProofDataSetManagerFile

//////////////////////////////////////////////////////////////////////////
//                                                                      //
// TProofDataSetManagerFile                                             //
//                                                                      //
// Implementation of TProofDataSetManager handling datasets from root   //
// files under a specific directory path                                //
//                                                                      //
//////////////////////////////////////////////////////////////////////////

#include "TProofDataSetManager.h"

class TProofDataSetManagerFile : public TProofDataSetManager
{

private:
   TString fDataSetDir;   // location of datasets
   TString fMSSUrl;       // URL for the Mass Storage System
   TString fDataSetLockFile;   // dataset lock file
   Int_t   fLockFileTimeLimit; // limit in seconds after a lock automatically expires

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

   Bool_t RemoveDataSet(const char *group, const char *user, const char *dsName);
   Bool_t ExistsDataSet(const char *group, const char *user, const char *dsName);

   Int_t  ScanDataSet(const char *group, const char *user, const char *dsName, UInt_t option);

   void UpdateUsedSpace();

public:
   TProofDataSetManagerFile(const char *group = 0, const char *user = 0, const char *ins = 0);
   virtual ~TProofDataSetManagerFile() { }

   void ParseInitOpts(const char *opts);

   TFileCollection *GetDataSet(const char *uri);
   TMap *GetDataSets(const char *uri, UInt_t /*option*/ = 0);
   Bool_t ExistsDataSet(const char *uri);
   Bool_t RemoveDataSet(const char *uri);

   Int_t RegisterDataSet(const char *uri, TFileCollection *dataSet, const char *opt);
   Int_t ScanDataSet(const char *uri, UInt_t /*option*/ = 0);

   // These should / could be private but they are used directly by the external daemon
   TFileCollection *GetDataSet(const char *group, const char *user, const char *dsName,
                               UInt_t option = 0, TMD5 **checksum = 0);
   TMap *GetDataSets(const char *group, const char *user, UInt_t option = 0);
   Int_t ScanDataSet(TFileCollection *dataset, UInt_t option, Int_t filesmax = -1);
   Int_t WriteDataSet(const char *group, const char *user, const char *dsName,
                      TFileCollection *dataset, UInt_t option = 0, TMD5 *checksum = 0);

   ClassDef(TProofDataSetManagerFile, 0) // DataSet manager for files
};

#endif
{'fraction_non_alphanumeric': 0.16914893617021276, 'fraction_numerical': 0.00851063829787234, 'mean_word_length': 1.9042365401588703, 'pattern_counts': {'":': 0, '<': 9, '<?xml version=': 0, '>': 9, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 32, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6260012', 'n_tokens_mistral': 1669, 'n_tokens_neox': 1607, 'n_words': 522}