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 504 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().

505  : verbose_ (1),
506  verboseQT_ (1),
507  reset_ (false),
508  collateHistograms_ (false),
509  enableMultiThread_(false),
510  forceResetOnBeginLumi_(false),
512  run_(0),
513  streamId_(0),
514  moduleId_(0),
515  stream_(nullptr),
516  pwd_ (""),
517  ibooker_(0),
518  igetter_(0)
519 {
520  if (!ibooker_)
521  ibooker_ = new DQMStore::IBooker(this);
522  if (!igetter_)
523  igetter_ = new DQMStore::IGetter(this);
524  initializeFrom(pset);
525 
526  if(pset.getUntrackedParameter<bool>("forceResetOnBeginRun",false)) {
528  }
529  ar.preallocateSignal_.connect([this](edm::service::SystemBounds const& iBounds) {
530  if(iBounds.maxNumberOfStreams() > 1 ) {
531  enableMultiThread_ = true;
532  }
533  });
534  if(pset.getUntrackedParameter<bool>("forceResetOnBeginLumi",false) && enableMultiThread_ == false) {
535  forceResetOnBeginLumi_ = true;
537  }
538 }
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:576
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:2107
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 540 of file DQMStore.cc.

References ibooker_, igetter_, and initializeFrom().

541  : verbose_ (1),
542  verboseQT_ (1),
543  reset_ (false),
544  collateHistograms_ (false),
545  enableMultiThread_(false),
547  run_(0),
548  streamId_(0),
549  moduleId_(0),
550  stream_(nullptr),
551  pwd_ (""),
552  ibooker_(0),
553  igetter_(0)
554 {
555  if (!ibooker_)
556  ibooker_ = new DQMStore::IBooker(this);
557  if (!igetter_)
558  igetter_ = new DQMStore::IGetter(this);
559  initializeFrom(pset);
560 }
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:576
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 562 of file DQMStore.cc.

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

563 {
564  for (QCMap::iterator i = qtests_.begin(), e = qtests_.end(); i != e; ++i)
565  delete i->second;
566 
567  for (QTestSpecs::iterator i = qtestspecs_.begin(), e = qtestspecs_.end(); i != e; ++i)
568  delete i->first;
569 
570  if (stream_)
571  stream_->close();
572  delete stream_;
573 }
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 886 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().

889 {
890  assert(name.find('/') == std::string::npos);
891  if (verbose_ > 3)
892  print_trace(dir, name);
893 
894  // Check if the request monitor element already exists.
896  {
897  if (verbose_ > 1)
898  {
900  mergePath(path, dir, name);
901 
902  std::cout << "DQMStore: "
903  << context << ": monitor element '"
904  << path << "' already exists, resetting" << std::endl;
905  }
906  me->Reset();
907  return me;
908  }
909  else
910  {
911  // Create it and return for initialisation.
912  assert(dirs_.count(dir));
913  MonitorElement proto(&*dirs_.find(dir), name, run_, streamId_, moduleId_);
914  return &const_cast<MonitorElement &>(*data_.insert(std::move(proto)).first);
915  }
916 }
static void mergePath(std::string &path, const std::string &dir, const std::string &name)
Definition: DQMStore.cc:111
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:1915
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:636
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 810 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_.

813 {
814  assert(name.find('/') == std::string::npos);
815  if (verbose_ > 3)
816  print_trace(dir, name);
818  mergePath(path, dir, name);
819 
820  // Put us in charge of h.
821  h->SetDirectory(0);
822 
823  // Check if the request monitor element already exists.
825  if (me)
826  {
827  if (collateHistograms_)
828  {
829  collate(me, h, verbose_);
830  delete h;
831  return me;
832  }
833  else
834  {
835  if (verbose_ > 1)
836  std::cout << "DQMStore: "
837  << context << ": monitor element '"
838  << path << "' already exists, collating" << std::endl;
839  me->Reset();
840  collate(me, h, verbose_);
841  delete h;
842  return me;
843  }
844  }
845  else
846  {
847  // Create and initialise core object.
848  assert(dirs_.count(dir));
849  MonitorElement proto(&*dirs_.find(dir), name, run_, streamId_, moduleId_);
850  me = const_cast<MonitorElement &>(*data_.insert(std::move(proto)).first)
852 
853  // Initialise quality test information.
854  QTestSpecs::iterator qi = qtestspecs_.begin();
855  QTestSpecs::iterator qe = qtestspecs_.end();
856  for ( ; qi != qe; ++qi)
857  {
858  if ( qi->first->match(path) )
859  me->addQReport(qi->second);
860  }
861 
862  // If we just booked a (plain) MonitorElement, and there is a reference
863  // MonitorElement with the same name, link the two together.
864  // The other direction is handled by the extract method.
865  std::string refdir;
866  refdir.reserve(s_referenceDirName.size() + dir.size() + 1);
867  refdir += s_referenceDirName;
868  refdir += '/';
869  refdir += dir;
870  MonitorElement* referenceME = findObject(refdir, name);
871  if (referenceME) {
872  // We have booked a new MonitorElement with a specific dir and name.
873  // Then, if we can find the corresponding MonitorElement in the reference
874  // dir we assign the object_ of the reference MonitorElement to the
875  // reference_ property of our new MonitorElement.
876  me->data_.flags |= DQMNet::DQM_PROP_HAS_REFERENCE;
877  me->reference_ = referenceME->object_;
878  }
879 
880  // Return the monitor element.
881  return me;
882  }
883 }
static void mergePath(std::string &path, const std::string &dir, const std::string &name)
Definition: DQMStore.cc:111
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:1915
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:636
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 1031 of file DQMStore.cc.

References pwd_.

Referenced by DQMFEDIntegrityClient::beginJob(), ConverterTester::beginJob(), SimplePhotonAnalyzer::beginJob(), APVValidationPlots::beginJob(), StripValidationPlots::beginJob(), MuonAlignment::beginJob(), RPCBxTest::beginRun(), hcaldqm::ContainerSingle1D::book(), MEtoMEComparitor::book(), hcaldqm::Container1D::book(), DQMStore::IBooker::book1D(), book1D(), SiStripBaseCondObjDQM::bookCumulMEs(), TrackerOfflineValidationSummary::bookHarvestingHists(), PixelVTXMonitor::bookHistograms(), DQMLumiMonitor::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().

1033 {
1034  return book1D(pwd_, name, new TH1F(name, title, nchX, lowX, highX));
1035 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:1031
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 1039 of file DQMStore.cc.

References book1D(), and pwd_.

1041 {
1042  return book1D(pwd_, name, new TH1F(name.c_str(), title.c_str(), nchX, lowX, highX));
1043 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:1031
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 1079 of file DQMStore.cc.

References book1D(), and pwd_.

1081 {
1082  return book1D(pwd_, name, new TH1F(name, title, nchX, xbinsize));
1083 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:1031
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 1087 of file DQMStore.cc.

References book1D(), and pwd_.

1089 {
1090  return book1D(pwd_, name, new TH1F(name.c_str(), title.c_str(), nchX, xbinsize));
1091 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:1031
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 1095 of file DQMStore.cc.

References book1D(), and pwd_.

1096 {
1097  return book1D(pwd_, name, static_cast<TH1F *>(source->Clone(name)));
1098 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:1031
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 1102 of file DQMStore.cc.

References book1D(), and pwd_.

1103 {
1104  return book1D(pwd_, name, static_cast<TH1F *>(source->Clone(name.c_str())));
1105 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:1031
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 1010 of file DQMStore.cc.

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

1011 {
1012  return book(dir, name, "book1D", MonitorElement::DQM_KIND_TH1F, h, collate1D);
1013 }
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:886
static void collate1D(MonitorElement *me, TH1F *h, unsigned verbose)
Definition: DQMStore.cc:1598
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 1063 of file DQMStore.cc.

References pwd_.

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

1065 {
1066  return book1DD(pwd_, name, new TH1D(name, title, nchX, lowX, highX));
1067 }
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1063
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 1071 of file DQMStore.cc.

References book1DD(), and pwd_.

1073 {
1074  return book1DD(pwd_, name, new TH1D(name.c_str(), title.c_str(), nchX, lowX, highX));
1075 }
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1063
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 1123 of file DQMStore.cc.

References book1DD(), and pwd_.

1124 {
1125  return book1DD(pwd_, name, static_cast<TH1D *>(source->Clone(name)));
1126 }
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1063
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 1130 of file DQMStore.cc.

References book1DD(), and pwd_.

1131 {
1132  return book1DD(pwd_, name, static_cast<TH1D *>(source->Clone(name.c_str())));
1133 }
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1063
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 1024 of file DQMStore.cc.

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

1025 {
1026  return book(dir, name, "book1DD", MonitorElement::DQM_KIND_TH1D, h, collate1DD);
1027 }
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:886
static void collate1DD(MonitorElement *me, TH1D *h, unsigned verbose)
Definition: DQMStore.cc:1612
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 1047 of file DQMStore.cc.

References pwd_.

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

1049 {
1050  return book1S(pwd_, name, new TH1S(name, title, nchX, lowX, highX));
1051 }
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:1047
MonitorElement * DQMStore::book1S ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX 
)

Book 1S histogram.

Definition at line 1055 of file DQMStore.cc.

References book1S(), and pwd_.

1057 {
1058  return book1S(pwd_, name, new TH1S(name.c_str(), title.c_str(), nchX, lowX, highX));
1059 }
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:1047
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 1109 of file DQMStore.cc.

References book1S(), and pwd_.

1110 {
1111  return book1S(pwd_, name, static_cast<TH1S *>(source->Clone(name)));
1112 }
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:1047
MonitorElement * DQMStore::book1S ( const std::string &  name,
TH1S *  h 
)

Book 1S histogram by cloning an existing histogram.

Definition at line 1116 of file DQMStore.cc.

References book1S(), and pwd_.

1117 {
1118  return book1S(pwd_, name, static_cast<TH1S *>(source->Clone(name.c_str())));
1119 }
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:1047
MonitorElement * DQMStore::book1S ( const std::string &  dir,
const std::string &  name,
TH1S *  h 
)
private

Book 1D histogram based on TH1S.

Definition at line 1017 of file DQMStore.cc.

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

1018 {
1019  return book(dir, name, "book1S", MonitorElement::DQM_KIND_TH1S, h, collate1S);
1020 }
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:886
static void collate1S(MonitorElement *me, TH1S *h, unsigned verbose)
Definition: DQMStore.cc:1605
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 1170 of file DQMStore.cc.

References book2D(), and pwd_.

1173 {
1174  return book2D(pwd_, name, new TH2F(name.c_str(), title.c_str(),
1175  nchX, lowX, highX,
1176  nchY, lowY, highY));
1177 }
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:1159
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 1225 of file DQMStore.cc.

References book2D(), and pwd_.

1227 {
1228  return book2D(pwd_, name, new TH2F(name, title,
1229  nchX, xbinsize, nchY, ybinsize));
1230 }
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:1159
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 1234 of file DQMStore.cc.

References book2D(), and pwd_.

1236 {
1237  return book2D(pwd_, name, new TH2F(name.c_str(), title.c_str(),
1238  nchX, xbinsize, nchY, ybinsize));
1239 }
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:1159
MonitorElement * DQMStore::book2D ( const char *  name,
TH2F *  h 
)

Book 2D histogram by cloning an existing histogram.

Definition at line 1243 of file DQMStore.cc.

References book2D(), and pwd_.

1244 {
1245  return book2D(pwd_, name, static_cast<TH2F *>(source->Clone(name)));
1246 }
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:1159
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 1250 of file DQMStore.cc.

References book2D(), and pwd_.

1251 {
1252  return book2D(pwd_, name, static_cast<TH2F *>(source->Clone(name.c_str())));
1253 }
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:1159
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 1138 of file DQMStore.cc.

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

1139 {
1140  return book(dir, name, "book2D", MonitorElement::DQM_KIND_TH2F, h, collate2D);
1141 }
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:886
dbl *** dir
Definition: mlp_gen.cc:35
static void collate2D(MonitorElement *me, TH2F *h, unsigned verbose)
Definition: DQMStore.cc:1619
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 1203 of file DQMStore.cc.

References pwd_.

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

1206 {
1207  return book2DD(pwd_, name, new TH2D(name, title,
1208  nchX, lowX, highX,
1209  nchY, lowY, highY));
1210 }
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:1203
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 1214 of file DQMStore.cc.

References book2DD(), and pwd_.

1217 {
1218  return book2DD(pwd_, name, new TH2D(name.c_str(), title.c_str(),
1219  nchX, lowX, highX,
1220  nchY, lowY, highY));
1221 }
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:1203
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 1271 of file DQMStore.cc.

References book2DD(), and pwd_.

1272 {
1273  return book2DD(pwd_, name, static_cast<TH2D *>(source->Clone(name)));
1274 }
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:1203
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 1278 of file DQMStore.cc.

References book2DD(), and pwd_.

1279 {
1280  return book2DD(pwd_, name, static_cast<TH2D *>(source->Clone(name.c_str())));
1281 }
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:1203
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 1152 of file DQMStore.cc.

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

1153 {
1154  return book(dir, name, "book2DD", MonitorElement::DQM_KIND_TH2D, h, collate2DD);
1155 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
static void collate2DD(MonitorElement *me, TH2D *h, unsigned verbose)
Definition: DQMStore.cc:1633
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:886
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 1181 of file DQMStore.cc.

References pwd_.

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

1184 {
1185  return book2S(pwd_, name, new TH2S(name, title,
1186  nchX, lowX, highX,
1187  nchY, lowY, highY));
1188 }
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:1181
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 1192 of file DQMStore.cc.

References book2S(), and pwd_.

1195 {
1196  return book2S(pwd_, name, new TH2S(name.c_str(), title.c_str(),
1197  nchX, lowX, highX,
1198  nchY, lowY, highY));
1199 }
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:1181
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 1257 of file DQMStore.cc.

References book2S(), and pwd_.

1258 {
1259  return book2S(pwd_, name, static_cast<TH2S *>(source->Clone(name)));
1260 }
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:1181
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 1264 of file DQMStore.cc.

References book2S(), and pwd_.

1265 {
1266  return book2S(pwd_, name, static_cast<TH2S *>(source->Clone(name.c_str())));
1267 }
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:1181
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 1145 of file DQMStore.cc.

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

1146 {
1147  return book(dir, name, "book2S", MonitorElement::DQM_KIND_TH2S, h, collate2S);
1148 }
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:886
dbl *** dir
Definition: mlp_gen.cc:35
static void collate2S(MonitorElement *me, TH2S *h, unsigned verbose)
Definition: DQMStore.cc:1626
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 1293 of file DQMStore.cc.

References pwd_.

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

1297 {
1298  return book3D(pwd_, name, new TH3F(name, title,
1299  nchX, lowX, highX,
1300  nchY, lowY, highY,
1301  nchZ, lowZ, highZ));
1302 }
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:1293
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 1306 of file DQMStore.cc.

References book3D(), and pwd_.

1310 {
1311  return book3D(pwd_, name, new TH3F(name.c_str(), title.c_str(),
1312  nchX, lowX, highX,
1313  nchY, lowY, highY,
1314  nchZ, lowZ, highZ));
1315 }
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:1293
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 1319 of file DQMStore.cc.

References book3D(), and pwd_.

1320 {
1321  return book3D(pwd_, name, static_cast<TH3F *>(source->Clone(name)));
1322 }
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:1293
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 1326 of file DQMStore.cc.

References book3D(), and pwd_.

1327 {
1328  return book3D(pwd_, name, static_cast<TH3F *>(source->Clone(name.c_str())));
1329 }
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:1293
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 1286 of file DQMStore.cc.

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

1287 {
1288  return book(dir, name, "book3D", MonitorElement::DQM_KIND_TH3F, h, collate3D);
1289 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
static void collate3D(MonitorElement *me, TH3F *h, unsigned verbose)
Definition: DQMStore.cc:1640
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:886
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 973 of file DQMStore.cc.

References bookFloat(), and pwd_.

974 {
975  return bookFloat(pwd_, name);
976 }
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:968
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * DQMStore::bookFloat ( const std::string &  dir,
const std::string &  name 
)
private

Book float.

Definition at line 951 of file DQMStore.cc.

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

952 {
953  if (collateHistograms_)
954  {
956  {
957  me->Fill(0.);
958  return me;
959  }
960  }
961 
962  return book(dir, name, "bookFloat")
964 }
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:1915
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:886
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 943 of file DQMStore.cc.

References bookInt(), and pwd_.

944 {
945  return bookInt(pwd_, name);
946 }
std::string pwd_
Definition: DQMStore.h:713
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:938
MonitorElement * DQMStore::bookInt ( const std::string &  dir,
const std::string &  name 
)
private

Book int.

Definition at line 921 of file DQMStore.cc.

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

922 {
923  if (collateHistograms_)
924  {
926  {
927  me->Fill(0);
928  return me;
929  }
930  }
931 
932  return book(dir, name, "bookInt")
934 }
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:1915
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:886
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 1345 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().

1349 {
1350  return bookProfile(pwd_, name, new TProfile(name, title,
1351  nchX, lowX, highX,
1352  lowY, highY,
1353  option));
1354 }
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:1345
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 1360 of file DQMStore.cc.

References bookProfile(), and pwd_.

1364 {
1365  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1366  nchX, lowX, highX,
1367  lowY, highY,
1368  option));
1369 }
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:1345
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 1375 of file DQMStore.cc.

References bookProfile(), and pwd_.

1379 {
1380  return bookProfile(pwd_, name, new TProfile(name, title,
1381  nchX, lowX, highX,
1382  lowY, highY,
1383  option));
1384 }
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:1345
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 1390 of file DQMStore.cc.

References bookProfile(), and pwd_.

1394 {
1395  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1396  nchX, lowX, highX,
1397  lowY, highY,
1398  option));
1399 }
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:1345
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 1405 of file DQMStore.cc.

References bookProfile(), and pwd_.

1409 {
1410  return bookProfile(pwd_, name, new TProfile(name, title,
1411  nchX, xbinsize,
1412  lowY, highY,
1413  option));
1414 }
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:1345
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 1420 of file DQMStore.cc.

References bookProfile(), and pwd_.

1424 {
1425  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1426  nchX, xbinsize,
1427  lowY, highY,
1428  option));
1429 }
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:1345
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 1435 of file DQMStore.cc.

References bookProfile(), and pwd_.

1439 {
1440  return bookProfile(pwd_, name, new TProfile(name, title,
1441  nchX, xbinsize,
1442  lowY, highY,
1443  option));
1444 }
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:1345
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 1450 of file DQMStore.cc.

References bookProfile(), and pwd_.

1454 {
1455  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1456  nchX, xbinsize,
1457  lowY, highY,
1458  option));
1459 }
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:1345
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 1463 of file DQMStore.cc.

References bookProfile(), and pwd_.

1464 {
1465  return bookProfile(pwd_, name, static_cast<TProfile *>(source->Clone(name)));
1466 }
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:1345
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 1470 of file DQMStore.cc.

References bookProfile(), and pwd_.

1471 {
1472  return bookProfile(pwd_, name, static_cast<TProfile *>(source->Clone(name.c_str())));
1473 }
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:1345
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 1334 of file DQMStore.cc.

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

1335 {
1336  return book(dir, name, "bookProfile",
1338  h, collateProfile);
1339 }
FWCore Framework interface EventSetupRecordImplementation h
Helper function to determine trigger accepts.
static void collateProfile(MonitorElement *me, TProfile *h, unsigned verbose)
Definition: DQMStore.cc:1647
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:886
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 1489 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().

1494 {
1495  return bookProfile2D(pwd_, name, new TProfile2D(name, title,
1496  nchX, lowX, highX,
1497  nchY, lowY, highY,
1498  lowZ, highZ,
1499  option));
1500 }
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:1489
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 1506 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1511 {
1512  return bookProfile2D(pwd_, name, new TProfile2D(name.c_str(), title.c_str(),
1513  nchX, lowX, highX,
1514  nchY, lowY, highY,
1515  lowZ, highZ,
1516  option));
1517 }
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:1489
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 1523 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1528 {
1529  return bookProfile2D(pwd_, name, new TProfile2D(name, title,
1530  nchX, lowX, highX,
1531  nchY, lowY, highY,
1532  lowZ, highZ,
1533  option));
1534 }
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:1489
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 1540 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1545 {
1546  return bookProfile2D(pwd_, name, new TProfile2D(name.c_str(), title.c_str(),
1547  nchX, lowX, highX,
1548  nchY, lowY, highY,
1549  lowZ, highZ,
1550  option));
1551 }
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:1489
MonitorElement * DQMStore::bookProfile2D ( const char *  name,
TProfile2D *  h 
)

Book TProfile2D by cloning an existing profile.

Definition at line 1555 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1556 {
1557  return bookProfile2D(pwd_, name, static_cast<TProfile2D *>(source->Clone(name)));
1558 }
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:1489
MonitorElement * DQMStore::bookProfile2D ( const std::string &  name,
TProfile2D *  h 
)

Book TProfile2D by cloning an existing profile.

Definition at line 1562 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1563 {
1564  return bookProfile2D(pwd_, name, static_cast<TProfile2D *>(source->Clone(name.c_str())));
1565 }
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:1489
MonitorElement * DQMStore::bookProfile2D ( const std::string &  folder,
const std::string &  name,
TProfile2D *  h 
)
private

Book 2D profile histogram based on TProfile2D.

Definition at line 1478 of file DQMStore.cc.

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

1479 {
1480  return book(dir, name, "bookProfile2D",
1482  h, collateProfile2D);
1483 }
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:886
static void collateProfile2D(MonitorElement *me, TProfile2D *h, unsigned verbose)
Definition: DQMStore.cc:1657
dbl *** dir
Definition: mlp_gen.cc:35
MonitorElement * DQMStore::bookString ( const char *  name,
const char *  value 
)

Book string.

Definition at line 997 of file DQMStore.cc.

References pwd_.

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

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

Book string.

Definition at line 1002 of file DQMStore.cc.

References bookString(), and pwd_.

1003 {
1004  return bookString(pwd_, name, value);
1005 }
MonitorElement * bookString(const char *name, const char *value)
Book string.
Definition: DQMStore.cc:997
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 981 of file DQMStore.cc.

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

984 {
985  if (collateHistograms_)
986  {
988  return me;
989  }
990 
991  return book(dir, name, "bookString")
993 }
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:1915
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:886
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 714 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(), APVValidationPlots::endJob(), StripValidationPlots::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(), SiStripBadModuleFedErrESSource::getProcessedEvents(), 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().

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

cd to subdirectory (if there)

Definition at line 719 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().

720 {
722  const std::string *cleaned = 0;
723  cleanTrailingSlashes(subdir, clean, cleaned);
724 
725  if (! dirExists(*cleaned))
726  raiseDQMError("DQMStore", "Cannot 'cd' into non-existent directory '%s'",
727  cleaned->c_str());
728 
729  setCurrentFolder(*cleaned);
730 }
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:81
std::vector< T * > clean
Definition: MVATrainer.cc:156
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:802
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:737
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 2474 of file DQMStore.cc.

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

Referenced by save().

2475 {
2476  assert(! path.empty());
2477 
2478  // Find the first path component.
2479  size_t start = 0;
2480  size_t end = path.find('/', start);
2481  if (end == std::string::npos)
2482  end = path.size();
2483 
2484  while (true)
2485  {
2486  // Check if this subdirectory component exists. If yes, make sure
2487  // it is actually a subdirectory. Otherwise create or cd into it.
2488  std::string part(path, start, end-start);
2489  TObject *o = gDirectory->Get(part.c_str());
2490  if (o && ! dynamic_cast<TDirectory *>(o))
2491  raiseDQMError("DQMStore", "Attempt to create directory '%s' in a file"
2492  " fails because the part '%s' already exists and is not"
2493  " directory", path.c_str(), part.c_str());
2494  else if (! o)
2495  gDirectory->mkdir(part.c_str());
2496 
2497  if (! gDirectory->cd(part.c_str()))
2498  raiseDQMError("DQMStore", "Attempt to create directory '%s' in a file"
2499  " fails because could not cd into subdirectory '%s'",
2500  path.c_str(), part.c_str());
2501 
2502  // Stop if we reached the end, ignoring any trailing '/'.
2503  if (end+1 >= path.size())
2504  break;
2505 
2506  // Find the next path component.
2507  start = end+1;
2508  end = path.find('/', start);
2509  if (end == std::string::npos)
2510  end = path.size();
2511  }
2512 
2513  return true;
2514 }
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 1571 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().

1572 {
1573  if (me->getTH1()->GetNbinsX() != h->GetNbinsX()
1574  || me->getTH1()->GetNbinsY() != h->GetNbinsY()
1575  || me->getTH1()->GetNbinsZ() != h->GetNbinsZ()
1576  || me->getTH1()->GetXaxis()->GetXmin() != h->GetXaxis()->GetXmin()
1577  || me->getTH1()->GetYaxis()->GetXmin() != h->GetYaxis()->GetXmin()
1578  || me->getTH1()->GetZaxis()->GetXmin() != h->GetZaxis()->GetXmin()
1579  || me->getTH1()->GetXaxis()->GetXmax() != h->GetXaxis()->GetXmax()
1580  || me->getTH1()->GetYaxis()->GetXmax() != h->GetYaxis()->GetXmax()
1581  || me->getTH1()->GetZaxis()->GetXmax() != h->GetZaxis()->GetXmax()
1582  || !MonitorElement::CheckBinLabels((TAxis*)me->getTH1()->GetXaxis(),(TAxis*)h->GetXaxis())
1583  || !MonitorElement::CheckBinLabels((TAxis*)me->getTH1()->GetYaxis(),(TAxis*)h->GetYaxis())
1584  || !MonitorElement::CheckBinLabels((TAxis*)me->getTH1()->GetZaxis(),(TAxis*)h->GetZaxis()) )
1585  {
1586  if(verbose > 0)
1587  std::cout << "*** DQMStore: WARNING:"
1588  << "checkBinningMatches: different binning - cannot add object '"
1589  << h->GetName() << "' of type "
1590  << h->IsA()->GetName() << " to existing ME: '"
1591  << me->getFullname() << "'\n";
1592  return false;
1593  }
1594  return true;
1595 }
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 1598 of file DQMStore.cc.

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

Referenced by book1D(), and extract().

1599 {
1600  if (checkBinningMatches(me,h,verbose))
1601  me->getTH1F()->Add(h);
1602 }
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:1571
void DQMStore::collate1DD ( MonitorElement me,
TH1D *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1612 of file DQMStore.cc.

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

Referenced by book1DD(), and extract().

1613 {
1614  if (checkBinningMatches(me,h,verbose))
1615  me->getTH1D()->Add(h);
1616 }
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:1571
void DQMStore::collate1S ( MonitorElement me,
TH1S *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1605 of file DQMStore.cc.

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

Referenced by book1S(), and extract().

1606 {
1607  if (checkBinningMatches(me,h,verbose))
1608  me->getTH1S()->Add(h);
1609 }
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:1571
void DQMStore::collate2D ( MonitorElement me,
TH2F *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1619 of file DQMStore.cc.

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

Referenced by book2D(), and extract().

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

Definition at line 1633 of file DQMStore.cc.

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

Referenced by book2DD(), and extract().

1634 {
1635  if (checkBinningMatches(me,h,verbose))
1636  me->getTH2D()->Add(h);
1637 }
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:1571
void DQMStore::collate2S ( MonitorElement me,
TH2S *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1626 of file DQMStore.cc.

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

Referenced by book2S(), and extract().

1627 {
1628  if (checkBinningMatches(me,h,verbose))
1629  me->getTH2S()->Add(h);
1630 }
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:1571
void DQMStore::collate3D ( MonitorElement me,
TH3F *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1640 of file DQMStore.cc.

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

Referenced by book3D(), and extract().

1641 {
1642  if (checkBinningMatches(me,h,verbose))
1643  me->getTH3F()->Add(h);
1644 }
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:1571
void DQMStore::collateProfile ( MonitorElement me,
TProfile *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1647 of file DQMStore.cc.

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

Referenced by bookProfile(), and extract().

1648 {
1649  if (checkBinningMatches(me,h,verbose))
1650  {
1651  TProfile *meh = me->getTProfile();
1652  me->addProfiles(h, meh, meh, 1, 1);
1653  }
1654 }
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:1571
void DQMStore::collateProfile2D ( MonitorElement me,
TProfile2D *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1657 of file DQMStore.cc.

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

Referenced by bookProfile2D(), and extract().

1658 {
1659  if (checkBinningMatches(me,h,verbose))
1660  {
1661  TProfile2D *meh = me->getTProfile2D();
1662  me->addProfiles(h, meh, meh, 1, 1);
1663  }
1664 }
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:1571
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 1775 of file DQMStore.cc.

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

1776 {
1777  MonitorElement proto(&path, std::string());
1778  MEMap::const_iterator e = data_.end();
1779  MEMap::const_iterator i = data_.lower_bound(proto);
1780  return (i != e && isSubdirectory(path, *i->data_.dirname));
1781 }
int i
Definition: DBlmapReader.cc:9
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:71
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 3288 of file DQMStore.cc.

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

Referenced by 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().

3289 {
3290  if (qtests_.count(qtname))
3291  raiseDQMError("DQMStore", "Attempt to create duplicate quality test '%s'",
3292  qtname.c_str());
3293 
3294  QAMap::iterator i = qalgos_.find(algoname);
3295  if (i == qalgos_.end())
3296  raiseDQMError("DQMStore", "Cannot create a quality test using unknown"
3297  " algorithm '%s'", algoname.c_str());
3298 
3299  QCriterion *qc = i->second(qtname);
3300  qc->setVerbose(verboseQT_);
3301 
3302  qtests_[qtname] = qc;
3303  return qc;
3304 }
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 2131 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().

2132 {
2133  if (!enableMultiThread_)
2134  return;
2135 
2136  std::lock_guard<std::mutex> guard(book_mutex_);
2137 
2138  std::string null_str("");
2139  MonitorElement proto(&null_str, null_str, run, 0, 0);
2140  proto.setLumi(lumi);
2141 
2142  std::set<MonitorElement>::const_iterator e = data_.end();
2143  std::set<MonitorElement>::const_iterator i = data_.lower_bound(proto);
2144 
2145  while (i != e) {
2146  if (i->data_.streamId != 0 ||
2147  i->data_.moduleId != 0)
2148  break;
2149  if (i->data_.lumi != lumi)
2150  break;
2151  if (i->data_.run != run)
2152  break;
2153 
2154  auto temp = i;
2155  ++i;
2156 
2157  if (verbose_ > 1) {
2158  std::cout << "DQMStore::deleteUnusedLumiHistograms: deleted monitor element '"
2159  << *i->data_.dirname << "/" << i->data_.objname << "'"
2160  << "flags " << i->data_.flags << "\n";
2161  }
2162 
2163  data_.erase(temp);
2164  }
2165 }
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 3422 of file DQMStore.cc.

References MonitorElement::disableSoftReset().

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

3423 {
3424  if (me)
3425  me->disableSoftReset();
3426 }
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 2173 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(), SpecificationBuilder_cfi::val(), relativeConstraints::value, and verbose_.

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

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

Referenced by get_info().

3100  {
3101  if (buf.Length() == buf.BufferSize())
3102  return 0;
3103  buf.InitMap();
3104  void *ptr = buf.ReadObjectAny(0);
3105  return reinterpret_cast<TObject *>(ptr);
3106 }
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 1915 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().

1921 {
1922  if (dir.find_first_not_of(s_safe) != std::string::npos)
1923  raiseDQMError("DQMStore", "Monitor element path name '%s' uses"
1924  " unacceptable characters", dir.c_str());
1925  if (name.find_first_not_of(s_safe) != std::string::npos)
1926  raiseDQMError("DQMStore", "Monitor element path name '%s' uses"
1927  " unacceptable characters", name.c_str());
1928 
1929  MonitorElement proto;
1930  proto.data_.dirname = &dir;
1931  proto.data_.objname = name;
1932  proto.data_.run = run;
1933  proto.data_.lumi = lumi;
1934  proto.data_.streamId = streamId;
1935  proto.data_.moduleId = moduleId;
1936 
1937  MEMap::const_iterator mepos = data_.find(proto);
1938  return (mepos == data_.end() ? 0
1939  : const_cast<MonitorElement *>(&*mepos));
1940 }
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 2107 of file DQMStore.cc.

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

Referenced by DQMStore().

2108 {
2109  MEMap::iterator mi = data_.begin();
2110  MEMap::iterator me = data_.end();
2111  for ( ; mi != me; ++mi)
2112  {
2113  if (forceResetOnBeginLumi_ && ((*mi).getLumiFlag() == false))
2114  continue;
2115  MonitorElement &me = const_cast<MonitorElement &>(*mi);
2116  me.Reset();
2117  me.resetUpdate();
2118  }
2119 
2120  reset_ = true;
2121 }
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 1785 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(), util.rrapi.RRApi::columns(), rrapi.RRApi::columns(), util.rrapi.RRApi::count(), rrapi.RRApi::count(), SiStripActionExecutor::createShiftReport(), util.rrapi.RRApi::data(), 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(), betterConfigParser.BetterConfigParser::getCompares(), SiStripTrackerMapCreator::getDetectorFlagAndComment(), EgHLTOfflineSummaryClient::getEgHLTSumHist_(), betterConfigParser.BetterConfigParser::getGeneral(), SiStripQualityChecker::getModuleStatus(), SiStripBadModuleFedErrESSource::getProcessedEvents(), betterConfigParser.BetterConfigParser::getResultingSection(), hcaldqm::Container1D::load(), TkHistoMap::loadTkHistoMap(), SiStripHistoPlotter::makePlot(), SiStripInformationExtractor::plotHistosFromLayout(), SiStripActionExecutor::printShiftHistoParameters(), QTestStatusChecker::processAlarms(), util.rrapi.RRApi::report(), rrapi.RRApi::report(), rrapi.RRApi::reports(), util.rrapi.RRApi::reports(), EgHLTOfflineSummaryClient::runClient_(), DQMFileSaver::saveForOffline(), DQMFileSaver::saveForOnline(), util.rrapi.RRApi::tables(), rrapi.RRApi::tables(), util.rrapi.RRApi::tags(), rrapi.RRApi::tags(), util.rrapi.RRApi::templates(), rrapi.RRApi::templates(), rrapi.RRApi::workspaces(), and util.rrapi.RRApi::workspaces().

1786 {
1787  std::string dir;
1788  std::string name;
1789  splitPath(dir, name, path);
1790  MonitorElement proto(&dir, name);
1791  MEMap::const_iterator mepos = data_.find(proto);
1792  return (mepos == data_.end() ? 0
1793  : const_cast<MonitorElement *>(&*mepos));
1794 }
static void splitPath(std::string &dir, std::string &name, const std::string &path)
Definition: DQMStore.cc:98
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 1798 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().

1799 {
1800  // FIXME: Use reverse map [tag -> path] / [tag -> dir]?
1801  std::vector<MonitorElement *> result;
1802  for (MEMap::const_iterator i = data_.begin(), e = data_.end(); i != e; ++i)
1803  {
1804  const MonitorElement &me = *i;
1805  if ((me.data_.flags & DQMNet::DQM_PROP_TAGGED) && me.data_.tag == tag)
1806  result.push_back(const_cast<MonitorElement *>(&me));
1807  }
1808  return result;
1809 }
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:1671
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 3108 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().

3111  {
3112 
3113  size_t slash = h.full_pathname().rfind('/');
3114  size_t dirpos = (slash == std::string::npos ? 0 : slash);
3115  size_t namepos = (slash == std::string::npos ? 0 : slash+1);
3116  dirname.assign(h.full_pathname(), 0, dirpos);
3117  objname.assign(h.full_pathname(), namepos, std::string::npos);
3118  TBufferFile buf(TBufferFile::kRead, h.size(),
3119  (void*)h.streamed_histo().data(),
3120  kFALSE);
3121  buf.Reset();
3122  *obj = extractNextObject(buf);
3123  if (!*obj) {
3124  raiseDQMError("DQMStore", "Error reading element:'%s'" , h.full_pathname().c_str());
3125  }
3126 }
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:3100
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 1998 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().

2001 {
2003  const std::string *cleaned = 0;
2004  cleanTrailingSlashes(path, clean, cleaned);
2005  MonitorElement proto(cleaned, std::string(), runNumber);
2006  proto.setLumi(lumi);
2007 
2008  std::vector<MonitorElement *> result;
2009  MEMap::const_iterator e = data_.end();
2010  MEMap::const_iterator i = data_.lower_bound(proto);
2011  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i) {
2012  if (runNumber != 0) {
2013  if (i->data_.run > runNumber // TODO[rovere]: pleonastic? first we encounter local ME of the same run ...
2014  || i->data_.streamId != 0
2015  || i->data_.moduleId != 0)
2016  break;
2017  }
2018  if (lumi != 0) {
2019  if (i->data_.lumi > lumi
2020  || i->data_.streamId != 0
2021  || i->data_.moduleId != 0)
2022  break;
2023  }
2024  if (runNumber != 0 or lumi !=0) {
2025  assert(i->data_.streamId == 0);
2026  assert(i->data_.moduleId == 0);
2027  }
2028  result.push_back(const_cast<MonitorElement *>(&*i));
2029  }
2030 
2031  if (enableMultiThread_)
2032  {
2033  //save legacy modules when running MT
2034  i = data_.begin();
2035  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i) {
2036  if (i->data_.run != 0 || i->data_.streamId != 0 || i->data_.moduleId != 0) break;
2037  result.push_back(const_cast<MonitorElement *>(&*i));
2038  }
2039  }
2040 
2041  return result;
2042 }
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:81
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:71
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 1945 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.

1946 {
1947  into.clear();
1948  into.reserve(dirs_.size());
1949 
1950  MEMap::const_iterator me = data_.end();
1951  std::set<std::string>::const_iterator di = dirs_.begin();
1952  std::set<std::string>::const_iterator de = dirs_.end();
1953  char tagbuf[32]; // more than enough for '/' and up to 10 digits
1954 
1955  for ( ; di != de; ++di)
1956  {
1957  MonitorElement proto(&*di, std::string());
1958  MEMap::const_iterator mi = data_.lower_bound(proto);
1959  MEMap::const_iterator m = mi;
1960  size_t sz = di->size() + 2;
1961  size_t nfound = 0;
1962  for ( ; m != me && isSubdirectory(*di, *m->data_.dirname); ++m)
1963  if (*di == *m->data_.dirname && (m->data_.flags & DQMNet::DQM_PROP_TAGGED))
1964  {
1965  // the tags count for '/' + up to 10 digits, otherwise ',' + ME name
1966  sz += 1 + m->data_.objname.size() + 11;
1967  ++nfound;
1968  }
1969 
1970  if (! nfound)
1971  continue;
1972 
1973  std::vector<std::string>::iterator istr
1974  = into.insert(into.end(), std::string());
1975 
1976  istr->reserve(sz);
1977 
1978  *istr += *di;
1979  *istr += ':';
1980  for (sz = 0; mi != m; ++mi)
1981  {
1982  if (*di == *m->data_.dirname && (m->data_.flags & DQMNet::DQM_PROP_TAGGED))
1983  {
1984  sprintf(tagbuf, "/%u", mi->data_.tag);
1985  if (sz > 0)
1986  *istr += ',';
1987  *istr += m->data_.objname;
1988  *istr += tagbuf;
1989  ++sz;
1990  }
1991  }
1992  }
1993 }
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:71
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 1814 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().

1815 {
1817  const std::string *cleaned = 0;
1818  cleanTrailingSlashes(path, clean, cleaned);
1819  MonitorElement proto(cleaned, std::string());
1820 
1821  std::vector<MonitorElement *> result;
1822  MEMap::const_iterator e = data_.end();
1823  MEMap::const_iterator i = data_.lower_bound(proto);
1824  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i)
1825  if (*cleaned == *i->data_.dirname)
1826  result.push_back(const_cast<MonitorElement *>(&*i));
1827 
1828  return result;
1829 }
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:81
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:71
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 1833 of file DQMStore.cc.

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

1834 {
1836  const std::string *cleaned = 0;
1837  cleanTrailingSlashes(path, clean, cleaned);
1838  MonitorElement proto(cleaned, std::string());
1839 
1840  std::vector<MonitorElement *> result;
1841  MEMap::const_iterator e = data_.end();
1842  MEMap::const_iterator i = data_.lower_bound(proto);
1843  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i)
1844  if (*cleaned == *i->data_.dirname
1845  && (i->data_.flags & DQMNet::DQM_PROP_TAGGED)
1846  && i->data_.tag == tag)
1847  result.push_back(const_cast<MonitorElement *>(&*i));
1848 
1849  return result;
1850 }
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:81
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1671
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:71
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 1857 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.

1858 {
1859  into.clear();
1860  into.reserve(dirs_.size());
1861 
1862  MEMap::const_iterator me = data_.end();
1863  std::set<std::string>::const_iterator di = dirs_.begin();
1864  std::set<std::string>::const_iterator de = dirs_.end();
1865  for ( ; di != de; ++di)
1866  {
1867  MonitorElement proto(&*di, std::string());
1868  MEMap::const_iterator mi = data_.lower_bound(proto);
1869  MEMap::const_iterator m = mi;
1870  size_t sz = di->size() + 2;
1871  size_t nfound = 0;
1872  for ( ; m != me && isSubdirectory(*di, *m->data_.dirname); ++m)
1873  if (*di == *m->data_.dirname)
1874  {
1875  sz += m->data_.objname.size() + 1;
1876  ++nfound;
1877  }
1878 
1879  if (! nfound)
1880  continue;
1881 
1882  std::vector<std::string>::iterator istr
1883  = into.insert(into.end(), std::string());
1884 
1885  if (showContents)
1886  {
1887  istr->reserve(sz);
1888 
1889  *istr += *di;
1890  *istr += ':';
1891  for (sz = 0; mi != m; ++mi)
1892  {
1893  if (*di != *mi->data_.dirname)
1894  continue;
1895 
1896  if (sz > 0)
1897  *istr += ',';
1898 
1899  *istr += mi->data_.objname;
1900  ++sz;
1901  }
1902  }
1903  else
1904  {
1905  istr->reserve(di->size() + 2);
1906  *istr += *di;
1907  *istr += ':';
1908  }
1909  }
1910 }
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:71
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 2047 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().

2048 {
2049  lat::Regexp rx;
2050  try
2051  {
2052  rx = lat::Regexp(pattern, 0, syntaxType);
2053  rx.study();
2054  }
2055  catch (lat::Error &e)
2056  {
2057  raiseDQMError("DQMStore", "Invalid regular expression '%s': %s",
2058  pattern.c_str(), e.explain().c_str());
2059  }
2060 
2061  std::string path;
2062  std::vector<MonitorElement *> result;
2063  MEMap::const_iterator i = data_.begin();
2064  MEMap::const_iterator e = data_.end();
2065  for ( ; i != e; ++i)
2066  {
2067  path.clear();
2068  mergePath(path, *i->data_.dirname, i->data_.objname);
2069  if (rx.match(path))
2070  result.push_back(const_cast<MonitorElement *>(&*i));
2071  }
2072 
2073  return result;
2074 }
int i
Definition: DBlmapReader.cc:9
static void mergePath(std::string &path, const std::string &dir, const std::string &name)
Definition: DQMStore.cc:111
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 1759 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().

1760 {
1761  MonitorElement proto(&pwd_, std::string());
1762  std::vector<std::string> result;
1763  MEMap::const_iterator e = data_.end();
1764  MEMap::const_iterator i = data_.lower_bound(proto);
1765  for ( ; i != e && isSubdirectory(pwd_, *i->data_.dirname); ++i)
1766  if (pwd_ == *i->data_.dirname)
1767  result.push_back(i->getName());
1768 
1769  return result;
1770 }
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:71
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 3383 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().

3384 {
3386  const std::string *cleaned = 0;
3387  cleanTrailingSlashes(path, clean, cleaned);
3388 
3390  MEMap::const_iterator mi = data_.begin();
3391  MEMap::const_iterator me = data_.end();
3392  for ( ; mi != me; ++mi)
3393  {
3394  if (! cleaned->empty() && ! isSubdirectory(*cleaned, *mi->data_.dirname))
3395  continue;
3396 
3397  if (mi->hasError())
3398  return dqm::qstatus::ERROR;
3399  else if (mi->hasWarning())
3400  status = dqm::qstatus::WARNING;
3401  else if (status < dqm::qstatus::WARNING
3402  && mi->hasOtherReport())
3403  status = dqm::qstatus::OTHER;
3404  }
3405  return status;
3406 }
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:81
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:71
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 1736 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().

1737 {
1738  std::vector<std::string> result;
1739  std::set<std::string>::const_iterator e = dirs_.end();
1740  std::set<std::string>::const_iterator i = dirs_.find(pwd_);
1741 
1742  // If we didn't find current directory, the tree is empty, so quit.
1743  if (i == e)
1744  return result;
1745 
1746  // Skip the current directory and then start looking for immediate
1747  // subdirectories in the dirs_ list. Stop when we are no longer in
1748  // (direct or indirect) subdirectories of pwd_. Note that we don't
1749  // "know" which order the set will sort A/B, A/B/C and A/D.
1750  while (++i != e && isSubdirectory(pwd_, *i))
1751  if (i->find('/', pwd_.size()+1) == std::string::npos)
1752  result.push_back(*i);
1753 
1754  return result;
1755 }
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:71
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 576 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().

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

Definition at line 3461 of file DQMStore.cc.

References collateHistograms_.

3462 {
3463  return collateHistograms_;
3464 }
bool collateHistograms_
Definition: DQMStore.h:703
bool DQMStore::isCollateME ( MonitorElement me) const
private

Definition at line 3470 of file DQMStore.cc.

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

Referenced by extract().

3471 { 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:71
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 3018 of file DQMStore.cc.

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

Referenced by DQMFileReader::beginJob().

3021 {
3022  bool overwrite = true;
3023  if (collateHistograms_) overwrite = false;
3024  if (verbose_)
3025  {
3026  std::cout << "DQMStore::load: reading from file '" << filename << "'\n";
3027  if (collateHistograms_)
3028  std::cout << "DQMStore::load: in collate mode " << "\n";
3029  else
3030  std::cout << "DQMStore::load: in overwrite mode " << "\n";
3031  }
3032 
3033  if (!s_rxpbfile.match(filename, 0, 0))
3034  return readFile(filename, overwrite, "", "", stripdirs, fileMustExist);
3035  else
3036  return readFilePB(filename, overwrite, "", "", stripdirs, fileMustExist);
3037 }
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:3045
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:3129
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 761 of file DQMStore.cc.

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

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

762 {
763  std::string prev;
764  std::string subdir;
766  prev.reserve(path.size());
767  subdir.reserve(path.size());
768  name.reserve(path.size());
769  size_t prevname = 0;
770  size_t slash = 0;
771 
772  while (true)
773  {
774  // Create this subdirectory component.
775  subdir.clear();
776  subdir.append(path, 0, slash);
777  name.clear();
778  name.append(subdir, prevname, std::string::npos);
779  if (! prev.empty() && findObject(prev, name))
780  raiseDQMError("DQMStore", "Attempt to create subdirectory '%s'"
781  " which already exists as a monitor element",
782  subdir.c_str());
783 
784  if (! dirs_.count(subdir))
785  dirs_.insert(subdir);
786 
787  // Stop if we've reached the end (including possibly a trailing slash).
788  if (slash+1 >= path.size())
789  break;
790 
791  // Find the next slash, making sure we progress. If reach the end,
792  // process the last path component; the next loop round will terminate.
793  prevname = slash ? slash+1 : slash;
794  prev = subdir;
795  if ((slash = path.find('/', ++slash)) == std::string::npos)
796  slash = path.size();
797  }
798 }
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:1915
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 433 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().

436  {
437  if (verbose_ > 1)
438  std::cout << "DQMStore::mergeAndResetMEsLuminositySummaryCache - Merging objects from run: "
439  << run << " lumi: " << lumi
440  << ", stream: " << streamId
441  << " module: " << moduleId << std::endl;
442  std::string null_str("");
443  MonitorElement proto(&null_str, null_str, run, streamId, moduleId);
444  std::set<MonitorElement>::const_iterator e = data_.end();
445  std::set<MonitorElement>::const_iterator i = data_.lower_bound(proto);
446 
447  while (i != e) {
448  if (i->data_.run != run
449  || i->data_.streamId != streamId
450  || i->data_.moduleId != moduleId)
451  break;
452 
453  // Handle LS-based histograms only.
454  if (not (i->getLumiFlag() || LSbasedMode_)) {
455  ++i;
456  continue;
457  }
458 
459  MonitorElement global_me(*i, MonitorElementNoCloneTag());
460  global_me.globalize();
461  global_me.setLumi(lumi);
462  // Since this accesses the data, the operation must be
463  // be locked.
464  std::lock_guard<std::mutex> guard(book_mutex_);
465  std::set<MonitorElement>::const_iterator me = data_.find(global_me);
466  if (me != data_.end()) {
467  if (verbose_ > 1)
468  std::cout << "Found global Object, using it --> " << me->getFullname() << std::endl;
469 
470  //don't take any action if the ME is an INT || FLOAT || STRING
471  if(me->kind() >= MonitorElement::DQM_KIND_TH1F)
472  {
473  if(me->getTH1()->CanExtendAllAxes() && i->getTH1()->CanExtendAllAxes()) {
474  TList list;
475  list.Add(i->getTH1());
476  if( -1 == me->getTH1()->Merge(&list)) {
477  std::cout << "mergeAndResetMEsLuminositySummaryCache: Failed to merge DQM element "<<me->getFullname();
478  }
479  }
480  else {
481  if (i->getTH1()->GetEntries())
482  me->getTH1()->Add(i->getTH1());
483  }
484  }
485  } else {
486  if (verbose_ > 1)
487  std::cout << "No global Object found. " << std::endl;
488  std::pair<std::set<MonitorElement>::const_iterator, bool> gme;
489 
490  // this makes an actual and a single copy with Clone()'ed th1
491  MonitorElement actual_global_me(*i);
492  actual_global_me.globalize();
493  actual_global_me.setLumi(lumi);
494  gme = data_.insert(std::move(actual_global_me));
495  assert(gme.second);
496  }
497  // make the ME reusable for the next LS
498  const_cast<MonitorElement*>(&*i)->Reset();
499  ++i;
500  }
501 }
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 360 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().

362  {
363  if (verbose_ > 1)
364  std::cout << "DQMStore::mergeAndResetMEsRunSummaryCache - Merging objects from run: "
365  << run
366  << ", stream: " << streamId
367  << " module: " << moduleId << std::endl;
368 
369  if (LSbasedMode_) {
370  return;
371  }
372 
373  std::string null_str("");
374  MonitorElement proto(&null_str, null_str, run, streamId, moduleId);
375  std::set<MonitorElement>::const_iterator e = data_.end();
376  std::set<MonitorElement>::const_iterator i = data_.lower_bound(proto);
377  while (i != e) {
378  if (i->data_.run != run
379  || i->data_.streamId != streamId
380  || i->data_.moduleId != moduleId)
381  break;
382 
383  // Handle Run-based histograms only.
384  if (i->getLumiFlag() || LSbasedMode_) {
385  ++i;
386  continue;
387  }
388 
389  // don't call the copy constructor
390  // we are just searching for a global histogram - a copy is not necessary
391  MonitorElement global_me(*i, MonitorElementNoCloneTag());
392  global_me.globalize();
393 
394  // Since this accesses the data, the operation must be
395  // be locked.
396  std::lock_guard<std::mutex> guard(book_mutex_);
397  std::set<MonitorElement>::const_iterator me = data_.find(global_me);
398  if (me != data_.end()) {
399  if (verbose_ > 1)
400  std::cout << "Found global Object, using it --> " << me->getFullname() << std::endl;
401 
402  //don't take any action if the ME is an INT || FLOAT || STRING
403  if(me->kind() >= MonitorElement::DQM_KIND_TH1F)
404  {
405  if(me->getTH1()->CanExtendAllAxes() && i->getTH1()->CanExtendAllAxes()) {
406  TList list;
407  list.Add(i->getTH1());
408  if( -1 == me->getTH1()->Merge(&list)) {
409  std::cout << "mergeAndResetMEsRunSummaryCache: Failed to merge DQM element "<<me->getFullname();
410  }
411  }
412  else {
413  if (i->getTH1()->GetEntries())
414  me->getTH1()->Add(i->getTH1());
415  }
416  }
417  } else {
418  if (verbose_ > 1)
419  std::cout << "No global Object found. " << std::endl;
420  std::pair<std::set<MonitorElement>::const_iterator, bool> gme;
421 
422  // this makes an actual and a single copy with Clone()'ed th1
423  MonitorElement actual_global_me(*i);
424  actual_global_me.globalize();
425  gme = data_.insert(std::move(actual_global_me));
426  assert(gme.second);
427  }
428  // TODO(rovere): eventually reset the local object and mark it as reusable??
429  ++i;
430  }
431 }
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 3003 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().

3009 {
3010  return readFile(filename,overwrite,onlypath,prepend,stripdirs,fileMustExist);
3011 }
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:3045
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 636 of file DQMStore.cc.

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

Referenced by book().

637 {
638  // the access to the member stream_ is implicitely protected against
639  // concurrency problems because the print_trace method is always called behind
640  // a lock (see bookTransaction).
641  if (!stream_)
642  stream_ = new std::ofstream("histogramBookingBT.log");
643 
644  void *array[10];
645  size_t size;
646  char **strings;
647  int r=0;
648  lat::RegexpMatch m;
649  m.reset();
650 
651  size = backtrace (array, 10);
652  strings = backtrace_symbols (array, size);
653 
654  size_t level = 1;
655  char * demangled = nullptr;
656  for (; level < size; level++) {
657  if (!s_rxtrace.match(strings[level], 0, 0, &m)) continue;
658  demangled = abi::__cxa_demangle(m.matchString(strings[level], 2).c_str(), 0, 0, &r);
659  if (!demangled) continue;
660  if (!s_rxself.match(demangled, 0, 0)) break;
661  free(demangled);
662  demangled = nullptr;
663  }
664 
665  if (demangled != nullptr) {
666  *stream_ << "\"" << dir << "/"
667  << name << "\" "
668  << (r ? m.matchString(strings[level], 2) : demangled) << " "
669  << m.matchString(strings[level], 1) << "\n";
670  free(demangled);
671  } else {
672  *stream_ << "Skipping "<< dir << "/" << name
673  << " with stack size " << size << "\n";
674  }
675 
676  /* In this case print the full stack trace, up to main or to the
677  * maximum stack size, i.e. 10. */
678  if (verbose_ > 4 || demangled == nullptr)
679  {
680  size_t i;
681  m.reset();
682 
683  for (i = 0; i < size; i++)
684  if (s_rxtrace.match(strings[i], 0, 0, &m))
685  {
686  char * demangled = abi::__cxa_demangle(m.matchString(strings[i], 2).c_str(), 0, 0, &r);
687  *stream_ << "\t\t" << i << "/" << size << " "
688  << (r ? m.matchString(strings[i], 2) : demangled) << " "
689  << m.matchString(strings[i], 1) << std::endl;
690  free (demangled);
691  }
692  }
693  free (strings);
694 }
int i
Definition: DBlmapReader.cc:9
tuple array
Definition: mps_check.py:181
static const lat::Regexp s_rxtrace("(.*)\\((.*)\\+0x.*\\).*")
static const lat::Regexp s_rxself("^[^()]*DQMStore::.*")
unsigned verbose_
Definition: DQMStore.h:699
tuple demangled
Definition: symbols.py:61
tuple level
Definition: testEve_cfg.py:34
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 2848 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().

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

3051 {
3052 
3053  if (verbose_)
3054  std::cout << "DQMStore::readFile: reading from file '" << filename << "'\n";
3055 
3056  std::auto_ptr<TFile> f;
3057 
3058  try
3059  {
3060  f.reset(TFile::Open(filename.c_str()));
3061  if (! f.get() || f->IsZombie())
3062  raiseDQMError("DQMStore", "Failed to open file '%s'", filename.c_str());
3063  }
3064  catch (std::exception &)
3065  {
3066  if (fileMustExist)
3067  throw;
3068  else
3069  {
3070  if (verbose_)
3071  std::cout << "DQMStore::readFile: file '" << filename << "' does not exist, continuing\n";
3072  return false;
3073  }
3074  }
3075 
3076  unsigned n = readDirectory(f.get(), overwrite, onlypath, prepend, "", stripdirs);
3077  f->Close();
3078 
3079  MEMap::iterator mi = data_.begin();
3080  MEMap::iterator me = data_.end();
3081  for ( ; mi != me; ++mi)
3082  const_cast<MonitorElement &>(*mi).updateQReportStats();
3083 
3084  if (verbose_)
3085  {
3086  std::cout << "DQMStore::open: successfully read " << n
3087  << " objects from file '" << filename << "'";
3088  if (! onlypath.empty())
3089  std::cout << " from directory '" << onlypath << "'";
3090  if (! prepend.empty())
3091  std::cout << " into directory '" << prepend << "'";
3092  std::cout << std::endl;
3093  }
3094  return true;
3095 }
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:2848
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 3129 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().

3135 {
3136  using google::protobuf::io::FileInputStream;
3137  using google::protobuf::io::FileOutputStream;
3138  using google::protobuf::io::GzipInputStream;
3139  using google::protobuf::io::GzipOutputStream;
3140  using google::protobuf::io::CodedInputStream;
3141  using google::protobuf::io::ArrayInputStream;
3142 
3143  if (verbose_)
3144  std::cout << "DQMStore::readFile: reading from file '" << filename << "'\n";
3145 
3146  int filedescriptor;
3147  if ((filedescriptor = ::open(filename.c_str(), O_RDONLY)) == -1) {
3148  if (fileMustExist)
3149  raiseDQMError("DQMStore", "Failed to open file '%s'", filename.c_str());
3150  else
3151  if (verbose_)
3152  std::cout << "DQMStore::readFile: file '" << filename << "' does not exist, continuing\n";
3153  return false;
3154  }
3155 
3156  dqmstorepb::ROOTFilePB dqmstore_message;
3157  FileInputStream fin(filedescriptor);
3158  GzipInputStream input(&fin);
3159  CodedInputStream input_coded(&input);
3160  input_coded.SetTotalBytesLimit(1024*1024*1024, -1);
3161  if (!dqmstore_message.ParseFromCodedStream(&input_coded)) {
3162  raiseDQMError("DQMStore", "Fatal parsing file '%s'", filename.c_str());
3163  return false;
3164  }
3165  ::close(filedescriptor);
3166 
3167  for (int i = 0; i < dqmstore_message.histo_size(); i++) {
3168  std::string path;
3169  std::string objname;
3170 
3171  TObject *obj = NULL;
3172  const dqmstorepb::ROOTFilePB::Histo &h = dqmstore_message.histo(i);
3173  get_info(h, path, objname, &obj);
3174 
3175  setCurrentFolder(path);
3176  if (obj)
3177  {
3178  /* Before calling the extract() check if histogram exists:
3179  * if it does - flags for the given monitor are already set (and merged)
3180  * else - set the flags after the histogram is created.
3181  */
3182  MonitorElement *me = findObject(path, objname);
3183 
3184  /* Run histograms should be collated and not overwritten,
3185  * Lumi histograms should be overwritten (and collate flag is not checked)
3186  */
3187  bool overwrite = h.flags() & DQMNet::DQM_PROP_LUMI;
3188  bool collate = !(h.flags() & DQMNet::DQM_PROP_LUMI);
3189  extract(static_cast<TObject *>(obj), path, overwrite, collate);
3190 
3191  if (me == nullptr) {
3192  me = findObject(path, objname);
3193  me->data_.flags = h.flags();
3194  }
3195 
3196  delete obj;
3197  }
3198  }
3199 
3200  cd();
3201  return true;
3202 }
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:1915
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:714
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:3108
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:2173
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:3003
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:737
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 3244 of file DQMStore.cc.

References pwd_.

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

remove all monitoring elements from directory;

Definition at line 3230 of file DQMStore.cc.

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

3231 {
3232  MonitorElement proto(&dir, std::string());
3233  MEMap::iterator e = data_.end();
3234  MEMap::iterator i = data_.lower_bound(proto);
3235  while (i != e && isSubdirectory(dir, *i->data_.dirname))
3236  if (dir == *i->data_.dirname)
3237  data_.erase(i++);
3238  else
3239  ++i;
3240 }
int i
Definition: DBlmapReader.cc:9
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:71
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 3252 of file DQMStore.cc.

References pwd_.

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

3253 {
3255 }
void removeElement(const std::string &name)
Definition: DQMStore.cc:3252
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 3260 of file DQMStore.cc.

References gather_cfg::cout, and data_.

3261 {
3262  MonitorElement proto(&dir, name);
3263  MEMap::iterator pos = data_.find(proto);
3264  if (pos != data_.end())
3265  data_.erase(pos);
3266  else if (warning)
3267  std::cout << "DQMStore: WARNING: attempt to remove non-existent"
3268  << " monitor element '" << name << "' in '" << dir << "'\n";
3269 }
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 2083 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().

2084 {
2085  MEMap::iterator mi = data_.begin();
2086  MEMap::iterator me = data_.end();
2087  for ( ; mi != me; ++mi)
2088  {
2089  MonitorElement &me = const_cast<MonitorElement &>(*mi);
2090  if (mi->wasUpdated())
2091  {
2092  if (me.resetMe())
2093  me.Reset();
2094  me.resetUpdate();
2095  }
2096  }
2097 
2098  reset_ = true;
2099 }
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 3210 of file DQMStore.cc.

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

Referenced by dqmCopyRecursively().

3211 {
3213  const std::string *cleaned = 0;
3214  cleanTrailingSlashes(path, clean, cleaned);
3215  MonitorElement proto(cleaned, std::string());
3216 
3217  MEMap::iterator e = data_.end();
3218  MEMap::iterator i = data_.lower_bound(proto);
3219  while (i != e && isSubdirectory(*cleaned, *i->data_.dirname))
3220  data_.erase(i++);
3221 
3222  std::set<std::string>::iterator de = dirs_.end();
3223  std::set<std::string>::iterator di = dirs_.lower_bound(*cleaned);
3224  while (di != de && isSubdirectory(*cleaned, *di))
3225  dirs_.erase(di++);
3226 }
int i
Definition: DBlmapReader.cc:9
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:81
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:71
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 3362 of file DQMStore.cc.

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

3363 {
3364 
3365  if (verbose_ > 0)
3366  std::cout << "DQMStore: running runQTests() with reset = "
3367  << ( reset_ ? "true" : "false" ) << std::endl;
3368 
3369  // Apply quality tests to each monitor element, skipping references.
3370  MEMap::iterator mi = data_.begin();
3371  MEMap::iterator me = data_.end();
3372  for ( ; mi != me; ++mi)
3373  if (! isSubdirectory(s_referenceDirName, *mi->data_.dirname))
3374  const_cast<MonitorElement &>(*mi).runQTests();
3375 
3376  reset_ = false;
3377 }
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:71
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 2646 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(), SiStripDigiValid::endJob(), SiPixelDigiValid::endJob(), LaserDQM::endJob(), SiStripLAProfileBooker::endJob(), dEdxAnalyzer::endJob(), TrackerHitAnalyzer::endJob(), StripValidationPlots::endJob(), TrackEfficiencyMonitor::endJob(), APVValidationPlots::endJob(), LogMessageMonitor::endJob(), MuonAlignment::endJob(), SiStripMonitorQuality::endRun(), SiStripMonitorRawData::endRun(), SiStripMonitorPedestals::endRun(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::extractBadAPVSandStrips(), TkHistoMap::save(), DQMFileSaver::saveForFilterUnit(), DQMFileSaver::saveForOffline(), GlobalHitsProdHistStripper::~GlobalHitsProdHistStripper(), and SiPixelTrackingRecHitsValid::~SiPixelTrackingRecHitsValid().

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

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

3479 {
3480  if (scaleFlag_ == 0.0) return;
3481  if (verbose_ > 0)
3482  std::cout << " =========== " << " ScaleFlag " << scaleFlag_ << std::endl;
3483  double factor = scaleFlag_;
3484  int events = 1;
3485  if (dirExists("Info/EventInfo")) {
3486  if ( scaleFlag_ == -1.0) {
3487  MonitorElement * scale_me = get("Info/EventInfo/ScaleFactor");
3488  if (scale_me && scale_me->kind()==MonitorElement::DQM_KIND_REAL) factor = scale_me->getFloatValue();
3489  }
3490  MonitorElement * event_me = get("Info/EventInfo/processedEvents");
3491  if (event_me && event_me->kind()==MonitorElement::DQM_KIND_INT) events = event_me->getIntValue();
3492  }
3493  factor = factor/(events*1.0);
3494 
3495  MEMap::iterator mi = data_.begin();
3496  MEMap::iterator me = data_.end();
3497  for ( ; mi != me; ++mi)
3498  {
3499  MonitorElement &me = const_cast<MonitorElement &>(*mi);
3500  switch (me.kind())
3501  {
3503  {
3504  me.getTH1F()->Scale(factor);
3505  break;
3506  }
3508  {
3509  me.getTH1S()->Scale(factor);
3510  break;
3511  }
3513  {
3514  me.getTH1D()->Scale(factor);
3515  break;
3516  }
3518  {
3519  me.getTH2F()->Scale(factor);
3520  break;
3521  }
3523  {
3524  me.getTH2S()->Scale(factor);
3525  break;
3526  }
3528  {
3529  me.getTH2D()->Scale(factor);
3530  break;
3531  }
3533  {
3534  me.getTH3F()->Scale(factor);
3535  break;
3536  }
3538  {
3539  me.getTProfile()->Scale(factor);
3540  break;
3541  }
3543  {
3544  me.getTProfile2D()->Scale(factor);
3545  break;
3546  }
3547  default:
3548  if (verbose_ > 0)
3549  std::cout << " The DQM object '" << me.getFullname() << "' is not scalable object " << std::endl;
3550  continue;
3551  }
3552  }
3553 }
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:802
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 3431 of file DQMStore.cc.

References MonitorElement::setAccumulate().

3432 {
3433  if (me)
3434  me->setAccumulate(flag);
3435 }
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 737 of file DQMStore.cc.

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

Referenced by SiStripDcsInfo::addBadModules(), DQMFileReader::beginJob(), DQMFEDIntegrityClient::beginJob(), L1ScalersClient::beginJob(), ConverterTester::beginJob(), APVValidationPlots::beginJob(), StripValidationPlots::beginJob(), DQMDaqInfo::beginJob(), MuonAlignment::beginJob(), HLTScalersClient::beginJob(), RPCBxTest::beginRun(), DQMDcsInfoClient::beginRun(), CalibrationScanTask::book(), FineDelayTask::book(), CalibrationTask::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(), 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(), and SiStripFolderOrganizer::setSiStripTopControlFolder().

738 {
740  const std::string *cleaned = 0;
741  cleanTrailingSlashes(fullpath, clean, cleaned);
742  makeDirectory(*cleaned);
743  pwd_ = *cleaned;
744 }
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:81
std::string pwd_
Definition: DQMStore.h:713
std::vector< T * > clean
Definition: MVATrainer.cc:156
void makeDirectory(const std::string &path)
Definition: DQMStore.cc:761
void DQMStore::setVerbose ( unsigned  level)

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

Definition at line 701 of file DQMStore.cc.

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

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

Definition at line 3441 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().

3442 {
3443  std::vector<std::string> contents;
3444  getContents(contents);
3445 
3446  std::cout << " ------------------------------------------------------------\n"
3447  << " Directory structure: \n"
3448  << " ------------------------------------------------------------\n";
3449 
3450  std::copy(contents.begin(), contents.end(),
3451  std::ostream_iterator<std::string>(std::cout, "\n"));
3452 
3453  std::cout << " ------------------------------------------------------------\n";
3454 }
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1814
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 3414 of file DQMStore.cc.

References MonitorElement::softReset().

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

3415 {
3416  if (me)
3417  me->softReset();
3418 }
void softReset(void)
void DQMStore::tag ( MonitorElement me,
unsigned int  myTag 
)

tag ME as <myTag> (myTag > 0)

Definition at line 1671 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().

1672 {
1673  if (! myTag)
1674  raiseDQMError("DQMStore", "Attempt to tag monitor element '%s'"
1675  " with a zero tag", me->getFullname().c_str());
1676  if ((me->data_.flags & DQMNet::DQM_PROP_TAGGED) && myTag != me->data_.tag)
1677  raiseDQMError("DQMStore", "Attempt to tag monitor element '%s'"
1678  " twice with multiple tags", me->getFullname().c_str());
1679 
1680  me->data_.tag = myTag;
1682 }
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 1686 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().

1687 {
1688  std::string dir;
1689  std::string name;
1690  splitPath(dir, name, path);
1691 
1692  if (MonitorElement *me = findObject(dir, name))
1693  tag(me, myTag);
1694  else
1695  raiseDQMError("DQMStore", "Attempt to tag non-existent monitor element"
1696  " '%s' with tag %u", path.c_str(), myTag);
1697 
1698 }
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:1915
static void splitPath(std::string &dir, std::string &name, const std::string &path)
Definition: DQMStore.cc:98
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1671
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 1714 of file DQMStore.cc.

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

1715 {
1717  const std::string *cleaned = 0;
1718  cleanTrailingSlashes(path, clean, cleaned);
1719  MonitorElement proto(cleaned, std::string());
1720 
1721  // FIXME: WILDCARDS? Old one supported them, but nobody seemed to use them.
1722  MEMap::iterator e = data_.end();
1723  MEMap::iterator i = data_.lower_bound(proto);
1724  while (i != e && isSubdirectory(*cleaned, *i->data_.dirname))
1725  {
1726  tag(const_cast<MonitorElement *>(&*i), myTag);
1727  ++i;
1728  }
1729 }
int i
Definition: DBlmapReader.cc:9
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:81
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1671
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:71
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 1702 of file DQMStore.cc.

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

1703 {
1704  MonitorElement proto(&path, std::string());
1705  MEMap::iterator e = data_.end();
1706  MEMap::iterator i = data_.lower_bound(proto);
1707  for ( ; i != e && path == *i->data_.dirname; ++i)
1708  tag(const_cast<MonitorElement *>(&*i), myTag);
1709 }
int i
Definition: DBlmapReader.cc:9
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1671
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 3309 of file DQMStore.cc.

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

3310 {
3311  // Clean the path
3313  const std::string *cleaned = 0;
3314  cleanTrailingSlashes(dir, clean, cleaned);
3315 
3316  // Validate the path.
3317  if (cleaned->find_first_not_of(s_safe) != std::string::npos)
3318  raiseDQMError("DQMStore", "Monitor element path name '%s'"
3319  " uses unacceptable characters", cleaned->c_str());
3320 
3321  // Redirect to the pattern match version.
3322  useQTestByMatch(*cleaned + "/*", qtname);
3323 }
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:81
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:3327
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 3327 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().

3328 {
3329  QCriterion *qc = getQCriterion(qtname);
3330  if (! qc)
3331  raiseDQMError("DQMStore", "Cannot apply non-existent quality test '%s'",
3332  qtname.c_str());
3333 
3334  fastmatch * fm = new fastmatch( pattern );
3335 
3336  // Record the test for future reference.
3337  QTestSpec qts(fm, qc);
3338  qtestspecs_.push_back(qts);
3339 
3340  // Apply the quality test.
3341  MEMap::iterator mi = data_.begin();
3342  MEMap::iterator me = data_.end();
3343  std::string path;
3344  int cases = 0;
3345  for ( ; mi != me; ++mi)
3346  {
3347  path.clear();
3348  mergePath(path, *mi->data_.dirname, mi->data_.objname);
3349  if (fm->match(path))
3350  {
3351  ++cases;
3352  const_cast<MonitorElement &>(*mi).addQReport(qts.second);
3353  }
3354  }
3355 
3356  //return the number of matched cases
3357  return cases;
3358 }
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:3277
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:111
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().