DQMServices
Core
interface
LegacyIOHelper.h
Go to the documentation of this file.
1
#ifndef DQMSERVICES_CORE_LEGACYIOHELPER_H
2
#define DQMSERVICES_CORE_LEGACYIOHELPER_H
3
4
#include "
DQMServices/Core/interface/DQMStore.h
"
5
6
// This class encapsulates the TDirectory based file format used for DQMGUI
7
// uploads and many other use cases.
8
// This should be part of `DQMFileSaver`, however since DQMServices/Components
9
// DQMFileSaver and DQMServices/FileIO DQMFileSaverOnline both write this
10
// format, the code is shared here (evnetually, these modules should become one
11
// again).
12
// This code is in DQMServices/Core to also allow the legacy DQMStore::save
13
// interface to use this without adding another dependency.
14
class
LegacyIOHelper
{
15
public
:
16
// use internal type here since we call this from the DQMStore itself.
17
typedef
dqm::implementation::DQMStore
DQMStore
;
18
typedef
dqm::legacy::MonitorElement
MonitorElement
;
19
LegacyIOHelper
(
DQMStore
* dqmstore) :
dbe_
(dqmstore){};
20
21
// Replace or append to `filename`, a TDirectory ROOT file. If a run number
22
// is passed, the paths are rewritten to the "Run Summary" format used by
23
// DQMGUI. The run number does not affect which MEs are saved; this code only
24
// supports non-threaded mode. `fileupdate` is passed to ROOT unchanged.
25
// The run number passed in is added to the Directory structure inside the
26
// file ("Run xxxxxx/.../Run Summary/...") if not 0. It is only used to
27
// select only MEs for that run iff saveall is false, else all MEs (RUN, LUMI
28
// and JOB) are saved.
29
void
save
(
std::string
const
&
filename
,
30
std::string
const
&
path
=
""
,
31
uint32_t
const
run
= 0,
32
bool
saveall =
true
,
33
std::string
const
& fileupdate =
"RECREATE"
);
34
35
private
:
36
bool
createDirectoryIfNeededAndCd
(
const
std::string
&
path
);
37
DQMStore
*
dbe_
;
38
};
39
40
#endif
LegacyIOHelper
Definition:
LegacyIOHelper.h:14
LegacyIOHelper::save
void save(std::string const &filename, std::string const &path="", uint32_t const run=0, bool saveall=true, std::string const &fileupdate="RECREATE")
Definition:
LegacyIOHelper.cc:13
DQMStore.h
dqm::legacy::MonitorElement
Definition:
MonitorElement.h:461
LegacyIOHelper::dbe_
DQMStore * dbe_
Definition:
LegacyIOHelper.h:37
corrVsCorr.filename
filename
Definition:
corrVsCorr.py:123
AlCaHLTBitMon_QueryRunRegistry.string
string
Definition:
AlCaHLTBitMon_QueryRunRegistry.py:256
LegacyIOHelper::MonitorElement
dqm::legacy::MonitorElement MonitorElement
Definition:
LegacyIOHelper.h:18
writedatasetfile.run
run
Definition:
writedatasetfile.py:27
LegacyIOHelper::DQMStore
dqm::implementation::DQMStore DQMStore
Definition:
LegacyIOHelper.h:17
LegacyIOHelper::LegacyIOHelper
LegacyIOHelper(DQMStore *dqmstore)
Definition:
LegacyIOHelper.h:19
LegacyIOHelper::createDirectoryIfNeededAndCd
bool createDirectoryIfNeededAndCd(const std::string &path)
Definition:
LegacyIOHelper.cc:124
castor_dqm_sourceclient_file_cfg.path
path
Definition:
castor_dqm_sourceclient_file_cfg.py:37
dqm::implementation::DQMStore
Definition:
DQMStore.h:538
Generated for CMSSW Reference Manual by
1.8.16