CMS 3D CMS Logo

 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Properties Friends Macros Pages
List of all members | Classes | Public Types | Public Member Functions | Private Types | Private Member Functions | Static Private Member Functions | Private Attributes | Friends
DQMStore Class Reference

#include <DQMStore.h>

Classes

class  IBooker
 
class  IGetter
 

Public Types

enum  OpenRunDirs { KeepRunDirs, StripRunDirs }
 
enum  SaveReferenceTag { SaveWithoutReference, SaveWithReference, SaveWithReferenceForQTest }
 

Public Member Functions

MonitorElementbook1D (const char *name, const char *title, int nchX, double lowX, double highX)
 Book 1D histogram. More...
 
MonitorElementbook1D (const std::string &name, const std::string &title, int nchX, double lowX, double highX)
 Book 1D histogram. More...
 
MonitorElementbook1D (const char *name, const char *title, int nchX, const float *xbinsize)
 Book 1D variable bin histogram. More...
 
MonitorElementbook1D (const std::string &name, const std::string &title, int nchX, const float *xbinsize)
 Book 1D variable bin histogram. More...
 
MonitorElementbook1D (const char *name, TH1F *h)
 Book 1D histogram by cloning an existing histogram. More...
 
MonitorElementbook1D (const std::string &name, TH1F *h)
 Book 1D histogram by cloning an existing histogram. More...
 
MonitorElementbook1DD (const char *name, const char *title, int nchX, double lowX, double highX)
 Book 1S histogram. More...
 
MonitorElementbook1DD (const std::string &name, const std::string &title, int nchX, double lowX, double highX)
 Book 1S histogram. More...
 
MonitorElementbook1DD (const char *name, const char *title, int nchX, const float *xbinsize)
 
MonitorElementbook1DD (const std::string &name, const std::string &title, int nchX, const float *xbinsize)
 
MonitorElementbook1DD (const char *name, TH1D *h)
 Book 1D double histogram by cloning an existing histogram. More...
 
MonitorElementbook1DD (const std::string &name, TH1D *h)
 Book 1D double histogram by cloning an existing histogram. More...
 
MonitorElementbook1S (const char *name, const char *title, int nchX, double lowX, double highX)
 Book 1S histogram. More...
 
MonitorElementbook1S (const std::string &name, const std::string &title, int nchX, double lowX, double highX)
 Book 1S histogram. More...
 
MonitorElementbook1S (const char *name, const char *title, int nchX, const float *xbinsize)
 
MonitorElementbook1S (const std::string &name, const std::string &title, int nchX, const float *xbinsize)
 
MonitorElementbook1S (const char *name, TH1S *h)
 Book 1S histogram by cloning an existing histogram. More...
 
MonitorElementbook1S (const std::string &name, TH1S *h)
 Book 1S histogram by cloning an existing histogram. More...
 
MonitorElementbook2D (const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
 Book 2D histogram. More...
 
MonitorElementbook2D (const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
 Book 2D histogram. More...
 
MonitorElementbook2D (const char *name, const char *title, int nchX, const float *xbinsize, int nchY, const float *ybinsize)
 Book 2D variable bin histogram. More...
 
MonitorElementbook2D (const std::string &name, const std::string &title, int nchX, const float *xbinsize, int nchY, const float *ybinsize)
 Book 2D variable bin histogram. More...
 
MonitorElementbook2D (const char *name, TH2F *h)
 Book 2D histogram by cloning an existing histogram. More...
 
MonitorElementbook2D (const std::string &name, TH2F *h)
 Book 2D histogram by cloning an existing histogram. More...
 
MonitorElementbook2DD (const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
 Book 2D double histogram. More...
 
MonitorElementbook2DD (const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
 Book 2S histogram. More...
 
MonitorElementbook2DD (const char *name, const char *title, int nchX, const float *xbinsize, int nchY, const float *ybinsize)
 
MonitorElementbook2DD (const std::string &name, const std::string &title, int nchX, const float *xbinsize, int nchY, const float *ybinsize)
 
MonitorElementbook2DD (const char *name, TH2D *h)
 Book 2DS histogram by cloning an existing histogram. More...
 
MonitorElementbook2DD (const std::string &name, TH2D *h)
 Book 2DS histogram by cloning an existing histogram. More...
 
MonitorElementbook2S (const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
 Book 2S histogram. More...
 
MonitorElementbook2S (const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
 Book 2S histogram. More...
 
MonitorElementbook2S (const char *name, const char *title, int nchX, const float *xbinsize, int nchY, const float *ybinsize)
 
MonitorElementbook2S (const std::string &name, const std::string &title, int nchX, const float *xbinsize, int nchY, const float *ybinsize)
 
MonitorElementbook2S (const char *name, TH2S *h)
 Book 2DS histogram by cloning an existing histogram. More...
 
MonitorElementbook2S (const std::string &name, TH2S *h)
 Book 2DS histogram by cloning an existing histogram. More...
 
MonitorElementbook3D (const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ)
 Book 3D histogram. More...
 
MonitorElementbook3D (const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ)
 Book 3D histogram. More...
 
MonitorElementbook3D (const char *name, TH3F *h)
 Book 3D histogram by cloning an existing histogram. More...
 
MonitorElementbook3D (const std::string &name, TH3F *h)
 Book 3D histogram by cloning an existing histogram. More...
 
MonitorElementbookFloat (const char *name)
 Book float. More...
 
MonitorElementbookFloat (const std::string &name)
 Book float. More...
 
MonitorElementbookInt (const char *name)
 Book int. More...
 
MonitorElementbookInt (const std::string &name)
 Book int. More...
 
MonitorElementbookProfile (const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
 
MonitorElementbookProfile (const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
 
MonitorElementbookProfile (const char *name, const char *title, int nchX, double lowX, double highX, double lowY, double highY, const char *option="s")
 
MonitorElementbookProfile (const std::string &name, const std::string &title, int nchX, double lowX, double highX, double lowY, double highY, const char *option="s")
 
MonitorElementbookProfile (const char *name, const char *title, int nchX, const double *xbinsize, int nchY, double lowY, double highY, const char *option="s")
 
MonitorElementbookProfile (const std::string &name, const std::string &title, int nchX, const double *xbinsize, int nchY, double lowY, double highY, const char *option="s")
 
MonitorElementbookProfile (const char *name, const char *title, int nchX, const double *xbinsize, double lowY, double highY, const char *option="s")
 
MonitorElementbookProfile (const std::string &name, const std::string &title, int nchX, const double *xbinsize, double lowY, double highY, const char *option="s")
 
MonitorElementbookProfile (const char *name, TProfile *h)
 Book TProfile by cloning an existing profile. More...
 
MonitorElementbookProfile (const std::string &name, TProfile *h)
 Book TProfile by cloning an existing profile. More...
 
MonitorElementbookProfile2D (const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
 
MonitorElementbookProfile2D (const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
 
MonitorElementbookProfile2D (const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, const char *option="s")
 
MonitorElementbookProfile2D (const std::string &name, const std::string &title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, double lowZ, double highZ, const char *option="s")
 
MonitorElementbookProfile2D (const char *name, TProfile2D *h)
 Book TProfile2D by cloning an existing profile. More...
 
MonitorElementbookProfile2D (const std::string &name, TProfile2D *h)
 Book TProfile2D by cloning an existing profile. More...
 
MonitorElementbookString (const char *name, const char *value)
 Book string. More...
 
MonitorElementbookString (const std::string &name, const std::string &value)
 Book string. More...
 
template<typename iFunc >
void bookTransaction (iFunc f, uint32_t run, uint32_t streamId, uint32_t moduleId)
 
void cd (void)
 go to top directory (ie. root) More...
 
void cd (const std::string &subdir)
 cd to subdirectory (if there) More...
 
bool containsAnyMonitorable (const std::string &path) const
 
QCriterioncreateQTest (const std::string &algoname, const std::string &qtname)
 
void deleteUnusedLumiHistograms (uint32_t run, uint32_t lumi)
 
bool dirExists (const std::string &path) const
 true if directory exists More...
 
void disableSoftReset (MonitorElement *me)
 
 DQMStore (const edm::ParameterSet &pset, edm::ActivityRegistry &)
 
 DQMStore (const edm::ParameterSet &pset)
 
MonitorElementget (const std::string &path) const
 get ME from full pathname (e.g. "my/long/dir/my_histo") More...
 
std::vector< MonitorElement * > get (unsigned int tag) const
 get all MonitorElements tagged as <tag> More...
 
std::vector< MonitorElement * > getAllContents (const std::string &path, uint32_t runNumber=0, uint32_t lumi=0) const
 
void getAllTags (std::vector< std::string > &into) const
 
std::vector< MonitorElement * > getContents (const std::string &path) const
 
std::vector< MonitorElement * > getContents (const std::string &path, unsigned int tag) const
 same as above for tagged MonitorElements More...
 
void getContents (std::vector< std::string > &into, bool showContents=true) const
 
std::vector< MonitorElement * > getMatchingContents (const std::string &pattern, lat::Regexp::Syntax syntaxType=lat::Regexp::Wildcard) const
 
std::vector< std::string > getMEs (void) const
 get list of (non-dir) MEs of current directory More...
 
QCriteriongetQCriterion (const std::string &qtname) const
 
int getStatus (const std::string &path="") const
 
std::vector< std::string > getSubdirs (void) const
 
void goUp (void)
 equivalent to "cd .." More...
 
bool isCollate (void) const
 
bool load (const std::string &filename, OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
 
template<typename iFunc >
void meBookerGetter (iFunc f)
 
template<typename iFunc >
void meGetter (iFunc f)
 
void mergeAndResetMEsLuminositySummaryCache (uint32_t run, uint32_t lumi, uint32_t streamId, uint32_t moduleId)
 
void mergeAndResetMEsRunSummaryCache (uint32_t run, uint32_t streamId, uint32_t moduleId)
 
bool mtEnabled ()
 
bool open (const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
 
const std::string & pwd (void) const
 
void removeContents (void)
 erase all monitoring elements in current directory (not including subfolders); More...
 
void removeContents (const std::string &dir)
 remove all monitoring elements from directory; More...
 
void removeElement (const std::string &name)
 
void removeElement (const std::string &dir, const std::string &name, bool warning=true)
 
void rmdir (const std::string &fullpath)
 
void runQTests (void)
 
void save (const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", const uint32_t run=0, const uint32_t lumi=0, SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE", const bool resetMEsAfterWriting=false)
 
void savePB (const std::string &filename, const std::string &path="", const uint32_t run=0, const uint32_t lumi=0, const bool resetMEsAfterWriting=false)
 
void scaleElements (void)
 
void setCurrentFolder (const std::string &fullpath)
 
void setVerbose (unsigned level)
 
void showDirStructure (void) const
 
void softReset (MonitorElement *me)
 
void tag (MonitorElement *me, unsigned int myTag)
 
void tag (const std::string &path, unsigned int myTag)
 tag ME specified by full pathname (e.g. "my/long/dir/my_histo") More...
 
void tagAllContents (const std::string &path, unsigned int myTag)
 
void tagContents (const std::string &path, unsigned int myTag)
 tag all children of folder (does NOT include subfolders) More...
 
void useQTest (const std::string &dir, const std::string &qtname)
 
int useQTestByMatch (const std::string &pattern, const std::string &qtname)
 attach quality test <qc> to monitor elements matching <pattern>. More...
 
 ~DQMStore (void)
 

Private Types

typedef std::set< MonitorElementMEMap
 
typedef std::map< std::string,
QCriterion *(*)(const
std::string &)> 
QAMap
 
typedef std::map< std::string,
QCriterion * > 
QCMap
 
typedef std::pair< fastmatch
*, QCriterion * > 
QTestSpec
 
typedef std::list< QTestSpecQTestSpecs
 

Private Member Functions

MonitorElementbook (const std::string &dir, const std::string &name, const char *context)
 
template<class HISTO , class COLLATE >
MonitorElementbook (const std::string &dir, const std::string &name, const char *context, int kind, HISTO *h, COLLATE collate)
 
MonitorElementbook1D (const std::string &dir, const std::string &name, TH1F *h)
 Book 1D histogram based on TH1F. More...
 
MonitorElementbook1DD (const std::string &dir, const std::string &name, TH1D *h)
 Book 1D histogram based on TH1D. More...
 
MonitorElementbook1S (const std::string &dir, const std::string &name, TH1S *h)
 Book 1D histogram based on TH1S. More...
 
MonitorElementbook2D (const std::string &dir, const std::string &name, TH2F *h)
 Book 2D histogram based on TH2F. More...
 
MonitorElementbook2DD (const std::string &dir, const std::string &name, TH2D *h)
 Book 2D histogram based on TH2D. More...
 
MonitorElementbook2S (const std::string &dir, const std::string &name, TH2S *h)
 Book 2D histogram based on TH2S. More...
 
MonitorElementbook3D (const std::string &dir, const std::string &name, TH3F *h)
 Book 3D histogram based on TH3F. More...
 
MonitorElementbookFloat (const std::string &dir, const std::string &name)
 Book float. More...
 
MonitorElementbookInt (const std::string &dir, const std::string &name)
 Book int. More...
 
MonitorElementbookProfile (const std::string &dir, const std::string &name, TProfile *h)
 Book profile histogram based on TProfile. More...
 
MonitorElementbookProfile2D (const std::string &folder, const std::string &name, TProfile2D *h)
 Book 2D profile histogram based on TProfile2D. More...
 
MonitorElementbookString (const std::string &dir, const std::string &name, const std::string &value)
 Book string. More...
 
bool cdInto (const std::string &path) const
 
 DQMStore (const DQMStore &)
 
bool extract (TObject *obj, const std::string &dir, bool overwrite, bool collateHistograms)
 
TObject * extractNextObject (TBufferFile &) const
 
MonitorElementfindObject (const std::string &dir, const std::string &name, const uint32_t run=0, const uint32_t lumi=0, const uint32_t streamId=0, const uint32_t moduleId=0) const
 
void forceReset (void)
 
void get_info (const dqmstorepb::ROOTFilePB_Histo &, std::string &dirname, std::string &objname, TObject **obj)
 
MonitorElementinitialise (MonitorElement *me, const std::string &path)
 
void initializeFrom (const edm::ParameterSet &)
 
bool isCollateME (MonitorElement *me) const
 
void makeDirectory (const std::string &path)
 
const DQMStoreoperator= (const DQMStore &)
 
void print_trace (const std::string &dir, const std::string &name)
 
unsigned int readDirectory (TFile *file, bool overwrite, const std::string &path, const std::string &prepend, const std::string &curdir, OpenRunDirs stripdirs)
 
bool readFile (const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
 
bool readFilePB (const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
 
void reset (void)
 
void setAccumulate (MonitorElement *me, bool flag)
 

Static Private Member Functions

static bool checkBinningMatches (MonitorElement *me, TH1 *h, unsigned verbose)
 
static void collate1D (MonitorElement *me, TH1F *h, unsigned verbose)
 
static void collate1DD (MonitorElement *me, TH1D *h, unsigned verbose)
 
static void collate1S (MonitorElement *me, TH1S *h, unsigned verbose)
 
static void collate2D (MonitorElement *me, TH2F *h, unsigned verbose)
 
static void collate2DD (MonitorElement *me, TH2D *h, unsigned verbose)
 
static void collate2S (MonitorElement *me, TH2S *h, unsigned verbose)
 
static void collate3D (MonitorElement *me, TH3F *h, unsigned verbose)
 
static void collateProfile (MonitorElement *me, TProfile *h, unsigned verbose)
 
static void collateProfile2D (MonitorElement *me, TProfile2D *h, unsigned verbose)
 

Private Attributes

std::mutex book_mutex_
 
bool collateHistograms_
 
MEMap data_
 
std::set< std::string > dirs_
 
bool enableMultiThread_
 
bool forceResetOnBeginLumi_
 
IBookeribooker_
 
IGetterigetter_
 
bool LSbasedMode_
 
uint32_t moduleId_
 
std::string pwd_
 
QAMap qalgos_
 
QCMap qtests_
 
QTestSpecs qtestspecs_
 
std::string readSelectedDirectory_
 
bool reset_
 
uint32_t run_
 
double scaleFlag_
 
std::ofstream * stream_
 
uint32_t streamId_
 
unsigned verbose_
 
unsigned verboseQT_
 

Friends

class DQMArchiver
 
class DQMFileSaver
 
class DQMNet
 
class DQMRootOutputModule
 
class DQMRootSource
 
class DQMService
 
class DQMStoreExample
 
class edm::DQMHttpSource
 
class MEtoEDMConverter
 

Detailed Description

Definition at line 75 of file DQMStore.h.

Member Typedef Documentation

typedef std::set<MonitorElement> DQMStore::MEMap
private

Definition at line 695 of file DQMStore.h.

typedef std::map<std::string, QCriterion *(*)(const std::string &)> DQMStore::QAMap
private

Definition at line 697 of file DQMStore.h.

typedef std::map<std::string, QCriterion *> DQMStore::QCMap
private

Definition at line 696 of file DQMStore.h.

typedef std::pair<fastmatch *, QCriterion *> DQMStore::QTestSpec
private

Definition at line 693 of file DQMStore.h.

Definition at line 694 of file DQMStore.h.

Member Enumeration Documentation

Enumerator
KeepRunDirs 
StripRunDirs 

Definition at line 84 of file DQMStore.h.

Enumerator
SaveWithoutReference 
SaveWithReference 
SaveWithReferenceForQTest 

Definition at line 78 of file DQMStore.h.

Constructor & Destructor Documentation

DQMStore::DQMStore ( const edm::ParameterSet pset,
edm::ActivityRegistry ar 
)

Definition at line 503 of file DQMStore.cc.

References edm::signalslot::Signal< T >::connect(), enableMultiThread_, forceReset(), forceResetOnBeginLumi_, edm::ParameterSet::getUntrackedParameter(), ibooker_, igetter_, initializeFrom(), edm::service::SystemBounds::maxNumberOfStreams(), edm::ActivityRegistry::preallocateSignal_, edm::ActivityRegistry::watchPostSourceLumi(), and edm::ActivityRegistry::watchPostSourceRun().

504  : verbose_ (1),
505  verboseQT_ (1),
506  reset_ (false),
507  collateHistograms_ (false),
508  enableMultiThread_(false),
509  forceResetOnBeginLumi_(false),
511  run_(0),
512  streamId_(0),
513  moduleId_(0),
514  stream_(nullptr),
515  pwd_ (""),
516  ibooker_(0),
517  igetter_(0)
518 {
519  if (!ibooker_)
520  ibooker_ = new DQMStore::IBooker(this);
521  if (!igetter_)
522  igetter_ = new DQMStore::IGetter(this);
523  initializeFrom(pset);
524 
525  if(pset.getUntrackedParameter<bool>("forceResetOnBeginRun",false)) {
527  }
528  ar.preallocateSignal_.connect([this](edm::service::SystemBounds const& iBounds) {
529  if(iBounds.maxNumberOfStreams() > 1 ) {
530  enableMultiThread_ = true;
531  }
532  });
533  if(pset.getUntrackedParameter<bool>("forceResetOnBeginLumi",false) && enableMultiThread_ == false) {
534  forceResetOnBeginLumi_ = true;
536  }
537 }
IGetter * igetter_
Definition: DQMStore.h:723
T getUntrackedParameter(std::string const &, T const &) const
uint32_t streamId_
Definition: DQMStore.h:709
bool reset_
Definition: DQMStore.h:701
void initializeFrom(const edm::ParameterSet &)
Definition: DQMStore.cc:575
uint32_t moduleId_
Definition: DQMStore.h:710
Preallocate preallocateSignal_
signal is emitted before beginJob
unsigned int maxNumberOfStreams() const
Definition: SystemBounds.h:43
void forceReset(void)
Definition: DQMStore.cc:2097
unsigned verboseQT_
Definition: DQMStore.h:700
void watchPostSourceRun(PostSourceRun::slot_type const &iSlot)
uint32_t run_
Definition: DQMStore.h:708
std::string pwd_
Definition: DQMStore.h:713
IBooker * ibooker_
Definition: DQMStore.h:722
std::string readSelectedDirectory_
Definition: DQMStore.h:707
void watchPostSourceLumi(PostSourceLumi::slot_type const &iSlot)
unsigned verbose_
Definition: DQMStore.h:699
bool forceResetOnBeginLumi_
Definition: DQMStore.h:706
std::ofstream * stream_
Definition: DQMStore.h:711
bool collateHistograms_
Definition: DQMStore.h:703
void connect(U iFunc)
Definition: Signal.h:63
bool enableMultiThread_
Definition: DQMStore.h:704
DQMStore::DQMStore ( const edm::ParameterSet pset)

Definition at line 539 of file DQMStore.cc.

References ibooker_, igetter_, and initializeFrom().

540  : verbose_ (1),
541  verboseQT_ (1),
542  reset_ (false),
543  collateHistograms_ (false),
544  enableMultiThread_(false),
546  run_(0),
547  streamId_(0),
548  moduleId_(0),
549  stream_(nullptr),
550  pwd_ (""),
551  ibooker_(0),
552  igetter_(0)
553 {
554  if (!ibooker_)
555  ibooker_ = new DQMStore::IBooker(this);
556  if (!igetter_)
557  igetter_ = new DQMStore::IGetter(this);
558  initializeFrom(pset);
559 }
IGetter * igetter_
Definition: DQMStore.h:723
uint32_t streamId_
Definition: DQMStore.h:709
bool reset_
Definition: DQMStore.h:701
void initializeFrom(const edm::ParameterSet &)
Definition: DQMStore.cc:575
uint32_t moduleId_
Definition: DQMStore.h:710
unsigned verboseQT_
Definition: DQMStore.h:700
uint32_t run_
Definition: DQMStore.h:708
std::string pwd_
Definition: DQMStore.h:713
IBooker * ibooker_
Definition: DQMStore.h:722
std::string readSelectedDirectory_
Definition: DQMStore.h:707
unsigned verbose_
Definition: DQMStore.h:699
std::ofstream * stream_
Definition: DQMStore.h:711
bool collateHistograms_
Definition: DQMStore.h:703
bool enableMultiThread_
Definition: DQMStore.h:704
DQMStore::~DQMStore ( void  )

Definition at line 561 of file DQMStore.cc.

References alignCSCRings::e, citk::for(), i, reco::if(), qtests_, qtestspecs_, and stream_.

562 {
563  for (QCMap::iterator i = qtests_.begin(), e = qtests_.end(); i != e; ++i)
564  delete i->second;
565 
566  for (QTestSpecs::iterator i = qtestspecs_.begin(), e = qtestspecs_.end(); i != e; ++i)
567  delete i->first;
568 
569  if (stream_)
570  stream_->close();
571  delete stream_;
572 }
int i
Definition: DBlmapReader.cc:9
QCMap qtests_
Definition: DQMStore.h:717
QTestSpecs qtestspecs_
Definition: DQMStore.h:719
if(dp >Float(M_PI)) dp-
std::ofstream * stream_
Definition: DQMStore.h:711
for(const auto &isodef:isoDefs)
DQMStore::DQMStore ( const DQMStore )
private

Member Function Documentation

MonitorElement * DQMStore::book ( const std::string &  dir,
const std::string &  name,
const char *  context 
)
private

Definition at line 876 of file DQMStore.cc.

References assert(), gather_cfg::cout, data_, dirs_, findObject(), hlt_dqm_clientPB-live_cfg::me, mergePath(), moduleId_, eostools::move(), mergeVDriftHistosByStation::name, fed_dqm_sourceclient-live_cfg::path, print_trace(), run_, streamId_, AlCaHLTBitMon_QueryRunRegistry::string, and verbose_.

Referenced by book1D(), book1DD(), book1S(), book2D(), book2DD(), book2S(), book3D(), bookFloat(), bookInt(), bookProfile(), bookProfile2D(), and bookString().

879 {
880  assert(name.find('/') == std::string::npos);
881  if (verbose_ > 3)
882  print_trace(dir, name);
883 
884  // Check if the request monitor element already exists.
886  {
887  if (verbose_ > 1)
888  {
890  mergePath(path, dir, name);
891 
892  std::cout << "DQMStore: "
893  << context << ": monitor element '"
894  << path << "' already exists, resetting" << std::endl;
895  }
896  me->Reset();
897  return me;
898  }
899  else
900  {
901  // Create it and return for initialisation.
902  assert(dirs_.count(dir));
903  MonitorElement proto(&*dirs_.find(dir), name, run_, streamId_, moduleId_);
904  return &const_cast<MonitorElement &>(*data_.insert(std::move(proto)).first);
905  }
906 }
static void mergePath(std::string &path, const std::string &dir, const std::string &name)
Definition: DQMStore.cc:110
MonitorElement * findObject(const std::string &dir, const std::string &name, const uint32_t run=0, const uint32_t lumi=0, const uint32_t streamId=0, const uint32_t moduleId=0) const
Definition: DQMStore.cc:1905
uint32_t streamId_
Definition: DQMStore.h:709
assert(m_qm.get())
uint32_t moduleId_
Definition: DQMStore.h:710
def move
Definition: eostools.py:510
uint32_t run_
Definition: DQMStore.h:708
unsigned verbose_
Definition: DQMStore.h:699
MEMap data_
Definition: DQMStore.h:714
void print_trace(const std::string &dir, const std::string &name)
Definition: DQMStore.cc:635
tuple cout
Definition: gather_cfg.py:145
dbl *** dir
Definition: mlp_gen.cc:35
std::set< std::string > dirs_
Definition: DQMStore.h:715
template<class HISTO , class COLLATE >
MonitorElement * DQMStore::book ( const std::string &  dir,
const std::string &  name,
const char *  context,
int  kind,
HISTO *  h,
COLLATE  collate 
)
private

Definition at line 800 of file DQMStore.cc.

References assert(), collateHistograms_, gather_cfg::cout, data_, dir, dirs_, DQMNet::DQM_PROP_HAS_REFERENCE, findObject(), h, initialise(), class-composition::kind, hlt_dqm_clientPB-live_cfg::me, mergePath(), moduleId_, eostools::move(), mergeVDriftHistosByStation::name, MonitorElement::object_, fed_dqm_sourceclient-live_cfg::path, print_trace(), qtestspecs_, MonitorElement::Reset(), run_, s_referenceDirName, streamId_, AlCaHLTBitMon_QueryRunRegistry::string, and verbose_.

803 {
804  assert(name.find('/') == std::string::npos);
805  if (verbose_ > 3)
806  print_trace(dir, name);
808  mergePath(path, dir, name);
809 
810  // Put us in charge of h.
811  h->SetDirectory(0);
812 
813  // Check if the request monitor element already exists.
815  if (me)
816  {
817  if (collateHistograms_)
818  {
819  collate(me, h, verbose_);
820  delete h;
821  return me;
822  }
823  else
824  {
825  if (verbose_ > 1)
826  std::cout << "DQMStore: "
827  << context << ": monitor element '"
828  << path << "' already exists, collating" << std::endl;
829  me->Reset();
830  collate(me, h, verbose_);
831  delete h;
832  return me;
833  }
834  }
835  else
836  {
837  // Create and initialise core object.
838  assert(dirs_.count(dir));
839  MonitorElement proto(&*dirs_.find(dir), name, run_, streamId_, moduleId_);
840  me = const_cast<MonitorElement &>(*data_.insert(std::move(proto)).first)
842 
843  // Initialise quality test information.
844  QTestSpecs::iterator qi = qtestspecs_.begin();
845  QTestSpecs::iterator qe = qtestspecs_.end();
846  for ( ; qi != qe; ++qi)
847  {
848  if ( qi->first->match(path) )
849  me->addQReport(qi->second);
850  }
851 
852  // If we just booked a (plain) MonitorElement, and there is a reference
853  // MonitorElement with the same name, link the two together.
854  // The other direction is handled by the extract method.
855  std::string refdir;
856  refdir.reserve(s_referenceDirName.size() + dir.size() + 1);
857  refdir += s_referenceDirName;
858  refdir += '/';
859  refdir += dir;
860  MonitorElement* referenceME = findObject(refdir, name);
861  if (referenceME) {
862  // We have booked a new MonitorElement with a specific dir and name.
863  // Then, if we can find the corresponding MonitorElement in the reference
864  // dir we assign the object_ of the reference MonitorElement to the
865  // reference_ property of our new MonitorElement.
866  me->data_.flags |= DQMNet::DQM_PROP_HAS_REFERENCE;
867  me->reference_ = referenceME->object_;
868  }
869 
870  // Return the monitor element.
871  return me;
872  }
873 }
static void mergePath(std::string &path, const std::string &dir, const std::string &name)
Definition: DQMStore.cc:110
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
MonitorElement * findObject(const std::string &dir, const std::string &name, const uint32_t run=0, const uint32_t lumi=0, const uint32_t streamId=0, const uint32_t moduleId=0) const
Definition: DQMStore.cc:1905
uint32_t streamId_
Definition: DQMStore.h:709
assert(m_qm.get())
uint32_t moduleId_
Definition: DQMStore.h:710
static const uint32_t DQM_PROP_HAS_REFERENCE
Definition: DQMNet.h:53
QTestSpecs qtestspecs_
Definition: DQMStore.h:719
def move
Definition: eostools.py:510
uint32_t run_
Definition: DQMStore.h:708
MonitorElement * initialise(MonitorElement *me, const std::string &path)
unsigned verbose_
Definition: DQMStore.h:699
MEMap data_
Definition: DQMStore.h:714
static const std::string s_referenceDirName
Definition: DQMStore.cc:56
void print_trace(const std::string &dir, const std::string &name)
Definition: DQMStore.cc:635
tuple cout
Definition: gather_cfg.py:145
dbl *** dir
Definition: mlp_gen.cc:35
std::set< std::string > dirs_
Definition: DQMStore.h:715
bool collateHistograms_
Definition: DQMStore.h:703
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * DQMStore::book1D ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX 
)

Book 1D histogram.

Definition at line 1021 of file DQMStore.cc.

References pwd_.

Referenced by DQMFEDIntegrityClient::beginJob(), ConverterTester::beginJob(), SimplePhotonAnalyzer::beginJob(), StripValidationPlots::beginJob(), APVValidationPlots::beginJob(), MuonAlignment::beginJob(), ValidationHcalIsoTrackAlCaReco::beginJob(), MCEmbeddingValidationAnalyzer::beginJob(), RPCBxTest::beginRun(), hcaldqm::ContainerSingle1D::book(), MEtoMEComparitor::book(), hcaldqm::Container1D::book(), DQMStore::IBooker::book1D(), book1D(), SiStripBaseCondObjDQM::bookCumulMEs(), TrackerOfflineValidationSummary::bookHarvestingHists(), PixelVTXMonitor::bookHistograms(), DQMLumiMonitor::bookHistograms(), MCEmbeddingValidationAnalyzer::plotEntryTypeEvtWeight::bookHistograms(), MCEmbeddingValidationAnalyzer::plotEntryTypeMuonRadCorrUncertainty::bookHistograms(), MCEmbeddingValidationAnalyzer::plotEntryTypeL1ETM::bookHistograms(), MCEmbeddingValidationAnalyzer::leptonDistributionT< T >::bookHistograms(), MCEmbeddingValidationAnalyzer::electronDistributionExtra::bookHistograms(), MCEmbeddingValidationAnalyzer::tauDistributionExtra::bookHistograms(), MCEmbeddingValidationAnalyzer::leptonEfficiencyT< T >::bookHistograms(), MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::bookHistograms(), MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::bookHistograms(), MCEmbeddingValidationAnalyzer::metDistributionType::bookHistograms(), MCEmbeddingValidationAnalyzer::metL1TriggerEfficiencyType::bookHistograms(), SiStripBaseCondObjDQM::bookProfileMEs(), SiStripBaseCondObjDQM::bookSummaryCumulMEs(), dqmRegisterHistogram(), HarvestingAnalyzer::endJob(), HLTScalersClient::endLuminosityBlock(), DQMDcsInfoClient::endRun(), TauDQMHistEffProducer::endRun(), GlobalHitsProdHistStripper::endRun(), extract(), SiStripQualityDQM::fillGrandSummaryMEs(), SiStripSummaryCreator::getSummaryME(), HEff1DHit::HEff1DHit(), HEff2DHit::HEff2DHit(), HEff4DHit::HEff4DHit(), HLTScalersClient::HLTScalersClient(), HRes1DHit::HRes1DHit(), HRes2DHit::HRes2DHit(), HRes4DHit::HRes4DHit(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::initializeDQMHistograms(), LaserDQM::initMonitors(), L1ScalersClient::L1ScalersClient(), and MonitorElementsDb::MonitorElementsDb().

1023 {
1024  return book1D(pwd_, name, new TH1F(name, title, nchX, lowX, highX));
1025 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:1021
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::book1D ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX 
)

Book 1D histogram.

Definition at line 1029 of file DQMStore.cc.

References book1D(), and pwd_.

1031 {
1032  return book1D(pwd_, name, new TH1F(name.c_str(), title.c_str(), nchX, lowX, highX));
1033 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:1021
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::book1D ( const char *  name,
const char *  title,
int  nchX,
const float *  xbinsize 
)

Book 1D variable bin histogram.

Definition at line 1069 of file DQMStore.cc.

References book1D(), and pwd_.

1071 {
1072  return book1D(pwd_, name, new TH1F(name, title, nchX, xbinsize));
1073 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:1021
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::book1D ( const std::string &  name,
const std::string &  title,
int  nchX,
const float *  xbinsize 
)

Book 1D variable bin histogram.

Definition at line 1077 of file DQMStore.cc.

References book1D(), and pwd_.

1079 {
1080  return book1D(pwd_, name, new TH1F(name.c_str(), title.c_str(), nchX, xbinsize));
1081 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:1021
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::book1D ( const char *  name,
TH1F *  h 
)

Book 1D histogram by cloning an existing histogram.

Definition at line 1085 of file DQMStore.cc.

References book1D(), and pwd_.

1086 {
1087  return book1D(pwd_, name, static_cast<TH1F *>(source->Clone(name)));
1088 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:1021
std::string pwd_
Definition: DQMStore.h:713
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book1D ( const std::string &  name,
TH1F *  h 
)

Book 1D histogram by cloning an existing histogram.

Definition at line 1092 of file DQMStore.cc.

References book1D(), and pwd_.

1093 {
1094  return book1D(pwd_, name, static_cast<TH1F *>(source->Clone(name.c_str())));
1095 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:1021
std::string pwd_
Definition: DQMStore.h:713
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book1D ( const std::string &  dir,
const std::string &  name,
TH1F *  h 
)
private

Book 1D histogram based on TH1F.

Definition at line 1000 of file DQMStore.cc.

References book(), collate1D(), and MonitorElement::DQM_KIND_TH1F.

1001 {
1002  return book(dir, name, "book1D", MonitorElement::DQM_KIND_TH1F, h, collate1D);
1003 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:876
static void collate1D(MonitorElement *me, TH1F *h, unsigned verbose)
Definition: DQMStore.cc:1588
dbl *** dir
Definition: mlp_gen.cc:35
MonitorElement * DQMStore::book1DD ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX 
)

Book 1S histogram.

Definition at line 1053 of file DQMStore.cc.

References pwd_.

Referenced by MEtoMEComparitor::book(), DQMStore::IBooker::book1DD(), book1DD(), and extract().

1055 {
1056  return book1DD(pwd_, name, new TH1D(name, title, nchX, lowX, highX));
1057 }
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1053
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::book1DD ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX 
)

Book 1S histogram.

Definition at line 1061 of file DQMStore.cc.

References book1DD(), and pwd_.

1063 {
1064  return book1DD(pwd_, name, new TH1D(name.c_str(), title.c_str(), nchX, lowX, highX));
1065 }
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1053
std::string pwd_
Definition: DQMStore.h:713
MonitorElement* DQMStore::book1DD ( const char *  name,
const char *  title,
int  nchX,
const float *  xbinsize 
)
MonitorElement* DQMStore::book1DD ( const std::string &  name,
const std::string &  title,
int  nchX,
const float *  xbinsize 
)
MonitorElement * DQMStore::book1DD ( const char *  name,
TH1D *  h 
)

Book 1D double histogram by cloning an existing histogram.

Definition at line 1113 of file DQMStore.cc.

References book1DD(), and pwd_.

1114 {
1115  return book1DD(pwd_, name, static_cast<TH1D *>(source->Clone(name)));
1116 }
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1053
std::string pwd_
Definition: DQMStore.h:713
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book1DD ( const std::string &  name,
TH1D *  h 
)

Book 1D double histogram by cloning an existing histogram.

Definition at line 1120 of file DQMStore.cc.

References book1DD(), and pwd_.

1121 {
1122  return book1DD(pwd_, name, static_cast<TH1D *>(source->Clone(name.c_str())));
1123 }
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1053
std::string pwd_
Definition: DQMStore.h:713
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book1DD ( const std::string &  dir,
const std::string &  name,
TH1D *  h 
)
private

Book 1D histogram based on TH1D.

Definition at line 1014 of file DQMStore.cc.

References book(), collate1DD(), and MonitorElement::DQM_KIND_TH1D.

1015 {
1016  return book(dir, name, "book1DD", MonitorElement::DQM_KIND_TH1D, h, collate1DD);
1017 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:876
static void collate1DD(MonitorElement *me, TH1D *h, unsigned verbose)
Definition: DQMStore.cc:1602
dbl *** dir
Definition: mlp_gen.cc:35
MonitorElement * DQMStore::book1S ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX 
)

Book 1S histogram.

Definition at line 1037 of file DQMStore.cc.

References pwd_.

Referenced by MEtoMEComparitor::book(), DQMStore::IBooker::book1S(), book1S(), dqmRegisterHistogram(), and extract().

1039 {
1040  return book1S(pwd_, name, new TH1S(name, title, nchX, lowX, highX));
1041 }
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * book1S(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1037
MonitorElement * DQMStore::book1S ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX 
)

Book 1S histogram.

Definition at line 1045 of file DQMStore.cc.

References book1S(), and pwd_.

1047 {
1048  return book1S(pwd_, name, new TH1S(name.c_str(), title.c_str(), nchX, lowX, highX));
1049 }
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * book1S(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1037
MonitorElement* DQMStore::book1S ( const char *  name,
const char *  title,
int  nchX,
const float *  xbinsize 
)
MonitorElement* DQMStore::book1S ( const std::string &  name,
const std::string &  title,
int  nchX,
const float *  xbinsize 
)
MonitorElement * DQMStore::book1S ( const char *  name,
TH1S *  h 
)

Book 1S histogram by cloning an existing histogram.

Definition at line 1099 of file DQMStore.cc.

References book1S(), and pwd_.

1100 {
1101  return book1S(pwd_, name, static_cast<TH1S *>(source->Clone(name)));
1102 }
std::string pwd_
Definition: DQMStore.h:713
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * book1S(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1037
MonitorElement * DQMStore::book1S ( const std::string &  name,
TH1S *  h 
)

Book 1S histogram by cloning an existing histogram.

Definition at line 1106 of file DQMStore.cc.

References book1S(), and pwd_.

1107 {
1108  return book1S(pwd_, name, static_cast<TH1S *>(source->Clone(name.c_str())));
1109 }
std::string pwd_
Definition: DQMStore.h:713
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * book1S(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1037
MonitorElement * DQMStore::book1S ( const std::string &  dir,
const std::string &  name,
TH1S *  h 
)
private

Book 1D histogram based on TH1S.

Definition at line 1007 of file DQMStore.cc.

References book(), collate1S(), and MonitorElement::DQM_KIND_TH1S.

1008 {
1009  return book(dir, name, "book1S", MonitorElement::DQM_KIND_TH1S, h, collate1S);
1010 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:876
static void collate1S(MonitorElement *me, TH1S *h, unsigned verbose)
Definition: DQMStore.cc:1595
dbl *** dir
Definition: mlp_gen.cc:35
MonitorElement * DQMStore::book2D ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY 
)
MonitorElement * DQMStore::book2D ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY 
)

Book 2D histogram.

Definition at line 1160 of file DQMStore.cc.

References book2D(), and pwd_.

1163 {
1164  return book2D(pwd_, name, new TH2F(name.c_str(), title.c_str(),
1165  nchX, lowX, highX,
1166  nchY, lowY, highY));
1167 }
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1149
MonitorElement * DQMStore::book2D ( const char *  name,
const char *  title,
int  nchX,
const float *  xbinsize,
int  nchY,
const float *  ybinsize 
)

Book 2D variable bin histogram.

Definition at line 1215 of file DQMStore.cc.

References book2D(), and pwd_.

1217 {
1218  return book2D(pwd_, name, new TH2F(name, title,
1219  nchX, xbinsize, nchY, ybinsize));
1220 }
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1149
MonitorElement * DQMStore::book2D ( const std::string &  name,
const std::string &  title,
int  nchX,
const float *  xbinsize,
int  nchY,
const float *  ybinsize 
)

Book 2D variable bin histogram.

Definition at line 1224 of file DQMStore.cc.

References book2D(), and pwd_.

1226 {
1227  return book2D(pwd_, name, new TH2F(name.c_str(), title.c_str(),
1228  nchX, xbinsize, nchY, ybinsize));
1229 }
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1149
MonitorElement * DQMStore::book2D ( const char *  name,
TH2F *  h 
)

Book 2D histogram by cloning an existing histogram.

Definition at line 1233 of file DQMStore.cc.

References book2D(), and pwd_.

1234 {
1235  return book2D(pwd_, name, static_cast<TH2F *>(source->Clone(name)));
1236 }
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1149
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book2D ( const std::string &  name,
TH2F *  h 
)

Book 2D histogram by cloning an existing histogram.

Definition at line 1240 of file DQMStore.cc.

References book2D(), and pwd_.

1241 {
1242  return book2D(pwd_, name, static_cast<TH2F *>(source->Clone(name.c_str())));
1243 }
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1149
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book2D ( const std::string &  dir,
const std::string &  name,
TH2F *  h 
)
private

Book 2D histogram based on TH2F.

Definition at line 1128 of file DQMStore.cc.

References book(), collate2D(), and MonitorElement::DQM_KIND_TH2F.

1129 {
1130  return book(dir, name, "book2D", MonitorElement::DQM_KIND_TH2F, h, collate2D);
1131 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:876
dbl *** dir
Definition: mlp_gen.cc:35
static void collate2D(MonitorElement *me, TH2F *h, unsigned verbose)
Definition: DQMStore.cc:1609
MonitorElement * DQMStore::book2DD ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY 
)

Book 2D double histogram.

Definition at line 1193 of file DQMStore.cc.

References pwd_.

Referenced by AcceptanceHistoProducer::beginJob(), DQMStore::IBooker::book2DD(), book2DD(), and extract().

1196 {
1197  return book2DD(pwd_, name, new TH2D(name, title,
1198  nchX, lowX, highX,
1199  nchY, lowY, highY));
1200 }
MonitorElement * book2DD(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D double histogram.
Definition: DQMStore.cc:1193
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::book2DD ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY 
)

Book 2S histogram.

Definition at line 1204 of file DQMStore.cc.

References book2DD(), and pwd_.

1207 {
1208  return book2DD(pwd_, name, new TH2D(name.c_str(), title.c_str(),
1209  nchX, lowX, highX,
1210  nchY, lowY, highY));
1211 }
MonitorElement * book2DD(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D double histogram.
Definition: DQMStore.cc:1193
std::string pwd_
Definition: DQMStore.h:713
MonitorElement* DQMStore::book2DD ( const char *  name,
const char *  title,
int  nchX,
const float *  xbinsize,
int  nchY,
const float *  ybinsize 
)
MonitorElement* DQMStore::book2DD ( const std::string &  name,
const std::string &  title,
int  nchX,
const float *  xbinsize,
int  nchY,
const float *  ybinsize 
)
MonitorElement * DQMStore::book2DD ( const char *  name,
TH2D *  h 
)

Book 2DS histogram by cloning an existing histogram.

Definition at line 1261 of file DQMStore.cc.

References book2DD(), and pwd_.

1262 {
1263  return book2DD(pwd_, name, static_cast<TH2D *>(source->Clone(name)));
1264 }
MonitorElement * book2DD(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D double histogram.
Definition: DQMStore.cc:1193
std::string pwd_
Definition: DQMStore.h:713
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book2DD ( const std::string &  name,
TH2D *  h 
)

Book 2DS histogram by cloning an existing histogram.

Definition at line 1268 of file DQMStore.cc.

References book2DD(), and pwd_.

1269 {
1270  return book2DD(pwd_, name, static_cast<TH2D *>(source->Clone(name.c_str())));
1271 }
MonitorElement * book2DD(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D double histogram.
Definition: DQMStore.cc:1193
std::string pwd_
Definition: DQMStore.h:713
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book2DD ( const std::string &  dir,
const std::string &  name,
TH2D *  h 
)
private

Book 2D histogram based on TH2D.

Definition at line 1142 of file DQMStore.cc.

References book(), collate2DD(), and MonitorElement::DQM_KIND_TH2D.

1143 {
1144  return book(dir, name, "book2DD", MonitorElement::DQM_KIND_TH2D, h, collate2DD);
1145 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
static void collate2DD(MonitorElement *me, TH2D *h, unsigned verbose)
Definition: DQMStore.cc:1623
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:876
dbl *** dir
Definition: mlp_gen.cc:35
MonitorElement * DQMStore::book2S ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY 
)

Book 2S histogram.

Definition at line 1171 of file DQMStore.cc.

References pwd_.

Referenced by DQMStore::IBooker::book2S(), book2S(), dqmRegisterHistogram(), and extract().

1174 {
1175  return book2S(pwd_, name, new TH2S(name, title,
1176  nchX, lowX, highX,
1177  nchY, lowY, highY));
1178 }
MonitorElement * book2S(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2S histogram.
Definition: DQMStore.cc:1171
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::book2S ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY 
)

Book 2S histogram.

Definition at line 1182 of file DQMStore.cc.

References book2S(), and pwd_.

1185 {
1186  return book2S(pwd_, name, new TH2S(name.c_str(), title.c_str(),
1187  nchX, lowX, highX,
1188  nchY, lowY, highY));
1189 }
MonitorElement * book2S(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2S histogram.
Definition: DQMStore.cc:1171
std::string pwd_
Definition: DQMStore.h:713
MonitorElement* DQMStore::book2S ( const char *  name,
const char *  title,
int  nchX,
const float *  xbinsize,
int  nchY,
const float *  ybinsize 
)
MonitorElement* DQMStore::book2S ( const std::string &  name,
const std::string &  title,
int  nchX,
const float *  xbinsize,
int  nchY,
const float *  ybinsize 
)
MonitorElement * DQMStore::book2S ( const char *  name,
TH2S *  h 
)

Book 2DS histogram by cloning an existing histogram.

Definition at line 1247 of file DQMStore.cc.

References book2S(), and pwd_.

1248 {
1249  return book2S(pwd_, name, static_cast<TH2S *>(source->Clone(name)));
1250 }
MonitorElement * book2S(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2S histogram.
Definition: DQMStore.cc:1171
std::string pwd_
Definition: DQMStore.h:713
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book2S ( const std::string &  name,
TH2S *  h 
)

Book 2DS histogram by cloning an existing histogram.

Definition at line 1254 of file DQMStore.cc.

References book2S(), and pwd_.

1255 {
1256  return book2S(pwd_, name, static_cast<TH2S *>(source->Clone(name.c_str())));
1257 }
MonitorElement * book2S(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2S histogram.
Definition: DQMStore.cc:1171
std::string pwd_
Definition: DQMStore.h:713
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book2S ( const std::string &  dir,
const std::string &  name,
TH2S *  h 
)
private

Book 2D histogram based on TH2S.

Definition at line 1135 of file DQMStore.cc.

References book(), collate2S(), and MonitorElement::DQM_KIND_TH2S.

1136 {
1137  return book(dir, name, "book2S", MonitorElement::DQM_KIND_TH2S, h, collate2S);
1138 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:876
dbl *** dir
Definition: mlp_gen.cc:35
static void collate2S(MonitorElement *me, TH2S *h, unsigned verbose)
Definition: DQMStore.cc:1616
MonitorElement * DQMStore::book3D ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY,
int  nchZ,
double  lowZ,
double  highZ 
)

Book 3D histogram.

Definition at line 1283 of file DQMStore.cc.

References pwd_.

Referenced by ConverterTester::beginJob(), DQMStore::IBooker::book3D(), book3D(), dqmRegisterHistogram(), and extract().

1287 {
1288  return book3D(pwd_, name, new TH3F(name, title,
1289  nchX, lowX, highX,
1290  nchY, lowY, highY,
1291  nchZ, lowZ, highZ));
1292 }
MonitorElement * book3D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ)
Book 3D histogram.
Definition: DQMStore.cc:1283
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::book3D ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY,
int  nchZ,
double  lowZ,
double  highZ 
)

Book 3D histogram.

Definition at line 1296 of file DQMStore.cc.

References book3D(), and pwd_.

1300 {
1301  return book3D(pwd_, name, new TH3F(name.c_str(), title.c_str(),
1302  nchX, lowX, highX,
1303  nchY, lowY, highY,
1304  nchZ, lowZ, highZ));
1305 }
MonitorElement * book3D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ)
Book 3D histogram.
Definition: DQMStore.cc:1283
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::book3D ( const char *  name,
TH3F *  h 
)

Book 3D histogram by cloning an existing histogram.

Definition at line 1309 of file DQMStore.cc.

References book3D(), and pwd_.

1310 {
1311  return book3D(pwd_, name, static_cast<TH3F *>(source->Clone(name)));
1312 }
MonitorElement * book3D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ)
Book 3D histogram.
Definition: DQMStore.cc:1283
std::string pwd_
Definition: DQMStore.h:713
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book3D ( const std::string &  name,
TH3F *  h 
)

Book 3D histogram by cloning an existing histogram.

Definition at line 1316 of file DQMStore.cc.

References book3D(), and pwd_.

1317 {
1318  return book3D(pwd_, name, static_cast<TH3F *>(source->Clone(name.c_str())));
1319 }
MonitorElement * book3D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ)
Book 3D histogram.
Definition: DQMStore.cc:1283
std::string pwd_
Definition: DQMStore.h:713
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book3D ( const std::string &  dir,
const std::string &  name,
TH3F *  h 
)
private

Book 3D histogram based on TH3F.

Definition at line 1276 of file DQMStore.cc.

References book(), collate3D(), and MonitorElement::DQM_KIND_TH3F.

1277 {
1278  return book(dir, name, "book3D", MonitorElement::DQM_KIND_TH3F, h, collate3D);
1279 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
static void collate3D(MonitorElement *me, TH3F *h, unsigned verbose)
Definition: DQMStore.cc:1630
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:876
dbl *** dir
Definition: mlp_gen.cc:35
MonitorElement * DQMStore::bookFloat ( const char *  name)
MonitorElement * DQMStore::bookFloat ( const std::string &  name)

Book float.

Definition at line 963 of file DQMStore.cc.

References bookFloat(), and pwd_.

964 {
965  return bookFloat(pwd_, name);
966 }
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:958
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::bookFloat ( const std::string &  dir,
const std::string &  name 
)
private

Book float.

Definition at line 941 of file DQMStore.cc.

References book(), collateHistograms_, MonitorElement::DQM_KIND_REAL, findObject(), MonitorElement::initialise(), hlt_dqm_clientPB-live_cfg::me, moduleId_, run_, and streamId_.

942 {
943  if (collateHistograms_)
944  {
946  {
947  me->Fill(0.);
948  return me;
949  }
950  }
951 
952  return book(dir, name, "bookFloat")
954 }
MonitorElement * initialise(Kind kind)
MonitorElement * findObject(const std::string &dir, const std::string &name, const uint32_t run=0, const uint32_t lumi=0, const uint32_t streamId=0, const uint32_t moduleId=0) const
Definition: DQMStore.cc:1905
uint32_t streamId_
Definition: DQMStore.h:709
uint32_t moduleId_
Definition: DQMStore.h:710
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:876
uint32_t run_
Definition: DQMStore.h:708
dbl *** dir
Definition: mlp_gen.cc:35
bool collateHistograms_
Definition: DQMStore.h:703
MonitorElement * DQMStore::bookInt ( const char *  name)
MonitorElement * DQMStore::bookInt ( const std::string &  name)

Book int.

Definition at line 933 of file DQMStore.cc.

References bookInt(), and pwd_.

934 {
935  return bookInt(pwd_, name);
936 }
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:928
MonitorElement * DQMStore::bookInt ( const std::string &  dir,
const std::string &  name 
)
private

Book int.

Definition at line 911 of file DQMStore.cc.

References book(), collateHistograms_, MonitorElement::DQM_KIND_INT, findObject(), MonitorElement::initialise(), hlt_dqm_clientPB-live_cfg::me, moduleId_, run_, and streamId_.

912 {
913  if (collateHistograms_)
914  {
916  {
917  me->Fill(0);
918  return me;
919  }
920  }
921 
922  return book(dir, name, "bookInt")
924 }
MonitorElement * initialise(Kind kind)
MonitorElement * findObject(const std::string &dir, const std::string &name, const uint32_t run=0, const uint32_t lumi=0, const uint32_t streamId=0, const uint32_t moduleId=0) const
Definition: DQMStore.cc:1905
uint32_t streamId_
Definition: DQMStore.h:709
uint32_t moduleId_
Definition: DQMStore.h:710
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:876
uint32_t run_
Definition: DQMStore.h:708
dbl *** dir
Definition: mlp_gen.cc:35
bool collateHistograms_
Definition: DQMStore.h:703
MonitorElement * DQMStore::bookProfile ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY,
const char *  option = "s" 
)

Book profile. Option is one of: " ", "s" (default), "i", "G" (see TProfile::BuildOptions). The number of channels in Y is disregarded in a profile plot.

Definition at line 1335 of file DQMStore.cc.

References pwd_.

Referenced by ConverterTester::beginJob(), StripValidationPlots::beginJob(), SiStripLAProfileBooker::beginRun(), hcaldqm::ContainerSingleProf1D::book(), hcaldqm::ContainerProf1D::book(), DQMLumiMonitor::bookHistograms(), DQMStore::IBooker::bookProfile(), bookProfile(), SiStripBaseCondObjDQM::bookSummaryMEs(), SiStripBaseCondObjDQM::bookSummaryProfileMEs(), dqmRegisterHistogram(), extract(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::initializeDQMHistograms(), and MonitorElementsDb::MonitorElementsDb().

1339 {
1340  return bookProfile(pwd_, name, new TProfile(name, title,
1341  nchX, lowX, highX,
1342  lowY, highY,
1343  option));
1344 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1335
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::bookProfile ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY,
const char *  option = "s" 
)

Book profile. Option is one of: " ", "s" (default), "i", "G" (see TProfile::BuildOptions). The number of channels in Y is disregarded in a profile plot.

Definition at line 1350 of file DQMStore.cc.

References bookProfile(), and pwd_.

1354 {
1355  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1356  nchX, lowX, highX,
1357  lowY, highY,
1358  option));
1359 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1335
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::bookProfile ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX,
double  lowY,
double  highY,
const char *  option = "s" 
)

Book profile. Option is one of: " ", "s" (default), "i", "G" (see TProfile::BuildOptions). The number of channels in Y is disregarded in a profile plot.

Definition at line 1365 of file DQMStore.cc.

References bookProfile(), and pwd_.

1369 {
1370  return bookProfile(pwd_, name, new TProfile(name, title,
1371  nchX, lowX, highX,
1372  lowY, highY,
1373  option));
1374 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1335
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::bookProfile ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
double  lowY,
double  highY,
const char *  option = "s" 
)

Book profile. Option is one of: " ", "s" (default), "i", "G" (see TProfile::BuildOptions). The number of channels in Y is disregarded in a profile plot.

Definition at line 1380 of file DQMStore.cc.

References bookProfile(), and pwd_.

1384 {
1385  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1386  nchX, lowX, highX,
1387  lowY, highY,
1388  option));
1389 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1335
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::bookProfile ( const char *  name,
const char *  title,
int  nchX,
const double *  xbinsize,
int  nchY,
double  lowY,
double  highY,
const char *  option = "s" 
)

Book variable bin profile. Option is one of: " ", "s" (default), "i", "G" (see TProfile::BuildOptions). The number of channels in Y is disregarded in a profile plot.

Definition at line 1395 of file DQMStore.cc.

References bookProfile(), and pwd_.

1399 {
1400  return bookProfile(pwd_, name, new TProfile(name, title,
1401  nchX, xbinsize,
1402  lowY, highY,
1403  option));
1404 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1335
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::bookProfile ( const std::string &  name,
const std::string &  title,
int  nchX,
const double *  xbinsize,
int  nchY,
double  lowY,
double  highY,
const char *  option = "s" 
)

Book variable bin profile. Option is one of: " ", "s" (default), "i", "G" (see TProfile::BuildOptions). The number of channels in Y is disregarded in a profile plot.

Definition at line 1410 of file DQMStore.cc.

References bookProfile(), and pwd_.

1414 {
1415  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1416  nchX, xbinsize,
1417  lowY, highY,
1418  option));
1419 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1335
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::bookProfile ( const char *  name,
const char *  title,
int  nchX,
const double *  xbinsize,
double  lowY,
double  highY,
const char *  option = "s" 
)

Book variable bin profile. Option is one of: " ", "s" (default), "i", "G" (see TProfile::BuildOptions). The number of channels in Y is disregarded in a profile plot.

Definition at line 1425 of file DQMStore.cc.

References bookProfile(), and pwd_.

1429 {
1430  return bookProfile(pwd_, name, new TProfile(name, title,
1431  nchX, xbinsize,
1432  lowY, highY,
1433  option));
1434 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1335
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::bookProfile ( const std::string &  name,
const std::string &  title,
int  nchX,
const double *  xbinsize,
double  lowY,
double  highY,
const char *  option = "s" 
)

Book variable bin profile. Option is one of: " ", "s" (default), "i", "G" (see TProfile::BuildOptions). The number of channels in Y is disregarded in a profile plot.

Definition at line 1440 of file DQMStore.cc.

References bookProfile(), and pwd_.

1444 {
1445  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1446  nchX, xbinsize,
1447  lowY, highY,
1448  option));
1449 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1335
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::bookProfile ( const char *  name,
TProfile *  h 
)

Book TProfile by cloning an existing profile.

Definition at line 1453 of file DQMStore.cc.

References bookProfile(), and pwd_.

1454 {
1455  return bookProfile(pwd_, name, static_cast<TProfile *>(source->Clone(name)));
1456 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1335
std::string pwd_
Definition: DQMStore.h:713
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::bookProfile ( const std::string &  name,
TProfile *  h 
)

Book TProfile by cloning an existing profile.

Definition at line 1460 of file DQMStore.cc.

References bookProfile(), and pwd_.

1461 {
1462  return bookProfile(pwd_, name, static_cast<TProfile *>(source->Clone(name.c_str())));
1463 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1335
std::string pwd_
Definition: DQMStore.h:713
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::bookProfile ( const std::string &  dir,
const std::string &  name,
TProfile *  h 
)
private

Book profile histogram based on TProfile.

Definition at line 1324 of file DQMStore.cc.

References book(), collateProfile(), and MonitorElement::DQM_KIND_TPROFILE.

1325 {
1326  return book(dir, name, "bookProfile",
1328  h, collateProfile);
1329 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
static void collateProfile(MonitorElement *me, TProfile *h, unsigned verbose)
Definition: DQMStore.cc:1637
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:876
dbl *** dir
Definition: mlp_gen.cc:35
MonitorElement * DQMStore::bookProfile2D ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY,
int  nchZ,
double  lowZ,
double  highZ,
const char *  option = "s" 
)

Book 2-D profile. Option is one of: " ", "s" (default), "i", "G" (see TProfile2D::BuildOptions). The number of channels in Z is disregarded in a 2-D profile.

Definition at line 1479 of file DQMStore.cc.

References pwd_.

Referenced by ConverterTester::beginJob(), hcaldqm::ContainerSingleProf2D::book(), hcaldqm::ContainerProf2D::book(), DQMLumiMonitor::bookHistograms(), DQMStore::IBooker::bookProfile2D(), bookProfile2D(), TkHistoMap::createTkHistoMap(), dqmRegisterHistogram(), extract(), and MonitorElementsDb::MonitorElementsDb().

1484 {
1485  return bookProfile2D(pwd_, name, new TProfile2D(name, title,
1486  nchX, lowX, highX,
1487  nchY, lowY, highY,
1488  lowZ, highZ,
1489  option));
1490 }
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
Definition: DQMStore.cc:1479
MonitorElement * DQMStore::bookProfile2D ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY,
int  nchZ,
double  lowZ,
double  highZ,
const char *  option = "s" 
)

Book 2-D profile. Option is one of: " ", "s" (default), "i", "G" (see TProfile2D::BuildOptions). The number of channels in Z is disregarded in a 2-D profile.

Definition at line 1496 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1501 {
1502  return bookProfile2D(pwd_, name, new TProfile2D(name.c_str(), title.c_str(),
1503  nchX, lowX, highX,
1504  nchY, lowY, highY,
1505  lowZ, highZ,
1506  option));
1507 }
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
Definition: DQMStore.cc:1479
MonitorElement * DQMStore::bookProfile2D ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY,
double  lowZ,
double  highZ,
const char *  option = "s" 
)

Book 2-D profile. Option is one of: " ", "s" (default), "i", "G" (see TProfile2D::BuildOptions). The number of channels in Z is disregarded in a 2-D profile.

Definition at line 1513 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1518 {
1519  return bookProfile2D(pwd_, name, new TProfile2D(name, title,
1520  nchX, lowX, highX,
1521  nchY, lowY, highY,
1522  lowZ, highZ,
1523  option));
1524 }
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
Definition: DQMStore.cc:1479
MonitorElement * DQMStore::bookProfile2D ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY,
double  lowZ,
double  highZ,
const char *  option = "s" 
)

Book 2-D profile. Option is one of: " ", "s" (default), "i", "G" (see TProfile2D::BuildOptions). The number of channels in Z is disregarded in a 2-D profile.

Definition at line 1530 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1535 {
1536  return bookProfile2D(pwd_, name, new TProfile2D(name.c_str(), title.c_str(),
1537  nchX, lowX, highX,
1538  nchY, lowY, highY,
1539  lowZ, highZ,
1540  option));
1541 }
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
Definition: DQMStore.cc:1479
MonitorElement * DQMStore::bookProfile2D ( const char *  name,
TProfile2D *  h 
)

Book TProfile2D by cloning an existing profile.

Definition at line 1545 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1546 {
1547  return bookProfile2D(pwd_, name, static_cast<TProfile2D *>(source->Clone(name)));
1548 }
std::string pwd_
Definition: DQMStore.h:713
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
Definition: DQMStore.cc:1479
MonitorElement * DQMStore::bookProfile2D ( const std::string &  name,
TProfile2D *  h 
)

Book TProfile2D by cloning an existing profile.

Definition at line 1552 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1553 {
1554  return bookProfile2D(pwd_, name, static_cast<TProfile2D *>(source->Clone(name.c_str())));
1555 }
std::string pwd_
Definition: DQMStore.h:713
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
Definition: DQMStore.cc:1479
MonitorElement * DQMStore::bookProfile2D ( const std::string &  folder,
const std::string &  name,
TProfile2D *  h 
)
private

Book 2D profile histogram based on TProfile2D.

Definition at line 1468 of file DQMStore.cc.

References book(), collateProfile2D(), and MonitorElement::DQM_KIND_TPROFILE2D.

1469 {
1470  return book(dir, name, "bookProfile2D",
1472  h, collateProfile2D);
1473 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:876
static void collateProfile2D(MonitorElement *me, TProfile2D *h, unsigned verbose)
Definition: DQMStore.cc:1647
dbl *** dir
Definition: mlp_gen.cc:35
MonitorElement * DQMStore::bookString ( const char *  name,
const char *  value 
)

Book string.

Definition at line 987 of file DQMStore.cc.

References pwd_.

Referenced by DQMFileReader::beginJob(), ConverterTester::beginJob(), DQMDcsInfoClient::beginRun(), DQMStore::IBooker::bookString(), bookString(), extract(), and DQMFileSaver::saveForOffline().

988 { return bookString(pwd_, name, value); }
MonitorElement * bookString(const char *name, const char *value)
Book string.
Definition: DQMStore.cc:987
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::bookString ( const std::string &  name,
const std::string &  value 
)

Book string.

Definition at line 992 of file DQMStore.cc.

References bookString(), and pwd_.

993 {
994  return bookString(pwd_, name, value);
995 }
MonitorElement * bookString(const char *name, const char *value)
Book string.
Definition: DQMStore.cc:987
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::bookString ( const std::string &  dir,
const std::string &  name,
const std::string &  value 
)
private

Book string.

Definition at line 971 of file DQMStore.cc.

References book(), collateHistograms_, MonitorElement::DQM_KIND_STRING, findObject(), MonitorElement::initialise(), hlt_dqm_clientPB-live_cfg::me, moduleId_, run_, and streamId_.

974 {
975  if (collateHistograms_)
976  {
978  return me;
979  }
980 
981  return book(dir, name, "bookString")
983 }
MonitorElement * initialise(Kind kind)
MonitorElement * findObject(const std::string &dir, const std::string &name, const uint32_t run=0, const uint32_t lumi=0, const uint32_t streamId=0, const uint32_t moduleId=0) const
Definition: DQMStore.cc:1905
uint32_t streamId_
Definition: DQMStore.h:709
uint32_t moduleId_
Definition: DQMStore.h:710
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:876
uint32_t run_
Definition: DQMStore.h:708
dbl *** dir
Definition: mlp_gen.cc:35
bool collateHistograms_
Definition: DQMStore.h:703
template<typename iFunc >
void DQMStore::bookTransaction ( iFunc  f,
uint32_t  run,
uint32_t  streamId,
uint32_t  moduleId 
)
inline

Definition at line 245 of file DQMStore.h.

References book_mutex_, enableMultiThread_, f, ibooker_, moduleId_, DTTTrigCorrFirst::run, run_, and streamId_.

Referenced by DQMEDAnalyzer::beginRun(), and thread_unsafe::DQMEDAnalyzer::beginRun().

248  {
249  std::lock_guard<std::mutex> guard(book_mutex_);
250  /* If enableMultiThread is not enabled we do not set run_,
251  streamId_ and moduleId_ to 0, since we rely on their default
252  initialization in DQMStore constructor. */
253  if (enableMultiThread_) {
254  run_ = run;
255  streamId_ = streamId;
256  moduleId_ = moduleId;
257  }
258  f(*ibooker_);
259 
260  /* Initialize to 0 the run_, streamId_ and moduleId_ variables
261  in case we run in mixed conditions with DQMEDAnalyzers and
262  legacy modules */
263  if (enableMultiThread_) {
264  run_ = 0;
265  streamId_ = 0;
266  moduleId_ = 0;
267  }
268  }
uint32_t streamId_
Definition: DQMStore.h:709
uint32_t moduleId_
Definition: DQMStore.h:710
std::mutex book_mutex_
Definition: DQMStore.h:721
double f[11][100]
uint32_t run_
Definition: DQMStore.h:708
IBooker * ibooker_
Definition: DQMStore.h:722
bool enableMultiThread_
Definition: DQMStore.h:704
void DQMStore::cd ( void  )

go to top directory (ie. root)

Definition at line 704 of file DQMStore.cc.

References setCurrentFolder().

Referenced by SiStripDcsInfo::addBadModules(), DQMFileReader::beginJob(), DQMDcsInfoClient::beginRun(), SiStripCertificationInfo::bookSiStripCertificationMEs(), SiStripQualityChecker::bookStatus(), SiStripDaqInfo::bookStatus(), SiStripDcsInfo::bookStatus(), DQMStore::IBooker::cd(), SiStripTrackerMapCreator::createForOffline(), SiStripTrackerMapCreator::createInfoFile(), SiStripSummaryCreator::createSummary(), SiStripActionExecutor::createSummary(), SiStripActionExecutor::createSummaryOffline(), StripValidationPlots::endJob(), APVValidationPlots::endJob(), DQMDcsInfoClient::endRun(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::extractBadAPVSandStrips(), SiStripQualityChecker::fillDetectorStatus(), SiStripQualityChecker::fillDetectorStatusAtLumi(), SiStripQualityChecker::fillFaultyModuleStatus(), SiStripSummaryCreator::fillGrandSummaryHistos(), SiStripCertificationInfo::fillSiStripCertificationMEs(), SiStripCertificationInfo::fillSiStripCertificationMEsAtLumi(), SiStripQualityChecker::fillSubDetStatus(), SiStripSummaryCreator::fillSummaryHistos(), SiStripDaqInfo::findExcludedModule(), dqm_interfaces.DQMcommunicator::get_root_objects_list_recursive(), dqm_interfaces.DQMcommunicator::get_root_objects_names_list_recursive(), dqm_interfaces.DQMcommunicator::get_root_objects_recursive(), SiStripTrackerMapCreator::getDetectorFlagAndComment(), SiStripUtility::getModuleFolderList(), SiStripSummaryCreator::getSummaryME(), SiStripUtility::getTopFolderPath(), SiStripUtility::goToDir(), SiStripInformationExtractor::printAlarmList(), SiStripActionExecutor::printFaultyModuleList(), SiStripInformationExtractor::printNonGeomHistoList(), SiStripInformationExtractor::printSummaryHistoList(), readFilePB(), DQMFileSaver::saveForOffline(), DQMFileSaver::saveForOnline(), SiStripTrackerMapCreator::setTkMapFromHistogram(), and dqm_interfaces.DirWalkerFile::walk().

705 { setCurrentFolder(""); }
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:727
void DQMStore::cd ( const std::string &  subdir)

cd to subdirectory (if there)

Definition at line 709 of file DQMStore.cc.

References clean, cleanTrailingSlashes(), dirExists(), raiseDQMError(), setCurrentFolder(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by dqm_interfaces.DQMcommunicator::get_root_objects_list_recursive(), dqm_interfaces.DQMcommunicator::get_root_objects_names_list_recursive(), dqm_interfaces.DQMcommunicator::get_root_objects_recursive(), and dqm_interfaces.DirWalkerFile::walk().

710 {
712  const std::string *cleaned = 0;
713  cleanTrailingSlashes(subdir, clean, cleaned);
714 
715  if (! dirExists(*cleaned))
716  raiseDQMError("DQMStore", "Cannot 'cd' into non-existent directory '%s'",
717  cleaned->c_str());
718 
719  setCurrentFolder(*cleaned);
720 }
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:80
std::vector< T * > clean
Definition: MVATrainer.cc:156
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:792
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:727
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
bool DQMStore::cdInto ( const std::string &  path) const
private

Use this for saving monitoring objects in ROOT files with dir structure; cd into directory (create first if it doesn't exist); returns success flag

Definition at line 2464 of file DQMStore.cc.

References assert(), end, connectstrParser::o, raiseDQMError(), dqm_diff::start, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by save().

2465 {
2466  assert(! path.empty());
2467 
2468  // Find the first path component.
2469  size_t start = 0;
2470  size_t end = path.find('/', start);
2471  if (end == std::string::npos)
2472  end = path.size();
2473 
2474  while (true)
2475  {
2476  // Check if this subdirectory component exists. If yes, make sure
2477  // it is actually a subdirectory. Otherwise create or cd into it.
2478  std::string part(path, start, end-start);
2479  TObject *o = gDirectory->Get(part.c_str());
2480  if (o && ! dynamic_cast<TDirectory *>(o))
2481  raiseDQMError("DQMStore", "Attempt to create directory '%s' in a file"
2482  " fails because the part '%s' already exists and is not"
2483  " directory", path.c_str(), part.c_str());
2484  else if (! o)
2485  gDirectory->mkdir(part.c_str());
2486 
2487  if (! gDirectory->cd(part.c_str()))
2488  raiseDQMError("DQMStore", "Attempt to create directory '%s' in a file"
2489  " fails because could not cd into subdirectory '%s'",
2490  path.c_str(), part.c_str());
2491 
2492  // Stop if we reached the end, ignoring any trailing '/'.
2493  if (end+1 >= path.size())
2494  break;
2495 
2496  // Find the next path component.
2497  start = end+1;
2498  end = path.find('/', start);
2499  if (end == std::string::npos)
2500  end = path.size();
2501  }
2502 
2503  return true;
2504 }
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
assert(m_qm.get())
#define end
Definition: vmac.h:37
part
Definition: HCALResponse.h:20
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
bool DQMStore::checkBinningMatches ( MonitorElement me,
TH1 *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1561 of file DQMStore.cc.

References MonitorElement::CheckBinLabels(), gather_cfg::cout, MonitorElement::getFullname(), and MonitorElement::getTH1().

Referenced by collate1D(), collate1DD(), collate1S(), collate2D(), collate2DD(), collate2S(), collate3D(), collateProfile(), collateProfile2D(), utils.BinToBin::do_test(), and utils.BinToBin1percent::do_test().

1562 {
1563  if (me->getTH1()->GetNbinsX() != h->GetNbinsX()
1564  || me->getTH1()->GetNbinsY() != h->GetNbinsY()
1565  || me->getTH1()->GetNbinsZ() != h->GetNbinsZ()
1566  || me->getTH1()->GetXaxis()->GetXmin() != h->GetXaxis()->GetXmin()
1567  || me->getTH1()->GetYaxis()->GetXmin() != h->GetYaxis()->GetXmin()
1568  || me->getTH1()->GetZaxis()->GetXmin() != h->GetZaxis()->GetXmin()
1569  || me->getTH1()->GetXaxis()->GetXmax() != h->GetXaxis()->GetXmax()
1570  || me->getTH1()->GetYaxis()->GetXmax() != h->GetYaxis()->GetXmax()
1571  || me->getTH1()->GetZaxis()->GetXmax() != h->GetZaxis()->GetXmax()
1572  || !MonitorElement::CheckBinLabels((TAxis*)me->getTH1()->GetXaxis(),(TAxis*)h->GetXaxis())
1573  || !MonitorElement::CheckBinLabels((TAxis*)me->getTH1()->GetYaxis(),(TAxis*)h->GetYaxis())
1574  || !MonitorElement::CheckBinLabels((TAxis*)me->getTH1()->GetZaxis(),(TAxis*)h->GetZaxis()) )
1575  {
1576  if(verbose > 0)
1577  std::cout << "*** DQMStore: WARNING:"
1578  << "checkBinningMatches: different binning - cannot add object '"
1579  << h->GetName() << "' of type "
1580  << h->IsA()->GetName() << " to existing ME: '"
1581  << me->getFullname() << "'\n";
1582  return false;
1583  }
1584  return true;
1585 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
TH1 * getTH1(void) const
const std::string getFullname(void) const
get full name of ME including Pathname
tuple cout
Definition: gather_cfg.py:145
static bool CheckBinLabels(const TAxis *a1, const TAxis *a2)
Check the consistency of the axis labels.
void DQMStore::collate1D ( MonitorElement me,
TH1F *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1588 of file DQMStore.cc.

References checkBinningMatches(), and MonitorElement::getTH1F().

Referenced by book1D(), and extract().

1589 {
1590  if (checkBinningMatches(me,h,verbose))
1591  me->getTH1F()->Add(h);
1592 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
TH1F * getTH1F(void) const
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
Definition: DQMStore.cc:1561
void DQMStore::collate1DD ( MonitorElement me,
TH1D *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1602 of file DQMStore.cc.

References checkBinningMatches(), and MonitorElement::getTH1D().

Referenced by book1DD(), and extract().

1603 {
1604  if (checkBinningMatches(me,h,verbose))
1605  me->getTH1D()->Add(h);
1606 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
TH1D * getTH1D(void) const
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
Definition: DQMStore.cc:1561
void DQMStore::collate1S ( MonitorElement me,
TH1S *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1595 of file DQMStore.cc.

References checkBinningMatches(), and MonitorElement::getTH1S().

Referenced by book1S(), and extract().

1596 {
1597  if (checkBinningMatches(me,h,verbose))
1598  me->getTH1S()->Add(h);
1599 }
TH1S * getTH1S(void) const
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
Definition: DQMStore.cc:1561
void DQMStore::collate2D ( MonitorElement me,
TH2F *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1609 of file DQMStore.cc.

References checkBinningMatches(), and MonitorElement::getTH2F().

Referenced by book2D(), and extract().

1610 {
1611  if (checkBinningMatches(me,h,verbose))
1612  me->getTH2F()->Add(h);
1613 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
Definition: DQMStore.cc:1561
TH2F * getTH2F(void) const
void DQMStore::collate2DD ( MonitorElement me,
TH2D *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1623 of file DQMStore.cc.

References checkBinningMatches(), and MonitorElement::getTH2D().

Referenced by book2DD(), and extract().

1624 {
1625  if (checkBinningMatches(me,h,verbose))
1626  me->getTH2D()->Add(h);
1627 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
TH2D * getTH2D(void) const
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
Definition: DQMStore.cc:1561
void DQMStore::collate2S ( MonitorElement me,
TH2S *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1616 of file DQMStore.cc.

References checkBinningMatches(), and MonitorElement::getTH2S().

Referenced by book2S(), and extract().

1617 {
1618  if (checkBinningMatches(me,h,verbose))
1619  me->getTH2S()->Add(h);
1620 }
TH2S * getTH2S(void) const
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
Definition: DQMStore.cc:1561
void DQMStore::collate3D ( MonitorElement me,
TH3F *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1630 of file DQMStore.cc.

References checkBinningMatches(), and MonitorElement::getTH3F().

Referenced by book3D(), and extract().

1631 {
1632  if (checkBinningMatches(me,h,verbose))
1633  me->getTH3F()->Add(h);
1634 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
TH3F * getTH3F(void) const
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
Definition: DQMStore.cc:1561
void DQMStore::collateProfile ( MonitorElement me,
TProfile *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1637 of file DQMStore.cc.

References MonitorElement::addProfiles(), checkBinningMatches(), and MonitorElement::getTProfile().

Referenced by bookProfile(), and extract().

1638 {
1639  if (checkBinningMatches(me,h,verbose))
1640  {
1641  TProfile *meh = me->getTProfile();
1642  me->addProfiles(h, meh, meh, 1, 1);
1643  }
1644 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
void addProfiles(TProfile *h1, TProfile *h2, TProfile *sum, float c1, float c2)
TProfile * getTProfile(void) const
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
Definition: DQMStore.cc:1561
void DQMStore::collateProfile2D ( MonitorElement me,
TProfile2D *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1647 of file DQMStore.cc.

References MonitorElement::addProfiles(), checkBinningMatches(), and MonitorElement::getTProfile2D().

Referenced by bookProfile2D(), and extract().

1648 {
1649  if (checkBinningMatches(me,h,verbose))
1650  {
1651  TProfile2D *meh = me->getTProfile2D();
1652  me->addProfiles(h, meh, meh, 1, 1);
1653  }
1654 }
TProfile2D * getTProfile2D(void) const
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
void addProfiles(TProfile *h1, TProfile *h2, TProfile *sum, float c1, float c2)
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
Definition: DQMStore.cc:1561
bool DQMStore::containsAnyMonitorable ( const std::string &  path) const

true if directory (or any subfolder at any level below it) contains at least one monitorable element

Definition at line 1765 of file DQMStore.cc.

References data_, alignCSCRings::e, i, isSubdirectory(), and AlCaHLTBitMon_QueryRunRegistry::string.

1766 {
1767  MonitorElement proto(&path, std::string());
1768  MEMap::const_iterator e = data_.end();
1769  MEMap::const_iterator i = data_.lower_bound(proto);
1770  return (i != e && isSubdirectory(path, *i->data_.dirname));
1771 }
int i
Definition: DBlmapReader.cc:9
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:70
MEMap data_
Definition: DQMStore.h:714
QCriterion * DQMStore::createQTest ( const std::string &  algoname,
const std::string &  qtname 
)

create quality test with unique name <qtname> (analogous to ME name); quality test can then be attached to ME with useQTest method (<algo_name> must match one of known algorithms)

Definition at line 3278 of file DQMStore.cc.

References i, qalgos_, qtests_, raiseDQMError(), QCriterion::setVerbose(), and verboseQT_.

Referenced by createH2CompTest(), createMeanValueTest(), createXRangeTest(), createYRangeTest(), QTestConfigure::EnableCheckVarianceTest(), QTestConfigure::EnableComp2RefChi2Test(), QTestConfigure::EnableComp2RefEqualHTest(), QTestConfigure::EnableComp2RefKolmogorovTest(), QTestConfigure::EnableCompareLastFilledBinTest(), QTestConfigure::EnableCompareToMedianTest(), QTestConfigure::EnableContentsWithinExpectedTest(), QTestConfigure::EnableDeadChannelTest(), QTestConfigure::EnableMeanWithinExpectedTest(), QTestConfigure::EnableNoisyChannelTest(), QTestConfigure::EnableXRangeTest(), and QTestConfigure::EnableYRangeTest().

3279 {
3280  if (qtests_.count(qtname))
3281  raiseDQMError("DQMStore", "Attempt to create duplicate quality test '%s'",
3282  qtname.c_str());
3283 
3284  QAMap::iterator i = qalgos_.find(algoname);
3285  if (i == qalgos_.end())
3286  raiseDQMError("DQMStore", "Cannot create a quality test using unknown"
3287  " algorithm '%s'", algoname.c_str());
3288 
3289  QCriterion *qc = i->second(qtname);
3290  qc->setVerbose(verboseQT_);
3291 
3292  qtests_[qtname] = qc;
3293  return qc;
3294 }
int i
Definition: DBlmapReader.cc:9
QCMap qtests_
Definition: DQMStore.h:717
unsigned verboseQT_
Definition: DQMStore.h:700
QAMap qalgos_
Definition: DQMStore.h:718
void setVerbose(int verbose)
probability limits for warnings, errors
Definition: QTest.h:116
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
void DQMStore::deleteUnusedLumiHistograms ( uint32_t  run,
uint32_t  lumi 
)

Delete global histograms which are no longer in used. Such histograms are created at the end of each lumi and should be deleted after last globalEndLuminosityBlock.

Definition at line 2121 of file DQMStore.cc.

References book_mutex_, gather_cfg::cout, data_, alignCSCRings::e, enableMultiThread_, i, MonitorElement::setLumi(), AlCaHLTBitMon_QueryRunRegistry::string, groupFilesInBlocks::temp, and verbose_.

Referenced by DQMFileSaver::globalEndLuminosityBlock().

2122 {
2123  if (!enableMultiThread_)
2124  return;
2125 
2126  std::lock_guard<std::mutex> guard(book_mutex_);
2127 
2128  std::string null_str("");
2129  MonitorElement proto(&null_str, null_str, run, 0, 0);
2130  proto.setLumi(lumi);
2131 
2132  std::set<MonitorElement>::const_iterator e = data_.end();
2133  std::set<MonitorElement>::const_iterator i = data_.lower_bound(proto);
2134 
2135  while (i != e) {
2136  if (i->data_.streamId != 0 ||
2137  i->data_.moduleId != 0)
2138  break;
2139  if (i->data_.lumi != lumi)
2140  break;
2141  if (i->data_.run != run)
2142  break;
2143 
2144  auto temp = i;
2145  ++i;
2146 
2147  if (verbose_ > 1) {
2148  std::cout << "DQMStore::deleteUnusedLumiHistograms: deleted monitor element '"
2149  << *i->data_.dirname << "/" << i->data_.objname << "'"
2150  << "flags " << i->data_.flags << "\n";
2151  }
2152 
2153  data_.erase(temp);
2154  }
2155 }
int i
Definition: DBlmapReader.cc:9
tuple lumi
Definition: fjr2json.py:35
std::mutex book_mutex_
Definition: DQMStore.h:721
unsigned verbose_
Definition: DQMStore.h:699
MEMap data_
Definition: DQMStore.h:714
tuple cout
Definition: gather_cfg.py:145
bool enableMultiThread_
Definition: DQMStore.h:704
bool DQMStore::dirExists ( const std::string &  path) const
void DQMStore::disableSoftReset ( MonitorElement me)

Definition at line 3412 of file DQMStore.cc.

References MonitorElement::disableSoftReset().

Referenced by ecaldqm::MESet::recoverStats(), and TrackAnalyzer::undoSoftReset().

3413 {
3414  if (me)
3415  me->disableSoftReset();
3416 }
void disableSoftReset(void)
reverts action of softReset
bool DQMStore::extract ( TObject *  obj,
const std::string &  dir,
bool  overwrite,
bool  collateHistograms 
)
private

extract object (TH1F, TH2F, ...) from <to>; return success flag flag fromRemoteNode indicating if ME arrived from different node

Definition at line 2163 of file DQMStore.cc.

References MonitorElement::addQReport(), DQMNet::QValue::algorithm, book1D(), book1DD(), book1S(), book2D(), book2DD(), book2S(), book3D(), bookFloat(), bookInt(), bookProfile(), bookProfile2D(), bookString(), DQMNet::QValue::code, collate1D(), collate1DD(), collate1S(), collate2D(), collate2DD(), collate2S(), collate3D(), collateHistograms_, collateProfile(), collateProfile2D(), MonitorElement::copyFrom(), gather_cfg::cout, dot(), DQMNet::DQM_PROP_HAS_REFERENCE, MonitorElement::Fill(), findObject(), h, isCollateME(), isSubdirectory(), class-composition::kind, diffTwoXMLs::label, visualization-live-secondInstance_cfg::m, autoMagneticFieldProducer_cfi::master, hlt_dqm_clientPB-live_cfg::me, DQMNet::QValue::message, gen::n, MonitorElement::object_, DQMNet::QValue::qtname, DQMNet::QValue::qtresult, alignCSCRings::s, s_referenceDirName, s_rxmeqr1(), s_rxmeqr2(), s_rxmeval(), MonitorElement::setEfficiencyFlag(), AlCaHLTBitMon_QueryRunRegistry::string, tag(), relativeConstraints::value, and verbose_.

Referenced by BeautifulSoup.PageElement::_invert(), BeautifulSoup.Tag::decompose(), readDirectory(), and readFilePB().

2165 {
2166  // NB: Profile histograms inherit from TH*D, checking order matters.
2167  MonitorElement *refcheck = 0;
2168  if (TProfile *h = dynamic_cast<TProfile *>(obj))
2169  {
2170  MonitorElement *me = findObject(dir, h->GetName());
2171  if (! me)
2172  me = bookProfile(dir, h->GetName(), (TProfile *) h->Clone());
2173  else if (overwrite)
2174  me->copyFrom(h);
2175  else if (isCollateME(me) || collateHistograms)
2176  collateProfile(me, h, verbose_);
2177  refcheck = me;
2178  }
2179  else if (TProfile2D *h = dynamic_cast<TProfile2D *>(obj))
2180  {
2181  MonitorElement *me = findObject(dir, h->GetName());
2182  if (! me)
2183  me = bookProfile2D(dir, h->GetName(), (TProfile2D *) h->Clone());
2184  else if (overwrite)
2185  me->copyFrom(h);
2186  else if (isCollateME(me) || collateHistograms)
2187  collateProfile2D(me, h, verbose_);
2188  refcheck = me;
2189  }
2190  else if (TH1F *h = dynamic_cast<TH1F *>(obj))
2191  {
2192  MonitorElement *me = findObject(dir, h->GetName());
2193  if (! me)
2194  me = book1D(dir, h->GetName(), (TH1F *) h->Clone());
2195  else if (overwrite)
2196  me->copyFrom(h);
2197  else if (isCollateME(me) || collateHistograms)
2198  collate1D(me, h, verbose_);
2199  refcheck = me;
2200  }
2201  else if (TH1S *h = dynamic_cast<TH1S *>(obj))
2202  {
2203  MonitorElement *me = findObject(dir, h->GetName());
2204  if (! me)
2205  me = book1S(dir, h->GetName(), (TH1S *) h->Clone());
2206  else if (overwrite)
2207  me->copyFrom(h);
2208  else if (isCollateME(me) || collateHistograms)
2209  collate1S(me, h, verbose_);
2210  refcheck = me;
2211  }
2212  else if (TH1D *h = dynamic_cast<TH1D *>(obj))
2213  {
2214  MonitorElement *me = findObject(dir, h->GetName());
2215  if (! me)
2216  me = book1DD(dir, h->GetName(), (TH1D *) h->Clone());
2217  else if (overwrite)
2218  me->copyFrom(h);
2219  else if (isCollateME(me) || collateHistograms)
2220  collate1DD(me, h, verbose_);
2221  refcheck = me;
2222  }
2223  else if (TH2F *h = dynamic_cast<TH2F *>(obj))
2224  {
2225  MonitorElement *me = findObject(dir, h->GetName());
2226  if (! me)
2227  me = book2D(dir, h->GetName(), (TH2F *) h->Clone());
2228  else if (overwrite)
2229  me->copyFrom(h);
2230  else if (isCollateME(me) || collateHistograms)
2231  collate2D(me, h, verbose_);
2232  refcheck = me;
2233  }
2234  else if (TH2S *h = dynamic_cast<TH2S *>(obj))
2235  {
2236  MonitorElement *me = findObject(dir, h->GetName());
2237  if (! me)
2238  me = book2S(dir, h->GetName(), (TH2S *) h->Clone());
2239  else if (overwrite)
2240  me->copyFrom(h);
2241  else if (isCollateME(me) || collateHistograms)
2242  collate2S(me, h, verbose_);
2243  refcheck = me;
2244  }
2245  else if (TH2D *h = dynamic_cast<TH2D *>(obj))
2246  {
2247  MonitorElement *me = findObject(dir, h->GetName());
2248  if (! me)
2249  me = book2DD(dir, h->GetName(), (TH2D *) h->Clone());
2250  else if (overwrite)
2251  me->copyFrom(h);
2252  else if (isCollateME(me) || collateHistograms)
2253  collate2DD(me, h, verbose_);
2254  refcheck = me;
2255  }
2256  else if (TH3F *h = dynamic_cast<TH3F *>(obj))
2257  {
2258  MonitorElement *me = findObject(dir, h->GetName());
2259  if (! me)
2260  me = book3D(dir, h->GetName(), (TH3F *) h->Clone());
2261  else if (overwrite)
2262  me->copyFrom(h);
2263  else if (isCollateME(me) || collateHistograms)
2264  collate3D(me, h, verbose_);
2265  refcheck = me;
2266  }
2267  else if (dynamic_cast<TObjString *>(obj))
2268  {
2269  lat::RegexpMatch m;
2270  if (! s_rxmeval.match(obj->GetName(), 0, 0, &m))
2271  {
2272  if (strstr(obj->GetName(), "CMSSW"))
2273  {
2274  if (verbose_)
2275  std::cout << "Input file version: " << obj->GetName() << std::endl;
2276  return true;
2277  }
2278  else if (strstr(obj->GetName(), "DQMPATCH"))
2279  {
2280  if (verbose_)
2281  std::cout << "DQM patch version: " << obj->GetName() << std::endl;
2282  return true;
2283  }
2284  else
2285  {
2286  std::cout << "*** DQMStore: WARNING: cannot extract object '"
2287  << obj->GetName() << "' of type '"
2288  << obj->IsA()->GetName() << "'\n";
2289  return false;
2290  }
2291  }
2292 
2293  std::string label = m.matchString(obj->GetName(), 1);
2294  std::string kind = m.matchString(obj->GetName(), 2);
2295  std::string value = m.matchString(obj->GetName(), 3);
2296 
2297  if (kind == "i")
2298  {
2299  MonitorElement *me = findObject(dir, label);
2300  if (! me || overwrite)
2301  {
2302  if (! me) me = bookInt(dir, label);
2303  me->Fill(atoll(value.c_str()));
2304  }
2305  }
2306  else if (kind == "f")
2307  {
2308  MonitorElement *me = findObject(dir, label);
2309  if (! me || overwrite)
2310  {
2311  if (! me) me = bookFloat(dir, label);
2312  me->Fill(atof(value.c_str()));
2313  }
2314  }
2315  else if (kind == "s")
2316  {
2317  MonitorElement *me = findObject(dir, label);
2318  if (! me)
2319  me = bookString(dir, label, value);
2320  else if (overwrite)
2321  me->Fill(value);
2322  }
2323  else if (kind == "e")
2324  {
2325  MonitorElement *me = findObject(dir, label);
2326  if (! me)
2327  {
2328  std::cout << "*** DQMStore: WARNING: no monitor element '"
2329  << label << "' in directory '"
2330  << dir << "' to be marked as efficiency plot.\n";
2331  return false;
2332  }
2333  me->setEfficiencyFlag();
2334  }
2335  else if (kind == "t")
2336  {
2337  MonitorElement *me = findObject(dir, label);
2338  if (! me)
2339  {
2340  std::cout << "*** DQMStore: WARNING: no monitor element '"
2341  << label << "' in directory '"
2342  << dir << "' for a tag\n";
2343  return false;
2344  }
2345  errno = 0;
2346  char *endp = 0;
2347  unsigned long val = strtoul(value.c_str(), &endp, 10);
2348  if ((val == 0 && errno) || *endp || val > ~uint32_t(0))
2349  {
2350  std::cout << "*** DQMStore: WARNING: cannot restore tag '"
2351  << value << "' for monitor element '"
2352  << label << "' in directory '"
2353  << dir << "' - invalid value\n";
2354  return false;
2355  }
2356  tag(me, val);
2357  }
2358  else if (kind == "qr")
2359  {
2360  // Handle qreports, but skip them while reading in references.
2362  {
2363  size_t dot = label.find('.');
2364  if (dot == std::string::npos)
2365  {
2366  std::cout << "*** DQMStore: WARNING: quality report label in '" << label
2367  << "' is missing a '.' and cannot be extracted\n";
2368  return false;
2369  }
2370 
2371  std::string mename (label, 0, dot);
2372  std::string qrname (label, dot+1, std::string::npos);
2373 
2374  m.reset();
2375  DQMNet::QValue qv;
2376  if (s_rxmeqr1.match(value, 0, 0, &m))
2377  {
2378  qv.code = atoi(m.matchString(value, 1).c_str());
2379  qv.qtresult = strtod(m.matchString(value, 2).c_str(), 0);
2380  qv.message = m.matchString(value, 4);
2381  qv.qtname = qrname;
2382  qv.algorithm = m.matchString(value, 3);
2383  }
2384  else if (s_rxmeqr2.match(value, 0, 0, &m))
2385  {
2386  qv.code = atoi(m.matchString(value, 1).c_str());
2387  qv.qtresult = 0; // unavailable in old format
2388  qv.message = m.matchString(value, 2);
2389  qv.qtname = qrname;
2390  // qv.algorithm unavailable in old format
2391  }
2392  else
2393  {
2394  std::cout << "*** DQMStore: WARNING: quality test value '"
2395  << value << "' is incorrectly formatted\n";
2396  return false;
2397  }
2398 
2399  MonitorElement *me = findObject(dir, mename);
2400  if (! me)
2401  {
2402  std::cout << "*** DQMStore: WARNING: no monitor element '"
2403  << mename << "' in directory '"
2404  << dir << "' for quality test '"
2405  << label << "'\n";
2406  return false;
2407  }
2408 
2409  me->addQReport(qv, /* FIXME: getQTest(qv.qtname)? */ 0);
2410  }
2411  }
2412  else
2413  {
2414  std::cout << "*** DQMStore: WARNING: cannot extract object '"
2415  << obj->GetName() << "' of type '"
2416  << obj->IsA()->GetName() << "'\n";
2417  return false;
2418  }
2419  }
2420  else if (TNamed *n = dynamic_cast<TNamed *>(obj))
2421  {
2422  // For old DQM data.
2423  std::string s;
2424  s.reserve(6 + strlen(n->GetTitle()) + 2*strlen(n->GetName()));
2425  s += '<'; s += n->GetName(); s += '>';
2426  s += n->GetTitle();
2427  s += '<'; s += '/'; s += n->GetName(); s += '>';
2428  TObjString os(s.c_str());
2429  return extract(&os, dir, overwrite, collateHistograms_);
2430  }
2431  else
2432  {
2433  std::cout << "*** DQMStore: WARNING: cannot extract object '"
2434  << obj->GetName() << "' of type '" << obj->IsA()->GetName()
2435  << "' and with title '" << obj->GetTitle() << "'\n";
2436  return false;
2437  }
2438 
2439  // If we just read in a reference MonitorElement, and there is a
2440  // MonitorElement with the same name, link the two together.
2441  // The other direction is handled by the book() method.
2442  if (refcheck && isSubdirectory(s_referenceDirName, dir))
2443  {
2444  std::string mdir(dir, s_referenceDirName.size()+1, std::string::npos);
2445  if (MonitorElement *master = findObject(mdir, obj->GetName()))
2446  {
2447  // We have extracted a MonitorElement, and it's located in the reference
2448  // dir. Then we find the corresponding MonitorElement in the
2449  // non-reference dir and assign the object_ of the reference
2450  // MonitorElement to the reference_ property of the corresponding
2451  // non-reference MonitorElement.
2452  master->data_.flags |= DQMNet::DQM_PROP_HAS_REFERENCE;
2453  master->reference_ = refcheck->object_;
2454  }
2455  }
2456 
2457  return true;
2458 }
static const lat::Regexp s_rxmeqr2("^st\\.(\\d+)\\.(.*)$")
MonitorElement * book2S(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2S histogram.
Definition: DQMStore.cc:1171
bool isCollateME(MonitorElement *me) const
Definition: DQMStore.cc:3460
void copyFrom(TH1 *from)
std::string algorithm
Definition: DQMNet.h:93
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:1021
static void collate3D(MonitorElement *me, TH3F *h, unsigned verbose)
Definition: DQMStore.cc:1630
MonitorElement * findObject(const std::string &dir, const std::string &name, const uint32_t run=0, const uint32_t lumi=0, const uint32_t streamId=0, const uint32_t moduleId=0) const
Definition: DQMStore.cc:1905
static void collateProfile(MonitorElement *me, TProfile *h, unsigned verbose)
Definition: DQMStore.cc:1637
MonitorElement * book3D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ)
Book 3D histogram.
Definition: DQMStore.cc:1283
MonitorElement * book2DD(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D double histogram.
Definition: DQMStore.cc:1193
static void collate2DD(MonitorElement *me, TH2D *h, unsigned verbose)
Definition: DQMStore.cc:1623
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1053
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:958
void Fill(long long x)
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1661
static const lat::Regexp s_rxmeval("^<(.*)>(i|f|s|e|t|qr)=(.*)</\\1>$")
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:70
static const uint32_t DQM_PROP_HAS_REFERENCE
Definition: DQMNet.h:53
MonitorElement * bookString(const char *name, const char *value)
Book string.
Definition: DQMStore.cc:987
static void collateProfile2D(MonitorElement *me, TProfile2D *h, unsigned verbose)
Definition: DQMStore.cc:1647
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1335
std::string qtname
Definition: DQMNet.h:92
static void collate1DD(MonitorElement *me, TH1D *h, unsigned verbose)
Definition: DQMStore.cc:1602
unsigned verbose_
Definition: DQMStore.h:699
static const std::string s_referenceDirName
Definition: DQMStore.cc:56
static void collate1D(MonitorElement *me, TH1F *h, unsigned verbose)
Definition: DQMStore.cc:1588
bool extract(TObject *obj, const std::string &dir, bool overwrite, bool collateHistograms)
Definition: DQMStore.cc:2163
T dot(const Basic3DVector &v) const
Scalar product, or &quot;dot&quot; product, with a vector of same type.
std::string message
Definition: DQMNet.h:91
tuple cout
Definition: gather_cfg.py:145
void setEfficiencyFlag(void)
static void collate1S(MonitorElement *me, TH1S *h, unsigned verbose)
Definition: DQMStore.cc:1595
dbl *** dir
Definition: mlp_gen.cc:35
static void collate2D(MonitorElement *me, TH2F *h, unsigned verbose)
Definition: DQMStore.cc:1609
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:928
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1149
tuple collateHistograms
float qtresult
Definition: DQMNet.h:90
bool collateHistograms_
Definition: DQMStore.h:703
void addQReport(const DQMNet::QValue &desc, QCriterion *qc)
Add quality report, from DQMStore.
MonitorElement * book1S(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1037
static const lat::Regexp s_rxmeqr1("^st:(\\d+):([-+e.\\d]+):([^:]*):(.*)$")
static void collate2S(MonitorElement *me, TH2S *h, unsigned verbose)
Definition: DQMStore.cc:1616
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
Definition: DQMStore.cc:1479
TObject * DQMStore::extractNextObject ( TBufferFile &  buf) const
inlineprivate
Extract the next serialised ROOT object from @a buf. Returns null

if there are no more objects in the buffer, or a null pointer was serialised at this location.

Definition at line 3090 of file DQMStore.cc.

Referenced by get_info().

3090  {
3091  if (buf.Length() == buf.BufferSize())
3092  return 0;
3093  buf.InitMap();
3094  void *ptr = buf.ReadObjectAny(0);
3095  return reinterpret_cast<TObject *>(ptr);
3096 }
MonitorElement * DQMStore::findObject ( const std::string &  dir,
const std::string &  name,
const uint32_t  run = 0,
const uint32_t  lumi = 0,
const uint32_t  streamId = 0,
const uint32_t  moduleId = 0 
) const
private

get MonitorElement <name> in directory <dir> (null if MonitorElement does not exist)

Definition at line 1905 of file DQMStore.cc.

References MonitorElement::data_, data_, dir, DQMNet::CoreObject::dirname, fjr2json::lumi, DQMNet::CoreObject::lumi, DQMNet::CoreObject::moduleId, mergeVDriftHistosByStation::name, DQMNet::CoreObject::objname, raiseDQMError(), DTTTrigCorrFirst::run, DQMNet::CoreObject::run, s_safe, and DQMNet::CoreObject::streamId.

Referenced by book(), bookFloat(), bookInt(), bookString(), extract(), makeDirectory(), readFilePB(), and tag().

1911 {
1912  if (dir.find_first_not_of(s_safe) != std::string::npos)
1913  raiseDQMError("DQMStore", "Monitor element path name '%s' uses"
1914  " unacceptable characters", dir.c_str());
1915  if (name.find_first_not_of(s_safe) != std::string::npos)
1916  raiseDQMError("DQMStore", "Monitor element path name '%s' uses"
1917  " unacceptable characters", name.c_str());
1918 
1919  MonitorElement proto;
1920  proto.data_.dirname = &dir;
1921  proto.data_.objname = name;
1922  proto.data_.run = run;
1923  proto.data_.lumi = lumi;
1924  proto.data_.streamId = streamId;
1925  proto.data_.moduleId = moduleId;
1926 
1927  MEMap::const_iterator mepos = data_.find(proto);
1928  return (mepos == data_.end() ? 0
1929  : const_cast<MonitorElement *>(&*mepos));
1930 }
uint32_t moduleId
Definition: DQMNet.h:104
tuple lumi
Definition: fjr2json.py:35
static const std::string s_safe
Definition: DQMStore.cc:58
const std::string * dirname
Definition: DQMNet.h:105
uint32_t run
Definition: DQMNet.h:101
uint32_t lumi
Definition: DQMNet.h:102
std::string objname
Definition: DQMNet.h:106
DQMNet::CoreObject data_
MEMap data_
Definition: DQMStore.h:714
dbl *** dir
Definition: mlp_gen.cc:35
uint32_t streamId
Definition: DQMNet.h:103
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
void DQMStore::forceReset ( void  )
private

Invoke this method after flushing all recently changed monitoring. Clears updated flag on all MEs and calls their Reset() method.

Definition at line 2097 of file DQMStore.cc.

References data_, forceResetOnBeginLumi_, hlt_dqm_clientPB-live_cfg::me, MonitorElement::Reset(), reset_, and MonitorElement::resetUpdate().

Referenced by DQMStore().

2098 {
2099  MEMap::iterator mi = data_.begin();
2100  MEMap::iterator me = data_.end();
2101  for ( ; mi != me; ++mi)
2102  {
2103  if (forceResetOnBeginLumi_ && ((*mi).getLumiFlag() == false))
2104  continue;
2105  MonitorElement &me = const_cast<MonitorElement &>(*mi);
2106  me.Reset();
2107  me.resetUpdate();
2108  }
2109 
2110  reset_ = true;
2111 }
void resetUpdate(void)
reset &quot;was updated&quot; flag
bool reset_
Definition: DQMStore.h:701
MEMap data_
Definition: DQMStore.h:714
bool forceResetOnBeginLumi_
Definition: DQMStore.h:706
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * DQMStore::get ( const std::string &  path) const

get ME from full pathname (e.g. "my/long/dir/my_histo")

Definition at line 1775 of file DQMStore.cc.

References data_, dir, mergeVDriftHistosByStation::name, splitPath(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), SiStripDcsInfo::addBadModules(), TrackerOfflineValidationSummary::associateModuleHistsWithTree(), RPCBxTest::beginRun(), CalibrationScanTask::book(), CalibrationTask::book(), rrapi.RRApi::columns(), util.rrapi.RRApi::columns(), rrapi.RRApi::count(), util.rrapi.RRApi::count(), createH2CompTest(), createH2ContentTest(), SiStripActionExecutor::createShiftReport(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), dqmCopyRecursively(), HarvestingAnalyzer::endJob(), MuonAlignment::endJob(), DQMDcsInfoClient::endLuminosityBlock(), SiStripMonitorDigi::endLuminosityBlock(), L1ScalersClient::endLuminosityBlock(), HLTScalersClient::endLuminosityBlock(), DQMDcsInfoClient::endRun(), TauDQMHistEffProducer::endRun(), TauDQMHistPlotter::endRun(), SiStripQualityChecker::fillDetectorStatusAtLumi(), SiStripQualityChecker::fillFaultyModuleStatus(), DQMFEDIntegrityClient::fillHistograms(), SiStripCertificationInfo::fillSiStripCertificationMEs(), SiStripCertificationInfo::fillSiStripCertificationMEsAtLumi(), PFDQMEventSelector::filter(), SiStripDaqInfo::findExcludedModule(), getAnyHisto(), betterConfigParser.BetterConfigParser::getCompares(), SiStripTrackerMapCreator::getDetectorFlagAndComment(), EgHLTOfflineSummaryClient::getEgHLTSumHist_(), betterConfigParser.BetterConfigParser::getGeneral(), getHisto(), getHisto2(), getHistoTH3F(), getHistoTProfile(), getHistoTProfile2D(), SiStripQualityChecker::getModuleStatus(), betterConfigParser.BetterConfigParser::getResultingSection(), getTH1F(), getTH2F(), getTH3F(), getTProfile(), getTProfile2D(), htmlErrors(), hcaldqm::Container1D::load(), TkHistoMap::loadTkHistoMap(), SiStripHistoPlotter::makePlot(), SiStripInformationExtractor::plotHistosFromLayout(), SiStripActionExecutor::printShiftHistoParameters(), QTestStatusChecker::processAlarms(), rrapi.RRApi::report(), util.rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), resetME(), EgHLTOfflineSummaryClient::runClient_(), DQMFileSaver::saveForOffline(), DQMFileSaver::saveForOnline(), util.rrapi.RRApi::tables(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), util.rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), rrapi.RRApi::workspaces(), util.rrapi.RRApi::workspaces(), and SubTaskSummaryStatus::WriteThreshold().

1776 {
1777  std::string dir;
1778  std::string name;
1779  splitPath(dir, name, path);
1780  MonitorElement proto(&dir, name);
1781  MEMap::const_iterator mepos = data_.find(proto);
1782  return (mepos == data_.end() ? 0
1783  : const_cast<MonitorElement *>(&*mepos));
1784 }
static void splitPath(std::string &dir, std::string &name, const std::string &path)
Definition: DQMStore.cc:97
MEMap data_
Definition: DQMStore.h:714
dbl *** dir
Definition: mlp_gen.cc:35
std::vector< MonitorElement * > DQMStore::get ( unsigned int  tag) const

get all MonitorElements tagged as <tag>

Definition at line 1788 of file DQMStore.cc.

References MonitorElement::data_, data_, DQMNet::DQM_PROP_TAGGED, alignCSCRings::e, DQMNet::CoreObject::flags, i, hlt_dqm_clientPB-live_cfg::me, mps_fire::result, DQMNet::CoreObject::tag, and tag().

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), util.rrapi.RRApi::count(), rrapi.RRApi::count(), rrapi.RRApi::data(), util.rrapi.RRApi::data(), betterConfigParser.BetterConfigParser::getCompares(), betterConfigParser.BetterConfigParser::getGeneral(), betterConfigParser.BetterConfigParser::getResultingSection(), rrapi.RRApi::report(), util.rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), util.rrapi.RRApi::tables(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), util.rrapi.RRApi::tags(), rrapi.RRApi::templates(), util.rrapi.RRApi::templates(), util.rrapi.RRApi::workspaces(), and rrapi.RRApi::workspaces().

1789 {
1790  // FIXME: Use reverse map [tag -> path] / [tag -> dir]?
1791  std::vector<MonitorElement *> result;
1792  for (MEMap::const_iterator i = data_.begin(), e = data_.end(); i != e; ++i)
1793  {
1794  const MonitorElement &me = *i;
1795  if ((me.data_.flags & DQMNet::DQM_PROP_TAGGED) && me.data_.tag == tag)
1796  result.push_back(const_cast<MonitorElement *>(&me));
1797  }
1798  return result;
1799 }
int i
Definition: DBlmapReader.cc:9
uint32_t flags
Definition: DQMNet.h:98
static const uint32_t DQM_PROP_TAGGED
Definition: DQMNet.h:54
uint32_t tag
Definition: DQMNet.h:99
tuple result
Definition: mps_fire.py:84
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1661
DQMNet::CoreObject data_
MEMap data_
Definition: DQMStore.h:714
void DQMStore::get_info ( const dqmstorepb::ROOTFilePB_Histo h,
std::string &  dirname,
std::string &  objname,
TObject **  obj 
)
private

Definition at line 3098 of file DQMStore.cc.

References extractNextObject(), dqmstorepb::ROOTFilePB_Histo::full_pathname(), raiseDQMError(), dqmstorepb::ROOTFilePB_Histo::size(), pickleFileParser::slash, and dqmstorepb::ROOTFilePB_Histo::streamed_histo().

Referenced by readFilePB().

3101  {
3102 
3103  size_t slash = h.full_pathname().rfind('/');
3104  size_t dirpos = (slash == std::string::npos ? 0 : slash);
3105  size_t namepos = (slash == std::string::npos ? 0 : slash+1);
3106  dirname.assign(h.full_pathname(), 0, dirpos);
3107  objname.assign(h.full_pathname(), namepos, std::string::npos);
3108  TBufferFile buf(TBufferFile::kRead, h.size(),
3109  (void*)h.streamed_histo().data(),
3110  kFALSE);
3111  buf.Reset();
3112  *obj = extractNextObject(buf);
3113  if (!*obj) {
3114  raiseDQMError("DQMStore", "Error reading element:'%s'" , h.full_pathname().c_str());
3115  }
3116 }
inline::google::protobuf::uint32 size() const
const ::std::string & full_pathname() const
const ::std::string & streamed_histo() const
TObject * extractNextObject(TBufferFile &) const
Definition: DQMStore.cc:3090
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
std::vector< MonitorElement * > DQMStore::getAllContents ( const std::string &  path,
uint32_t  runNumber = 0,
uint32_t  lumi = 0 
) const

get vector with children of folder, including all subfolders + their children; must use an exact pathname

Definition at line 1988 of file DQMStore.cc.

References assert(), clean, cleanTrailingSlashes(), data_, alignCSCRings::e, enableMultiThread_, i, isSubdirectory(), or, mps_fire::result, MonitorElement::setLumi(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiStripCalibLorentzAngle::algoBeginJob(), edmtest::DQMReferenceHistogramRootFileEventSetupAnalyzer::beginRun(), SiStripQualityHotStripIdentifierRoot::bookHistos(), DQMHistoryServiceBase::createSummary(), StatisticsFilter::filter(), DQMRootOutputModule::writeLuminosityBlock(), and DQMRootOutputModule::writeRun().

1991 {
1993  const std::string *cleaned = 0;
1994  cleanTrailingSlashes(path, clean, cleaned);
1995  MonitorElement proto(cleaned, std::string(), runNumber);
1996  proto.setLumi(lumi);
1997 
1998  std::vector<MonitorElement *> result;
1999  MEMap::const_iterator e = data_.end();
2000  MEMap::const_iterator i = data_.lower_bound(proto);
2001  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i) {
2002  if (runNumber != 0) {
2003  if (i->data_.run > runNumber // TODO[rovere]: pleonastic? first we encounter local ME of the same run ...
2004  || i->data_.streamId != 0
2005  || i->data_.moduleId != 0)
2006  break;
2007  }
2008  if (lumi != 0) {
2009  if (i->data_.lumi > lumi
2010  || i->data_.streamId != 0
2011  || i->data_.moduleId != 0)
2012  break;
2013  }
2014  if (runNumber != 0 or lumi !=0) {
2015  assert(i->data_.streamId == 0);
2016  assert(i->data_.moduleId == 0);
2017  }
2018  result.push_back(const_cast<MonitorElement *>(&*i));
2019  }
2020 
2021  if (enableMultiThread_)
2022  {
2023  //save legacy modules when running MT
2024  i = data_.begin();
2025  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i) {
2026  if (i->data_.run != 0 || i->data_.streamId != 0 || i->data_.moduleId != 0) break;
2027  result.push_back(const_cast<MonitorElement *>(&*i));
2028  }
2029  }
2030 
2031  return result;
2032 }
int i
Definition: DBlmapReader.cc:9
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
tuple lumi
Definition: fjr2json.py:35
assert(m_qm.get())
tuple result
Definition: mps_fire.py:84
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:80
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:70
std::vector< T * > clean
Definition: MVATrainer.cc:156
MEMap data_
Definition: DQMStore.h:714
bool enableMultiThread_
Definition: DQMStore.h:704
void DQMStore::getAllTags ( std::vector< std::string > &  into) const

get tags for various maps, return vector with strings of the form <dir pathname>="">:<obj1>/<tag1>/<tag2>,<obj2>/<tag1>/<tag3>, etc.

Definition at line 1935 of file DQMStore.cc.

References data_, dirs_, DQMNet::DQM_PROP_TAGGED, isSubdirectory(), visualization-live-secondInstance_cfg::m, hlt_dqm_clientPB-live_cfg::me, contentValuesCheck::nfound, and AlCaHLTBitMon_QueryRunRegistry::string.

1936 {
1937  into.clear();
1938  into.reserve(dirs_.size());
1939 
1940  MEMap::const_iterator me = data_.end();
1941  std::set<std::string>::const_iterator di = dirs_.begin();
1942  std::set<std::string>::const_iterator de = dirs_.end();
1943  char tagbuf[32]; // more than enough for '/' and up to 10 digits
1944 
1945  for ( ; di != de; ++di)
1946  {
1947  MonitorElement proto(&*di, std::string());
1948  MEMap::const_iterator mi = data_.lower_bound(proto);
1949  MEMap::const_iterator m = mi;
1950  size_t sz = di->size() + 2;
1951  size_t nfound = 0;
1952  for ( ; m != me && isSubdirectory(*di, *m->data_.dirname); ++m)
1953  if (*di == *m->data_.dirname && (m->data_.flags & DQMNet::DQM_PROP_TAGGED))
1954  {
1955  // the tags count for '/' + up to 10 digits, otherwise ',' + ME name
1956  sz += 1 + m->data_.objname.size() + 11;
1957  ++nfound;
1958  }
1959 
1960  if (! nfound)
1961  continue;
1962 
1963  std::vector<std::string>::iterator istr
1964  = into.insert(into.end(), std::string());
1965 
1966  istr->reserve(sz);
1967 
1968  *istr += *di;
1969  *istr += ':';
1970  for (sz = 0; mi != m; ++mi)
1971  {
1972  if (*di == *m->data_.dirname && (m->data_.flags & DQMNet::DQM_PROP_TAGGED))
1973  {
1974  sprintf(tagbuf, "/%u", mi->data_.tag);
1975  if (sz > 0)
1976  *istr += ',';
1977  *istr += m->data_.objname;
1978  *istr += tagbuf;
1979  ++sz;
1980  }
1981  }
1982  }
1983 }
static const uint32_t DQM_PROP_TAGGED
Definition: DQMNet.h:54
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:70
MEMap data_
Definition: DQMStore.h:714
std::set< std::string > dirs_
Definition: DQMStore.h:715
std::vector< MonitorElement * > DQMStore::getContents ( const std::string &  path) const

get vector with all children of folder (does NOT include contents of subfolders)

Definition at line 1804 of file DQMStore.cc.

References clean, cleanTrailingSlashes(), data_, alignCSCRings::e, i, isSubdirectory(), mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiStripSummaryCreator::fillGrandSummaryHistos(), SiStripCertificationInfo::fillSiStripCertificationMEs(), SiStripQualityChecker::fillSubDetStatus(), SiStripSummaryCreator::fillSummaryHistos(), QTestStatusChecker::fullPathNames(), DQMStore::IGetter::getContents(), SiStripSummaryCreator::getSummaryME(), SiStripHistoPlotter::makeCondDBPlots(), SiStripInformationExtractor::printAlarmList(), SiStripActionExecutor::printFaultyModuleList(), SiStripInformationExtractor::printNonGeomHistoList(), SiStripInformationExtractor::printSummaryHistoList(), SiStripTrackerMapCreator::setTkMapFromHistogram(), and showDirStructure().

1805 {
1807  const std::string *cleaned = 0;
1808  cleanTrailingSlashes(path, clean, cleaned);
1809  MonitorElement proto(cleaned, std::string());
1810 
1811  std::vector<MonitorElement *> result;
1812  MEMap::const_iterator e = data_.end();
1813  MEMap::const_iterator i = data_.lower_bound(proto);
1814  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i)
1815  if (*cleaned == *i->data_.dirname)
1816  result.push_back(const_cast<MonitorElement *>(&*i));
1817 
1818  return result;
1819 }
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: mps_fire.py:84
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:80
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:70
std::vector< T * > clean
Definition: MVATrainer.cc:156
MEMap data_
Definition: DQMStore.h:714
std::vector< MonitorElement * > DQMStore::getContents ( const std::string &  path,
unsigned int  tag 
) const

same as above for tagged MonitorElements

Definition at line 1823 of file DQMStore.cc.

References clean, cleanTrailingSlashes(), data_, DQMNet::DQM_PROP_TAGGED, alignCSCRings::e, i, isSubdirectory(), mps_fire::result, AlCaHLTBitMon_QueryRunRegistry::string, and tag().

1824 {
1826  const std::string *cleaned = 0;
1827  cleanTrailingSlashes(path, clean, cleaned);
1828  MonitorElement proto(cleaned, std::string());
1829 
1830  std::vector<MonitorElement *> result;
1831  MEMap::const_iterator e = data_.end();
1832  MEMap::const_iterator i = data_.lower_bound(proto);
1833  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i)
1834  if (*cleaned == *i->data_.dirname
1835  && (i->data_.flags & DQMNet::DQM_PROP_TAGGED)
1836  && i->data_.tag == tag)
1837  result.push_back(const_cast<MonitorElement *>(&*i));
1838 
1839  return result;
1840 }
int i
Definition: DBlmapReader.cc:9
static const uint32_t DQM_PROP_TAGGED
Definition: DQMNet.h:54
tuple result
Definition: mps_fire.py:84
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:80
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1661
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:70
std::vector< T * > clean
Definition: MVATrainer.cc:156
MEMap data_
Definition: DQMStore.h:714
void DQMStore::getContents ( std::vector< std::string > &  into,
bool  showContents = true 
) const

get contents; return vector<string> of the form <dir pathname>="">:<obj1>,<obj2>,<obj3>; if showContents = false, change form to <dir pathname>="">: (useful for subscription requests; meant to imply "all contents")

Definition at line 1847 of file DQMStore.cc.

References data_, dirs_, isSubdirectory(), visualization-live-secondInstance_cfg::m, hlt_dqm_clientPB-live_cfg::me, contentValuesCheck::nfound, and AlCaHLTBitMon_QueryRunRegistry::string.

1848 {
1849  into.clear();
1850  into.reserve(dirs_.size());
1851 
1852  MEMap::const_iterator me = data_.end();
1853  std::set<std::string>::const_iterator di = dirs_.begin();
1854  std::set<std::string>::const_iterator de = dirs_.end();
1855  for ( ; di != de; ++di)
1856  {
1857  MonitorElement proto(&*di, std::string());
1858  MEMap::const_iterator mi = data_.lower_bound(proto);
1859  MEMap::const_iterator m = mi;
1860  size_t sz = di->size() + 2;
1861  size_t nfound = 0;
1862  for ( ; m != me && isSubdirectory(*di, *m->data_.dirname); ++m)
1863  if (*di == *m->data_.dirname)
1864  {
1865  sz += m->data_.objname.size() + 1;
1866  ++nfound;
1867  }
1868 
1869  if (! nfound)
1870  continue;
1871 
1872  std::vector<std::string>::iterator istr
1873  = into.insert(into.end(), std::string());
1874 
1875  if (showContents)
1876  {
1877  istr->reserve(sz);
1878 
1879  *istr += *di;
1880  *istr += ':';
1881  for (sz = 0; mi != m; ++mi)
1882  {
1883  if (*di != *mi->data_.dirname)
1884  continue;
1885 
1886  if (sz > 0)
1887  *istr += ',';
1888 
1889  *istr += mi->data_.objname;
1890  ++sz;
1891  }
1892  }
1893  else
1894  {
1895  istr->reserve(di->size() + 2);
1896  *istr += *di;
1897  *istr += ':';
1898  }
1899  }
1900 }
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:70
MEMap data_
Definition: DQMStore.h:714
std::set< std::string > dirs_
Definition: DQMStore.h:715
std::vector< MonitorElement * > DQMStore::getMatchingContents ( const std::string &  pattern,
lat::Regexp::Syntax  syntaxType = lat::Regexp::Wildcard 
) const

get vector with children of folder, including all subfolders + their children; matches names against a wildcard pattern matched against the full ME path

Definition at line 2037 of file DQMStore.cc.

References data_, alignCSCRings::e, i, mergePath(), fed_dqm_sourceclient-live_cfg::path, raiseDQMError(), mps_fire::result, corrVsCorr::rx, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by EgHLTOfflineSummaryClient::getQTestResults_(), and DQMFileSaver::saveForOnline().

2038 {
2039  lat::Regexp rx;
2040  try
2041  {
2042  rx = lat::Regexp(pattern, 0, syntaxType);
2043  rx.study();
2044  }
2045  catch (lat::Error &e)
2046  {
2047  raiseDQMError("DQMStore", "Invalid regular expression '%s': %s",
2048  pattern.c_str(), e.explain().c_str());
2049  }
2050 
2051  std::string path;
2052  std::vector<MonitorElement *> result;
2053  MEMap::const_iterator i = data_.begin();
2054  MEMap::const_iterator e = data_.end();
2055  for ( ; i != e; ++i)
2056  {
2057  path.clear();
2058  mergePath(path, *i->data_.dirname, i->data_.objname);
2059  if (rx.match(path))
2060  result.push_back(const_cast<MonitorElement *>(&*i));
2061  }
2062 
2063  return result;
2064 }
int i
Definition: DBlmapReader.cc:9
static void mergePath(std::string &path, const std::string &dir, const std::string &name)
Definition: DQMStore.cc:110
tuple result
Definition: mps_fire.py:84
MEMap data_
Definition: DQMStore.h:714
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
std::vector< std::string > DQMStore::getMEs ( void  ) const

get list of (non-dir) MEs of current directory

Definition at line 1749 of file DQMStore.cc.

References data_, alignCSCRings::e, i, isSubdirectory(), pwd_, mps_fire::result, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by CalibrationScanTask::book(), CalibrationTask::book(), and dqmCopyRecursively().

1750 {
1751  MonitorElement proto(&pwd_, std::string());
1752  std::vector<std::string> result;
1753  MEMap::const_iterator e = data_.end();
1754  MEMap::const_iterator i = data_.lower_bound(proto);
1755  for ( ; i != e && isSubdirectory(pwd_, *i->data_.dirname); ++i)
1756  if (pwd_ == *i->data_.dirname)
1757  result.push_back(i->getName());
1758 
1759  return result;
1760 }
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: mps_fire.py:84
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:70
std::string pwd_
Definition: DQMStore.h:713
MEMap data_
Definition: DQMStore.h:714
QCriterion * DQMStore::getQCriterion ( const std::string &  qtname) const
int DQMStore::getStatus ( const std::string &  path = "") const

get "global" folder <path> status (one of:STATUS_OK, WARNING, ERROR, OTHER); returns most sever error, where ERROR > WARNING > OTHER > STATUS_OK; see Core/interface/QTestStatus.h for details on "OTHER"

Definition at line 3373 of file DQMStore.cc.

References clean, cleanTrailingSlashes(), data_, dqm::qstatus::ERROR, isSubdirectory(), hlt_dqm_clientPB-live_cfg::me, dqm::qstatus::OTHER, mps_update::status, dqm::qstatus::STATUS_OK, AlCaHLTBitMon_QueryRunRegistry::string, and dqm::qstatus::WARNING.

Referenced by QTestStatusChecker::checkGlobalStatus(), and SiStripInformationExtractor::printAlarmList().

3374 {
3376  const std::string *cleaned = 0;
3377  cleanTrailingSlashes(path, clean, cleaned);
3378 
3380  MEMap::const_iterator mi = data_.begin();
3381  MEMap::const_iterator me = data_.end();
3382  for ( ; mi != me; ++mi)
3383  {
3384  if (! cleaned->empty() && ! isSubdirectory(*cleaned, *mi->data_.dirname))
3385  continue;
3386 
3387  if (mi->hasError())
3388  return dqm::qstatus::ERROR;
3389  else if (mi->hasWarning())
3390  status = dqm::qstatus::WARNING;
3391  else if (status < dqm::qstatus::WARNING
3392  && mi->hasOtherReport())
3393  status = dqm::qstatus::OTHER;
3394  }
3395  return status;
3396 }
static const int OTHER
static const int WARNING
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:80
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:70
std::vector< T * > clean
Definition: MVATrainer.cc:156
MEMap data_
Definition: DQMStore.h:714
static const int STATUS_OK
static const int ERROR
tuple status
Definition: mps_update.py:57
std::vector< std::string > DQMStore::getSubdirs ( void  ) const

get list of subdirectories of current directory

Definition at line 1726 of file DQMStore.cc.

References dirs_, alignCSCRings::e, i, isSubdirectory(), pwd_, and mps_fire::result.

Referenced by SiStripSummaryCreator::createSummary(), dqmCopyRecursively(), TauDQMFileLoader::endRun(), SiStripSummaryCreator::fillGrandSummaryHistos(), SiStripQualityChecker::fillSubDetStatus(), SiStripSummaryCreator::fillSummaryHistos(), SiStripUtility::getModuleFolderList(), SiStripSummaryCreator::getSummaryME(), SiStripUtility::goToDir(), SiStripInformationExtractor::printAlarmList(), SiStripInformationExtractor::printNonGeomHistoList(), SiStripInformationExtractor::printSummaryHistoList(), DQMFileSaver::saveForOffline(), DQMFileSaver::saveForOnline(), and SiStripTrackerMapCreator::setTkMapFromHistogram().

1727 {
1728  std::vector<std::string> result;
1729  std::set<std::string>::const_iterator e = dirs_.end();
1730  std::set<std::string>::const_iterator i = dirs_.find(pwd_);
1731 
1732  // If we didn't find current directory, the tree is empty, so quit.
1733  if (i == e)
1734  return result;
1735 
1736  // Skip the current directory and then start looking for immediate
1737  // subdirectories in the dirs_ list. Stop when we are no longer in
1738  // (direct or indirect) subdirectories of pwd_. Note that we don't
1739  // "know" which order the set will sort A/B, A/B/C and A/D.
1740  while (++i != e && isSubdirectory(pwd_, *i))
1741  if (i->find('/', pwd_.size()+1) == std::string::npos)
1742  result.push_back(*i);
1743 
1744  return result;
1745 }
int i
Definition: DBlmapReader.cc:9
tuple result
Definition: mps_fire.py:84
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:70
std::string pwd_
Definition: DQMStore.h:713
std::set< std::string > dirs_
Definition: DQMStore.h:715
void DQMStore::goUp ( void  )
MonitorElement* DQMStore::initialise ( MonitorElement me,
const std::string &  path 
)
private

Referenced by book().

void DQMStore::initializeFrom ( const edm::ParameterSet pset)
private

Definition at line 575 of file DQMStore.cc.

References collateHistograms_, gather_cfg::cout, enableMultiThread_, edm::ParameterSet::getUntrackedParameter(), LSbasedMode_, makeDirectory(), qalgos_, readFile(), reset(), s_referenceDirName, scaleFlag_, AlCaHLTBitMon_QueryRunRegistry::string, StripRunDirs, verbose_, and verboseQT_.

Referenced by DQMStore().

575  {
576  makeDirectory("");
577  reset();
578 
579  // set steerable parameters
580  verbose_ = pset.getUntrackedParameter<int>("verbose", 0);
581  if (verbose_ > 0)
582  std::cout << "DQMStore: verbosity set to " << verbose_ << std::endl;
583 
584  verboseQT_ = pset.getUntrackedParameter<int>("verboseQT", 0);
585  if (verbose_ > 0)
586  std::cout << "DQMStore: QTest verbosity set to " << verboseQT_ << std::endl;
587 
588  collateHistograms_ = pset.getUntrackedParameter<bool>("collateHistograms", false);
589  if (collateHistograms_)
590  std::cout << "DQMStore: histogram collation is enabled\n";
591 
592  enableMultiThread_ = pset.getUntrackedParameter<bool>("enableMultiThread", false);
593  if (enableMultiThread_)
594  std::cout << "DQMStore: MultiThread option is enabled\n";
595 
596  LSbasedMode_ = pset.getUntrackedParameter<bool>("LSbasedMode", false);
597  if (LSbasedMode_)
598  std::cout << "DQMStore: LSbasedMode option is enabled\n";
599 
600  std::string ref = pset.getUntrackedParameter<std::string>("referenceFileName", "");
601  if (! ref.empty())
602  {
603  std::cout << "DQMStore: using reference file '" << ref << "'\n";
604  readFile(ref, true, "", s_referenceDirName, StripRunDirs, false);
605  }
606 
607  initQCriterion<Comp2RefChi2>(qalgos_);
608  initQCriterion<Comp2RefKolmogorov>(qalgos_);
609  initQCriterion<ContentsXRange>(qalgos_);
610  initQCriterion<ContentsYRange>(qalgos_);
611  initQCriterion<MeanWithinExpected>(qalgos_);
612  initQCriterion<Comp2RefEqualH>(qalgos_);
613  initQCriterion<DeadChannel>(qalgos_);
614  initQCriterion<NoisyChannel>(qalgos_);
615  initQCriterion<ContentsWithinExpected>(qalgos_);
616  initQCriterion<CompareToMedian>(qalgos_);
617  initQCriterion<CompareLastFilledBin>(qalgos_);
618  initQCriterion<CheckVariance>(qalgos_);
619 
620  scaleFlag_ = pset.getUntrackedParameter<double>("ScalingFlag", 0.0);
621  if (verbose_ > 0)
622  std::cout << "DQMStore: Scaling Flag set to " << scaleFlag_ << std::endl;
623 }
T getUntrackedParameter(std::string const &, T const &) const
bool readFile(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:3035
unsigned verboseQT_
Definition: DQMStore.h:700
double scaleFlag_
Definition: DQMStore.h:702
QAMap qalgos_
Definition: DQMStore.h:718
unsigned verbose_
Definition: DQMStore.h:699
static const std::string s_referenceDirName
Definition: DQMStore.cc:56
tuple cout
Definition: gather_cfg.py:145
void reset(void)
Definition: DQMStore.cc:2073
bool collateHistograms_
Definition: DQMStore.h:703
bool LSbasedMode_
Definition: DQMStore.h:705
void makeDirectory(const std::string &path)
Definition: DQMStore.cc:751
bool enableMultiThread_
Definition: DQMStore.h:704
bool DQMStore::isCollate ( void  ) const

Definition at line 3451 of file DQMStore.cc.

References collateHistograms_.

3452 {
3453  return collateHistograms_;
3454 }
bool collateHistograms_
Definition: DQMStore.h:703
bool DQMStore::isCollateME ( MonitorElement me) const
private

Definition at line 3460 of file DQMStore.cc.

References MonitorElement::data_, DQMNet::CoreObject::dirname, isSubdirectory(), and s_collateDirName.

Referenced by extract().

3461 { return me && isSubdirectory(s_collateDirName, *me->data_.dirname); }
const std::string * dirname
Definition: DQMNet.h:105
static const std::string s_collateDirName
Definition: DQMStore.cc:57
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:70
DQMNet::CoreObject data_
bool DQMStore::load ( const std::string &  filename,
OpenRunDirs  stripdirs = StripRunDirs,
bool  fileMustExist = true 
)

public load root file <filename>, and copy MonitorElements; overwrite identical MonitorElements (default: true); set DQMStore.collateHistograms to true to sum several files note: by default this method strips off run dir structure

Definition at line 3008 of file DQMStore.cc.

References collateHistograms_, gather_cfg::cout, readFile(), readFilePB(), s_rxpbfile(), and verbose_.

Referenced by DQMFileReader::beginJob().

3011 {
3012  bool overwrite = true;
3013  if (collateHistograms_) overwrite = false;
3014  if (verbose_)
3015  {
3016  std::cout << "DQMStore::load: reading from file '" << filename << "'\n";
3017  if (collateHistograms_)
3018  std::cout << "DQMStore::load: in collate mode " << "\n";
3019  else
3020  std::cout << "DQMStore::load: in overwrite mode " << "\n";
3021  }
3022 
3023  if (!s_rxpbfile.match(filename, 0, 0))
3024  return readFile(filename, overwrite, "", "", stripdirs, fileMustExist);
3025  else
3026  return readFilePB(filename, overwrite, "", "", stripdirs, fileMustExist);
3027 }
bool readFile(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:3035
unsigned verbose_
Definition: DQMStore.h:699
static const lat::Regexp s_rxpbfile(".*\\.pb$")
bool readFilePB(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:3119
tuple filename
Definition: lut2db_cfg.py:20
tuple cout
Definition: gather_cfg.py:145
bool collateHistograms_
Definition: DQMStore.h:703
void DQMStore::makeDirectory ( const std::string &  path)
private

get folder corresponding to inpath wrt to root (create subdirs if necessary)

Definition at line 751 of file DQMStore.cc.

References dirs_, findObject(), mergeVDriftHistosByStation::name, raiseDQMError(), pickleFileParser::slash, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by initializeFrom(), readDirectory(), and setCurrentFolder().

752 {
753  std::string prev;
754  std::string subdir;
756  prev.reserve(path.size());
757  subdir.reserve(path.size());
758  name.reserve(path.size());
759  size_t prevname = 0;
760  size_t slash = 0;
761 
762  while (true)
763  {
764  // Create this subdirectory component.
765  subdir.clear();
766  subdir.append(path, 0, slash);
767  name.clear();
768  name.append(subdir, prevname, std::string::npos);
769  if (! prev.empty() && findObject(prev, name))
770  raiseDQMError("DQMStore", "Attempt to create subdirectory '%s'"
771  " which already exists as a monitor element",
772  subdir.c_str());
773 
774  if (! dirs_.count(subdir))
775  dirs_.insert(subdir);
776 
777  // Stop if we've reached the end (including possibly a trailing slash).
778  if (slash+1 >= path.size())
779  break;
780 
781  // Find the next slash, making sure we progress. If reach the end,
782  // process the last path component; the next loop round will terminate.
783  prevname = slash ? slash+1 : slash;
784  prev = subdir;
785  if ((slash = path.find('/', ++slash)) == std::string::npos)
786  slash = path.size();
787  }
788 }
MonitorElement * findObject(const std::string &dir, const std::string &name, const uint32_t run=0, const uint32_t lumi=0, const uint32_t streamId=0, const uint32_t moduleId=0) const
Definition: DQMStore.cc:1905
std::set< std::string > dirs_
Definition: DQMStore.h:715
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
template<typename iFunc >
void DQMStore::meBookerGetter ( iFunc  f)
inline

Definition at line 275 of file DQMStore.h.

References f, ibooker_, and igetter_.

Referenced by DQMEDHarvester::endJob(), and DQMEDHarvester::endLuminosityBlock().

275  {
276  f(*ibooker_, *igetter_);
277  }
IGetter * igetter_
Definition: DQMStore.h:723
double f[11][100]
IBooker * ibooker_
Definition: DQMStore.h:722
template<typename iFunc >
void DQMStore::meGetter ( iFunc  f)
inline

Definition at line 284 of file DQMStore.h.

References f, and igetter_.

284  {
285  f(*igetter_);
286  }
IGetter * igetter_
Definition: DQMStore.h:723
double f[11][100]
void DQMStore::mergeAndResetMEsLuminositySummaryCache ( uint32_t  run,
uint32_t  lumi,
uint32_t  streamId,
uint32_t  moduleId 
)

Definition at line 432 of file DQMStore.cc.

References assert(), book_mutex_, gather_cfg::cout, data_, MonitorElement::DQM_KIND_TH1F, alignCSCRings::e, MonitorElement::globalize(), i, list(), LSbasedMode_, hlt_dqm_clientPB-live_cfg::me, eostools::move(), HcalObjRepresent::Reset(), MonitorElement::setLumi(), AlCaHLTBitMon_QueryRunRegistry::string, and verbose_.

Referenced by DQMEDAnalyzer::endLuminosityBlockSummary(), and FastTimerService::postStreamEndLumi().

435  {
436  if (verbose_ > 1)
437  std::cout << "DQMStore::mergeAndResetMEsLuminositySummaryCache - Merging objects from run: "
438  << run << " lumi: " << lumi
439  << ", stream: " << streamId
440  << " module: " << moduleId << std::endl;
441  std::string null_str("");
442  MonitorElement proto(&null_str, null_str, run, streamId, moduleId);
443  std::set<MonitorElement>::const_iterator e = data_.end();
444  std::set<MonitorElement>::const_iterator i = data_.lower_bound(proto);
445 
446  while (i != e) {
447  if (i->data_.run != run
448  || i->data_.streamId != streamId
449  || i->data_.moduleId != moduleId)
450  break;
451 
452  // Handle LS-based histograms only.
453  if (not (i->getLumiFlag() || LSbasedMode_)) {
454  ++i;
455  continue;
456  }
457 
458  MonitorElement global_me(*i, MonitorElementNoCloneTag());
459  global_me.globalize();
460  global_me.setLumi(lumi);
461  // Since this accesses the data, the operation must be
462  // be locked.
463  std::lock_guard<std::mutex> guard(book_mutex_);
464  std::set<MonitorElement>::const_iterator me = data_.find(global_me);
465  if (me != data_.end()) {
466  if (verbose_ > 1)
467  std::cout << "Found global Object, using it --> " << me->getFullname() << std::endl;
468 
469  //don't take any action if the ME is an INT || FLOAT || STRING
470  if(me->kind() >= MonitorElement::DQM_KIND_TH1F)
471  {
472  if(me->getTH1()->CanExtendAllAxes() && i->getTH1()->CanExtendAllAxes()) {
473  TList list;
474  list.Add(i->getTH1());
475  if( -1 == me->getTH1()->Merge(&list)) {
476  std::cout << "mergeAndResetMEsLuminositySummaryCache: Failed to merge DQM element "<<me->getFullname();
477  }
478  }
479  else {
480  if (i->getTH1()->GetEntries())
481  me->getTH1()->Add(i->getTH1());
482  }
483  }
484  } else {
485  if (verbose_ > 1)
486  std::cout << "No global Object found. " << std::endl;
487  std::pair<std::set<MonitorElement>::const_iterator, bool> gme;
488 
489  // this makes an actual and a single copy with Clone()'ed th1
490  MonitorElement actual_global_me(*i);
491  actual_global_me.globalize();
492  actual_global_me.setLumi(lumi);
493  gme = data_.insert(std::move(actual_global_me));
494  assert(gme.second);
495  }
496  // make the ME reusable for the next LS
497  const_cast<MonitorElement*>(&*i)->Reset();
498  ++i;
499  }
500 }
int i
Definition: DBlmapReader.cc:9
tuple lumi
Definition: fjr2json.py:35
assert(m_qm.get())
std::mutex book_mutex_
Definition: DQMStore.h:721
def move
Definition: eostools.py:510
unsigned verbose_
Definition: DQMStore.h:699
MEMap data_
Definition: DQMStore.h:714
tuple cout
Definition: gather_cfg.py:145
void Reset(std::vector< TH2F > &depth)
bool LSbasedMode_
Definition: DQMStore.h:705
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
void DQMStore::mergeAndResetMEsRunSummaryCache ( uint32_t  run,
uint32_t  streamId,
uint32_t  moduleId 
)

Function to transfer the local copies of histograms from each stream into the global ROOT Object. Since this involves de-facto a booking action in the case in which the global object is not yet there, the function requires the acquisition of the central lock into the DQMStore. In case we book the global object for the first time, no Add action is needed since the ROOT histograms is cloned starting from the local one.

Definition at line 359 of file DQMStore.cc.

References assert(), book_mutex_, gather_cfg::cout, data_, MonitorElement::DQM_KIND_TH1F, alignCSCRings::e, MonitorElement::globalize(), i, list(), LSbasedMode_, hlt_dqm_clientPB-live_cfg::me, eostools::move(), AlCaHLTBitMon_QueryRunRegistry::string, and verbose_.

Referenced by DQMEDAnalyzer::endRunSummary(), and FastTimerService::postStreamEndRun().

361  {
362  if (verbose_ > 1)
363  std::cout << "DQMStore::mergeAndResetMEsRunSummaryCache - Merging objects from run: "
364  << run
365  << ", stream: " << streamId
366  << " module: " << moduleId << std::endl;
367 
368  if (LSbasedMode_) {
369  return;
370  }
371 
372  std::string null_str("");
373  MonitorElement proto(&null_str, null_str, run, streamId, moduleId);
374  std::set<MonitorElement>::const_iterator e = data_.end();
375  std::set<MonitorElement>::const_iterator i = data_.lower_bound(proto);
376  while (i != e) {
377  if (i->data_.run != run
378  || i->data_.streamId != streamId
379  || i->data_.moduleId != moduleId)
380  break;
381 
382  // Handle Run-based histograms only.
383  if (i->getLumiFlag() || LSbasedMode_) {
384  ++i;
385  continue;
386  }
387 
388  // don't call the copy constructor
389  // we are just searching for a global histogram - a copy is not necessary
390  MonitorElement global_me(*i, MonitorElementNoCloneTag());
391  global_me.globalize();
392 
393  // Since this accesses the data, the operation must be
394  // be locked.
395  std::lock_guard<std::mutex> guard(book_mutex_);
396  std::set<MonitorElement>::const_iterator me = data_.find(global_me);
397  if (me != data_.end()) {
398  if (verbose_ > 1)
399  std::cout << "Found global Object, using it --> " << me->getFullname() << std::endl;
400 
401  //don't take any action if the ME is an INT || FLOAT || STRING
402  if(me->kind() >= MonitorElement::DQM_KIND_TH1F)
403  {
404  if(me->getTH1()->CanExtendAllAxes() && i->getTH1()->CanExtendAllAxes()) {
405  TList list;
406  list.Add(i->getTH1());
407  if( -1 == me->getTH1()->Merge(&list)) {
408  std::cout << "mergeAndResetMEsRunSummaryCache: Failed to merge DQM element "<<me->getFullname();
409  }
410  }
411  else {
412  if (i->getTH1()->GetEntries())
413  me->getTH1()->Add(i->getTH1());
414  }
415  }
416  } else {
417  if (verbose_ > 1)
418  std::cout << "No global Object found. " << std::endl;
419  std::pair<std::set<MonitorElement>::const_iterator, bool> gme;
420 
421  // this makes an actual and a single copy with Clone()'ed th1
422  MonitorElement actual_global_me(*i);
423  actual_global_me.globalize();
424  gme = data_.insert(std::move(actual_global_me));
425  assert(gme.second);
426  }
427  // TODO(rovere): eventually reset the local object and mark it as reusable??
428  ++i;
429  }
430 }
int i
Definition: DBlmapReader.cc:9
assert(m_qm.get())
std::mutex book_mutex_
Definition: DQMStore.h:721
def move
Definition: eostools.py:510
unsigned verbose_
Definition: DQMStore.h:699
MEMap data_
Definition: DQMStore.h:714
tuple cout
Definition: gather_cfg.py:145
bool LSbasedMode_
Definition: DQMStore.h:705
How EventSelector::AcceptEvent() decides whether to accept an event for output otherwise it is excluding the probing of A single or multiple positive and the trigger will pass if any such matching triggers are PASS or EXCEPTION[A criterion thatmatches no triggers at all is detected and causes a throw.] A single negative with an expectation of appropriate bit checking in the decision and the trigger will pass if any such matching triggers are FAIL or EXCEPTION A wildcarded negative criterion that matches more than one trigger in the trigger list("!*","!HLTx*"if it matches 2 triggers or more) will accept the event if all the matching triggers are FAIL.It will reject the event if any of the triggers are PASS or EXCEPTION(this matches the behavior of"!*"before the partial wildcard feature was incorporated).Triggers which are in the READY state are completely ignored.(READY should never be returned since the trigger paths have been run
bool DQMStore::mtEnabled ( )
inline

Definition at line 561 of file DQMStore.h.

References enableMultiThread_.

561 { return enableMultiThread_; };
bool enableMultiThread_
Definition: DQMStore.h:704
bool DQMStore::open ( const std::string &  filename,
bool  overwrite = false,
const std::string &  onlypath = "",
const std::string &  prepend = "",
OpenRunDirs  stripdirs = KeepRunDirs,
bool  fileMustExist = true 
)

public open/read root file <filename>, and copy MonitorElements; if flag=true, overwrite identical MonitorElements (default: false); if onlypath != "", read only selected directory if prepend !="", prepend string to path note: by default this method keeps the dir structure as in file and does not update monitor element references!

Definition at line 2993 of file DQMStore.cc.

References readFile().

Referenced by SiStripCalibLorentzAngle::algoBeginJob(), DQMFileReader::beginJob(), edmtest::DQMReferenceHistogramRootFileEventSetupAnalyzer::beginRun(), EcalCondDBWriter::EcalCondDBWriter(), TauDQMFileLoader::endRun(), Vispa.Plugins.ConfigEditor.ConfigEditorTabController.ConfigEditorTabController::importConfig(), PFDQMEventSelector::openInputFile(), SiStripOfflineDQM::openInputFile(), DQMHistoryServiceBase::openRequestedFile(), BuildTrackerMapPlugin::read(), readFilePB(), savePB(), and StatisticsFilter::StatisticsFilter().

2999 {
3000  return readFile(filename,overwrite,onlypath,prepend,stripdirs,fileMustExist);
3001 }
bool readFile(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:3035
tuple filename
Definition: lut2db_cfg.py:20
const DQMStore& DQMStore::operator= ( const DQMStore )
private
void DQMStore::print_trace ( const std::string &  dir,
const std::string &  name 
)
private

Definition at line 635 of file DQMStore.cc.

References mps_check::array, symbols::demangled, i, visualization-live-secondInstance_cfg::m, alignCSCRings::r, s_rxtrace(), findQualityFiles::size, stream_, and verbose_.

Referenced by book().

636 {
637  // the access to the member stream_ is implicitely protected against
638  // concurrency problems because the print_trace method is always called behind
639  // a lock (see bookTransaction).
640  if (!stream_)
641  stream_ = new std::ofstream("histogramBookingBT.log");
642 
643  void *array[10];
644  size_t size;
645  char **strings;
646  int r=0;
647  lat::RegexpMatch m;
648  m.reset();
649 
650  size = backtrace (array, 10);
651  strings = backtrace_symbols (array, size);
652 
653  if ((size > 4)
654  &&s_rxtrace.match(strings[4], 0, 0, &m))
655  {
656  char * demangled = abi::__cxa_demangle(m.matchString(strings[4], 2).c_str(), 0, 0, &r);
657  *stream_ << "\"" << dir << "/"
658  << name << "\" "
659  << (r ? m.matchString(strings[4], 2) : demangled) << " "
660  << m.matchString(strings[4], 1) << "\n";
661  free(demangled);
662  }
663  else
664  *stream_ << "Skipping "<< dir << "/" << name
665  << " with stack size " << size << "\n";
666  /* In this case print the full stack trace, up to main or to the
667  * maximum stack size, i.e. 10. */
668  if (verbose_ > 4)
669  {
670  size_t i;
671  m.reset();
672 
673  for (i = 0; i < size; i++)
674  if (s_rxtrace.match(strings[i], 0, 0, &m))
675  {
676  char * demangled = abi::__cxa_demangle(m.matchString(strings[i], 2).c_str(), 0, 0, &r);
677  *stream_ << "\t\t" << i << "/" << size << " "
678  << (r ? m.matchString(strings[i], 2) : demangled) << " "
679  << m.matchString(strings[i], 1) << std::endl;
680  free (demangled);
681  }
682  }
683  free (strings);
684 }
int i
Definition: DBlmapReader.cc:9
tuple array
Definition: mps_check.py:181
static const lat::Regexp s_rxtrace("(.*)\\((.*)\\+0x.*\\).*")
unsigned verbose_
Definition: DQMStore.h:699
tuple demangled
Definition: symbols.py:61
std::ofstream * stream_
Definition: DQMStore.h:711
dbl *** dir
Definition: mlp_gen.cc:35
tuple size
Write out results.
const std::string & DQMStore::pwd ( void  ) const
unsigned int DQMStore::readDirectory ( TFile *  file,
bool  overwrite,
const std::string &  onlypath,
const std::string &  prepend,
const std::string &  curdir,
OpenRunDirs  stripdirs 
)
private

read ROOT objects from file <file> in directory <onlypath>; return total # of ROOT objects read

Definition at line 2838 of file DQMStore.cc.

References collateHistograms_, KineDebug3::count(), gather_cfg::cout, extract(), isSubdirectory(), relval_steps::key, makeDirectory(), GetRecoTauVFromDQM_MC_cff::next, getGTfromDQMFile::obj, raiseDQMError(), s_collateDirName, s_monitorDirName, s_referenceDirName, createPayload::skip, pickleFileParser::slash, AlCaHLTBitMon_QueryRunRegistry::string, StripRunDirs, and verbose_.

Referenced by readFile().

2844 {
2845  unsigned int ntot = 0;
2846  unsigned int count = 0;
2847 
2848  if (! file->cd(curdir.c_str()))
2849  raiseDQMError("DQMStore", "Failed to process directory '%s' while"
2850  " reading file '%s'", curdir.c_str(), file->GetName());
2851 
2852  // Figure out current directory name, but strip out the top
2853  // directory into which we dump everything.
2854  std::string dirpart = curdir;
2855  if (dirpart.compare(0, s_monitorDirName.size(), s_monitorDirName) == 0)
2856  {
2857  if (dirpart.size() == s_monitorDirName.size())
2858  dirpart.clear();
2859  else if (dirpart[s_monitorDirName.size()] == '/')
2860  dirpart.erase(0, s_monitorDirName.size()+1);
2861  }
2862 
2863  // See if we are going to skip this directory.
2864  bool skip = (! onlypath.empty() && ! isSubdirectory(onlypath, dirpart));
2865 
2866  if (prepend == s_collateDirName ||
2867  prepend == s_referenceDirName ||
2868  stripdirs == StripRunDirs )
2869  {
2870  // Remove Run # and RunSummary dirs
2871  // first look for Run summary,
2872  // if that is found and erased, also erase Run dir
2873  size_t slash = dirpart.find('/');
2874  size_t pos = dirpart.find("/Run summary");
2875  if (slash != std::string::npos && pos !=std::string::npos)
2876  {
2877  dirpart.erase(pos,12);
2878 
2879  pos = dirpart.find("Run ");
2880  size_t length = dirpart.find('/',pos+1)-pos+1;
2881  if (pos !=std::string::npos)
2882  dirpart.erase(pos,length);
2883  }
2884  }
2885 
2886  // If we are prepending, add it to the directory name,
2887  // and suppress reading of already existing reference histograms
2888  if (prepend == s_collateDirName ||
2889  prepend == s_referenceDirName)
2890  {
2891  size_t slash = dirpart.find('/');
2892  // If we are reading reference, skip previous reference.
2893  if (slash == std::string::npos // skip if Reference is toplevel folder, i.e. no slash
2894  && slash+1+s_referenceDirName.size() == dirpart.size()
2895  && dirpart.compare(slash+1, s_referenceDirName.size(), s_referenceDirName) == 0)
2896  return 0;
2897 
2898  slash = dirpart.find('/');
2899  // Skip reading of EventInfo subdirectory.
2900  if (slash != std::string::npos
2901  && slash + 10 == dirpart.size()
2902  && dirpart.compare( slash+1 , 9 , "EventInfo") == 0) {
2903  if (verbose_)
2904  std::cout << "DQMStore::readDirectory: skipping '" << dirpart << "'\n";
2905  return 0;
2906  }
2907 
2908  // Add prefix.
2909  if (dirpart.empty())
2910  dirpart = prepend;
2911  else
2912  dirpart = prepend + '/' + dirpart;
2913  }
2914  else if (! prepend.empty())
2915  {
2916  if (dirpart.empty())
2917  dirpart = prepend;
2918  else
2919  dirpart = prepend + '/' + dirpart;
2920  }
2921 
2922  // Loop over the contents of this directory in the file.
2923  // Post-pone string object handling to happen after other
2924  // objects have been read in so we are guaranteed to have
2925  // histograms by the time we read in quality tests and tags.
2926  TKey *key;
2927  TIter next (gDirectory->GetListOfKeys());
2928  std::list<TObject *> delayed;
2929  while ((key = (TKey *) next()))
2930  {
2931  std::auto_ptr<TObject> obj(key->ReadObj());
2932  if (dynamic_cast<TDirectory *>(obj.get()))
2933  {
2934  std::string subdir;
2935  subdir.reserve(curdir.size() + strlen(obj->GetName()) + 2);
2936  subdir += curdir;
2937  if (! curdir.empty())
2938  subdir += '/';
2939  subdir += obj->GetName();
2940 
2941  ntot += readDirectory(file, overwrite, onlypath, prepend, subdir, stripdirs);
2942  }
2943  else if (skip)
2944  ;
2945  else if (dynamic_cast<TObjString *>(obj.get()))
2946  {
2947  delayed.push_back(obj.release());
2948  }
2949  else
2950  {
2951  if (verbose_ > 2)
2952  std::cout << "DQMStore: reading object '" << obj->GetName()
2953  << "' of type '" << obj->IsA()->GetName()
2954  << "' from '" << file->GetName()
2955  << "' into '" << dirpart << "'\n";
2956 
2957  makeDirectory(dirpart);
2958  if (extract(obj.get(), dirpart, overwrite, collateHistograms_))
2959  ++count;
2960  }
2961  }
2962 
2963  while (! delayed.empty())
2964  {
2965  if (verbose_ > 2)
2966  std::cout << "DQMStore: reading object '" << delayed.front()->GetName()
2967  << "' of type '" << delayed.front()->IsA()->GetName()
2968  << "' from '" << file->GetName()
2969  << "' into '" << dirpart << "'\n";
2970 
2971  makeDirectory(dirpart);
2972  if (extract(delayed.front(), dirpart, overwrite, collateHistograms_))
2973  ++count;
2974 
2975  delete delayed.front();
2976  delayed.pop_front();
2977  }
2978 
2979  if (verbose_ > 1)
2980  std::cout << "DQMStore: read " << count << '/' << ntot
2981  << " objects from directory '" << dirpart << "'\n";
2982 
2983  return ntot + count;
2984 }
static const std::string s_collateDirName
Definition: DQMStore.cc:57
static const std::string s_monitorDirName
name of global monitoring folder (containing all sources subdirectories)
Definition: DQMStore.cc:55
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:70
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
unsigned verbose_
Definition: DQMStore.h:699
static const std::string s_referenceDirName
Definition: DQMStore.cc:56
unsigned int readDirectory(TFile *file, bool overwrite, const std::string &path, const std::string &prepend, const std::string &curdir, OpenRunDirs stripdirs)
Definition: DQMStore.cc:2838
bool extract(TObject *obj, const std::string &dir, bool overwrite, bool collateHistograms)
Definition: DQMStore.cc:2163
tuple cout
Definition: gather_cfg.py:145
bool collateHistograms_
Definition: DQMStore.h:703
void makeDirectory(const std::string &path)
Definition: DQMStore.cc:751
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
bool DQMStore::readFile ( const std::string &  filename,
bool  overwrite = false,
const std::string &  onlypath = "",
const std::string &  prepend = "",
OpenRunDirs  stripdirs = StripRunDirs,
bool  fileMustExist = true 
)
private

private readFile <filename>, and copy MonitorElements; if flag=true, overwrite identical MonitorElements (default: false); if onlypath != "", read only selected directory if prepend !="", prepend string to path if StripRunDirs is set the run and run summary folders are erased.

Definition at line 3035 of file DQMStore.cc.

References gather_cfg::cout, data_, cppFunctionSkipper::exception, f, hlt_dqm_clientPB-live_cfg::me, gen::n, raiseDQMError(), readDirectory(), and verbose_.

Referenced by initializeFrom(), load(), Vispa.Plugins.EventBrowser.EventBrowserTabController.EventBrowserTabController::navigate(), Vispa.Main.TabController.TabController::open(), open(), and Vispa.Main.TabController.TabController::refresh().

3041 {
3042 
3043  if (verbose_)
3044  std::cout << "DQMStore::readFile: reading from file '" << filename << "'\n";
3045 
3046  std::auto_ptr<TFile> f;
3047 
3048  try
3049  {
3050  f.reset(TFile::Open(filename.c_str()));
3051  if (! f.get() || f->IsZombie())
3052  raiseDQMError("DQMStore", "Failed to open file '%s'", filename.c_str());
3053  }
3054  catch (std::exception &)
3055  {
3056  if (fileMustExist)
3057  throw;
3058  else
3059  {
3060  if (verbose_)
3061  std::cout << "DQMStore::readFile: file '" << filename << "' does not exist, continuing\n";
3062  return false;
3063  }
3064  }
3065 
3066  unsigned n = readDirectory(f.get(), overwrite, onlypath, prepend, "", stripdirs);
3067  f->Close();
3068 
3069  MEMap::iterator mi = data_.begin();
3070  MEMap::iterator me = data_.end();
3071  for ( ; mi != me; ++mi)
3072  const_cast<MonitorElement &>(*mi).updateQReportStats();
3073 
3074  if (verbose_)
3075  {
3076  std::cout << "DQMStore::open: successfully read " << n
3077  << " objects from file '" << filename << "'";
3078  if (! onlypath.empty())
3079  std::cout << " from directory '" << onlypath << "'";
3080  if (! prepend.empty())
3081  std::cout << " into directory '" << prepend << "'";
3082  std::cout << std::endl;
3083  }
3084  return true;
3085 }
double f[11][100]
unsigned verbose_
Definition: DQMStore.h:699
MEMap data_
Definition: DQMStore.h:714
unsigned int readDirectory(TFile *file, bool overwrite, const std::string &path, const std::string &prepend, const std::string &curdir, OpenRunDirs stripdirs)
Definition: DQMStore.cc:2838
tuple filename
Definition: lut2db_cfg.py:20
tuple cout
Definition: gather_cfg.py:145
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
bool DQMStore::readFilePB ( const std::string &  filename,
bool  overwrite = false,
const std::string &  path = "",
const std::string &  prepend = "",
OpenRunDirs  stripdirs = StripRunDirs,
bool  fileMustExist = true 
)
private

Definition at line 3119 of file DQMStore.cc.

References cd(), gather_cfg::cout, MonitorElement::data_, DQMNet::DQM_PROP_LUMI, extract(), groupFilesInBlocks::fin, findObject(), DQMNet::CoreObject::flags, dqmstorepb::ROOTFilePB_Histo::flags(), get_info(), h, dqmstorepb::ROOTFilePB::histo(), dqmstorepb::ROOTFilePB::histo_size(), i, input, hlt_dqm_clientPB-live_cfg::me, NULL, getGTfromDQMFile::obj, open(), fed_dqm_sourceclient-live_cfg::path, raiseDQMError(), setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and verbose_.

Referenced by load().

3125 {
3126  using google::protobuf::io::FileInputStream;
3127  using google::protobuf::io::FileOutputStream;
3128  using google::protobuf::io::GzipInputStream;
3129  using google::protobuf::io::GzipOutputStream;
3130  using google::protobuf::io::CodedInputStream;
3131  using google::protobuf::io::ArrayInputStream;
3132 
3133  if (verbose_)
3134  std::cout << "DQMStore::readFile: reading from file '" << filename << "'\n";
3135 
3136  int filedescriptor;
3137  if ((filedescriptor = ::open(filename.c_str(), O_RDONLY)) == -1) {
3138  if (fileMustExist)
3139  raiseDQMError("DQMStore", "Failed to open file '%s'", filename.c_str());
3140  else
3141  if (verbose_)
3142  std::cout << "DQMStore::readFile: file '" << filename << "' does not exist, continuing\n";
3143  return false;
3144  }
3145 
3146  dqmstorepb::ROOTFilePB dqmstore_message;
3147  FileInputStream fin(filedescriptor);
3148  GzipInputStream input(&fin);
3149  CodedInputStream input_coded(&input);
3150  input_coded.SetTotalBytesLimit(1024*1024*1024, -1);
3151  if (!dqmstore_message.ParseFromCodedStream(&input_coded)) {
3152  raiseDQMError("DQMStore", "Fatal parsing file '%s'", filename.c_str());
3153  return false;
3154  }
3155  ::close(filedescriptor);
3156 
3157  for (int i = 0; i < dqmstore_message.histo_size(); i++) {
3158  std::string path;
3159  std::string objname;
3160 
3161  TObject *obj = NULL;
3162  const dqmstorepb::ROOTFilePB::Histo &h = dqmstore_message.histo(i);
3163  get_info(h, path, objname, &obj);
3164 
3165  setCurrentFolder(path);
3166  if (obj)
3167  {
3168  /* Before calling the extract() check if histogram exists:
3169  * if it does - flags for the given monitor are already set (and merged)
3170  * else - set the flags after the histogram is created.
3171  */
3172  MonitorElement *me = findObject(path, objname);
3173 
3174  /* Run histograms should be collated and not overwritten,
3175  * Lumi histograms should be overwritten (and collate flag is not checked)
3176  */
3177  bool overwrite = h.flags() & DQMNet::DQM_PROP_LUMI;
3178  bool collate = !(h.flags() & DQMNet::DQM_PROP_LUMI);
3179  extract(static_cast<TObject *>(obj), path, overwrite, collate);
3180 
3181  if (me == nullptr) {
3182  me = findObject(path, objname);
3183  me->data_.flags = h.flags();
3184  }
3185 
3186  delete obj;
3187  }
3188  }
3189 
3190  cd();
3191  return true;
3192 }
int i
Definition: DBlmapReader.cc:9
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
MonitorElement * findObject(const std::string &dir, const std::string &name, const uint32_t run=0, const uint32_t lumi=0, const uint32_t streamId=0, const uint32_t moduleId=0) const
Definition: DQMStore.cc:1905
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:704
uint32_t flags
Definition: DQMNet.h:98
#define NULL
Definition: scimark2.h:8
static std::string const input
Definition: EdmProvDump.cc:44
void get_info(const dqmstorepb::ROOTFilePB_Histo &, std::string &dirname, std::string &objname, TObject **obj)
Definition: DQMStore.cc:3098
DQMNet::CoreObject data_
const ::dqmstorepb::ROOTFilePB_Histo & histo(int index) const
unsigned verbose_
Definition: DQMStore.h:699
bool extract(TObject *obj, const std::string &dir, bool overwrite, bool collateHistograms)
Definition: DQMStore.cc:2163
tuple filename
Definition: lut2db_cfg.py:20
bool open(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:2993
inline::google::protobuf::uint32 flags() const
tuple cout
Definition: gather_cfg.py:145
static const uint32_t DQM_PROP_LUMI
Definition: DQMNet.h:60
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:727
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
void DQMStore::removeContents ( void  )

erase all monitoring elements in current directory (not including subfolders);

Definition at line 3234 of file DQMStore.cc.

References pwd_.

3235 {
3237 }
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
Definition: DQMStore.cc:3234
std::string pwd_
Definition: DQMStore.h:713
void DQMStore::removeContents ( const std::string &  dir)

remove all monitoring elements from directory;

Definition at line 3220 of file DQMStore.cc.

References data_, alignCSCRings::e, i, isSubdirectory(), and AlCaHLTBitMon_QueryRunRegistry::string.

3221 {
3222  MonitorElement proto(&dir, std::string());
3223  MEMap::iterator e = data_.end();
3224  MEMap::iterator i = data_.lower_bound(proto);
3225  while (i != e && isSubdirectory(dir, *i->data_.dirname))
3226  if (dir == *i->data_.dirname)
3227  data_.erase(i++);
3228  else
3229  ++i;
3230 }
int i
Definition: DBlmapReader.cc:9
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:70
MEMap data_
Definition: DQMStore.h:714
dbl *** dir
Definition: mlp_gen.cc:35
void DQMStore::removeElement ( const std::string &  name)

erase monitoring element in current directory (opposite of book1D,2D,etc. action);

Definition at line 3242 of file DQMStore.cc.

References pwd_.

Referenced by RPCBxTest::beginRun(), MonitorElementsDb::endJob(), DQMDcsInfoClient::endRun(), TrackerOfflineValidationSummary::fillTree(), DQMStore::IGetter::removeElement(), and SubTaskSummaryStatus::WriteThreshold().

3243 {
3245 }
void removeElement(const std::string &name)
Definition: DQMStore.cc:3242
std::string pwd_
Definition: DQMStore.h:713
void DQMStore::removeElement ( const std::string &  dir,
const std::string &  name,
bool  warning = true 
)

remove monitoring element from directory; if warning = true, print message if element does not exist

Definition at line 3250 of file DQMStore.cc.

References gather_cfg::cout, and data_.

3251 {
3252  MonitorElement proto(&dir, name);
3253  MEMap::iterator pos = data_.find(proto);
3254  if (pos != data_.end())
3255  data_.erase(pos);
3256  else if (warning)
3257  std::cout << "DQMStore: WARNING: attempt to remove non-existent"
3258  << " monitor element '" << name << "' in '" << dir << "'\n";
3259 }
MEMap data_
Definition: DQMStore.h:714
tuple cout
Definition: gather_cfg.py:145
dbl *** dir
Definition: mlp_gen.cc:35
void DQMStore::reset ( void  )
private

Invoke this method after flushing all recently changed monitoring. Clears updated flag on all recently updated MEs and calls their Reset() method for those that have resetMe = true.

Definition at line 2073 of file DQMStore.cc.

References data_, hlt_dqm_clientPB-live_cfg::me, MonitorElement::Reset(), reset_, MonitorElement::resetMe(), and MonitorElement::resetUpdate().

Referenced by DQMService::flushStandalone(), and initializeFrom().

2074 {
2075  MEMap::iterator mi = data_.begin();
2076  MEMap::iterator me = data_.end();
2077  for ( ; mi != me; ++mi)
2078  {
2079  MonitorElement &me = const_cast<MonitorElement &>(*mi);
2080  if (mi->wasUpdated())
2081  {
2082  if (me.resetMe())
2083  me.Reset();
2084  me.resetUpdate();
2085  }
2086  }
2087 
2088  reset_ = true;
2089 }
void resetUpdate(void)
reset &quot;was updated&quot; flag
bool reset_
Definition: DQMStore.h:701
MEMap data_
Definition: DQMStore.h:714
bool resetMe(void) const
true if ME should be reset at end of monitoring cycle
void Reset(void)
reset ME (ie. contents, errors, etc)
void DQMStore::rmdir ( const std::string &  path)

delete directory and all contents; delete directory (all contents + subfolders);

Definition at line 3200 of file DQMStore.cc.

References clean, cleanTrailingSlashes(), data_, dirs_, alignCSCRings::e, i, isSubdirectory(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by dqmCopyRecursively().

3201 {
3203  const std::string *cleaned = 0;
3204  cleanTrailingSlashes(path, clean, cleaned);
3205  MonitorElement proto(cleaned, std::string());
3206 
3207  MEMap::iterator e = data_.end();
3208  MEMap::iterator i = data_.lower_bound(proto);
3209  while (i != e && isSubdirectory(*cleaned, *i->data_.dirname))
3210  data_.erase(i++);
3211 
3212  std::set<std::string>::iterator de = dirs_.end();
3213  std::set<std::string>::iterator di = dirs_.lower_bound(*cleaned);
3214  while (di != de && isSubdirectory(*cleaned, *di))
3215  dirs_.erase(di++);
3216 }
int i
Definition: DBlmapReader.cc:9
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:80
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:70
std::vector< T * > clean
Definition: MVATrainer.cc:156
MEMap data_
Definition: DQMStore.h:714
std::set< std::string > dirs_
Definition: DQMStore.h:715
void DQMStore::runQTests ( void  )

run quality tests (also finds updated contents in last monitoring cycle, including newly added content)

Definition at line 3352 of file DQMStore.cc.

References gather_cfg::cout, data_, isSubdirectory(), hlt_dqm_clientPB-live_cfg::me, reset_, MonitorElement::runQTests(), s_referenceDirName, and verbose_.

3353 {
3354 
3355  if (verbose_ > 0)
3356  std::cout << "DQMStore: running runQTests() with reset = "
3357  << ( reset_ ? "true" : "false" ) << std::endl;
3358 
3359  // Apply quality tests to each monitor element, skipping references.
3360  MEMap::iterator mi = data_.begin();
3361  MEMap::iterator me = data_.end();
3362  for ( ; mi != me; ++mi)
3363  if (! isSubdirectory(s_referenceDirName, *mi->data_.dirname))
3364  const_cast<MonitorElement &>(*mi).runQTests();
3365 
3366  reset_ = false;
3367 }
void runQTests(void)
run all quality tests
bool reset_
Definition: DQMStore.h:701
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:70
unsigned verbose_
Definition: DQMStore.h:699
MEMap data_
Definition: DQMStore.h:714
static const std::string s_referenceDirName
Definition: DQMStore.cc:56
tuple cout
Definition: gather_cfg.py:145
void DQMStore::save ( const std::string &  filename,
const std::string &  path = "",
const std::string &  pattern = "",
const std::string &  rewrite = "",
const uint32_t  run = 0,
const uint32_t  lumi = 0,
SaveReferenceTag  ref = SaveWithReference,
int  minStatus = dqm::qstatus::STATUS_OK,
const std::string &  fileupdate = "RECREATE",
const bool  resetMEsAfterWriting = false 
)

save directory with monitoring objects into root file <filename>; include quality test results with status >= minimum_status (defined in Core/interface/QTestStatus.h); if directory="", save full monitoring structure

Definition at line 2636 of file DQMStore.cc.

References book_mutex_, cdInto(), gather_cfg::cout, data_, dirs_, MonitorElement::DQM_KIND_INT, MonitorElement::DQM_KIND_REAL, MonitorElement::DQM_KIND_STRING, DQMNet::DQM_PROP_EFFICIENCY_PLOT, DQMNet::DQM_PROP_TAGGED, alignCSCRings::e, enableMultiThread_, f, mergeVDriftHistosByStation::file, i, isSubdirectory(), fjr2json::lumi, autoMagneticFieldProducer_cfi::master, bookConverter::max, hlt_dqm_clientPB-live_cfg::me, fed_dqm_sourceclient-live_cfg::path, raiseDQMError(), python.rootplot.root2matplotlib::replace(), HcalObjRepresent::Reset(), s_monitorDirName, s_referenceDirName, SaveWithoutReference, SaveWithReference, SaveWithReferenceForQTest, MonitorElement::setLumi(), mps_update::status, AlCaHLTBitMon_QueryRunRegistry::string, and verbose_.

Referenced by Vispa.Main.TabController.TabController::allowClose(), CalibrationScanTask::checkAndSave(), CalibrationTask::checkAndSave(), Vispa.Main.TabController.TabController::checkModificationTimestamp(), doSaveForOnline(), TauDQMSimpleFileSaver::endJob(), TrackingTruthValid::endJob(), SiPixelDigiValid::endJob(), SiStripDigiValid::endJob(), LaserDQM::endJob(), SiStripLAProfileBooker::endJob(), dEdxAnalyzer::endJob(), TrackerHitAnalyzer::endJob(), StripValidationPlots::endJob(), TrackEfficiencyMonitor::endJob(), APVValidationPlots::endJob(), LogMessageMonitor::endJob(), MuonAlignment::endJob(), ValidationHcalIsoTrackAlCaReco::endJob(), SiStripMonitorRawData::endRun(), SiStripMonitorQuality::endRun(), SiStripMonitorPedestals::endRun(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::extractBadAPVSandStrips(), TkHistoMap::save(), DQMFileSaver::saveForFilterUnit(), DQMFileSaver::saveForOffline(), GlobalHitsProdHistStripper::~GlobalHitsProdHistStripper(), and SiPixelTrackingRecHitsValid::~SiPixelTrackingRecHitsValid().

2646 {
2647  std::lock_guard<std::mutex> guard(book_mutex_);
2648 
2649  std::set<std::string>::iterator di, de;
2650  MEMap::iterator mi, me = data_.end();
2651  DQMNet::QReports::const_iterator qi, qe;
2652  int nme=0;
2653 
2654  // TFile flushes to disk with fsync() on every TDirectory written to
2655  // the file. This makes DQM file saving painfully slow, and
2656  // ironically makes it _more_ likely the file saving gets
2657  // interrupted and corrupts the file. The utility class below
2658  // simply ignores the flush synchronisation.
2659  class TFileNoSync : public TFile
2660  {
2661  public:
2662  TFileNoSync(const char *file, const char *opt) : TFile(file, opt) {}
2663  virtual Int_t SysSync(Int_t) override { return 0; }
2664  };
2665 
2666  // open output file, on 1st save recreate, later update
2667  if (verbose_)
2668  std::cout << "\n DQMStore: Opening TFile '" << filename
2669  << "' with option '" << fileupdate <<"'\n";
2670 
2671  TFileNoSync f(filename.c_str(), fileupdate.c_str()); // open file
2672  if(f.IsZombie())
2673  raiseDQMError("DQMStore", "Failed to create/update file '%s'", filename.c_str());
2674  f.cd();
2675 
2676  // Construct a regular expression from the pattern string.
2677  std::auto_ptr<lat::Regexp> rxpat;
2678  if (! pattern.empty())
2679  rxpat.reset(new lat::Regexp(pattern.c_str()));
2680 
2681  // Prepare a path for the reference object selection.
2682  std::string refpath;
2683  refpath.reserve(s_referenceDirName.size() + path.size() + 2);
2684  refpath += s_referenceDirName;
2685  if (! path.empty())
2686  {
2687  refpath += '/';
2688  refpath += path;
2689  }
2690 
2691  // Loop over the directory structure.
2692  for (di = dirs_.begin(), de = dirs_.end(); di != de; ++di)
2693  {
2694  // Check if we should process this directory. We process the
2695  // requested part of the object tree, including references.
2696  if (! path.empty()
2697  && ! isSubdirectory(path, *di)
2698  && ! isSubdirectory(refpath, *di))
2699  continue;
2700 
2701  // Loop over monitor elements in this directory.
2702  MonitorElement proto(&*di, std::string(), run, 0, 0);
2703  if (enableMultiThread_)
2704  proto.setLumi(lumi);
2705 
2706  mi = data_.lower_bound(proto);
2707  for ( ; mi != me && isSubdirectory(*di, *mi->data_.dirname); ++mi)
2708  {
2709  if (verbose_ > 1)
2710  std::cout << "DQMStore::save: Run: " << (*mi).run()
2711  << " Lumi: " << (*mi).lumi()
2712  << " LumiFlag: " << (*mi).getLumiFlag()
2713  << " streamId: " << (*mi).streamId()
2714  << " moduleId: " << (*mi).moduleId()
2715  << " fullpathname: " << (*mi).getFullname() << std::endl;
2716 
2717  // Upper bound in the loop over the MEs
2718  if (enableMultiThread_ && ((*mi).lumi() != lumi))
2719  break;
2720 
2721  // Skip if it isn't a direct child.
2722  if (*di != *mi->data_.dirname) {
2723  if (verbose_ > 1)
2724  std::cout << "DQMStore::save: isn't a direct child. Skipping" << std::endl;
2725  continue;
2726  }
2727 
2728  // Keep backward compatibility with the old way of
2729  // booking/handlind MonitorElements into the DQMStore. If run is
2730  // 0 it means that a booking happened w/ the old non-threadsafe
2731  // style, and we have to ignore the streamId and moduleId as a
2732  // consequence.
2733 
2734  if (run != 0 && (mi->data_.streamId !=0 || mi->data_.moduleId !=0)) {
2735  continue;
2736  }
2737 
2738  // Handle reference histograms, with three distinct cases:
2739  // 1) Skip all references entirely on saving.
2740  // 2) Blanket saving of all references.
2741  // 3) Save only references for monitor elements with qtests.
2742  // The latter two are affected by "path" sub-tree selection,
2743  // i.e. references are saved only in the selected tree part.
2744  if (isSubdirectory(refpath, *mi->data_.dirname))
2745  {
2746  if (ref == SaveWithoutReference)
2747  // Skip the reference entirely.
2748  continue;
2749  else if (ref == SaveWithReference)
2750  // Save all references regardless of qtests.
2751  ;
2752  else if (ref == SaveWithReferenceForQTest)
2753  {
2754  // Save only references for monitor elements with qtests
2755  // with an optional cut on minimum quality test result.
2756  int status = -1;
2757  std::string mname(mi->getFullname(), s_referenceDirName.size()+1, std::string::npos);
2758  MonitorElement *master = get(mname);
2759  if (master)
2760  for (size_t i = 0, e = master->data_.qreports.size(); i != e; ++i)
2761  status = std::max(status, master->data_.qreports[i].code);
2762 
2763  if (! master || status < minStatus)
2764  {
2765  if (verbose_ > 1)
2766  std::cout << "DQMStore::save: skipping monitor element '"
2767  << mi->data_.objname << "' while saving, status is "
2768  << status << ", required minimum status is "
2769  << minStatus << std::endl;
2770  continue;
2771  }
2772  }
2773  }
2774 
2775  if (verbose_ > 1)
2776  std::cout << "DQMStore::save: saving monitor element '"
2777  << mi->data_.objname << "'\n";
2778  nme++; // count saved histograms
2779 
2780  // Create the directory.
2781  gDirectory->cd("/");
2782  if (di->empty())
2784  else if (rxpat.get())
2785  cdInto(s_monitorDirName + '/' + lat::StringOps::replace(*di, *rxpat, rewrite));
2786  else
2787  cdInto(s_monitorDirName + '/' + *di);
2788 
2789  // Save the object.
2790  switch (mi->kind())
2791  {
2795  TObjString(mi->tagString().c_str()).Write();
2796  break;
2797 
2798  default:
2799  mi->object_->Write();
2800  break;
2801  }
2802 
2803  // Save quality reports if this is not in reference section.
2804  if (! isSubdirectory(s_referenceDirName, *mi->data_.dirname))
2805  {
2806  qi = mi->data_.qreports.begin();
2807  qe = mi->data_.qreports.end();
2808  for ( ; qi != qe; ++qi)
2809  TObjString(mi->qualityTagString(*qi).c_str()).Write();
2810  }
2811 
2812  // Save efficiency tag, if any
2813  if (mi->data_.flags & DQMNet::DQM_PROP_EFFICIENCY_PLOT)
2814  TObjString(mi->effLabelString().c_str()).Write();
2815 
2816  // Save tag if any
2817  if (mi->data_.flags & DQMNet::DQM_PROP_TAGGED)
2818  TObjString(mi->tagLabelString().c_str()).Write();
2819 
2820  //reset the ME just written to make it available for the next LS (online)
2821  if (resetMEsAfterWriting)
2822  const_cast<MonitorElement*>(&*mi)->Reset();
2823  }
2824  }
2825 
2826  f.Close();
2827 
2828  // Maybe make some noise.
2829  if (verbose_)
2830  std::cout << "DQMStore::save: successfully wrote " << nme
2831  << " objects from path '" << path
2832  << "' into DQM file '" << filename << "'\n";
2833 }
int i
Definition: DBlmapReader.cc:9
bool cdInto(const std::string &path) const
Definition: DQMStore.cc:2464
tuple lumi
Definition: fjr2json.py:35
static const uint32_t DQM_PROP_TAGGED
Definition: DQMNet.h:54
static const uint32_t DQM_PROP_EFFICIENCY_PLOT
Definition: DQMNet.h:63
static const std::string s_monitorDirName
name of global monitoring folder (containing all sources subdirectories)
Definition: DQMStore.cc:55
std::mutex book_mutex_
Definition: DQMStore.h:721
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:70
double f[11][100]
unsigned verbose_
Definition: DQMStore.h:699
MEMap data_
Definition: DQMStore.h:714
static const std::string s_referenceDirName
Definition: DQMStore.cc:56
tuple filename
Definition: lut2db_cfg.py:20
tuple cout
Definition: gather_cfg.py:145
void Reset(std::vector< TH2F > &depth)
std::set< std::string > dirs_
Definition: DQMStore.h:715
tuple status
Definition: mps_update.py:57
bool enableMultiThread_
Definition: DQMStore.h:704
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
void DQMStore::savePB ( const std::string &  filename,
const std::string &  path = "",
const uint32_t  run = 0,
const uint32_t  lumi = 0,
const bool  resetMEsAfterWriting = false 
)

Definition at line 2506 of file DQMStore.cc.

References dqmstorepb::ROOTFilePB::add_histo(), book_mutex_, gather_cfg::cout, data_, deleteObject(), dirs_, MonitorElement::DQM_KIND_TH1F, enableMultiThread_, isSubdirectory(), fjr2json::lumi, hlt_dqm_clientPB-live_cfg::me, open(), AlCaHLTBitMon_ParallelJobs::options, HcalObjRepresent::Reset(), dqmstorepb::ROOTFilePB_Histo::set_flags(), dqmstorepb::ROOTFilePB_Histo::set_full_pathname(), dqmstorepb::ROOTFilePB_Histo::set_size(), dqmstorepb::ROOTFilePB_Histo::set_streamed_histo(), MonitorElement::setLumi(), AlCaHLTBitMon_QueryRunRegistry::string, and verbose_.

Referenced by doSaveForOnline(), DQMFileSaver::saveForFilterUnit(), and DQMFileSaver::saveForOfflinePB().

2511 {
2512  using google::protobuf::io::FileOutputStream;
2513  using google::protobuf::io::GzipOutputStream;
2514  using google::protobuf::io::StringOutputStream;
2515 
2516  std::lock_guard<std::mutex> guard(book_mutex_);
2517 
2518  std::set<std::string>::iterator di, de;
2519  MEMap::iterator mi, me = data_.end();
2520  dqmstorepb::ROOTFilePB dqmstore_message;
2521  int nme = 0;
2522 
2523  if (verbose_)
2524  std::cout << "\n DQMStore: Opening PBFile '"
2525  << filename << "'"<< std::endl;
2526 
2527  // Loop over the directory structure.
2528  for (di = dirs_.begin(), de = dirs_.end(); di != de; ++di)
2529  {
2530  // Check if we should process this directory. We process the
2531  // requested part of the object tree, including references.
2532  if (! path.empty()
2533  && ! isSubdirectory(path, *di))
2534  continue;
2535 
2536  // Loop over monitor elements in this directory.
2537  MonitorElement proto(&*di, std::string(), run, 0, 0);
2538  if (enableMultiThread_)
2539  proto.setLumi(lumi);
2540 
2541  mi = data_.lower_bound(proto);
2542  for ( ; mi != me && isSubdirectory(*di, *mi->data_.dirname); ++mi)
2543  {
2544  if (verbose_ > 1)
2545  std::cout << "Run: " << (*mi).run()
2546  << " Lumi: " << (*mi).lumi()
2547  << " LumiFlag: " << (*mi).getLumiFlag()
2548  << " streamId: " << (*mi).streamId()
2549  << " moduleId: " << (*mi).moduleId()
2550  << " fullpathname: " << (*mi).getFullname() << std::endl;
2551 
2552  // Upper bound in the loop over the MEs
2553  if (enableMultiThread_ && ((*mi).lumi() != lumi))
2554  break;
2555 
2556  // Skip if it isn't a direct child.
2557  if (*di != *mi->data_.dirname)
2558  continue;
2559 
2560  // Keep backward compatibility with the old way of
2561  // booking/handlind MonitorElements into the DQMStore. If run is
2562  // 0 it means that a booking happened w/ the old non-threadsafe
2563  // style, and we have to ignore the streamId and moduleId as a
2564  // consequence.
2565 
2566  if (run != 0 && (mi->data_.streamId !=0 || mi->data_.moduleId !=0))
2567  continue;
2568 
2569  if (verbose_ > 1)
2570  std::cout << "DQMStore::savePB: saving monitor element '"
2571  << *mi->data_.dirname << "/" << mi->data_.objname << "'"
2572  << "flags " << mi->data_.flags << "\n";
2573 
2574  nme++;
2575  dqmstorepb::ROOTFilePB::Histo* me = dqmstore_message.add_histo();
2576  me->set_full_pathname((*mi->data_.dirname) + '/' + mi->data_.objname);
2577  me->set_flags(mi->data_.flags);
2578 
2579  TObject *toWrite = nullptr;
2580  bool deleteObject = false;
2581 
2582  if (mi->kind() < MonitorElement::DQM_KIND_TH1F) {
2583  toWrite = new TObjString(mi->tagString().c_str());
2584  deleteObject = true;
2585  } else {
2586  toWrite = mi->object_;
2587  }
2588 
2589  TBufferFile buffer(TBufferFile::kWrite);
2590  buffer.WriteObject(toWrite);
2591  me->set_size(buffer.Length());
2592  me->set_streamed_histo((const void*)buffer.Buffer(),
2593  buffer.Length());
2594 
2595  if (deleteObject) {
2596  delete toWrite;
2597  }
2598 
2599  //reset the ME just written to make it available for the next LS (online)
2600  if (resetMEsAfterWriting)
2601  const_cast<MonitorElement*>(&*mi)->Reset();
2602  }
2603  }
2604 
2605  int filedescriptor = ::open(filename.c_str(),
2606  O_WRONLY | O_CREAT | O_TRUNC,
2607  S_IRUSR | S_IWUSR |
2608  S_IRGRP | S_IWGRP |
2609  S_IROTH);
2610  FileOutputStream file_stream(filedescriptor);
2612  options.format = GzipOutputStream::GZIP;
2613  options.compression_level = 1;
2614  GzipOutputStream gzip_stream(&file_stream,
2615  options);
2616  dqmstore_message.SerializeToZeroCopyStream(&gzip_stream);
2617 
2618  // we need to flush it before we close the fd
2619  gzip_stream.Close();
2620  file_stream.Close();
2621  ::close(filedescriptor);
2622 
2623  // Maybe make some noise.
2624  if (verbose_)
2625  std::cout << "DQMStore::savePB: successfully wrote " << nme
2626  << " objects from path '" << path
2627  << "' into DQM file '" << filename << "'\n";
2628 }
tuple lumi
Definition: fjr2json.py:35
void set_flags(::google::protobuf::uint32 value)
std::mutex book_mutex_
Definition: DQMStore.h:721
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:70
unsigned verbose_
Definition: DQMStore.h:699
void set_size(::google::protobuf::uint32 value)
MEMap data_
Definition: DQMStore.h:714
void set_full_pathname(const ::std::string &value)
std::vector< boost::shared_ptr< fireworks::OptionNode > > Options
inline::dqmstorepb::ROOTFilePB_Histo * add_histo()
tuple filename
Definition: lut2db_cfg.py:20
bool open(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:2993
tuple cout
Definition: gather_cfg.py:145
void Reset(std::vector< TH2F > &depth)
bool deleteObject(T *fObject, const std::string &fInput, const std::string &fInputTag, HcalDbTool::IOVRun fInputRun, bool fVerbose)
std::set< std::string > dirs_
Definition: DQMStore.h:715
bool enableMultiThread_
Definition: DQMStore.h:704
void set_streamed_histo(const ::std::string &value)
void DQMStore::scaleElements ( void  )

Invoke this method after flushing all recently changed monitoring. Clears updated flag on all MEs and calls their Reset() method.

Definition at line 3468 of file DQMStore.cc.

References gather_cfg::cout, data_, dirExists(), MonitorElement::DQM_KIND_INT, MonitorElement::DQM_KIND_REAL, MonitorElement::DQM_KIND_TH1D, MonitorElement::DQM_KIND_TH1F, MonitorElement::DQM_KIND_TH1S, MonitorElement::DQM_KIND_TH2D, MonitorElement::DQM_KIND_TH2F, MonitorElement::DQM_KIND_TH2S, MonitorElement::DQM_KIND_TH3F, MonitorElement::DQM_KIND_TPROFILE, MonitorElement::DQM_KIND_TPROFILE2D, patZpeak::events, V0MonitoringClient_cfi::factor, MonitorElement::getFloatValue(), MonitorElement::getFullname(), MonitorElement::getIntValue(), MonitorElement::getTH1D(), MonitorElement::getTH1F(), MonitorElement::getTH1S(), MonitorElement::getTH2D(), MonitorElement::getTH2F(), MonitorElement::getTH2S(), MonitorElement::getTH3F(), MonitorElement::getTProfile(), MonitorElement::getTProfile2D(), MonitorElement::kind(), hlt_dqm_clientPB-live_cfg::me, scaleFlag_, and verbose_.

3469 {
3470  if (scaleFlag_ == 0.0) return;
3471  if (verbose_ > 0)
3472  std::cout << " =========== " << " ScaleFlag " << scaleFlag_ << std::endl;
3473  double factor = scaleFlag_;
3474  int events = 1;
3475  if (dirExists("Info/EventInfo")) {
3476  if ( scaleFlag_ == -1.0) {
3477  MonitorElement * scale_me = get("Info/EventInfo/ScaleFactor");
3478  if (scale_me && scale_me->kind()==MonitorElement::DQM_KIND_REAL) factor = scale_me->getFloatValue();
3479  }
3480  MonitorElement * event_me = get("Info/EventInfo/processedEvents");
3481  if (event_me && event_me->kind()==MonitorElement::DQM_KIND_INT) events = event_me->getIntValue();
3482  }
3483  factor = factor/(events*1.0);
3484 
3485  MEMap::iterator mi = data_.begin();
3486  MEMap::iterator me = data_.end();
3487  for ( ; mi != me; ++mi)
3488  {
3489  MonitorElement &me = const_cast<MonitorElement &>(*mi);
3490  switch (me.kind())
3491  {
3493  {
3494  me.getTH1F()->Scale(factor);
3495  break;
3496  }
3498  {
3499  me.getTH1S()->Scale(factor);
3500  break;
3501  }
3503  {
3504  me.getTH1D()->Scale(factor);
3505  break;
3506  }
3508  {
3509  me.getTH2F()->Scale(factor);
3510  break;
3511  }
3513  {
3514  me.getTH2S()->Scale(factor);
3515  break;
3516  }
3518  {
3519  me.getTH2D()->Scale(factor);
3520  break;
3521  }
3523  {
3524  me.getTH3F()->Scale(factor);
3525  break;
3526  }
3528  {
3529  me.getTProfile()->Scale(factor);
3530  break;
3531  }
3533  {
3534  me.getTProfile2D()->Scale(factor);
3535  break;
3536  }
3537  default:
3538  if (verbose_ > 0)
3539  std::cout << " The DQM object '" << me.getFullname() << "' is not scalable object " << std::endl;
3540  continue;
3541  }
3542  }
3543 }
TH2S * getTH2S(void) const
TH1S * getTH1S(void) const
TProfile2D * getTProfile2D(void) const
TH3F * getTH3F(void) const
TH1D * getTH1D(void) const
TH2D * getTH2D(void) const
double scaleFlag_
Definition: DQMStore.h:702
double getFloatValue(void) const
Kind kind(void) const
Get the type of the monitor element.
const std::string getFullname(void) const
get full name of ME including Pathname
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:792
unsigned verbose_
Definition: DQMStore.h:699
MEMap data_
Definition: DQMStore.h:714
int64_t getIntValue(void) const
TH1F * getTH1F(void) const
tuple events
Definition: patZpeak.py:19
TProfile * getTProfile(void) const
tuple cout
Definition: gather_cfg.py:145
TH2F * getTH2F(void) const
void DQMStore::setAccumulate ( MonitorElement me,
bool  flag 
)
private

if true, will accumulate ME contents (over many periods) until method is called with flag = false again

Definition at line 3421 of file DQMStore.cc.

References MonitorElement::setAccumulate().

3422 {
3423  if (me)
3424  me->setAccumulate(flag);
3425 }
void setAccumulate(bool)
void DQMStore::setCurrentFolder ( const std::string &  fullpath)

set the last directory in fullpath as the current directory(create if needed); to be invoked by user to specify directories for monitoring objects before booking; commands book1D (etc) & removeElement(name) imply elements in this directory!;

Definition at line 727 of file DQMStore.cc.

References clean, cleanTrailingSlashes(), makeDirectory(), pwd_, and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by SiStripDcsInfo::addBadModules(), DQMFileReader::beginJob(), DQMFEDIntegrityClient::beginJob(), L1ScalersClient::beginJob(), AcceptanceHistoProducer::beginJob(), ConverterTester::beginJob(), APVValidationPlots::beginJob(), StripValidationPlots::beginJob(), DQMDaqInfo::beginJob(), MuonAlignment::beginJob(), ValidationHcalIsoTrackAlCaReco::beginJob(), HLTScalersClient::beginJob(), MCEmbeddingValidationAnalyzer::beginJob(), RPCBxTest::beginRun(), DQMDcsInfoClient::beginRun(), CalibrationScanTask::book(), CalibrationTask::book(), FineDelayTask::book(), LatencyTask::book(), hcaldqm::ContainerSingleProf1D::book(), hcaldqm::ContainerSingleProf2D::book(), hcaldqm::ContainerSingle1D::book(), hcaldqm::ContainerProf1D::book(), hcaldqm::ContainerProf2D::book(), hcaldqm::ContainerSingle2D::book(), MEtoMEComparitor::book(), hcaldqm::Container2D::book(), hcaldqm::Container1D::book(), TrackerOfflineValidationSummary::bookHarvestingHists(), PixelVTXMonitor::bookHistograms(), DQMLumiMonitor::bookHistograms(), MCEmbeddingValidationAnalyzer::plotEntryTypeEvtWeight::bookHistograms(), MCEmbeddingValidationAnalyzer::plotEntryTypeMuonRadCorrUncertainty::bookHistograms(), MCEmbeddingValidationAnalyzer::plotEntryTypeL1ETM::bookHistograms(), MCEmbeddingValidationAnalyzer::leptonDistributionT< T >::bookHistograms(), MCEmbeddingValidationAnalyzer::electronDistributionExtra::bookHistograms(), MCEmbeddingValidationAnalyzer::tauDistributionExtra::bookHistograms(), MCEmbeddingValidationAnalyzer::leptonEfficiencyT< T >::bookHistograms(), MCEmbeddingValidationAnalyzer::leptonL1TriggerEfficiencyT1T2< T1, T2 >::bookHistograms(), MCEmbeddingValidationAnalyzer::l1ExtraObjectDistributionT< T >::bookHistograms(), MCEmbeddingValidationAnalyzer::metDistributionType::bookHistograms(), MCEmbeddingValidationAnalyzer::metL1TriggerEfficiencyType::bookHistograms(), SiStripCertificationInfo::bookSiStripCertificationMEs(), SiStripQualityChecker::bookStatus(), SiStripDaqInfo::bookStatus(), SiStripDcsInfo::bookStatus(), cd(), dqmCopyRecursively(), HarvestingAnalyzer::endJob(), HLTScalersClient::endLuminosityBlock(), DQMDcsInfoClient::endRun(), TauDQMHistEffProducer::endRun(), TauDQMFileLoader::endRun(), GlobalHitsProdHistStripper::endRun(), SiStripQualityChecker::fillFaultyModuleStatus(), SiStripQualityDQM::fillGrandSummaryMEs(), TrackerOfflineValidationSummary::fillTree(), SiStripDaqInfo::findExcludedModule(), TkHistoMap::folderDefinition(), EgHLTOfflineSummaryClient::getEgHLTSumHist_(), goUp(), HEff1DHit::HEff1DHit(), HEff2DHit::HEff2DHit(), HEff4DHit::HEff4DHit(), HLTScalersClient::HLTScalersClient(), HRes1DHit::HRes1DHit(), HRes2DHit::HRes2DHit(), HRes4DHit::HRes4DHit(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::initializeDQMHistograms(), LaserDQM::initMonitors(), L1ScalersClient::L1ScalersClient(), MonitorElementsDb::MonitorElementsDb(), readFilePB(), EgHLTOfflineSummaryClient::runClient_(), DQMFileSaver::saveForOffline(), SiStripFolderOrganizer::setDetectorFolder(), SiPixelFolderOrganizer::setFedFolder(), SiStripFolderOrganizer::setLayerFolder(), SiPixelFolderOrganizer::setModuleFolder(), SiStripFolderOrganizer::setSiStripControlFolder(), SiStripFolderOrganizer::setSiStripFolder(), SiStripFolderOrganizer::setSiStripTopControlFolder(), and SubTaskSummaryStatus::WriteThreshold().

728 {
730  const std::string *cleaned = 0;
731  cleanTrailingSlashes(fullpath, clean, cleaned);
732  makeDirectory(*cleaned);
733  pwd_ = *cleaned;
734 }
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:80
std::string pwd_
Definition: DQMStore.h:713
std::vector< T * > clean
Definition: MVATrainer.cc:156
void makeDirectory(const std::string &path)
Definition: DQMStore.cc:751
void DQMStore::setVerbose ( unsigned  level)

set verbose level (0 turns all non-error messages off)

Definition at line 691 of file DQMStore.cc.

Referenced by TrackerHitAnalyzer::bookHistograms(), GlobalHitsProdHistStripper::GlobalHitsProdHistStripper(), and HLTScalersClient::HLTScalersClient().

692 { return; }
void DQMStore::showDirStructure ( void  ) const

Definition at line 3431 of file DQMStore.cc.

References relmon_rootfiles_spy::contents, filterCSVwithJSON::copy, gather_cfg::cout, and getContents().

Referenced by TrackerHitAnalyzer::bookHistograms(), EcalBarrelMonitorDbModule::EcalBarrelMonitorDbModule(), dEdxAnalyzer::endJob(), TrackEfficiencyMonitor::endJob(), LogMessageMonitor::endJob(), HLTScalersClient::endLuminosityBlock(), TauDQMFileLoader::endRun(), GlobalHitsProdHistStripper::GlobalHitsProdHistStripper(), and LaserDQM::initMonitors().

3432 {
3433  std::vector<std::string> contents;
3434  getContents(contents);
3435 
3436  std::cout << " ------------------------------------------------------------\n"
3437  << " Directory structure: \n"
3438  << " ------------------------------------------------------------\n";
3439 
3440  std::copy(contents.begin(), contents.end(),
3441  std::ostream_iterator<std::string>(std::cout, "\n"));
3442 
3443  std::cout << " ------------------------------------------------------------\n";
3444 }
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1804
tuple cout
Definition: gather_cfg.py:145
void DQMStore::softReset ( MonitorElement me)

reset contents (does not erase contents permanently) (makes copy of current contents; will be subtracted from future contents)

Definition at line 3404 of file DQMStore.cc.

References MonitorElement::softReset().

Referenced by TrackAnalyzer::doSoftReset(), resetME(), and ecaldqm::MESet::softReset().

3405 {
3406  if (me)
3407  me->softReset();
3408 }
void softReset(void)
void DQMStore::tag ( MonitorElement me,
unsigned int  myTag 
)

tag ME as <myTag> (myTag > 0)

Definition at line 1661 of file DQMStore.cc.

References MonitorElement::data_, DQMNet::DQM_PROP_TAGGED, DQMNet::CoreObject::flags, MonitorElement::getFullname(), raiseDQMError(), and DQMNet::CoreObject::tag.

Referenced by ConverterTester::beginJob(), SiStripBaseCondObjDQM::bookCumulMEs(), SiStripBaseCondObjDQM::bookProfileMEs(), SiStripBaseCondObjDQM::bookSummaryCumulMEs(), SiStripBaseCondObjDQM::bookSummaryMEs(), SiStripBaseCondObjDQM::bookSummaryProfileMEs(), extract(), get(), getContents(), Inspector.Inspector::SetTag(), tag(), tagAllContents(), and tagContents().

1662 {
1663  if (! myTag)
1664  raiseDQMError("DQMStore", "Attempt to tag monitor element '%s'"
1665  " with a zero tag", me->getFullname().c_str());
1666  if ((me->data_.flags & DQMNet::DQM_PROP_TAGGED) && myTag != me->data_.tag)
1667  raiseDQMError("DQMStore", "Attempt to tag monitor element '%s'"
1668  " twice with multiple tags", me->getFullname().c_str());
1669 
1670  me->data_.tag = myTag;
1672 }
uint32_t flags
Definition: DQMNet.h:98
static const uint32_t DQM_PROP_TAGGED
Definition: DQMNet.h:54
uint32_t tag
Definition: DQMNet.h:99
const std::string getFullname(void) const
get full name of ME including Pathname
DQMNet::CoreObject data_
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
void DQMStore::tag ( const std::string &  path,
unsigned int  myTag 
)

tag ME specified by full pathname (e.g. "my/long/dir/my_histo")

Definition at line 1676 of file DQMStore.cc.

References dir, findObject(), hlt_dqm_clientPB-live_cfg::me, mergeVDriftHistosByStation::name, raiseDQMError(), splitPath(), AlCaHLTBitMon_QueryRunRegistry::string, and tag().

Referenced by Inspector.Inspector::SetTag().

1677 {
1678  std::string dir;
1679  std::string name;
1680  splitPath(dir, name, path);
1681 
1682  if (MonitorElement *me = findObject(dir, name))
1683  tag(me, myTag);
1684  else
1685  raiseDQMError("DQMStore", "Attempt to tag non-existent monitor element"
1686  " '%s' with tag %u", path.c_str(), myTag);
1687 
1688 }
MonitorElement * findObject(const std::string &dir, const std::string &name, const uint32_t run=0, const uint32_t lumi=0, const uint32_t streamId=0, const uint32_t moduleId=0) const
Definition: DQMStore.cc:1905
static void splitPath(std::string &dir, std::string &name, const std::string &path)
Definition: DQMStore.cc:97
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1661
dbl *** dir
Definition: mlp_gen.cc:35
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
void DQMStore::tagAllContents ( const std::string &  path,
unsigned int  myTag 
)

tag all children of folder, including all subfolders and their children; path must be an exact path name

Definition at line 1704 of file DQMStore.cc.

References clean, cleanTrailingSlashes(), data_, alignCSCRings::e, i, isSubdirectory(), AlCaHLTBitMon_QueryRunRegistry::string, and tag().

1705 {
1707  const std::string *cleaned = 0;
1708  cleanTrailingSlashes(path, clean, cleaned);
1709  MonitorElement proto(cleaned, std::string());
1710 
1711  // FIXME: WILDCARDS? Old one supported them, but nobody seemed to use them.
1712  MEMap::iterator e = data_.end();
1713  MEMap::iterator i = data_.lower_bound(proto);
1714  while (i != e && isSubdirectory(*cleaned, *i->data_.dirname))
1715  {
1716  tag(const_cast<MonitorElement *>(&*i), myTag);
1717  ++i;
1718  }
1719 }
int i
Definition: DBlmapReader.cc:9
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:80
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1661
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:70
std::vector< T * > clean
Definition: MVATrainer.cc:156
MEMap data_
Definition: DQMStore.h:714
void DQMStore::tagContents ( const std::string &  path,
unsigned int  myTag 
)

tag all children of folder (does NOT include subfolders)

Definition at line 1692 of file DQMStore.cc.

References data_, alignCSCRings::e, i, AlCaHLTBitMon_QueryRunRegistry::string, and tag().

1693 {
1694  MonitorElement proto(&path, std::string());
1695  MEMap::iterator e = data_.end();
1696  MEMap::iterator i = data_.lower_bound(proto);
1697  for ( ; i != e && path == *i->data_.dirname; ++i)
1698  tag(const_cast<MonitorElement *>(&*i), myTag);
1699 }
int i
Definition: DBlmapReader.cc:9
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1661
MEMap data_
Definition: DQMStore.h:714
void DQMStore::useQTest ( const std::string &  dir,
const std::string &  qtname 
)

attach quality test <qtname> to directory contents (need exact pathname without wildcards, e.g. A/B/C);

Definition at line 3299 of file DQMStore.cc.

References clean, cleanTrailingSlashes(), raiseDQMError(), s_safe, AlCaHLTBitMon_QueryRunRegistry::string, and useQTestByMatch().

Referenced by createMeanValueTest(), createXRangeTest(), and createYRangeTest().

3300 {
3301  // Clean the path
3303  const std::string *cleaned = 0;
3304  cleanTrailingSlashes(dir, clean, cleaned);
3305 
3306  // Validate the path.
3307  if (cleaned->find_first_not_of(s_safe) != std::string::npos)
3308  raiseDQMError("DQMStore", "Monitor element path name '%s'"
3309  " uses unacceptable characters", cleaned->c_str());
3310 
3311  // Redirect to the pattern match version.
3312  useQTestByMatch(*cleaned + "/*", qtname);
3313 }
static const std::string s_safe
Definition: DQMStore.cc:58
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:80
std::vector< T * > clean
Definition: MVATrainer.cc:156
int useQTestByMatch(const std::string &pattern, const std::string &qtname)
attach quality test &lt;qc&gt; to monitor elements matching &lt;pattern&gt;.
Definition: DQMStore.cc:3317
dbl *** dir
Definition: mlp_gen.cc:35
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
int DQMStore::useQTestByMatch ( const std::string &  pattern,
const std::string &  qtname 
)

attach quality test <qc> to monitor elements matching <pattern>.

Definition at line 3317 of file DQMStore.cc.

References MonitorElement::addQReport(), data_, getQCriterion(), hlt_dqm_clientPB-live_cfg::me, mergePath(), fed_dqm_sourceclient-live_cfg::path, qtestspecs_, raiseDQMError(), and AlCaHLTBitMon_QueryRunRegistry::string.

Referenced by QTestHandle::attachTests(), and useQTest().

3318 {
3319  QCriterion *qc = getQCriterion(qtname);
3320  if (! qc)
3321  raiseDQMError("DQMStore", "Cannot apply non-existent quality test '%s'",
3322  qtname.c_str());
3323 
3324  fastmatch * fm = new fastmatch( pattern );
3325 
3326  // Record the test for future reference.
3327  QTestSpec qts(fm, qc);
3328  qtestspecs_.push_back(qts);
3329 
3330  // Apply the quality test.
3331  MEMap::iterator mi = data_.begin();
3332  MEMap::iterator me = data_.end();
3333  std::string path;
3334  int cases = 0;
3335  for ( ; mi != me; ++mi)
3336  {
3337  path.clear();
3338  mergePath(path, *mi->data_.dirname, mi->data_.objname);
3339  if (fm->match(path))
3340  {
3341  ++cases;
3342  const_cast<MonitorElement &>(*mi).addQReport(qts.second);
3343  }
3344  }
3345 
3346  //return the number of matched cases
3347  return cases;
3348 }
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:3267
std::pair< fastmatch *, QCriterion * > QTestSpec
Definition: DQMStore.h:693
static void mergePath(std::string &path, const std::string &dir, const std::string &name)
Definition: DQMStore.cc:110
QTestSpecs qtestspecs_
Definition: DQMStore.h:719
MEMap data_
Definition: DQMStore.h:714
void addQReport(const DQMNet::QValue &desc, QCriterion *qc)
Add quality report, from DQMStore.
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11

Friends And Related Function Documentation

friend class DQMArchiver
friend

Definition at line 728 of file DQMStore.h.

friend class DQMFileSaver
friend

Definition at line 732 of file DQMStore.h.

friend class DQMNet
friend

Definition at line 727 of file DQMStore.h.

friend class DQMRootOutputModule
friend

Definition at line 730 of file DQMStore.h.

friend class DQMRootSource
friend

Definition at line 731 of file DQMStore.h.

friend class DQMService
friend

Definition at line 726 of file DQMStore.h.

friend class DQMStoreExample
friend

Definition at line 729 of file DQMStore.h.

friend class edm::DQMHttpSource
friend

Definition at line 725 of file DQMStore.h.

friend class MEtoEDMConverter
friend

Definition at line 733 of file DQMStore.h.

Member Data Documentation

std::mutex DQMStore::book_mutex_
private
bool DQMStore::collateHistograms_
private
MEMap DQMStore::data_
private
std::set<std::string> DQMStore::dirs_
private
bool DQMStore::enableMultiThread_
private
bool DQMStore::forceResetOnBeginLumi_
private

Definition at line 706 of file DQMStore.h.

Referenced by DQMStore(), and forceReset().

IBooker* DQMStore::ibooker_
private

Definition at line 722 of file DQMStore.h.

Referenced by bookTransaction(), DQMStore(), and meBookerGetter().

IGetter* DQMStore::igetter_
private

Definition at line 723 of file DQMStore.h.

Referenced by DQMStore(), meBookerGetter(), and meGetter().

bool DQMStore::LSbasedMode_
private
uint32_t DQMStore::moduleId_
private

Definition at line 710 of file DQMStore.h.

Referenced by book(), bookFloat(), bookInt(), bookString(), and bookTransaction().

DQMStore::pwd_
private
DQMStore::qalgos_
private

Set of all the available quality test algorithms.

Definition at line 718 of file DQMStore.h.

Referenced by createQTest(), and initializeFrom().

DQMStore::qtests_
private

All the quality tests.

Definition at line 717 of file DQMStore.h.

Referenced by createQTest(), getQCriterion(), and ~DQMStore().

QTestSpecs DQMStore::qtestspecs_
private

Definition at line 719 of file DQMStore.h.

Referenced by book(), useQTestByMatch(), and ~DQMStore().

DQMStore::readSelectedDirectory_
private

If non-empty, read from file only selected directory.

Definition at line 707 of file DQMStore.h.

DQMStore::reset_
private

Flag used to print out a warning when calling quality tests. twice without having called reset() in between; to be reset in DQMOldReceiver::runQualityTests.

Definition at line 701 of file DQMStore.h.

Referenced by forceReset(), reset(), and runQTests().

uint32_t DQMStore::run_
private

Definition at line 708 of file DQMStore.h.

Referenced by book(), bookFloat(), bookInt(), bookString(), and bookTransaction().

double DQMStore::scaleFlag_
private

Definition at line 702 of file DQMStore.h.

Referenced by initializeFrom(), and scaleElements().

std::ofstream* DQMStore::stream_
private

Definition at line 711 of file DQMStore.h.

Referenced by print_trace(), and ~DQMStore().

uint32_t DQMStore::streamId_
private

Definition at line 709 of file DQMStore.h.

Referenced by book(), bookFloat(), bookInt(), bookString(), and bookTransaction().

DQMStore::verbose_
private
DQMStore::verboseQT_
private

Verbose flag for xml-based QTests.

Definition at line 700 of file DQMStore.h.

Referenced by createQTest(), and initializeFrom().