BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
get_file_metadata.C
Go to the documentation of this file.
1// macro for obtaining file metadata by its LFN
2#ifndef __CLING__
3#include "../FileCatalogue.cxx"
4#include "../FileCatalogue.h"
5using namespace std;
6#endif
7
8void get_file_metadata(TString lfn = "/bmn.nica.jinr/exp/raw/run9/run_Top_9639_ev0_p24.data")
9{
10 // create File Catalogue interface
12
13 FileInfo file_metadata;
14
15 // call GetFileInfo function and pass LFN to it
16 int res = FC.GetFileInfo(lfn.Data(), file_metadata);
17
18 // print file metadata if found for the LFN
19 if (res)
20 cout << "Error: " << GetErrorString(-res) << endl;
21 else
22 file_metadata.Print();
23}
string const GetErrorString(int error_id)
Main Interface Class to work with the File Catalog of the experiment Throws runtime_exception if a cr...
int GetFileInfo(string LFN, FileInfo &file_info)
Function to get metadata of the file stored at the given location.
Class presenting File Info (Metadata) Structure.
void Print() const
Print all file metadata to the standard output.
void get_file_metadata(TString lfn="/bmn.nica.jinr/exp/raw/run9/run_Top_9639_ev0_p24.data")
Definition json.hpp:4446