Belle II Software light-2406-ragdoll
FileMetaData Class Reference

Metadata information about a file. More...

#include <FileMetaData.h>

Inheritance diagram for FileMetaData:
Collaboration diagram for FileMetaData:

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
 

Detailed Description

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.

Constructor & Destructor Documentation

◆ FileMetaData()

Constructor.

Definition at line 26 of file FileMetaData.cc.

26 :
28 m_experimentHigh(0), m_runHigh(0), m_eventHigh(0), m_date(""), m_site(""), m_user(""), m_release(""),
29 m_steering(""), m_isMC(true), m_mcEvents(0)
30{
31}
std::string m_steering
The steering file content.
Definition: FileMetaData.h:282
unsigned int m_eventHigh
Highest event number in highest run.
Definition: FileMetaData.h:268
unsigned int m_nEvents
Number of events.
Definition: FileMetaData.h:254
bool m_isMC
Is it generated or real data?.
Definition: FileMetaData.h:284
unsigned int m_nFullEvents
Number of full events.
Definition: FileMetaData.h:256
unsigned int m_mcEvents
Number of generated events, 0 for real data.
Definition: FileMetaData.h:286
std::string m_lfn
Logical file name.
Definition: FileMetaData.h:252
int m_runLow
Lowest run number.
Definition: FileMetaData.h:260
std::string m_release
Software release version.
Definition: FileMetaData.h:280
std::string m_date
File creation date and time (UTC).
Definition: FileMetaData.h:272
unsigned int m_eventLow
Lowest event number in lowest run.
Definition: FileMetaData.h:262
int m_experimentLow
Lowest experiment number.
Definition: FileMetaData.h:258
std::string m_user
User who created the file.
Definition: FileMetaData.h:276
std::string m_site
Site where the file was created.
Definition: FileMetaData.h:274
int m_experimentHigh
Highest experiment number.
Definition: FileMetaData.h:264
int m_runHigh
Highest run number.
Definition: FileMetaData.h:266

Member Function Documentation

◆ containsEvent()

bool containsEvent ( int  experiment,
int  run,
unsigned int  event 
) const

Check whether the given event is in the covered range of events.

Note
This does not guarantee that the event is in the file, only that the file contains a range of exp/run/event numbers that would make it plausible.
Parameters
experimentThe experiment number of the event.
runThe run number of the event.
eventThe event number of the event.

Definition at line 33 of file FileMetaData.cc.

34{
35 if (experiment < m_experimentLow) return false;
36 if (experiment == m_experimentLow) {
37 if (run < m_runLow) return false;
38 if ((run == m_runLow) && (event < m_eventLow)) return false;
39 }
40 if (experiment > m_experimentHigh) return false;
41 if (experiment == m_experimentHigh) {
42 if (run > m_runHigh) return false;
43 if ((run == m_runHigh) && (event > m_eventHigh)) return false;
44 }
45 return true;
46}

◆ declareRealData()

void declareRealData ( )
inlineprivate

Declare that this is not generated, but real data.

Definition at line 294 of file FileMetaData.h.

294{m_isMC = false;}

◆ exposePythonAPI()

void exposePythonAPI ( )
static

Exposes methods of the FileMetaData class to Python.

Definition at line 48 of file FileMetaData.cc.

49{
50 //Note: these can only be used with update_file_metadata(), PyROOT is the more common interface
51 class_<FileMetaData>("FileMetaData")
52 .def("get_lfn", &FileMetaData::getLfn, return_value_policy<copy_const_reference>())
53 .def("get_nevents", &FileMetaData::getNEvents)
54 .def("get_nfullevents", &FileMetaData::getNFullEvents)
55 .def("get_experiment_low", &FileMetaData::getExperimentLow)
56 .def("get_run_low", &FileMetaData::getRunLow)
57 .def("get_event_low", &FileMetaData::getEventLow)
58 .def("get_experiment_high", &FileMetaData::getExperimentHigh)
59 .def("get_run_high", &FileMetaData::getRunHigh)
60 .def("get_event_high", &FileMetaData::getEventHigh)
61 .def("get_n_parents", &FileMetaData::getNParents)
62 .def("get_parent", &FileMetaData::getParent, return_value_policy<copy_const_reference>())
63 .def("get_date", &FileMetaData::getDate, return_value_policy<copy_const_reference>())
64 .def("get_site", &FileMetaData::getSite, return_value_policy<copy_const_reference>())
65 .def("get_user", &FileMetaData::getUser, return_value_policy<copy_const_reference>())
66 .def("get_random_seed", &FileMetaData::getRandomSeed, return_value_policy<copy_const_reference>())
67 .def("get_release", &FileMetaData::getRelease, return_value_policy<copy_const_reference>())
68 .def("get_steering", &FileMetaData::getSteering, return_value_policy<copy_const_reference>())
69 .def("is_mc", &FileMetaData::isMC)
70 .def("get_mc_events", &FileMetaData::getMcEvents)
71 .def("get_global_tag", &FileMetaData::getDatabaseGlobalTag, return_value_policy<copy_const_reference>())
72 .def("get_data_description", &FileMetaData::getDataDescription, return_value_policy<copy_const_reference>())
73 .def("set_lfn", &FileMetaData::setLfn);
74}
const std::string & getDatabaseGlobalTag() const
Get the database global tag used when creating this file.
Definition: FileMetaData.h:130
unsigned int getEventHigh() const
Highest event number in highest run getter.
Definition: FileMetaData.h:69
int getRunHigh() const
Highest run number getter.
Definition: FileMetaData.h:65
const std::string & getLfn() const
Logical file name getter.
Definition: FileMetaData.h:37
int getNParents() const
Get number of parent files.
Definition: FileMetaData.h:85
const std::string & getRelease() const
Software release version getter.
Definition: FileMetaData.h:111
int getRunLow() const
Lowest run number getter.
Definition: FileMetaData.h:53
const std::string & getSteering() const
Steering file content getter.
Definition: FileMetaData.h:115
bool isMC() const
Is it generated data?.
Definition: FileMetaData.h:119
unsigned int getNEvents() const
Number of events getter.
Definition: FileMetaData.h:41
const std::string & getDate() const
File creation date and time getter (UTC)
Definition: FileMetaData.h:95
unsigned int getEventLow() const
Lowest event number in lowest run getter.
Definition: FileMetaData.h:57
const std::string & getSite() const
Site where the file was created getter.
Definition: FileMetaData.h:99
int getExperimentLow() const
Lowest experiment number getter.
Definition: FileMetaData.h:49
const std::map< std::string, std::string > & getDataDescription() const
get data description.
Definition: FileMetaData.h:133
void setLfn(const std::string &lfn)
Setter for LFN.
Definition: FileMetaData.h:139
const std::string & getUser() const
User who created the file getter.
Definition: FileMetaData.h:103
unsigned int getNFullEvents() const
Number of full events getter.
Definition: FileMetaData.h:45
const std::string & getRandomSeed() const
Random seed getter.
Definition: FileMetaData.h:107
int getExperimentHigh() const
Highest experiment number getter.
Definition: FileMetaData.h:61
unsigned int getMcEvents() const
Number of generated events getter.
Definition: FileMetaData.h:123
const std::string & getParent(int iParent) const
Get LFN of parent file.
Definition: FileMetaData.h:92

◆ getDatabaseGlobalTag()

const std::string & getDatabaseGlobalTag ( ) const
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.

130{ return m_databaseGlobalTag; }
std::string m_databaseGlobalTag
Global tag in the database used for production of this file.
Definition: FileMetaData.h:288

◆ getDataDescription()

const std::map< std::string, std::string > & getDataDescription ( ) const
inline

get data description.

(Keys and values to be defined by the computing group)

Definition at line 133 of file FileMetaData.h.

133{ return m_dataDescription; }
std::map< std::string, std::string > m_dataDescription
key-value store to describe the data.
Definition: FileMetaData.h:290

◆ getDate()

const std::string & getDate ( ) const
inline

File creation date and time getter (UTC)

Definition at line 95 of file FileMetaData.h.

95{return m_date;}

◆ getEventHigh()

unsigned int getEventHigh ( ) const
inline

Highest event number in highest run getter.

Definition at line 69 of file FileMetaData.h.

69{return m_eventHigh;}

◆ getEventLow()

unsigned int getEventLow ( ) const
inline

Lowest event number in lowest run getter.

Definition at line 57 of file FileMetaData.h.

57{return m_eventLow;}

◆ getExperimentHigh()

int getExperimentHigh ( ) const
inline

Highest experiment number getter.

Definition at line 61 of file FileMetaData.h.

61{return m_experimentHigh;}

◆ getExperimentLow()

int getExperimentLow ( ) const
inline

Lowest experiment number getter.

Definition at line 49 of file FileMetaData.h.

49{return m_experimentLow;}

◆ getJsonStr()

std::string getJsonStr ( ) const

Get a json representation.

Definition at line 182 of file FileMetaData.cc.

183{
184 nlohmann::json metadata = {
185 {"LFN", m_lfn},
186 {"nEvents", m_nEvents},
187 {"nFullEvents", m_nFullEvents},
188 {"experimentLow", m_experimentLow},
189 {"runLow", m_runLow},
190 {"eventLow", m_eventLow},
191 {"experimentHigh", m_experimentHigh},
192 {"runHigh", m_runHigh},
193 {"eventHigh", m_eventHigh},
194 {"parents", m_parentLfns},
195 {"date", m_date},
196 {"site", m_site},
197 {"user", m_user},
198 {"randomSeed", m_randomSeed},
199 {"release", m_release},
200 {"isMC", m_isMC},
201 {"mcEvents", m_mcEvents},
202 {"globalTag", m_databaseGlobalTag},
203 {"dataDescription", m_dataDescription},
204 {"steering", m_steering}
205 };
206 return metadata.dump(2);
207}
std::string m_randomSeed
The random seed used when producing the file.
Definition: FileMetaData.h:278
std::vector< std::string > m_parentLfns
LFNs of parent files.
Definition: FileMetaData.h:270

◆ getLfn()

const std::string & getLfn ( ) const
inline

Logical file name getter.

Definition at line 37 of file FileMetaData.h.

37{return m_lfn;}

◆ getMcEvents()

unsigned int getMcEvents ( ) const
inline

Number of generated events getter.

Definition at line 123 of file FileMetaData.h.

123{return m_mcEvents;}

◆ getNEvents()

unsigned int getNEvents ( ) const
inline

Number of events getter.

Definition at line 41 of file FileMetaData.h.

41{return m_nEvents;}

◆ getNFullEvents()

unsigned int getNFullEvents ( ) const
inline

Number of full events getter.

Definition at line 45 of file FileMetaData.h.

45{return m_nFullEvents;}

◆ getNParents()

int getNParents ( ) const
inline

Get number of parent files.

Definition at line 85 of file FileMetaData.h.

85{return m_parentLfns.size();}

◆ getParent()

const std::string & getParent ( int  iParent) const
inline

Get LFN of parent file.

Note
Not range-checked!
Parameters
iParentThe number of the parent file.

Definition at line 92 of file FileMetaData.h.

92{return m_parentLfns[iParent];}

◆ getRandomSeed()

const std::string & getRandomSeed ( ) const
inline

Random seed getter.

Definition at line 107 of file FileMetaData.h.

107{return m_randomSeed;}

◆ getRelease()

const std::string & getRelease ( ) const
inline

Software release version getter.

Definition at line 111 of file FileMetaData.h.

111{return m_release;}

◆ getRunHigh()

int getRunHigh ( ) const
inline

Highest run number getter.

Definition at line 65 of file FileMetaData.h.

65{return m_runHigh;}

◆ getRunLow()

int getRunLow ( ) const
inline

Lowest run number getter.

Definition at line 53 of file FileMetaData.h.

53{return m_runLow;}

◆ getSite()

const std::string & getSite ( ) const
inline

Site where the file was created getter.

Definition at line 99 of file FileMetaData.h.

99{return m_site;}

◆ getSteering()

const std::string & getSteering ( ) const
inline

Steering file content getter.

Definition at line 115 of file FileMetaData.h.

115{return m_steering;}

◆ getUser()

const std::string & getUser ( ) const
inline

User who created the file getter.

Definition at line 103 of file FileMetaData.h.

103{return m_user;}

◆ isMC()

bool isMC ( ) const
inline

Is it generated data?.

Definition at line 119 of file FileMetaData.h.

119{return m_isMC;}

◆ Print()

void Print ( Option_t *  option = "") const
overridevirtual

Print the content of the meta data object.

Parameters
optionUse "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.

78{
79 if (option && (option == std::string("steering"))) {
80 cout << m_steering << endl;
81 return;
82 } else if (option && (option == std::string("json"))) {
83 cout << getJsonStr() << endl;
84 return;
85 }
86 const bool all = (option && option == std::string("all"));
87 KeyValuePrinter printer(false);
88 printer.put("LFN", m_lfn);
89 printer.put("nEvents", m_nEvents);
90 printer.put("nFullEvents", m_nFullEvents);
91 printer.put("range", std::to_string(m_experimentLow) + "/" + std::to_string(m_runLow) + "/" + std::to_string(m_eventLow)
92 + " - " + std::to_string(m_experimentHigh) + "/" + std::to_string(m_runHigh) + "/" + std::to_string(m_eventHigh));
93 printer.put("parents", m_parentLfns);
94 if (all) {
95 printer.put("date", m_date);
96 printer.put("site", m_site);
97 printer.put("user", m_user);
98 printer.put("randomSeed", m_randomSeed);
99 printer.put("release", m_release);
100 printer.put("isMC", m_isMC);
101 printer.put("mcEvents", m_mcEvents);
102 printer.put("globalTag", m_databaseGlobalTag);
103 printer.put("dataDescription", m_dataDescription);
104 }
105 std::cout << "=== FileMetaData ===\n";
106 std::cout << printer.string();
107}
std::string getJsonStr() const
Get a json representation.
create human-readable or JSON output for key value pairs.

◆ read()

bool read ( std::istream &  input,
std::string &  physicalFileName 
)

Read file meta data in xml format from the input stream.

Parameters
inputThe input stream.
physicalFileNameThe physical file name. Will be set on return.
Returns
True if metadata could be read

Definition at line 109 of file FileMetaData.cc.

110{
111 physicalFileName = "";
112 if (input.eof()) return false;
113
114 std::string line;
115 std::getline(input, line);
116 boost::algorithm::trim(line);
117 if (line.compare("<File>") != 0) return false;
118
119 while (!input.eof()) {
120 std::getline(input, line);
121 boost::algorithm::trim(line);
122 if (line.compare("</File>") == 0) return true;
123
124 int pos = line.find('>') + 1;
125 std::string tag = line.substr(0, pos);
126 std::string value = line.substr(pos, line.rfind('<') - pos);
127 if (tag.compare("<LFN>") == 0) {
128 m_lfn = HTML::unescape(value);
129 } else if (tag.compare("<PFN>") == 0) {
130 physicalFileName = HTML::unescape(value);
131 } else if (tag.compare("<ExperimentLow>") == 0) {
132 m_experimentLow = stoi(value);
133 } else if (tag.compare("<RunLow>") == 0) {
134 m_runLow = stoi(value);
135 } else if (tag.compare("<EventLow>") == 0) {
136 m_eventLow = stoi(value);
137 } else if (tag.compare("<ExperimentHigh>") == 0) {
138 m_experimentHigh = stoi(value);
139 } else if (tag.compare("<RunHigh>") == 0) {
140 m_runHigh = stoi(value);
141 } else if (tag.compare("<EventHigh>") == 0) {
142 m_eventHigh = stoi(value);
143 } else if (tag.compare("<Parents>") == 0) {
144 pos = value.find(',');
145 while (pos > 0) {
146 m_parentLfns.push_back(HTML::unescape(value.substr(0, pos)));
147 value.erase(0, pos + 1);
148 pos = value.find(',');
149 }
150 m_parentLfns.push_back(HTML::unescape(value));
151 }
152 }
153
154 return false;
155}
std::string unescape(const std::string &str)
inverse of escape()
Definition: HTML.cc:169

◆ removeDataDescription()

void removeDataDescription ( const std::string &  key)
inline

remove an existing data description

Definition at line 217 of file FileMetaData.h.

217{ m_dataDescription.erase(key); }

◆ setCreationData()

void setCreationData ( const std::string &  date,
const std::string &  site,
const std::string &  user,
const std::string &  release 
)
inline

Creation data setter.

Parameters
dateThe creation date and time.
siteThe site where the file was created.
userThe user who created the file.
releaseThe software release.

Definition at line 182 of file FileMetaData.h.

183 {m_date = date; m_site = site; m_user = user; m_release = release;}

◆ setDatabaseGlobalTag()

void setDatabaseGlobalTag ( const std::string &  globalTag)
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.

208{ m_databaseGlobalTag = globalTag; }

◆ setDataDescription()

void setDataDescription ( const std::string &  key,
const std::string &  value 
)
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.

214{ m_dataDescription[key] = value; }

◆ setHigh()

void setHigh ( int  experiment,
int  run,
unsigned int  event 
)
inline

Highest experiment, run and event number setter.

Parameters
experimentThe highest experiment number.
runThe highest run number.
eventThe highest event number of the highest run.

Definition at line 167 of file FileMetaData.h.

167{m_experimentHigh = experiment; m_runHigh = run; m_eventHigh = event;}

◆ setLfn()

void setLfn ( const std::string &  lfn)
inline

Setter for LFN.

Parameters
lfnThe logical file name.

Definition at line 139 of file FileMetaData.h.

139{m_lfn = lfn;}

◆ setLow()

void setLow ( int  experiment,
int  run,
unsigned int  event 
)
inline

Lowest experiment, run and event number setter.

Parameters
experimentThe lowest experiment number.
runThe lowest run number.
eventThe lowest event number of the lowest run.

Definition at line 159 of file FileMetaData.h.

159{m_experimentLow = experiment; m_runLow = run; m_eventLow = event;}

◆ setMcEvents()

void setMcEvents ( unsigned int  nEvents)
inline

Number of generated events setter.

Parameters
nEventsThe number of generated events.

Definition at line 201 of file FileMetaData.h.

201{m_mcEvents = nEvents;}

◆ setNEvents()

void setNEvents ( unsigned int  nEvents)
inline

Number of events setter.

Parameters
nEventsThe number of events.

Definition at line 145 of file FileMetaData.h.

145{m_nEvents = nEvents;}

◆ setNFullEvents()

void setNFullEvents ( unsigned int  nEvents)
inline

Number of full events setter.

Parameters
nEventsThe number of full events.

Definition at line 151 of file FileMetaData.h.

151{m_nFullEvents = nEvents;}

◆ setParents()

void setParents ( const std::vector< std::string > &  parents)
inline

Parents setter.

Parameters
parentsThe vector of parent IDs.

Definition at line 173 of file FileMetaData.h.

173{m_parentLfns = parents;}

◆ setRandomSeed()

void setRandomSeed ( const std::string &  seed)
inline

Random seed setter.

Parameters
seedThe random seed.

Definition at line 189 of file FileMetaData.h.

189{m_randomSeed = seed;}

◆ setSteering()

void setSteering ( const std::string &  steering)
inline

Steering file content setter.

Parameters
steeringThe content of the steering file.

Definition at line 195 of file FileMetaData.h.

195{m_steering = steering;}

◆ write()

bool write ( std::ostream &  output,
const std::string &  physicalFileName 
) const

Write file meta data in xml format to the output stream.

Parameters
outputThe output stream.
physicalFileNameThe physical file name.
Returns
True if metadata could be written

Definition at line 157 of file FileMetaData.cc.

158{
159 output << " <File>\n";
160 output << " <LFN>" << HTML::escape(m_lfn) << "</LFN>\n";
161 if (!physicalFileName.empty()) {
162 output << " <PFN>" << HTML::escape(physicalFileName) << "</PFN>\n";
163 }
164 output << " <ExperimentLow>" << m_experimentLow << "</ExperimentLow>\n";
165 output << " <RunLow>" << m_runLow << "</RunLow>\n";
166 output << " <EventLow>" << m_eventLow << "</EventLow>\n";
167 output << " <ExperimentHigh>" << m_experimentHigh << "</ExperimentHigh>\n";
168 output << " <RunHigh>" << m_runHigh << "</RunHigh>\n";
169 output << " <EventHigh>" << m_eventHigh << "</EventHigh>\n";
170 if (!m_parentLfns.empty()) {
171 output << " <Parents>" << HTML::escape(m_parentLfns[0]);
172 for (unsigned int parent = 1; parent < m_parentLfns.size(); parent++) {
173 output << "," << HTML::escape(m_parentLfns[parent]);
174 }
175 output << "</Parents>\n";
176 }
177 output << " </File>\n";
178
179 return true;
180}
std::string escape(const std::string &str)
Convert &, <, > etc.
Definition: HTML.cc:159

Friends And Related Function Documentation

◆ B2BIIMdstInputModule

friend class B2BIIMdstInputModule
friend

Definition at line 299 of file FileMetaData.h.

◆ BeamBkgHitRateMonitorModule

friend class BeamBkgHitRateMonitorModule
friend

Definition at line 300 of file FileMetaData.h.

◆ RootInputModule

friend class RootInputModule
friend

Definition at line 297 of file FileMetaData.h.

◆ RootOutputModule

friend class RootOutputModule
friend

Definition at line 298 of file FileMetaData.h.

◆ SeqRootInputModule

friend class SeqRootInputModule
friend

Definition at line 296 of file FileMetaData.h.

◆ StorageRootOutputModule

friend class StorageRootOutputModule
friend

Definition at line 301 of file FileMetaData.h.

Member Data Documentation

◆ m_databaseGlobalTag

std::string m_databaseGlobalTag
private

Global tag in the database used for production of this file.

Definition at line 288 of file FileMetaData.h.

◆ m_dataDescription

std::map<std::string, std::string> m_dataDescription
private

key-value store to describe the data.

(for use by the computing group)

Definition at line 290 of file FileMetaData.h.

◆ m_date

std::string m_date
private

File creation date and time (UTC).


Definition at line 272 of file FileMetaData.h.

◆ m_eventHigh

unsigned int m_eventHigh
private

Highest event number in highest run.


Definition at line 268 of file FileMetaData.h.

◆ m_eventLow

unsigned int m_eventLow
private

Lowest event number in lowest run.


Definition at line 262 of file FileMetaData.h.

◆ m_experimentHigh

int m_experimentHigh
private

Highest experiment number.


Definition at line 264 of file FileMetaData.h.

◆ m_experimentLow

int m_experimentLow
private

Lowest experiment number.


Definition at line 258 of file FileMetaData.h.

◆ m_isMC

bool m_isMC
private

Is it generated or real data?.


Definition at line 284 of file FileMetaData.h.

◆ m_lfn

std::string m_lfn
private

Logical file name.


Definition at line 252 of file FileMetaData.h.

◆ m_mcEvents

unsigned int m_mcEvents
private

Number of generated events, 0 for real data.


Definition at line 286 of file FileMetaData.h.

◆ m_nEvents

unsigned int m_nEvents
private

Number of events.


Definition at line 254 of file FileMetaData.h.

◆ m_nFullEvents

unsigned int m_nFullEvents
private

Number of full events.


Definition at line 256 of file FileMetaData.h.

◆ m_parentLfns

std::vector<std::string> m_parentLfns
private

LFNs of parent files.


Definition at line 270 of file FileMetaData.h.

◆ m_randomSeed

std::string m_randomSeed
private

The random seed used when producing the file.

Definition at line 278 of file FileMetaData.h.

◆ m_release

std::string m_release
private

Software release version.


Definition at line 280 of file FileMetaData.h.

◆ m_runHigh

int m_runHigh
private

Highest run number.


Definition at line 266 of file FileMetaData.h.

◆ m_runLow

int m_runLow
private

Lowest run number.


Definition at line 260 of file FileMetaData.h.

◆ m_site

std::string m_site
private

Site where the file was created.


Definition at line 274 of file FileMetaData.h.

◆ m_steering

std::string m_steering
private

The steering file content.


Definition at line 282 of file FileMetaData.h.

◆ m_user

std::string m_user
private

User who created the file.


Definition at line 276 of file FileMetaData.h.


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