|
|
Go to the documentation of this file. 1 #ifndef DQMServices_Core_DQMStore_h
2 #define DQMServices_Core_DQMStore_h
15 std::cout << "TRACE: " << __FILE__ << ":" << __LINE__ << "(" << __FUNCTION__ << ") " << msg << std::endl;
16 #define TRACE_ TRACE("");
19 namespace implementation {
93 me->Fill(initial_value);
103 FUNC onbooking =
NOOP()) {
105 auto th1 =
new TH1F(
name,
title, nchX, lowX, highX);
112 TString
const&
name, TString
const&
title,
int nchX,
float const* xbinsize, FUNC onbooking =
NOOP()) {
114 auto th1 =
new TH1F(
name,
title, nchX, xbinsize);
125 auto th1 = static_cast<TH1F*>(
object->Clone(
name));
134 TString
const&
name, TString
const&
title,
int nchX,
double lowX,
double highX, FUNC onbooking =
NOOP()) {
136 auto th1 =
new TH1S(
name,
title, nchX, lowX, highX);
147 auto th1 = static_cast<TH1S*>(
object->Clone(
name));
156 TString
const&
name, TString
const&
title,
int nchX,
double lowX,
double highX, FUNC onbooking =
NOOP()) {
158 auto th1 =
new TH1D(
name,
title, nchX, lowX, highX);
169 auto th1 = static_cast<TH1D*>(
object->Clone(
name));
178 TString
const&
title,
185 FUNC onbooking =
NOOP()) {
187 auto th2 =
new TH2F(
name,
title, nchX, lowX, highX, nchY, lowY, highY);
194 TString
const&
title,
196 float const* xbinsize,
198 float const* ybinsize,
199 FUNC onbooking =
NOOP()) {
201 auto th2 =
new TH2F(
name,
title, nchX, xbinsize, nchY, ybinsize);
212 auto th2 = static_cast<TH2F*>(
object->Clone(
name));
220 TString
const&
title,
227 FUNC onbooking =
NOOP()) {
229 auto th2 =
new TH2S(
name,
title, nchX, lowX, highX, nchY, lowY, highY);
236 TString
const&
title,
238 float const* xbinsize,
240 float const* ybinsize,
241 FUNC onbooking =
NOOP()) {
243 auto th2 =
new TH2S(
name,
title, nchX, xbinsize, nchY, ybinsize);
254 auto th2 = static_cast<TH2S*>(
object->Clone(
name));
262 TString
const&
title,
269 FUNC onbooking =
NOOP()) {
271 auto th2 =
new TH2D(
name,
title, nchX, lowX, highX, nchY, lowY, highY);
282 auto th2 = static_cast<TH2D*>(
object->Clone(
name));
291 TString
const&
title,
301 FUNC onbooking =
NOOP()) {
303 auto th3 =
new TH3F(
name,
title, nchX, lowX, highX, nchY, lowY, highY, nchZ, lowZ, highZ);
314 auto th3 = static_cast<TH3F*>(
object->Clone(
name));
323 TString
const&
title,
331 FUNC onbooking =
NOOP()) {
333 auto tprofile =
new TProfile(
name,
title, nchX, lowX, highX, lowY, highY,
option);
340 TString
const&
title,
347 FUNC onbooking =
NOOP()) {
349 auto tprofile =
new TProfile(
name,
title, nchX, lowX, highX, lowY, highY,
option);
356 TString
const&
title,
358 double const* xbinsize,
363 FUNC onbooking =
NOOP()) {
365 auto tprofile =
new TProfile(
name,
title, nchX, xbinsize, lowY, highY,
option);
372 TString
const&
title,
374 double const* xbinsize,
378 FUNC onbooking =
NOOP()) {
380 auto tprofile =
new TProfile(
name,
title, nchX, xbinsize, lowY, highY,
option);
391 auto tprofile = static_cast<TProfile*>(
object->Clone(
name));
400 TString
const&
title,
410 FUNC onbooking =
NOOP()) {
412 auto tprofile =
new TProfile2D(
name,
title, nchX, lowX, highX, nchY, lowY, highY, lowZ, highZ,
option);
419 TString
const&
title,
430 FUNC onbooking =
NOOP()) {
432 auto tprofile =
new TProfile2D(
name,
title, nchX, lowX, highX, nchY, lowY, highY, lowZ, highZ,
option);
443 auto tprofile = static_cast<TProfile2D*>(
object->Clone(
name));
456 template <MonitorElementData::Scope SCOPE>
476 bool forceReplace =
false);
506 uint32_t
lumi)
const;
524 virtual std::vector<std::string>
getSubdirs()
const;
526 virtual std::vector<std::string>
getMEs()
const;
556 bool overwrite =
false,
560 bool fileMustExist =
true);
577 template <
typename iFunc>
597 struct ModuleIdScope {
608 oldscope_ = booker_.
setScope(newscope);
610 assert(newid != 0 || !
"moduleID must be set for normal booking transaction");
611 assert(oldid_ == 0 || !
"Nested booking transaction?");
620 ModuleIdScope booker(
624 canSaveByLumi && this->
doSaveByLumi_ ? MonitorElementData::Scope::LUMI : MonitorElementData::Scope::RUN,
631 template <
typename iFunc>
671 template <
typename MELIKE>
698 std::map<edm::LuminosityBlockID, std::set<MonitorElement*, MonitorElement::MEComparison>>
globalMEs_;
702 std::map<uint64_t, std::set<MonitorElement*, MonitorElement::MEComparison>>
localMEs_;
739 namespace harvesting {
MonitorElement * book2S(TString const &name, TH2S *object, FUNC onbooking=NOOP())
edm::LuminosityBlockID runlumi_
MonitorElement * book1D(TString const &name, TH1F *object, FUNC onbooking=NOOP())
MonitorElement * findOrRecycle(MonitorElementData::Key const &)
virtual std::vector< dqm::harvesting::MonitorElement * > getContents(std::string const &path) const
MonitorElement * bookFloat(TString const &name, FUNC onbooking=NOOP())
void leaveLumi(edm::RunNumber_t run, edm::LuminosityBlockNumber_t lumi, uint64_t moduleID)
MonitorElement * book2S(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
MonitorElement * book2S(TString const &name, TString const &title, int nchX, float const *xbinsize, int nchY, float const *ybinsize, FUNC onbooking=NOOP())
virtual MonitorElementData::Scope setScope(MonitorElementData::Scope newscope)
MonitorElement * book2D(TString const &name, TH2F *object, FUNC onbooking=NOOP())
void initLumi(edm::RunNumber_t run, edm::LuminosityBlockNumber_t lumi)
DQMStore(edm::ParameterSet const &pset, edm::ActivityRegistry &)
virtual std::vector< std::string > getMEs() const
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
virtual MonitorElement * bookME(TString const &name, MonitorElementData::Kind kind, std::function< TH1 *()> makeobject, bool forceReplace=false)
virtual void setCurrentFolder(std::string const &fullpath)
MonitorElement * book1D(TString const &name, TString const &title, int nchX, float const *xbinsize, FUNC onbooking=NOOP())
DQMStore & operator=(DQMStore const &)=delete
void meBookerGetter(iFunc f)
virtual DQM_DEPRECATED std::vector< std::string > getSubdirs() const
uint16_t *__restrict__ uint16_t const *__restrict__ uint32_t const *__restrict__ uint32_t *__restrict__ uint32_t const *__restrict__ moduleId
dqm::reco::DQMStore::IBooker IBooker
MonitorElement * book2DD(TString const &name, TH2D *object, FUNC onbooking=NOOP())
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
virtual std::vector< dqm::harvesting::MonitorElement * > getAllContents(std::string const &path) const
virtual edm::LuminosityBlockID setRunLumi(edm::LuminosityBlockID runlumi)
unsigned int LuminosityBlockNumber_t
dqm::legacy::DQMStore DQMStore
void cleanupLumi(edm::RunNumber_t run, edm::LuminosityBlockNumber_t lumi)
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double const *xbinsize, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double lowX, double highX, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
MonitorElement * book1S(TString const &name, TH1S *object, FUNC onbooking=NOOP())
void setCurrentFolder(std::string const &fullpath) override
MonitorElement * book1S(TString const &name, TString const &title, int nchX, double lowX, double highX, FUNC onbooking=NOOP())
DQM_DEPRECATED void save(std::string const &filename, std::string const &path="")
virtual std::string pwd()
MonitorElementData::Scope scope_
std::vector< std::string > MEsToSave_
MonitorElement * book1DD(TString const &name, TString const &title, int nchX, double lowX, double highX, FUNC onbooking=NOOP())
MonitorElement * putME(MonitorElement *me)
std::string pwd() override
void printTrace(std::string const &message)
MonitorElement * book2DD(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
MonitorElement * bookString(TString const &name, TString const &value, FUNC onbooking=NOOP())
std::recursive_mutex booking_mutex_
MonitorElement * bookInt(TString const &name, FUNC onbooking=NOOP())
MonitorElement * book1DD(TString const &name, TH1D *object, FUNC onbooking=NOOP())
virtual uint64_t setModuleID(uint64_t moduleID)
std::map< uint64_t, std::set< MonitorElement *, MonitorElement::MEComparison > > localMEs_
dqm::legacy::MonitorElement MonitorElement
MonitorElementData::Scope oldscope
MonitorElement * bookProfile2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int, double lowZ, double highZ, char const *option="s", FUNC onbooking=NOOP())
MonitorElement * book3D(TString const &name, TH3F *object, FUNC onbooking=NOOP())
void bookTransaction(iFunc f, uint64_t moduleId, bool canSaveByLumi)
UseScope(IBooker &booker)
void cd(std::string const &dir) override
MonitorElement * book2D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, FUNC onbooking=NOOP())
void debugTrackME(const char *message, MonitorElement *me_local, MonitorElement *me_global) const
MonitorElement * book3D(TString const &name, TString const &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, FUNC onbooking=NOOP())
void operator()(TH1 *) const
virtual MonitorElement * get(std::string const &fullpath) const
MonitorElement * bookProfile(TString const &name, TString const &title, int nchX, double const *xbinsize, int, double lowY, double highY, char const *option="s", FUNC onbooking=NOOP())
MonitorElement * findME(MELIKE const &path)
DQM_DEPRECATED bool open(std::string const &filename, bool overwrite=false, std::string const &path="", std::string const &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
unsigned long long uint64_t
virtual DQM_DEPRECATED MonitorElement * getElement(std::string const &path) const
std::map< edm::LuminosityBlockID, std::set< MonitorElement *, MonitorElement::MEComparison > > globalMEs_
void enterLumi(edm::RunNumber_t run, edm::LuminosityBlockNumber_t lumi, uint64_t moduleID)
MonitorElement * bookProfile2D(TString const &name, TProfile2D *object, FUNC onbooking=NOOP())
MonitorElement * bookProfile(TString const &name, TProfile *object, FUNC onbooking=NOOP())
MonitorElement * book2D(TString const &name, TString const &title, int nchX, float const *xbinsize, int nchY, float const *ybinsize, FUNC onbooking=NOOP())
virtual bool dirExists(std::string const &path) const
MonitorElement * book1D(TString const &name, TString const &title, int const nchX, double const lowX, double const highX, FUNC onbooking=NOOP())