BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
FileCatalogue Class Reference

Main Interface Class to work with the File Catalog of the experiment Throws runtime_exception if a critical error occurrs while the constructor Error Codes: -1 - sending command via CURL failed, -401 - unauthorized request, -403 - token invalid or expired, -404 - data not found, -409 - incorrect database request (e.g. More...

#include <FileCatalogue.h>

Public Member Functions

 FileCatalogue ()
virtual ~FileCatalogue ()
int GetFileList (vector< unique_ptr< FileCondition > > file_conditions, vector< string > &filepaths)
 Function for searching for file metadata in the File Catalog using specified conditions.
int GetFileInfo (string LFN, FileInfo &file_info)
 Function to get metadata of the file stored at the given location.
int GetDirectoryInfo (string path, string &directory_info)
 Function to get metadata of the directory at the given path.
int GetConsistencyCheckStatus ()
 Function to get status of the last successful consistency check.
int GetConsistencyCheckResults (int &eos_missing_count, int &fc_missing_count, vector< string > &eos_missing, vector< string > &fc_missing)
 Function to get result of the last successful consistency check.
int GetFile (string LFN, string save_path)
 Function to download file from the CICC (Dirac FC).
int GetPFNs (string LFN, vector< string > &PFNs)
 Function to get file PFN (Physical File Name).
int AddFileInfo (string LFN, FileInfo file_metadata)
 Function to add metadata for the file with specific LFN.
int AddFileInfo (string json_file_path)
 Function to add file metadata to the File Catalog using input JSON file path.
int AddDirectoryInfo (string json_file_path)
 Function to add directory metadata to the File Catalog using input JSON directory path.
int AddMetadataField (string field_name, string field_type, bool isDirectoryType=true)
 Function to add new metadata field to the File Catalog.
int AddFile (string input_path, string LFN)
 Function to add file to the File Catalog and upload to CICC.
int UpdateFileInfo (string LFN, FileInfo file_metadata)
 Function to update metadata for the file with specific LFN.
int DeleteFileInfo (string LFN)
 Function to delete metadata for the file with specific LFN.
int DeleteDirectoryInfo (string path)
 Function to delete metadata for the directory at specific path.
int DeleteMetadataField (string metadatafield_name)
 Function to delete metadata field from the File Catalog.
int DeleteFile (string LFN)
 Function to delete file from the File Catalog and CICC.
int CheckFileInfo (string LFN)
 Function to check metadata for the file with specific LFN.
int CheckFileExist (string LFN)
 Function to check whether file exist or not.
int PrintFileInfo (string LFN)
 Function to print metadata for the file stored at the given location.
int PrintMetadataFields ()
 Function to print current metadata fields.
int FileCatalogRequest (string rest_api_request, vector< string > &filepaths)
 Function for searching for files matching specific metadata in the File Catalog using REST API request as an HTTP(s) string.
int FileCatalogConsistencyCheck ()
 Function to perform a consistency check in the File Catalog.
int FileCatalogStats (int &files_count, int &files_without_replicas, int &replicas_count, int &replicas_without_files)
 Function to collect summary statistics on the File Catalog.
void SetVerbose (int verbose_level=0)
 Setting Verbose level: 0 - only errors, 1 - normal output, 2 - detailed output, 3 - all with debug info.
 FileCatalogue ()
virtual ~FileCatalogue ()
int GetFileList (vector< unique_ptr< FileCondition > > file_conditions, vector< string > &filepaths)
 Function for searching for file metadata in the File Catalog using specified conditions.
int GetFileInfo (string LFN, FileInfo &file_info)
 Function to get metadata of the file stored at the given location.
int GetDirectoryInfo (string path, string &directory_info)
 Function to get metadata of the directory at the given path.
int GetConsistencyCheckStatus ()
 Function to get status of the last successful consistency check.
int GetConsistencyCheckResults (int &eos_missing_count, int &fc_missing_count, vector< string > &eos_missing, vector< string > &fc_missing)
 Function to get result of the last successful consistency check.
int GetFile (string LFN, string save_path)
 Function to download file from the CICC (Dirac FC).
int GetPFNs (string LFN, vector< string > &PFNs)
 Function to get file PFN (Physical File Name).
int AddFileInfo (string LFN, FileInfo file_metadata)
 Function to add metadata for the file with specific LFN.
int AddFileInfo (string json_file_path)
 Function to add file metadata to the File Catalog using input JSON file path.
int AddDirectoryInfo (string json_file_path)
 Function to add directory metadata to the File Catalog using input JSON directory path.
int AddMetadataField (string field_name, string field_type, bool isDirectoryType=true)
 Function to add new metadata field to the File Catalog.
int AddFile (string input_path, string LFN)
 Function to add file to the File Catalog and upload to CICC.
int UpdateFileInfo (string LFN, FileInfo file_metadata)
 Function to update metadata for the file with specific LFN.
int DeleteFileInfo (string LFN)
 Function to delete metadata for the file with specific LFN.
int DeleteDirectoryInfo (string path)
 Function to delete metadata for the directory at specific path.
int DeleteMetadataField (string metadatafield_name)
 Function to delete metadata field from the File Catalog.
int DeleteFile (string LFN)
 Function to delete file from the File Catalog and CICC.
int CheckFileInfo (string LFN)
 Function to check metadata for the file with specific LFN.
int CheckFileExist (string LFN)
 Function to check whether file exist or not.
int PrintFileInfo (string LFN)
 Function to print metadata for the file stored at the given location.
int PrintMetadataFields ()
 Function to print current metadata fields.
int FileCatalogRequest (string rest_api_request, vector< string > &filepaths)
 Function for searching for files matching specific metadata in the File Catalog using REST API request as an HTTP(s) string.
int FileCatalogConsistencyCheck ()
 Function to perform a consistency check in the File Catalog.
int FileCatalogStats (int &files_count, int &files_without_replicas, int &replicas_count, int &replicas_without_files)
 Function to collect summary statistics on the File Catalog.
void SetVerbose (int verbose_level=0)
 Setting Verbose level: 0 - only errors, 1 - normal output, 2 - detailed output, 3 - all with debug info.

Private Member Functions

string performRequest (string conditions, string json_content, string qType)
 Perfrom common curl read/write shenanigans.
int DownloadFile (string conditions, string savePath)
int UploadFile (string conditions, string filepath)
string performRequest (string conditions, string json_content, string qType)
 Perfrom common curl read/write shenanigans.
int DownloadFile (string conditions, string savePath)
int UploadFile (string conditions, string filepath)

Private Attributes

CURL * curlInstance
string ServiceUrl
string ServiceAccount
int VerboseLevel = 0

Detailed Description

violating constraints), -422 - incorrect input request, -500 - internal server error, -503 - service unavaialble, -504 - gateway timeout

Definition at line 134 of file FileCatalogue.h.

Constructor & Destructor Documentation

◆ FileCatalogue() [1/2]

FileCatalogue::FileCatalogue ( )

◆ ~FileCatalogue() [1/2]

FileCatalogue::~FileCatalogue ( )
virtual

Definition at line 119 of file FileCatalogue.cxx.

References curlInstance.

◆ FileCatalogue() [2/2]

FileCatalogue::FileCatalogue ( )

◆ ~FileCatalogue() [2/2]

virtual FileCatalogue::~FileCatalogue ( )
virtual

Member Function Documentation

◆ AddDirectoryInfo() [1/2]

int FileCatalogue::AddDirectoryInfo ( string json_file_path)

dir_path field for path to directory

Parameters
[in]json_file_pathpath of the JSON file containing a set of directory metadata to be stored
Returns
0 - if successful, error_code (<0) in case of failures

Definition at line 486 of file FileCatalogue.cxx.

References performRequest().

Here is the call graph for this function:

◆ AddDirectoryInfo() [2/2]

int FileCatalogue::AddDirectoryInfo ( string json_file_path)

dir_path field for path to directory

Parameters
[in]json_file_pathpath of the JSON file containing a set of directory metadata to be stored
Returns
0 - if successful, error_code (<0) in case of failures

◆ AddFile() [1/2]

int FileCatalogue::AddFile ( string input_path,
string LFN )
Parameters
[in]input_pathlocal path to the file
[in]LFNLFN of the output file on the CICC and FileCatalogue
Returns
0 - if successfully added, error_code (<0) in case of failures

Definition at line 508 of file FileCatalogue.cxx.

References UploadFile().

Here is the call graph for this function:

◆ AddFile() [2/2]

int FileCatalogue::AddFile ( string input_path,
string LFN )
Parameters
[in]input_pathlocal path to the file
[in]LFNLFN of the output file on the CICC and FileCatalogue
Returns
0 - if successfully added, error_code (<0) in case of failures

◆ AddFileInfo() [1/4]

int FileCatalogue::AddFileInfo ( string json_file_path)
Parameters
[in]json_file_pathpath of the JSON file containing a set of file metadata to be stored
Returns
0 - if successful, error_code (<0) in case of failures

Definition at line 463 of file FileCatalogue.cxx.

References performRequest().

Here is the call graph for this function:

◆ AddFileInfo() [2/4]

int FileCatalogue::AddFileInfo ( string json_file_path)
Parameters
[in]json_file_pathpath of the JSON file containing a set of file metadata to be stored
Returns
0 - if successful, error_code (<0) in case of failures

◆ AddFileInfo() [3/4]

int FileCatalogue::AddFileInfo ( string LFN,
FileInfo file_metadata )
Parameters
[in]LFNLogical File Name of the file
[in]file_metadata'FileInfo' object containing file metadata
Returns
0 - if successful, error_code (<0) in case of failures

Definition at line 401 of file FileCatalogue.cxx.

References FileInfo::BeamParticle, FileInfo::EndDateTime, FileInfo::EndEvent, FileInfo::Energy, FileInfo::EventCount, FileInfo::FieldVoltage, FileInfo::FileSize, performRequest(), FileInfo::RunNumber, FileInfo::RunType, FileInfo::StartDateTime, FileInfo::StartEvent, and FileInfo::TargetParticle.

Referenced by UpdateFileInfo().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ AddFileInfo() [4/4]

int FileCatalogue::AddFileInfo ( string LFN,
FileInfo file_metadata )
Parameters
[in]LFNLogical File Name of the file
[in]file_metadata'FileInfo' object containing file metadata
Returns
0 - if successful, error_code (<0) in case of failures

◆ AddMetadataField() [1/2]

int FileCatalogue::AddMetadataField ( string field_name,
string field_type,
bool isDirectoryType = true )
Parameters
[in]field_namemetadata field name to be added
[in]field_typemetadata field type (INT, DATETIME, FLOAT, VARCHAR(128))
[in]isDirectoryTypewhich type of field is needed. Directory or file
Returns
0 - if successfully added, error_code (<0) in case of failures

Definition at line 427 of file FileCatalogue.cxx.

References performRequest().

Here is the call graph for this function:

◆ AddMetadataField() [2/2]

int FileCatalogue::AddMetadataField ( string field_name,
string field_type,
bool isDirectoryType = true )
Parameters
[in]field_namemetadata field name to be added
[in]field_typemetadata field type (INT, DATETIME, FLOAT, VARCHAR(128))
[in]isDirectoryTypewhich type of field is needed. Directory or file
Returns
0 - if successfully added, error_code (<0) in case of failures

◆ CheckFileExist() [1/2]

int FileCatalogue::CheckFileExist ( string LFN)
Parameters
[in]LFNLogical File Name of the file
Returns
1 - if file exist, 0 - if not, <0 - an error occured

Definition at line 585 of file FileCatalogue.cxx.

References performRequest().

Here is the call graph for this function:

◆ CheckFileExist() [2/2]

int FileCatalogue::CheckFileExist ( string LFN)
Parameters
[in]LFNLogical File Name of the file
Returns
1 - if file exist, 0 - if not, <0 - an error occured

◆ CheckFileInfo() [1/2]

int FileCatalogue::CheckFileInfo ( string LFN)
Parameters
[in]LFNLogical File Name of the file
Returns
0 - if file metadata is avaialble, -1 - if file metadata is not set, error_code (<0) in case of failures

Definition at line 570 of file FileCatalogue.cxx.

References performRequest().

Here is the call graph for this function:

◆ CheckFileInfo() [2/2]

int FileCatalogue::CheckFileInfo ( string LFN)
Parameters
[in]LFNLogical File Name of the file
Returns
0 - if file metadata is avaialble, -1 - if file metadata is not set, error_code (<0) in case of failures

◆ DeleteDirectoryInfo() [1/2]

int FileCatalogue::DeleteDirectoryInfo ( string path)
Parameters
[in]pathPath to the directory inside File Catalog
Returns
0 - if successfully deleted, <0 - an error occured

Definition at line 533 of file FileCatalogue.cxx.

References performRequest().

Here is the call graph for this function:

◆ DeleteDirectoryInfo() [2/2]

int FileCatalogue::DeleteDirectoryInfo ( string path)
Parameters
[in]pathPath to the directory inside File Catalog
Returns
0 - if successfully deleted, <0 - an error occured

◆ DeleteFile() [1/2]

int FileCatalogue::DeleteFile ( string LFN)
Parameters
[in]LFNLogical File Name of the file
Returns
0 - if successfully deleted, error_code (<0) in case of failures

Definition at line 558 of file FileCatalogue.cxx.

References performRequest().

Here is the call graph for this function:

◆ DeleteFile() [2/2]

int FileCatalogue::DeleteFile ( string LFN)
Parameters
[in]LFNLogical File Name of the file
Returns
0 - if successfully deleted, error_code (<0) in case of failures

◆ DeleteFileInfo() [1/2]

int FileCatalogue::DeleteFileInfo ( string LFN)
Parameters
[in]LFNLogical File Name of the file
Returns
0 - if successfully deleted, <0 - an error occured

Definition at line 520 of file FileCatalogue.cxx.

References performRequest().

Here is the call graph for this function:

◆ DeleteFileInfo() [2/2]

int FileCatalogue::DeleteFileInfo ( string LFN)
Parameters
[in]LFNLogical File Name of the file
Returns
0 - if successfully deleted, <0 - an error occured

◆ DeleteMetadataField() [1/2]

int FileCatalogue::DeleteMetadataField ( string metadatafield_name)

Either for file or directory

Parameters
[in]metadatafield_nameMetadatafield name which you want to delete
Returns
0 - if successfully deleted, <0 - an error occured

Definition at line 546 of file FileCatalogue.cxx.

References performRequest().

Here is the call graph for this function:

◆ DeleteMetadataField() [2/2]

int FileCatalogue::DeleteMetadataField ( string metadatafield_name)

Either for file or directory

Parameters
[in]metadatafield_nameMetadatafield name which you want to delete
Returns
0 - if successfully deleted, <0 - an error occured

◆ DownloadFile() [1/2]

int FileCatalogue::DownloadFile ( string conditions,
string savePath )
private

Definition at line 845 of file FileCatalogue.cxx.

References curlInstance, WriteData::error_detected, WriteData::error_msg, WriteData::file, FILE_API_PASSWORD, FILE_API_USERNAME, ServiceUrl, and WriteCallback().

Referenced by GetFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ DownloadFile() [2/2]

int FileCatalogue::DownloadFile ( string conditions,
string savePath )
private

◆ FileCatalogConsistencyCheck() [1/2]

int FileCatalogue::FileCatalogConsistencyCheck ( )
Returns
check ID if successfull, <0 - an error occured

Definition at line 683 of file FileCatalogue.cxx.

References performRequest().

Here is the call graph for this function:

◆ FileCatalogConsistencyCheck() [2/2]

int FileCatalogue::FileCatalogConsistencyCheck ( )
Returns
check ID if successfull, <0 - an error occured

◆ FileCatalogRequest() [1/2]

int FileCatalogue::FileCatalogRequest ( string rest_api_request,
vector< string > & filepaths )
Parameters
[in]rest_api_requestString HTTP command representing a request using REST API format
[out]filepathsVector of the filepath containing selected file metadata (empty if not found or some errors occured)
Returns
0 - if succesfull, <0 - an error occured

Definition at line 655 of file FileCatalogue.cxx.

References exec().

Here is the call graph for this function:

◆ FileCatalogRequest() [2/2]

int FileCatalogue::FileCatalogRequest ( string rest_api_request,
vector< string > & filepaths )
Parameters
[in]rest_api_requestString HTTP command representing a request using REST API format
[out]filepathsVector of the filepath containing selected file metadata (empty if not found or some errors occured)
Returns
0 - if succesfull, <0 - an error occured

◆ FileCatalogStats() [1/2]

int FileCatalogue::FileCatalogStats ( int & files_count,
int & files_without_replicas,
int & replicas_count,
int & replicas_without_files )
Parameters
[out]files_countNumber of files in the File Catalog
[out]files_without_replicasNumber of files without replicas
[out]replicas_countNumber of replicas in the File Catalog
[out]replicas_without_filesNumber of replicas without files in the File Catalog
Returns
0 - if successfull, <0 - an error occured

Definition at line 699 of file FileCatalogue.cxx.

References performRequest().

Here is the call graph for this function:

◆ FileCatalogStats() [2/2]

int FileCatalogue::FileCatalogStats ( int & files_count,
int & files_without_replicas,
int & replicas_count,
int & replicas_without_files )
Parameters
[out]files_countNumber of files in the File Catalog
[out]files_without_replicasNumber of files without replicas
[out]replicas_countNumber of replicas in the File Catalog
[out]replicas_without_filesNumber of replicas without files in the File Catalog
Returns
0 - if successfull, <0 - an error occured

◆ GetConsistencyCheckResults() [1/2]

int FileCatalogue::GetConsistencyCheckResults ( int & eos_missing_count,
int & fc_missing_count,
vector< string > & eos_missing,
vector< string > & fc_missing )

Presumably up to hundreds megabytes of data

Parameters
[out]eos_missing_countnumber of files that exist in File Catalog but missing on EOS
[out]fc_missing_countnumber of files that exist in EOS but missing from File Catalog
[out]eos_missingpaths to files (lfns) in File Catalog that are missing from EOS
[out]fc_missingpaths to files in EOS that are missing from File Catalog
Returns
0 - if successful, error_code (<0) in case of failures

Definition at line 319 of file FileCatalogue.cxx.

References performRequest().

Here is the call graph for this function:

◆ GetConsistencyCheckResults() [2/2]

int FileCatalogue::GetConsistencyCheckResults ( int & eos_missing_count,
int & fc_missing_count,
vector< string > & eos_missing,
vector< string > & fc_missing )

Presumably up to hundreds megabytes of data

Parameters
[out]eos_missing_countnumber of files that exist in File Catalog but missing on EOS
[out]fc_missing_countnumber of files that exist in EOS but missing from File Catalog
[out]eos_missingpaths to files (lfns) in File Catalog that are missing from EOS
[out]fc_missingpaths to files in EOS that are missing from File Catalog
Returns
0 - if successful, error_code (<0) in case of failures

◆ GetConsistencyCheckStatus() [1/2]

int FileCatalogue::GetConsistencyCheckStatus ( )

Date and ID.

Returns
ID (>=0) or error_code (<0) in case of failures

Definition at line 307 of file FileCatalogue.cxx.

References performRequest().

Here is the call graph for this function:

◆ GetConsistencyCheckStatus() [2/2]

int FileCatalogue::GetConsistencyCheckStatus ( )

Date and ID.

Returns
ID (>=0) or error_code (<0) in case of failures

◆ GetDirectoryInfo() [1/2]

int FileCatalogue::GetDirectoryInfo ( string path,
string & directory_info )
Parameters
[in]pathPath to the directory in the File Catalog
[out]directory_infoString containing metadata fields and it's values
Returns
0 - if successful, error_code (<0) in case of failures

Definition at line 285 of file FileCatalogue.cxx.

References performRequest().

Here is the call graph for this function:

◆ GetDirectoryInfo() [2/2]

int FileCatalogue::GetDirectoryInfo ( string path,
string & directory_info )
Parameters
[in]pathPath to the directory in the File Catalog
[out]directory_infoString containing metadata fields and it's values
Returns
0 - if successful, error_code (<0) in case of failures

◆ GetFile() [1/2]

int FileCatalogue::GetFile ( string LFN,
string save_path )
Parameters
[in]LFNLFN of the downloaded file
[in]save_pathpath to place where you want to save it. locally or by xrootd URL
Returns
0 - if successful, error_code (<0) in case of failures

Definition at line 353 of file FileCatalogue.cxx.

References DownloadFile(), and performRequest().

Referenced by get_file().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFile() [2/2]

int FileCatalogue::GetFile ( string LFN,
string save_path )
Parameters
[in]LFNLFN of the downloaded file
[in]save_pathpath to place where you want to save it. locally or by xrootd URL
Returns
0 - if successful, error_code (<0) in case of failures

◆ GetFileInfo() [1/2]

int FileCatalogue::GetFileInfo ( string LFN,
FileInfo & file_info )
Parameters
[in]LFNLogical File Name of the file
[out]file_infoFileInfo object containing file metadata
Returns
0 - if successful, error_code (<0) in case of failures

Definition at line 227 of file FileCatalogue.cxx.

References FileInfo::BeamParticle, FileInfo::EndDateTime, FileInfo::EndEvent, FileInfo::Energy, FileInfo::EventCount, FileInfo::FieldVoltage, FileInfo::FileSize, performRequest(), FileInfo::PeriodNumber, FileInfo::RunNumber, FileInfo::RunType, FileInfo::StartDateTime, FileInfo::StartEvent, and FileInfo::TargetParticle.

Referenced by get_file_metadata().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFileInfo() [2/2]

int FileCatalogue::GetFileInfo ( string LFN,
FileInfo & file_info )
Parameters
[in]LFNLogical File Name of the file
[out]file_infoFileInfo object containing file metadata
Returns
0 - if successful, error_code (<0) in case of failures

◆ GetFileList() [1/2]

int FileCatalogue::GetFileList ( vector< unique_ptr< FileCondition > > file_conditions,
vector< string > & filepaths )
Parameters
[in]file_conditionsA set of conditions to specify criteria for file metadata search
[out]filepathsVector of the filepaths to files containing selected file metadata (empty if not found or some errors occured
Returns
0 - if successful, error_code (<0) in case of failures

Definition at line 135 of file FileCatalogue.cxx.

References FileCondition::kBeamParticle, FileCondition::kEndDateTime, FileCondition::kEndEvent, FileCondition::kEnergy, FileCondition::kEqual, FileCondition::kError, FileCondition::kEventCount, FileCondition::kFieldVoltage, FileCondition::kFileSize, FileCondition::kGreaterOrEqual, FileCondition::kLessOrEqual, FileCondition::kLike, FileCondition::kNotEqual, FileCondition::kPeriodNumber, FileCondition::kRunNumber, FileCondition::kRunType, FileCondition::kStartDateTime, FileCondition::kStartEvent, FileCondition::kTargetParticle, performRequest(), and ReplaceAll().

Referenced by get_file_list().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ GetFileList() [2/2]

int FileCatalogue::GetFileList ( vector< unique_ptr< FileCondition > > file_conditions,
vector< string > & filepaths )
Parameters
[in]file_conditionsA set of conditions to specify criteria for file metadata search
[out]filepathsVector of the filepaths to files containing selected file metadata (empty if not found or some errors occured
Returns
0 - if successful, error_code (<0) in case of failures

◆ GetPFNs() [1/2]

int FileCatalogue::GetPFNs ( string LFN,
vector< string > & PFNs )
Parameters
[in]LFNLFN of the file
[out]PFNsVector of PFNs of the file
Returns
0 - if successful, error_code (<0) in case of failures

Definition at line 372 of file FileCatalogue.cxx.

References performRequest().

Here is the call graph for this function:

◆ GetPFNs() [2/2]

int FileCatalogue::GetPFNs ( string LFN,
vector< string > & PFNs )
Parameters
[in]LFNLFN of the file
[out]PFNsVector of PFNs of the file
Returns
0 - if successful, error_code (<0) in case of failures

◆ performRequest() [1/2]

string FileCatalogue::performRequest ( string conditions,
string json_content,
string qType )
private
Parameters
[in]conditionsString of conditions/path/commands which goes after URL when perfrorming API request
[in]json_contentString containing json with request as append content
[in]qTypetype of request
Returns
Response string from the API server

Definition at line 723 of file FileCatalogue.cxx.

References appendData(), curlInstance, FILE_API_PASSWORD, FILE_API_USERNAME, ServiceUrl, and VerboseLevel.

Referenced by AddDirectoryInfo(), AddFileInfo(), AddFileInfo(), AddMetadataField(), CheckFileExist(), CheckFileInfo(), DeleteDirectoryInfo(), DeleteFile(), DeleteFileInfo(), DeleteMetadataField(), FileCatalogConsistencyCheck(), FileCatalogStats(), GetConsistencyCheckResults(), GetConsistencyCheckStatus(), GetDirectoryInfo(), GetFile(), GetFileInfo(), GetFileList(), GetPFNs(), PrintFileInfo(), and PrintMetadataFields().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ performRequest() [2/2]

string FileCatalogue::performRequest ( string conditions,
string json_content,
string qType )
private
Parameters
[in]conditionsString of conditions/path/commands which goes after URL when perfrorming API request
[in]json_contentString containing json with request as append content
[in]qTypetype of request
Returns
Response string from the API server

◆ PrintFileInfo() [1/2]

int FileCatalogue::PrintFileInfo ( string LFN)
Parameters
[in]LFNLogical File Name of the file
Returns
0 - if successfull, -2 - if file was not found at the location, error_code (<0) in case of failures

Definition at line 600 of file FileCatalogue.cxx.

References performRequest().

Here is the call graph for this function:

◆ PrintFileInfo() [2/2]

int FileCatalogue::PrintFileInfo ( string LFN)
Parameters
[in]LFNLogical File Name of the file
Returns
0 - if successfull, -2 - if file was not found at the location, error_code (<0) in case of failures

◆ PrintMetadataFields() [1/2]

int FileCatalogue::PrintMetadataFields ( )
Returns
0 - if succesfull, <0 - an error occured

Definition at line 624 of file FileCatalogue.cxx.

References performRequest().

Here is the call graph for this function:

◆ PrintMetadataFields() [2/2]

int FileCatalogue::PrintMetadataFields ( )
Returns
0 - if succesfull, <0 - an error occured

◆ SetVerbose() [1/2]

void FileCatalogue::SetVerbose ( int verbose_level = 0)
inline
Parameters
[in]verbose_levelVerbose level for output information

Definition at line 339 of file FileCatalogue.h.

References VerboseLevel.

◆ SetVerbose() [2/2]

void FileCatalogue::SetVerbose ( int verbose_level = 0)
inline
Parameters
[in]verbose_levelVerbose level for output information

Definition at line 339 of file FileCatalogue.h.

References VerboseLevel.

◆ UpdateFileInfo() [1/2]

int FileCatalogue::UpdateFileInfo ( string LFN,
FileInfo file_metadata )
Parameters
[in]LFNLogical File Name of the file
[in]file_metadata'FileInfo' object containing file metadata
Returns
0 - if successfully updated, <0 - an error occured

Definition at line 515 of file FileCatalogue.cxx.

References AddFileInfo().

Here is the call graph for this function:

◆ UpdateFileInfo() [2/2]

int FileCatalogue::UpdateFileInfo ( string LFN,
FileInfo file_metadata )
Parameters
[in]LFNLogical File Name of the file
[in]file_metadata'FileInfo' object containing file metadata
Returns
0 - if successfully updated, <0 - an error occured

◆ UploadFile() [1/2]

int FileCatalogue::UploadFile ( string conditions,
string filepath )
private

Definition at line 908 of file FileCatalogue.cxx.

References appendData(), curlInstance, FILE_API_PASSWORD, FILE_API_USERNAME, progressCallback(), and ServiceUrl.

Referenced by AddFile().

Here is the call graph for this function:
Here is the caller graph for this function:

◆ UploadFile() [2/2]

int FileCatalogue::UploadFile ( string conditions,
string filepath )
private

Member Data Documentation

◆ curlInstance

CURL * FileCatalogue::curlInstance
private

◆ ServiceAccount

string FileCatalogue::ServiceAccount
private

Definition at line 344 of file FileCatalogue.h.

Referenced by FileCatalogue().

◆ ServiceUrl

string FileCatalogue::ServiceUrl
private

Definition at line 343 of file FileCatalogue.h.

Referenced by FileCatalogue(), DownloadFile(), performRequest(), and UploadFile().

◆ VerboseLevel

int FileCatalogue::VerboseLevel = 0
private

Definition at line 346 of file FileCatalogue.h.

Referenced by performRequest(), and SetVerbose().


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