![]() |
Belle II Software development
|
Metadata information about a file. More...
#include <FileMetaData.h>
Public Member Functions | |
FileMetaData () | |
Constructor. | |
const std::string & | getLfn () const |
Logical file name getter. | |
unsigned int | getNEvents () const |
Number of events getter. | |
unsigned int | getNFullEvents () const |
Number of full events getter. | |
int | getExperimentLow () const |
Lowest experiment number getter. | |
int | getRunLow () const |
Lowest run number getter. | |
unsigned int | getEventLow () const |
Lowest event number in lowest run getter. | |
int | getExperimentHigh () const |
Highest experiment number getter. | |
int | getRunHigh () const |
Highest run number getter. | |
unsigned int | getEventHigh () const |
Highest event number in highest run getter. | |
bool | containsEvent (int experiment, int run, unsigned int event) const |
Check whether the given event is in the covered range of events. | |
int | getNParents () const |
Get number of parent files. | |
const std::string & | getParent (int iParent) const |
Get LFN of parent file. | |
const std::string & | getDate () const |
File creation date and time getter (UTC) | |
const std::string & | getSite () const |
Site where the file was created getter. | |
const std::string & | getUser () const |
User who created the file getter. | |
const std::string & | getRandomSeed () const |
Random seed getter. | |
const std::string & | getRelease () const |
Software release version getter. | |
const std::string & | getSteering () const |
Steering file content getter. | |
bool | isMC () const |
Is it generated data?. | |
unsigned int | getMcEvents () const |
Number of generated events getter. | |
const std::string & | getDatabaseGlobalTag () const |
Get the database global tag used when creating this file. | |
const std::map< std::string, std::string > & | getDataDescription () const |
get data description. | |
void | setLfn (const std::string &lfn) |
Setter for LFN. | |
void | setNEvents (unsigned int nEvents) |
Number of events setter. | |
void | setNFullEvents (unsigned int nEvents) |
Number of full events setter. | |
void | setLow (int experiment, int run, unsigned int event) |
Lowest experiment, run and event number setter. | |
void | setHigh (int experiment, int run, unsigned int event) |
Highest experiment, run and event number setter. | |
void | setParents (const std::vector< std::string > &parents) |
Parents setter. | |
void | setCreationData (const std::string &date, const std::string &site, const std::string &user, const std::string &release) |
Creation data setter. | |
void | setRandomSeed (const std::string &seed) |
Random seed setter. | |
void | setSteering (const std::string &steering) |
Steering file content setter. | |
void | setMcEvents (unsigned int nEvents) |
Number of generated events setter. | |
void | setDatabaseGlobalTag (const std::string &globalTag) |
Set the database global tag used when creating this file. | |
void | setDataDescription (const std::string &key, const std::string &value) |
describe the data, if the key exists contents will be overwritten. | |
void | removeDataDescription (const std::string &key) |
remove an existing data description | |
virtual void | Print (Option_t *option="") const override |
Print the content of the meta data object. | |
bool | read (std::istream &input, std::string &physicalFileName) |
Read file meta data in xml format from the input stream. | |
bool | write (std::ostream &output, const std::string &physicalFileName) const |
Write file meta data in xml format to the output stream. | |
std::string | getJsonStr () const |
Get a json representation. | |
Static Public Member Functions | |
static void | exposePythonAPI () |
Exposes methods of the FileMetaData class to Python. | |
Private Member Functions | |
void | declareRealData () |
Declare that this is not generated, but real data. | |
ClassDefOverride (FileMetaData, 11) | |
Metadata information about a file. | |
Private Attributes | |
std::string | m_lfn |
Logical file name. | |
unsigned int | m_nEvents |
Number of events. | |
unsigned int | m_nFullEvents |
Number of full events. | |
int | m_experimentLow |
Lowest experiment number. | |
int | m_runLow |
Lowest run number. | |
unsigned int | m_eventLow |
Lowest event number in lowest run. | |
int | m_experimentHigh |
Highest experiment number. | |
int | m_runHigh |
Highest run number. | |
unsigned int | m_eventHigh |
Highest event number in highest run. | |
std::vector< std::string > | m_parentLfns |
LFNs of parent files. | |
std::string | m_date |
File creation date and time (UTC). | |
std::string | m_site |
Site where the file was created. | |
std::string | m_user |
User who created the file. | |
std::string | m_randomSeed |
The random seed used when producing the file. | |
std::string | m_release |
Software release version. | |
std::string | m_steering |
The steering file content. | |
bool | m_isMC |
Is it generated or real data?. | |
unsigned int | m_mcEvents |
Number of generated events, 0 for real data. | |
std::string | m_databaseGlobalTag |
Global tag in the database used for production of this file. | |
std::map< std::string, std::string > | m_dataDescription |
key-value store to describe the data. | |
Friends | |
class | SeqRootInputModule |
class | RootInputModule |
class | RootOutputModule |
class | B2BIIMdstInputModule |
class | BeamBkgHitRateMonitorModule |
class | StorageRootOutputModule |
Metadata information about a file.
See BELLE2-NOTE-TE-2015-028: Event, File, and Dataset Metadata for a detailed definition. Available at: https://docs.belle2.org/record/287?ln=en
Definition at line 29 of file FileMetaData.h.
FileMetaData | ( | ) |
Constructor.
Definition at line 26 of file FileMetaData.cc.
bool containsEvent | ( | int | experiment, |
int | run, | ||
unsigned int | event | ||
) | const |
Check whether the given event is in the covered range of events.
experiment | The experiment number of the event. |
run | The run number of the event. |
event | The event number of the event. |
Definition at line 33 of file FileMetaData.cc.
|
inlineprivate |
|
static |
Exposes methods of the FileMetaData class to Python.
Definition at line 48 of file FileMetaData.cc.
|
inline |
Get the database global tag used when creating this file.
If more then one global tag was used by multiple conditions database instances all are concatenated using ',' as separation. If no conditions database was used an empty string is returned
Definition at line 130 of file FileMetaData.h.
|
inline |
get data description.
(Keys and values to be defined by the computing group)
Definition at line 133 of file FileMetaData.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
std::string getJsonStr | ( | ) | const |
Get a json representation.
Definition at line 182 of file FileMetaData.cc.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
Get LFN of parent file.
iParent | The number of the parent file. |
Definition at line 92 of file FileMetaData.h.
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
inline |
|
overridevirtual |
Print the content of the meta data object.
option | Use "all" to print everything, except steering file. Use "steering" for printing (only) steering file. "json" for machine-readable output |
Definition at line 77 of file FileMetaData.cc.
bool read | ( | std::istream & | input, |
std::string & | physicalFileName | ||
) |
Read file meta data in xml format from the input stream.
input | The input stream. |
physicalFileName | The physical file name. Will be set on return. |
Definition at line 109 of file FileMetaData.cc.
|
inline |
remove an existing data description
Definition at line 217 of file FileMetaData.h.
|
inline |
|
inline |
Set the database global tag used when creating this file.
If more then one global tag was used by multiple conditions database instances all should be concatenated using ',' as separation. If no conditions database was used an empty string should be set.
Definition at line 208 of file FileMetaData.h.
|
inline |
describe the data, if the key exists contents will be overwritten.
(Keys and values to be defined by the computing group)
Definition at line 214 of file FileMetaData.h.
|
inline |
Highest experiment, run and event number setter.
experiment | The highest experiment number. |
run | The highest run number. |
event | The highest event number of the highest run. |
Definition at line 167 of file FileMetaData.h.
|
inline |
Setter for LFN.
lfn | The logical file name. |
Definition at line 139 of file FileMetaData.h.
|
inline |
Lowest experiment, run and event number setter.
experiment | The lowest experiment number. |
run | The lowest run number. |
event | The lowest event number of the lowest run. |
Definition at line 159 of file FileMetaData.h.
|
inline |
Number of generated events setter.
nEvents | The number of generated events. |
Definition at line 201 of file FileMetaData.h.
|
inline |
Number of events setter.
nEvents | The number of events. |
Definition at line 145 of file FileMetaData.h.
|
inline |
Number of full events setter.
nEvents | The number of full events. |
Definition at line 151 of file FileMetaData.h.
|
inline |
Parents setter.
parents | The vector of parent IDs. |
Definition at line 173 of file FileMetaData.h.
|
inline |
Random seed setter.
seed | The random seed. |
Definition at line 189 of file FileMetaData.h.
|
inline |
Steering file content setter.
steering | The content of the steering file. |
Definition at line 195 of file FileMetaData.h.
bool write | ( | std::ostream & | output, |
const std::string & | physicalFileName | ||
) | const |
Write file meta data in xml format to the output stream.
output | The output stream. |
physicalFileName | The physical file name. |
Definition at line 157 of file FileMetaData.cc.
|
friend |
Definition at line 299 of file FileMetaData.h.
|
friend |
Definition at line 300 of file FileMetaData.h.
|
friend |
Definition at line 297 of file FileMetaData.h.
|
friend |
Definition at line 298 of file FileMetaData.h.
|
friend |
Definition at line 296 of file FileMetaData.h.
|
friend |
Definition at line 301 of file FileMetaData.h.
|
private |
Global tag in the database used for production of this file.
Definition at line 288 of file FileMetaData.h.
|
private |
key-value store to describe the data.
(for use by the computing group)
Definition at line 290 of file FileMetaData.h.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
The random seed used when producing the file.
Definition at line 278 of file FileMetaData.h.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |