![]() |
Belle II Software
release-06-00-14
|
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. | |
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. More... | |
int | getNParents () const |
Get number of parent files. | |
const std::string & | getParent (int iParent) const |
Get LFN of parent file. More... | |
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. More... | |
const std::map< std::string, std::string > & | getDataDescription () const |
get data description. More... | |
void | setLfn (const std::string &lfn) |
Setter for LFN. More... | |
void | setNEvents (unsigned int nEvents) |
Number of events setter. More... | |
void | setLow (int experiment, int run, unsigned int event) |
Lowest experiment, run and event number setter. More... | |
void | setHigh (int experiment, int run, unsigned int event) |
Highest experiment, run and event number setter. More... | |
void | setParents (const std::vector< std::string > &parents) |
Parents setter. More... | |
void | setCreationData (const std::string &date, const std::string &site, const std::string &user, const std::string &release) |
Creation data setter. More... | |
void | setRandomSeed (const std::string &seed) |
Random seed setter. More... | |
void | setSteering (const std::string &steering) |
Steering file content setter. More... | |
void | setMcEvents (unsigned int nEvents) |
Number of generated events setter. More... | |
void | setDatabaseGlobalTag (const std::string &globalTag) |
Set the database global tag used when creating this file. More... | |
void | setDataDescription (const std::string &key, const std::string &value) |
describe the data, if the key exists contents will be overwritten. More... | |
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. More... | |
bool | read (std::istream &input, std::string &physicalFileName) |
Read file meta data in xml format from the input stream. More... | |
bool | write (std::ostream &output, const std::string &physicalFileName) const |
Write file meta data in xml format to the output stream. More... | |
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, 10) | |
Metadata information about a file. | |
Private Attributes | |
std::string | m_lfn |
Logical file name. More... | |
unsigned int | m_nEvents |
Number of events. More... | |
int | m_experimentLow |
Lowest experiment number. More... | |
int | m_runLow |
Lowest run number. More... | |
unsigned int | m_eventLow |
Lowest event number in lowest run. More... | |
int | m_experimentHigh |
Highest experiment number. More... | |
int | m_runHigh |
Highest run number. More... | |
unsigned int | m_eventHigh |
Highest event number in highest run. More... | |
std::vector< std::string > | m_parentLfns |
LFNs of parent files. More... | |
std::string | m_date |
File creation date and time (UTC). More... | |
std::string | m_site |
Site where the file was created. More... | |
std::string | m_user |
User who created the file. More... | |
std::string | m_randomSeed |
The random seed used when producing the file. | |
std::string | m_release |
Software release version. More... | |
std::string | m_steering |
The steering file content. More... | |
bool | m_isMC |
Is it generated or real data?. More... | |
unsigned int | m_mcEvents |
Number of generated events, 0 for real data. More... | |
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. More... | |
Friends | |
class | SeqRootInputModule |
class | RootInputModule |
class | RootOutputModule |
class | B2BIIMdstInputModule |
class | BeamBkgHitRateMonitorModule |
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.
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.
|
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 126 of file FileMetaData.h.
|
inline |
get data description.
(Keys and values to be defined by the computing group)
Definition at line 129 of file FileMetaData.h.
|
inline |
Get LFN of parent file.
iParent | The number of the parent file. |
Definition at line 88 of file FileMetaData.h.
|
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 76 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 107 of file FileMetaData.cc.
|
inline |
Creation data setter.
date | The creation date and time. |
site | The site where the file was created. |
user | The user who created the file. |
release | The software release. |
Definition at line 172 of file FileMetaData.h.
|
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 198 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 204 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 157 of file FileMetaData.h.
|
inline |
|
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 149 of file FileMetaData.h.
|
inline |
Number of generated events setter.
nEvents | The number of generated events. |
Definition at line 191 of file FileMetaData.h.
|
inline |
Number of events setter.
nEvents | The number of events. |
Definition at line 141 of file FileMetaData.h.
|
inline |
Parents setter.
parents | The vector of parent IDs. |
Definition at line 163 of file FileMetaData.h.
|
inline |
|
inline |
Steering file content setter.
steering | The content of the steering file. |
Definition at line 185 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 155 of file FileMetaData.cc.
|
private |
key-value store to describe the data.
(for use by the computing group)
Definition at line 278 of file FileMetaData.h.
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |
|
private |