35 "1970-01-01 00-00-00";
52 cout <<
"FileInfo (version " <<
Version <<
"):" << endl;
54 cout <<
" Run Type = " <<
RunType << endl;
57 cout <<
" Energy = " <<
Energy <<
" GeV" << endl;
61 cout <<
" Event Count = " <<
EventCount << endl;
62 cout <<
" File Size = " <<
FileSize << endl;
103 FileCondition(searchAttributes attribute, matchCriteria condition);
104 FileCondition(searchAttributes attribute, matchCriteria condition,
int value);
105 FileCondition(searchAttributes attribute, matchCriteria condition,
unsigned int value);
106 FileCondition(searchAttributes attribute, matchCriteria condition,
float value);
107 FileCondition(searchAttributes attribute, matchCriteria condition,
string value);
147 int GetFileList(vector<unique_ptr<FileCondition>> file_conditions, vector<string>& filepaths);
180 int& fc_missing_count,
181 vector<string>& eos_missing,
182 vector<string>& fc_missing);
190 int GetFile(
string LFN,
string save_path);
198 int GetPFNs(
string LFN, vector<string>& PFNs);
230 int AddMetadataField(
string field_name,
string field_type,
bool isDirectoryType =
true);
238 int AddFile(
string input_path,
string LFN);
331 int& files_without_replicas,
333 int& replicas_without_files);
355 string performRequest(
string conditions,
string json_content,
string qType);
361 int UploadFile(
string conditions,
string filepath);
int CheckFileExist(string LFN)
Function to check whether file exist or not.
int DeleteDirectoryInfo(string path)
Function to delete metadata for the directory at specific path.
int AddDirectoryInfo(string json_file_path)
Function to add directory metadata to the File Catalog using input JSON directory path.
int DeleteFile(string LFN)
Function to delete file from the File Catalog and CICC.
int AddMetadataField(string field_name, string field_type, bool isDirectoryType=true)
Function to add new metadata field to the File Catalog.
int FileCatalogRequest(string rest_api_request, vector< string > &filepaths)
Function for searching for files matching specific metadata in the File Catalog using REST API reques...
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.
int UploadFile(string conditions, string filepath)
int PrintFileInfo(string LFN)
Function to print metadata for 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 DeleteMetadataField(string metadatafield_name)
Function to delete metadata field from 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 in...
int FileCatalogConsistencyCheck()
Function to perform a consistency check in the File Catalog.
int CheckFileInfo(string LFN)
Function to check metadata for the file with specific LFN.
int GetFile(string LFN, string save_path)
Function to download file from the CICC (Dirac FC).
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 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 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 DownloadFile(string conditions, string savePath)
int AddFileInfo(string LFN, FileInfo file_metadata)
Function to add metadata for the file with specific LFN.
string performRequest(string conditions, string json_content, string qType)
Perfrom common curl read/write shenanigans.
int AddFile(string input_path, string LFN)
Function to add file to the File Catalog and upload to CICC.
int GetFileInfo(string LFN, FileInfo &file_info)
Function to get metadata of the file stored at the given location.
int GetPFNs(string LFN, vector< string > &PFNs)
Function to get file PFN (Physical File Name).
int PrintMetadataFields()
Function to print current metadata fields.
int GetConsistencyCheckStatus()
Function to get status of the last successful consistency check.
searchAttributes
enumeration for attributes, which can be used in searching file metadata
string getValueAsString()
matchCriteria
enumeration for conditions, which can be used for matching with a specified value
FileCondition(searchAttributes attribute, matchCriteria condition)
Create condition for searching file metadata.
matchCriteria getMatchCriteria()
matchCriteria FileMatchCriteria
searchAttributes getFileAttribute()
searchAttributes FileAttribute
Class presenting File Info (Metadata) Structure.
int StartEvent
event number from which stored event set begins
float FileSize
file size in bytes
int RunType
run type (1 - physics run, 2 - calibration run, 3 - test run)
static const int Version
structure (API) version
string BeamParticle
beam particle name
int EndEvent
event number with which event set ends
int EventCount
event count stored in the file
void Print() const
Print all file metadata to the standard output.
string EndDateTime
end datetime of the stored event set (YYYY-MM-DD HH-MM-SS format)
int PeriodNumber
number of experiment session, when the events was collected
string StartDateTime
start datetime of the stored event set (YYYY-MM-DD HH-MM-SS format)
int RunNumber
number of experiment run, when the events was collected
string TargetParticle
target particle name
float FieldVoltage
field voltage