Belle II Software development
DQMFileMetaData Class Reference

Metadata information about a DQM file. More...

#include <DQMFileMetaData.h>

Inheritance diagram for DQMFileMetaData:

Public Member Functions

 DQMFileMetaData ()
 Constructor.
 
unsigned int getNEvents () const
 Number of events getter.
 
int getExperiment () const
 experiment number getter.
 
int getRun () const
 run number getter.
 
const std::string & getRunDate () const
 Run date getter (UTC)
 
const std::string & getRelease () const
 Software release version getter.
 
const std::string & getProcessingID () const
 Processing ID getter.
 
const std::string & getRunType () const
 Run type getter.
 
bool isMC () const
 Is it generated data?.
 
const std::string & getDatabaseGlobalTag () const
 Get the database global tag used when creating this file.
 
void setNEvents (unsigned int nEvents)
 Number of events setter.
 
void setExperimentRun (int experiment, int run)
 Set experiment and run.
 
void setRelease (const std::string &release)
 set release
 
void setRunDate (const std::string &date)
 set run date
 
void setProcessingID (const std::string &procID)
 set processing ID
 
void setRunType (const std::string &rtype)
 set run type
 
void setDatabaseGlobalTag (const std::string &globalTag)
 Set the database global tag used when creating this file.
 
virtual void Print (Option_t *option="") const override
 Print the content of the meta data object.
 

Private Member Functions

void declareMCData ()
 Declare that this is not generated, but real data.
 
 ClassDefOverride (DQMFileMetaData, 1)
 Metadata information about a file.
 

Private Attributes

unsigned int m_nEvents
 Number of events.
 
int m_experiment
 experiment number.
 
int m_run
 run number.
 
std::string m_date
 run date and time (UTC).
 
std::string m_release
 Software release version.
 
std::string m_procID
 processing ID
 
std::string m_rtype
 run type (physics, cosmics, etc.)
 
bool m_isMC
 Is it generated or real data?.
 
std::string m_databaseGlobalTag
 Global tag in the database used for production of this file.
 

Detailed Description

Metadata information about a DQM file.

Definition at line 27 of file DQMFileMetaData.h.

Constructor & Destructor Documentation

◆ DQMFileMetaData()

Constructor.

Definition at line 22 of file DQMFileMetaData.cc.

22 :
23 m_nEvents(0), m_experiment(0), m_run(0), m_date(""), m_release(""), m_procID(""), m_rtype(""), m_isMC(false),
25{
26}
std::string m_databaseGlobalTag
Global tag in the database used for production of this file.
unsigned int m_nEvents
Number of events.
bool m_isMC
Is it generated or real data?.
std::string m_rtype
run type (physics, cosmics, etc.)
std::string m_procID
processing ID
std::string m_release
Software release version.
std::string m_date
run date and time (UTC).
int m_experiment
experiment number.

Member Function Documentation

◆ declareMCData()

void declareMCData ( )
inlineprivate

Declare that this is not generated, but real data.

Definition at line 148 of file DQMFileMetaData.h.

148{m_isMC = true;}

◆ 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 66 of file DQMFileMetaData.h.

66{ return m_databaseGlobalTag; }

◆ getExperiment()

int getExperiment ( ) const
inline

experiment number getter.

Definition at line 39 of file DQMFileMetaData.h.

39{return m_experiment;}

◆ getNEvents()

unsigned int getNEvents ( ) const
inline

Number of events getter.

Definition at line 35 of file DQMFileMetaData.h.

35{return m_nEvents;}

◆ getProcessingID()

const std::string & getProcessingID ( ) const
inline

Processing ID getter.

Definition at line 52 of file DQMFileMetaData.h.

52{return m_procID;}

◆ getRelease()

const std::string & getRelease ( ) const
inline

Software release version getter.

Definition at line 49 of file DQMFileMetaData.h.

49{return m_release;}

◆ getRun()

int getRun ( ) const
inline

run number getter.

Definition at line 43 of file DQMFileMetaData.h.

43{return m_run;}

◆ getRunDate()

const std::string & getRunDate ( ) const
inline

Run date getter (UTC)

Definition at line 46 of file DQMFileMetaData.h.

46{return m_date;}

◆ getRunType()

const std::string & getRunType ( ) const
inline

Run type getter.

Definition at line 55 of file DQMFileMetaData.h.

55{return m_rtype;}

◆ isMC()

bool isMC ( ) const
inline

Is it generated data?.

Definition at line 59 of file DQMFileMetaData.h.

59{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 29 of file DQMFileMetaData.cc.

30{
31
32 const bool all = (option && option == std::string("all"));
33 KeyValuePrinter printer(false);
34 printer.put("nEvents", m_nEvents);
35 printer.put("Experiment", m_experiment);
36 printer.put("Run", m_run);
37
38 if (all) {
39 printer.put("run type", m_rtype);
40 printer.put("run date", m_date);
41 printer.put("processing", m_procID);
42 printer.put("release", m_release);
43 printer.put("isMC", m_isMC);
44 printer.put("globalTag", m_databaseGlobalTag);
45 }
46 std::cout << "=== DQMFileMetaData ===\n";
47 std::cout << printer.string();
48 std::cout << "=======================\n";
49}
create human-readable or JSON output for key value pairs.

◆ 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 118 of file DQMFileMetaData.h.

118{ m_databaseGlobalTag = globalTag; }

◆ setExperimentRun()

void setExperimentRun ( int  experiment,
int  run 
)
inline

Set experiment and run.

Parameters
experimentexperiment number.
runrun number.

Definition at line 79 of file DQMFileMetaData.h.

79{m_experiment = experiment; m_run = run;}

◆ setNEvents()

void setNEvents ( unsigned int  nEvents)
inline

Number of events setter.

Parameters
nEventsThe number of events.

Definition at line 72 of file DQMFileMetaData.h.

72{m_nEvents = nEvents;}

◆ setProcessingID()

void setProcessingID ( const std::string &  procID)
inline

set processing ID

Parameters
procIDprocessing ID (online,proc9,proc10,etc.)

Definition at line 100 of file DQMFileMetaData.h.

101 {
102 m_procID = procID;
103 }

◆ setRelease()

void setRelease ( const std::string &  release)
inline

set release

Parameters
releaserelease number

Definition at line 84 of file DQMFileMetaData.h.

85 {
86 m_release = release;
87 }

◆ setRunDate()

void setRunDate ( const std::string &  date)
inline

set run date

Parameters
datedate and time of run

Definition at line 92 of file DQMFileMetaData.h.

93 {
94 m_date = date;
95 }

◆ setRunType()

void setRunType ( const std::string &  rtype)
inline

set run type

Parameters
rtyperun type (physics,cosmic,local,null)

Definition at line 108 of file DQMFileMetaData.h.

109 {
110 m_rtype = rtype;
111 }

Member Data Documentation

◆ m_databaseGlobalTag

std::string m_databaseGlobalTag
private

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

Definition at line 144 of file DQMFileMetaData.h.

◆ m_date

std::string m_date
private

run date and time (UTC).


Definition at line 134 of file DQMFileMetaData.h.

◆ m_experiment

int m_experiment
private

experiment number.


Definition at line 130 of file DQMFileMetaData.h.

◆ m_isMC

bool m_isMC
private

Is it generated or real data?.


Definition at line 142 of file DQMFileMetaData.h.

◆ m_nEvents

unsigned int m_nEvents
private

Number of events.


Definition at line 128 of file DQMFileMetaData.h.

◆ m_procID

std::string m_procID
private

processing ID

Definition at line 138 of file DQMFileMetaData.h.

◆ m_release

std::string m_release
private

Software release version.


Definition at line 136 of file DQMFileMetaData.h.

◆ m_rtype

std::string m_rtype
private

run type (physics, cosmics, etc.)

Definition at line 140 of file DQMFileMetaData.h.

◆ m_run

int m_run
private

run number.


Definition at line 132 of file DQMFileMetaData.h.


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