test
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 691 of file DQMStore.h.

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

Definition at line 693 of file DQMStore.h.

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

Definition at line 692 of file DQMStore.h.

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

Definition at line 689 of file DQMStore.h.

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

484  : verbose_ (1),
485  verboseQT_ (1),
486  reset_ (false),
487  collateHistograms_ (false),
488  enableMultiThread_(false),
489  forceResetOnBeginLumi_(false),
491  run_(0),
492  streamId_(0),
493  moduleId_(0),
494  stream_(nullptr),
495  pwd_ (""),
496  ibooker_(0),
497  igetter_(0)
498 {
499  if (!ibooker_)
500  ibooker_ = new DQMStore::IBooker(this);
501  if (!igetter_)
502  igetter_ = new DQMStore::IGetter(this);
503  initializeFrom(pset);
504 
505  if(pset.getUntrackedParameter<bool>("forceResetOnBeginRun",false)) {
507  }
508  ar.preallocateSignal_.connect([this](edm::service::SystemBounds const& iBounds) {
509  if(iBounds.maxNumberOfStreams() > 1 ) {
510  enableMultiThread_ = true;
511  }
512  });
513  if(pset.getUntrackedParameter<bool>("forceResetOnBeginLumi",false) && enableMultiThread_ == false) {
514  forceResetOnBeginLumi_ = true;
516  }
517 }
IGetter * igetter_
Definition: DQMStore.h:719
T getUntrackedParameter(std::string const &, T const &) const
uint32_t streamId_
Definition: DQMStore.h:705
bool reset_
Definition: DQMStore.h:697
void initializeFrom(const edm::ParameterSet &)
Definition: DQMStore.cc:555
uint32_t moduleId_
Definition: DQMStore.h:706
Preallocate preallocateSignal_
signal is emitted before beginJob
unsigned int maxNumberOfStreams() const
Definition: SystemBounds.h:43
void forceReset(void)
Definition: DQMStore.cc:2070
unsigned verboseQT_
Definition: DQMStore.h:696
void watchPostSourceRun(PostSourceRun::slot_type const &iSlot)
uint32_t run_
Definition: DQMStore.h:704
std::string pwd_
Definition: DQMStore.h:709
IBooker * ibooker_
Definition: DQMStore.h:718
std::string readSelectedDirectory_
Definition: DQMStore.h:703
void watchPostSourceLumi(PostSourceLumi::slot_type const &iSlot)
unsigned verbose_
Definition: DQMStore.h:695
bool forceResetOnBeginLumi_
Definition: DQMStore.h:702
std::ofstream * stream_
Definition: DQMStore.h:707
bool collateHistograms_
Definition: DQMStore.h:699
void connect(U iFunc)
Definition: Signal.h:63
bool enableMultiThread_
Definition: DQMStore.h:700
DQMStore::DQMStore ( const edm::ParameterSet pset)

Definition at line 519 of file DQMStore.cc.

References ibooker_, igetter_, and initializeFrom().

520  : verbose_ (1),
521  verboseQT_ (1),
522  reset_ (false),
523  collateHistograms_ (false),
524  enableMultiThread_(false),
526  run_(0),
527  streamId_(0),
528  moduleId_(0),
529  stream_(nullptr),
530  pwd_ (""),
531  ibooker_(0),
532  igetter_(0)
533 {
534  if (!ibooker_)
535  ibooker_ = new DQMStore::IBooker(this);
536  if (!igetter_)
537  igetter_ = new DQMStore::IGetter(this);
538  initializeFrom(pset);
539 }
IGetter * igetter_
Definition: DQMStore.h:719
uint32_t streamId_
Definition: DQMStore.h:705
bool reset_
Definition: DQMStore.h:697
void initializeFrom(const edm::ParameterSet &)
Definition: DQMStore.cc:555
uint32_t moduleId_
Definition: DQMStore.h:706
unsigned verboseQT_
Definition: DQMStore.h:696
uint32_t run_
Definition: DQMStore.h:704
std::string pwd_
Definition: DQMStore.h:709
IBooker * ibooker_
Definition: DQMStore.h:718
std::string readSelectedDirectory_
Definition: DQMStore.h:703
unsigned verbose_
Definition: DQMStore.h:695
std::ofstream * stream_
Definition: DQMStore.h:707
bool collateHistograms_
Definition: DQMStore.h:699
bool enableMultiThread_
Definition: DQMStore.h:700
DQMStore::~DQMStore ( void  )

Definition at line 541 of file DQMStore.cc.

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

542 {
543  for (QCMap::iterator i = qtests_.begin(), e = qtests_.end(); i != e; ++i)
544  delete i->second;
545 
546  for (QTestSpecs::iterator i = qtestspecs_.begin(), e = qtestspecs_.end(); i != e; ++i)
547  delete i->first;
548 
549  if (stream_)
550  stream_->close();
551  delete stream_;
552 }
int i
Definition: DBlmapReader.cc:9
QCMap qtests_
Definition: DQMStore.h:713
QTestSpecs qtestspecs_
Definition: DQMStore.h:715
if(c.getParameter< edm::InputTag >("puppiValueMap").label().size()!=0)
std::ofstream * stream_
Definition: DQMStore.h:707
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 849 of file DQMStore.cc.

References assert(), gather_cfg::cout, data_, dirs_, findObject(), 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().

852 {
853  assert(name.find('/') == std::string::npos);
854  if (verbose_ > 3)
855  print_trace(dir, name);
856 
857  // Check if the request monitor element already exists.
859  {
860  if (verbose_ > 1)
861  {
863  mergePath(path, dir, name);
864 
865  std::cout << "DQMStore: "
866  << context << ": monitor element '"
867  << path << "' already exists, resetting" << std::endl;
868  }
869  me->Reset();
870  return me;
871  }
872  else
873  {
874  // Create it and return for initialisation.
875  assert(dirs_.count(dir));
876  MonitorElement proto(&*dirs_.find(dir), name, run_, streamId_, moduleId_);
877  return &const_cast<MonitorElement &>(*data_.insert(std::move(proto)).first);
878  }
879 }
static void mergePath(std::string &path, const std::string &dir, const std::string &name)
Definition: DQMStore.cc:108
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:1878
uint32_t streamId_
Definition: DQMStore.h:705
assert(m_qm.get())
uint32_t moduleId_
Definition: DQMStore.h:706
def move
Definition: eostools.py:510
uint32_t run_
Definition: DQMStore.h:704
unsigned verbose_
Definition: DQMStore.h:695
MEMap data_
Definition: DQMStore.h:710
void print_trace(const std::string &dir, const std::string &name)
Definition: DQMStore.cc:615
tuple cout
Definition: gather_cfg.py:121
dbl *** dir
Definition: mlp_gen.cc:35
std::set< std::string > dirs_
Definition: DQMStore.h:711
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 780 of file DQMStore.cc.

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

783 {
784  assert(name.find('/') == std::string::npos);
785  if (verbose_ > 3)
786  print_trace(dir, name);
788  mergePath(path, dir, name);
789 
790  // Put us in charge of h.
791  h->SetDirectory(0);
792 
793  // Check if the request monitor element already exists.
795  if (me)
796  {
797  if (collateHistograms_)
798  {
799  collate(me, h, verbose_);
800  delete h;
801  return me;
802  }
803  else
804  {
805  if (verbose_ > 1)
806  std::cout << "DQMStore: "
807  << context << ": monitor element '"
808  << path << "' already exists, collating" << std::endl;
809  me->Reset();
810  collate(me, h, verbose_);
811  delete h;
812  return me;
813  }
814  }
815  else
816  {
817  // Create and initialise core object.
818  assert(dirs_.count(dir));
819  MonitorElement proto(&*dirs_.find(dir), name, run_, streamId_, moduleId_);
820  me = const_cast<MonitorElement &>(*data_.insert(std::move(proto)).first)
822 
823  // Initialise quality test information.
824  QTestSpecs::iterator qi = qtestspecs_.begin();
825  QTestSpecs::iterator qe = qtestspecs_.end();
826  for ( ; qi != qe; ++qi)
827  {
828  if ( qi->first->match(path) )
829  me->addQReport(qi->second);
830  }
831 
832  // Assign reference if we have one.
833  std::string refdir;
834  refdir.reserve(s_referenceDirName.size() + dir.size() + 2);
835  refdir += s_referenceDirName;
836  refdir += '/';
837  refdir += dir;
838 
839  if (findObject(refdir, name))
840  {
841  me->data_.flags |= DQMNet::DQM_PROP_HAS_REFERENCE;
842  }
843  // Return the monitor element.
844  return me;
845  }
846 }
static void mergePath(std::string &path, const std::string &dir, const std::string &name)
Definition: DQMStore.cc:108
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:1878
uint32_t streamId_
Definition: DQMStore.h:705
assert(m_qm.get())
uint32_t moduleId_
Definition: DQMStore.h:706
static const uint32_t DQM_PROP_HAS_REFERENCE
Definition: DQMNet.h:53
QTestSpecs qtestspecs_
Definition: DQMStore.h:715
def move
Definition: eostools.py:510
uint32_t run_
Definition: DQMStore.h:704
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
MonitorElement * initialise(MonitorElement *me, const std::string &path)
unsigned verbose_
Definition: DQMStore.h:695
MEMap data_
Definition: DQMStore.h:710
static const std::string s_referenceDirName
Definition: DQMStore.cc:54
void print_trace(const std::string &dir, const std::string &name)
Definition: DQMStore.cc:615
tuple cout
Definition: gather_cfg.py:121
dbl *** dir
Definition: mlp_gen.cc:35
std::set< std::string > dirs_
Definition: DQMStore.h:711
bool collateHistograms_
Definition: DQMStore.h:699
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 994 of file DQMStore.cc.

References pwd_.

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

996 {
997  return book1D(pwd_, name, new TH1F(name, title, nchX, lowX, highX));
998 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:994
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * DQMStore::book1D ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX 
)

Book 1D histogram.

Definition at line 1002 of file DQMStore.cc.

References book1D(), and pwd_.

1004 {
1005  return book1D(pwd_, name, new TH1F(name.c_str(), title.c_str(), nchX, lowX, highX));
1006 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:994
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * DQMStore::book1D ( const char *  name,
const char *  title,
int  nchX,
const float *  xbinsize 
)

Book 1D variable bin histogram.

Definition at line 1042 of file DQMStore.cc.

References book1D(), and pwd_.

1044 {
1045  return book1D(pwd_, name, new TH1F(name, title, nchX, xbinsize));
1046 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:994
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * DQMStore::book1D ( const std::string &  name,
const std::string &  title,
int  nchX,
const float *  xbinsize 
)

Book 1D variable bin histogram.

Definition at line 1050 of file DQMStore.cc.

References book1D(), and pwd_.

1052 {
1053  return book1D(pwd_, name, new TH1F(name.c_str(), title.c_str(), nchX, xbinsize));
1054 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:994
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * DQMStore::book1D ( const char *  name,
TH1F *  h 
)

Book 1D histogram by cloning an existing histogram.

Definition at line 1058 of file DQMStore.cc.

References book1D(), and pwd_.

1059 {
1060  return book1D(pwd_, name, static_cast<TH1F *>(source->Clone(name)));
1061 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:994
std::string pwd_
Definition: DQMStore.h:709
static std::string const source
Definition: EdmProvDump.cc:42
MonitorElement * DQMStore::book1D ( const std::string &  name,
TH1F *  h 
)

Book 1D histogram by cloning an existing histogram.

Definition at line 1065 of file DQMStore.cc.

References book1D(), and pwd_.

1066 {
1067  return book1D(pwd_, name, static_cast<TH1F *>(source->Clone(name.c_str())));
1068 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:994
std::string pwd_
Definition: DQMStore.h:709
static std::string const source
Definition: EdmProvDump.cc:42
MonitorElement * DQMStore::book1D ( const std::string &  dir,
const std::string &  name,
TH1F *  h 
)
private

Book 1D histogram based on TH1F.

Definition at line 973 of file DQMStore.cc.

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

974 {
975  return book(dir, name, "book1D", MonitorElement::DQM_KIND_TH1F, h, collate1D);
976 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static void collate1D(MonitorElement *me, TH1F *h, unsigned verbose)
Definition: DQMStore.cc:1561
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 1026 of file DQMStore.cc.

References pwd_.

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

1028 {
1029  return book1DD(pwd_, name, new TH1D(name, title, nchX, lowX, highX));
1030 }
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1026
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * DQMStore::book1DD ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX 
)

Book 1S histogram.

Definition at line 1034 of file DQMStore.cc.

References book1DD(), and pwd_.

1036 {
1037  return book1DD(pwd_, name, new TH1D(name.c_str(), title.c_str(), nchX, lowX, highX));
1038 }
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1026
std::string pwd_
Definition: DQMStore.h:709
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 1086 of file DQMStore.cc.

References book1DD(), and pwd_.

1087 {
1088  return book1DD(pwd_, name, static_cast<TH1D *>(source->Clone(name)));
1089 }
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1026
std::string pwd_
Definition: DQMStore.h:709
static std::string const source
Definition: EdmProvDump.cc:42
MonitorElement * DQMStore::book1DD ( const std::string &  name,
TH1D *  h 
)

Book 1D double histogram by cloning an existing histogram.

Definition at line 1093 of file DQMStore.cc.

References book1DD(), and pwd_.

1094 {
1095  return book1DD(pwd_, name, static_cast<TH1D *>(source->Clone(name.c_str())));
1096 }
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1026
std::string pwd_
Definition: DQMStore.h:709
static std::string const source
Definition: EdmProvDump.cc:42
MonitorElement * DQMStore::book1DD ( const std::string &  dir,
const std::string &  name,
TH1D *  h 
)
private

Book 1D histogram based on TH1D.

Definition at line 987 of file DQMStore.cc.

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

988 {
989  return book(dir, name, "book1DD", MonitorElement::DQM_KIND_TH1D, h, collate1DD);
990 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static void collate1DD(MonitorElement *me, TH1D *h, unsigned verbose)
Definition: DQMStore.cc:1575
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 1010 of file DQMStore.cc.

References pwd_.

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

1012 {
1013  return book1S(pwd_, name, new TH1S(name, title, nchX, lowX, highX));
1014 }
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * book1S(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1010
MonitorElement * DQMStore::book1S ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX 
)

Book 1S histogram.

Definition at line 1018 of file DQMStore.cc.

References book1S(), and pwd_.

1020 {
1021  return book1S(pwd_, name, new TH1S(name.c_str(), title.c_str(), nchX, lowX, highX));
1022 }
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * book1S(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1010
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 1072 of file DQMStore.cc.

References book1S(), and pwd_.

1073 {
1074  return book1S(pwd_, name, static_cast<TH1S *>(source->Clone(name)));
1075 }
std::string pwd_
Definition: DQMStore.h:709
static std::string const source
Definition: EdmProvDump.cc:42
MonitorElement * book1S(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1010
MonitorElement * DQMStore::book1S ( const std::string &  name,
TH1S *  h 
)

Book 1S histogram by cloning an existing histogram.

Definition at line 1079 of file DQMStore.cc.

References book1S(), and pwd_.

1080 {
1081  return book1S(pwd_, name, static_cast<TH1S *>(source->Clone(name.c_str())));
1082 }
std::string pwd_
Definition: DQMStore.h:709
static std::string const source
Definition: EdmProvDump.cc:42
MonitorElement * book1S(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1010
MonitorElement * DQMStore::book1S ( const std::string &  dir,
const std::string &  name,
TH1S *  h 
)
private

Book 1D histogram based on TH1S.

Definition at line 980 of file DQMStore.cc.

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

981 {
982  return book(dir, name, "book1S", MonitorElement::DQM_KIND_TH1S, h, collate1S);
983 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static void collate1S(MonitorElement *me, TH1S *h, unsigned verbose)
Definition: DQMStore.cc:1568
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 1133 of file DQMStore.cc.

References book2D(), and pwd_.

1136 {
1137  return book2D(pwd_, name, new TH2F(name.c_str(), title.c_str(),
1138  nchX, lowX, highX,
1139  nchY, lowY, highY));
1140 }
std::string pwd_
Definition: DQMStore.h:709
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:1122
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 1188 of file DQMStore.cc.

References book2D(), and pwd_.

1190 {
1191  return book2D(pwd_, name, new TH2F(name, title,
1192  nchX, xbinsize, nchY, ybinsize));
1193 }
std::string pwd_
Definition: DQMStore.h:709
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:1122
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 1197 of file DQMStore.cc.

References book2D(), and pwd_.

1199 {
1200  return book2D(pwd_, name, new TH2F(name.c_str(), title.c_str(),
1201  nchX, xbinsize, nchY, ybinsize));
1202 }
std::string pwd_
Definition: DQMStore.h:709
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:1122
MonitorElement * DQMStore::book2D ( const char *  name,
TH2F *  h 
)

Book 2D histogram by cloning an existing histogram.

Definition at line 1206 of file DQMStore.cc.

References book2D(), and pwd_.

1207 {
1208  return book2D(pwd_, name, static_cast<TH2F *>(source->Clone(name)));
1209 }
std::string pwd_
Definition: DQMStore.h:709
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:1122
static std::string const source
Definition: EdmProvDump.cc:42
MonitorElement * DQMStore::book2D ( const std::string &  name,
TH2F *  h 
)

Book 2D histogram by cloning an existing histogram.

Definition at line 1213 of file DQMStore.cc.

References book2D(), and pwd_.

1214 {
1215  return book2D(pwd_, name, static_cast<TH2F *>(source->Clone(name.c_str())));
1216 }
std::string pwd_
Definition: DQMStore.h:709
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:1122
static std::string const source
Definition: EdmProvDump.cc:42
MonitorElement * DQMStore::book2D ( const std::string &  dir,
const std::string &  name,
TH2F *  h 
)
private

Book 2D histogram based on TH2F.

Definition at line 1101 of file DQMStore.cc.

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

1102 {
1103  return book(dir, name, "book2D", MonitorElement::DQM_KIND_TH2F, h, collate2D);
1104 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
dbl *** dir
Definition: mlp_gen.cc:35
static void collate2D(MonitorElement *me, TH2F *h, unsigned verbose)
Definition: DQMStore.cc:1582
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 1166 of file DQMStore.cc.

References pwd_.

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

1169 {
1170  return book2DD(pwd_, name, new TH2D(name, title,
1171  nchX, lowX, highX,
1172  nchY, lowY, highY));
1173 }
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:1166
std::string pwd_
Definition: DQMStore.h:709
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 1177 of file DQMStore.cc.

References book2DD(), and pwd_.

1180 {
1181  return book2DD(pwd_, name, new TH2D(name.c_str(), title.c_str(),
1182  nchX, lowX, highX,
1183  nchY, lowY, highY));
1184 }
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:1166
std::string pwd_
Definition: DQMStore.h:709
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 1234 of file DQMStore.cc.

References book2DD(), and pwd_.

1235 {
1236  return book2DD(pwd_, name, static_cast<TH2D *>(source->Clone(name)));
1237 }
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:1166
std::string pwd_
Definition: DQMStore.h:709
static std::string const source
Definition: EdmProvDump.cc:42
MonitorElement * DQMStore::book2DD ( const std::string &  name,
TH2D *  h 
)

Book 2DS histogram by cloning an existing histogram.

Definition at line 1241 of file DQMStore.cc.

References book2DD(), and pwd_.

1242 {
1243  return book2DD(pwd_, name, static_cast<TH2D *>(source->Clone(name.c_str())));
1244 }
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:1166
std::string pwd_
Definition: DQMStore.h:709
static std::string const source
Definition: EdmProvDump.cc:42
MonitorElement * DQMStore::book2DD ( const std::string &  dir,
const std::string &  name,
TH2D *  h 
)
private

Book 2D histogram based on TH2D.

Definition at line 1115 of file DQMStore.cc.

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

1116 {
1117  return book(dir, name, "book2DD", MonitorElement::DQM_KIND_TH2D, h, collate2DD);
1118 }
static void collate2DD(MonitorElement *me, TH2D *h, unsigned verbose)
Definition: DQMStore.cc:1596
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
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 1144 of file DQMStore.cc.

References pwd_.

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

1147 {
1148  return book2S(pwd_, name, new TH2S(name, title,
1149  nchX, lowX, highX,
1150  nchY, lowY, highY));
1151 }
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:1144
std::string pwd_
Definition: DQMStore.h:709
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 1155 of file DQMStore.cc.

References book2S(), and pwd_.

1158 {
1159  return book2S(pwd_, name, new TH2S(name.c_str(), title.c_str(),
1160  nchX, lowX, highX,
1161  nchY, lowY, highY));
1162 }
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:1144
std::string pwd_
Definition: DQMStore.h:709
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 1220 of file DQMStore.cc.

References book2S(), and pwd_.

1221 {
1222  return book2S(pwd_, name, static_cast<TH2S *>(source->Clone(name)));
1223 }
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:1144
std::string pwd_
Definition: DQMStore.h:709
static std::string const source
Definition: EdmProvDump.cc:42
MonitorElement * DQMStore::book2S ( const std::string &  name,
TH2S *  h 
)

Book 2DS histogram by cloning an existing histogram.

Definition at line 1227 of file DQMStore.cc.

References book2S(), and pwd_.

1228 {
1229  return book2S(pwd_, name, static_cast<TH2S *>(source->Clone(name.c_str())));
1230 }
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:1144
std::string pwd_
Definition: DQMStore.h:709
static std::string const source
Definition: EdmProvDump.cc:42
MonitorElement * DQMStore::book2S ( const std::string &  dir,
const std::string &  name,
TH2S *  h 
)
private

Book 2D histogram based on TH2S.

Definition at line 1108 of file DQMStore.cc.

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

1109 {
1110  return book(dir, name, "book2S", MonitorElement::DQM_KIND_TH2S, h, collate2S);
1111 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
dbl *** dir
Definition: mlp_gen.cc:35
static void collate2S(MonitorElement *me, TH2S *h, unsigned verbose)
Definition: DQMStore.cc:1589
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 1256 of file DQMStore.cc.

References pwd_.

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

1260 {
1261  return book3D(pwd_, name, new TH3F(name, title,
1262  nchX, lowX, highX,
1263  nchY, lowY, highY,
1264  nchZ, lowZ, highZ));
1265 }
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:1256
std::string pwd_
Definition: DQMStore.h:709
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 1269 of file DQMStore.cc.

References book3D(), and pwd_.

1273 {
1274  return book3D(pwd_, name, new TH3F(name.c_str(), title.c_str(),
1275  nchX, lowX, highX,
1276  nchY, lowY, highY,
1277  nchZ, lowZ, highZ));
1278 }
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:1256
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * DQMStore::book3D ( const char *  name,
TH3F *  h 
)

Book 3D histogram by cloning an existing histogram.

Definition at line 1282 of file DQMStore.cc.

References book3D(), and pwd_.

1283 {
1284  return book3D(pwd_, name, static_cast<TH3F *>(source->Clone(name)));
1285 }
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:1256
std::string pwd_
Definition: DQMStore.h:709
static std::string const source
Definition: EdmProvDump.cc:42
MonitorElement * DQMStore::book3D ( const std::string &  name,
TH3F *  h 
)

Book 3D histogram by cloning an existing histogram.

Definition at line 1289 of file DQMStore.cc.

References book3D(), and pwd_.

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

Book 3D histogram based on TH3F.

Definition at line 1249 of file DQMStore.cc.

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

1250 {
1251  return book(dir, name, "book3D", MonitorElement::DQM_KIND_TH3F, h, collate3D);
1252 }
static void collate3D(MonitorElement *me, TH3F *h, unsigned verbose)
Definition: DQMStore.cc:1603
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
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 936 of file DQMStore.cc.

References bookFloat(), and pwd_.

937 {
938  return bookFloat(pwd_, name);
939 }
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:931
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * DQMStore::bookFloat ( const std::string &  dir,
const std::string &  name 
)
private

Book float.

Definition at line 914 of file DQMStore.cc.

References book(), collateHistograms_, MonitorElement::DQM_KIND_REAL, MonitorElement::Fill(), findObject(), MonitorElement::initialise(), moduleId_, run_, and streamId_.

915 {
916  if (collateHistograms_)
917  {
919  {
920  me->Fill(0.);
921  return me;
922  }
923  }
924 
925  return book(dir, name, "bookFloat")
927 }
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:1878
uint32_t streamId_
Definition: DQMStore.h:705
uint32_t moduleId_
Definition: DQMStore.h:706
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
uint32_t run_
Definition: DQMStore.h:704
dbl *** dir
Definition: mlp_gen.cc:35
bool collateHistograms_
Definition: DQMStore.h:699
MonitorElement * DQMStore::bookInt ( const char *  name)
MonitorElement * DQMStore::bookInt ( const std::string &  name)

Book int.

Definition at line 906 of file DQMStore.cc.

References bookInt(), and pwd_.

907 {
908  return bookInt(pwd_, name);
909 }
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:901
MonitorElement * DQMStore::bookInt ( const std::string &  dir,
const std::string &  name 
)
private

Book int.

Definition at line 884 of file DQMStore.cc.

References book(), collateHistograms_, MonitorElement::DQM_KIND_INT, MonitorElement::Fill(), findObject(), MonitorElement::initialise(), moduleId_, run_, and streamId_.

885 {
886  if (collateHistograms_)
887  {
889  {
890  me->Fill(0);
891  return me;
892  }
893  }
894 
895  return book(dir, name, "bookInt")
897 }
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:1878
uint32_t streamId_
Definition: DQMStore.h:705
uint32_t moduleId_
Definition: DQMStore.h:706
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
uint32_t run_
Definition: DQMStore.h:704
dbl *** dir
Definition: mlp_gen.cc:35
bool collateHistograms_
Definition: DQMStore.h:699
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 1308 of file DQMStore.cc.

References pwd_.

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

1312 {
1313  return bookProfile(pwd_, name, new TProfile(name, title,
1314  nchX, lowX, highX,
1315  lowY, highY,
1316  option));
1317 }
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:1308
std::string pwd_
Definition: DQMStore.h:709
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 1323 of file DQMStore.cc.

References bookProfile(), and pwd_.

1327 {
1328  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1329  nchX, lowX, highX,
1330  lowY, highY,
1331  option));
1332 }
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:1308
std::string pwd_
Definition: DQMStore.h:709
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 1338 of file DQMStore.cc.

References bookProfile(), and pwd_.

1342 {
1343  return bookProfile(pwd_, name, new TProfile(name, title,
1344  nchX, lowX, highX,
1345  lowY, highY,
1346  option));
1347 }
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:1308
std::string pwd_
Definition: DQMStore.h:709
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 1353 of file DQMStore.cc.

References bookProfile(), and pwd_.

1357 {
1358  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1359  nchX, lowX, highX,
1360  lowY, highY,
1361  option));
1362 }
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:1308
std::string pwd_
Definition: DQMStore.h:709
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 1368 of file DQMStore.cc.

References bookProfile(), and pwd_.

1372 {
1373  return bookProfile(pwd_, name, new TProfile(name, title,
1374  nchX, xbinsize,
1375  lowY, highY,
1376  option));
1377 }
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:1308
std::string pwd_
Definition: DQMStore.h:709
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 1383 of file DQMStore.cc.

References bookProfile(), and pwd_.

1387 {
1388  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1389  nchX, xbinsize,
1390  lowY, highY,
1391  option));
1392 }
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:1308
std::string pwd_
Definition: DQMStore.h:709
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 1398 of file DQMStore.cc.

References bookProfile(), and pwd_.

1402 {
1403  return bookProfile(pwd_, name, new TProfile(name, title,
1404  nchX, xbinsize,
1405  lowY, highY,
1406  option));
1407 }
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:1308
std::string pwd_
Definition: DQMStore.h:709
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 1413 of file DQMStore.cc.

References bookProfile(), and pwd_.

1417 {
1418  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1419  nchX, xbinsize,
1420  lowY, highY,
1421  option));
1422 }
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:1308
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * DQMStore::bookProfile ( const char *  name,
TProfile *  h 
)

Book TProfile by cloning an existing profile.

Definition at line 1426 of file DQMStore.cc.

References bookProfile(), and pwd_.

1427 {
1428  return bookProfile(pwd_, name, static_cast<TProfile *>(source->Clone(name)));
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:1308
std::string pwd_
Definition: DQMStore.h:709
static std::string const source
Definition: EdmProvDump.cc:42
MonitorElement * DQMStore::bookProfile ( const std::string &  name,
TProfile *  h 
)

Book TProfile by cloning an existing profile.

Definition at line 1433 of file DQMStore.cc.

References bookProfile(), and pwd_.

1434 {
1435  return bookProfile(pwd_, name, static_cast<TProfile *>(source->Clone(name.c_str())));
1436 }
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:1308
std::string pwd_
Definition: DQMStore.h:709
static std::string const source
Definition: EdmProvDump.cc:42
MonitorElement * DQMStore::bookProfile ( const std::string &  dir,
const std::string &  name,
TProfile *  h 
)
private

Book profile histogram based on TProfile.

Definition at line 1297 of file DQMStore.cc.

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

1298 {
1299  return book(dir, name, "bookProfile",
1301  h, collateProfile);
1302 }
static void collateProfile(MonitorElement *me, TProfile *h, unsigned verbose)
Definition: DQMStore.cc:1610
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
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 1452 of file DQMStore.cc.

References pwd_.

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

1457 {
1458  return bookProfile2D(pwd_, name, new TProfile2D(name, title,
1459  nchX, lowX, highX,
1460  nchY, lowY, highY,
1461  lowZ, highZ,
1462  option));
1463 }
std::string pwd_
Definition: DQMStore.h:709
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:1452
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 1469 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1474 {
1475  return bookProfile2D(pwd_, name, new TProfile2D(name.c_str(), title.c_str(),
1476  nchX, lowX, highX,
1477  nchY, lowY, highY,
1478  lowZ, highZ,
1479  option));
1480 }
std::string pwd_
Definition: DQMStore.h:709
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:1452
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 1486 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1491 {
1492  return bookProfile2D(pwd_, name, new TProfile2D(name, title,
1493  nchX, lowX, highX,
1494  nchY, lowY, highY,
1495  lowZ, highZ,
1496  option));
1497 }
std::string pwd_
Definition: DQMStore.h:709
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:1452
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 1503 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1508 {
1509  return bookProfile2D(pwd_, name, new TProfile2D(name.c_str(), title.c_str(),
1510  nchX, lowX, highX,
1511  nchY, lowY, highY,
1512  lowZ, highZ,
1513  option));
1514 }
std::string pwd_
Definition: DQMStore.h:709
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:1452
MonitorElement * DQMStore::bookProfile2D ( const char *  name,
TProfile2D *  h 
)

Book TProfile2D by cloning an existing profile.

Definition at line 1518 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1519 {
1520  return bookProfile2D(pwd_, name, static_cast<TProfile2D *>(source->Clone(name)));
1521 }
std::string pwd_
Definition: DQMStore.h:709
static std::string const source
Definition: EdmProvDump.cc:42
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:1452
MonitorElement * DQMStore::bookProfile2D ( const std::string &  name,
TProfile2D *  h 
)

Book TProfile2D by cloning an existing profile.

Definition at line 1525 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1526 {
1527  return bookProfile2D(pwd_, name, static_cast<TProfile2D *>(source->Clone(name.c_str())));
1528 }
std::string pwd_
Definition: DQMStore.h:709
static std::string const source
Definition: EdmProvDump.cc:42
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:1452
MonitorElement * DQMStore::bookProfile2D ( const std::string &  folder,
const std::string &  name,
TProfile2D *  h 
)
private

Book 2D profile histogram based on TProfile2D.

Definition at line 1441 of file DQMStore.cc.

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

1442 {
1443  return book(dir, name, "bookProfile2D",
1445  h, collateProfile2D);
1446 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
static void collateProfile2D(MonitorElement *me, TProfile2D *h, unsigned verbose)
Definition: DQMStore.cc:1620
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
dbl *** dir
Definition: mlp_gen.cc:35
MonitorElement * DQMStore::bookString ( const char *  name,
const char *  value 
)
MonitorElement * DQMStore::bookString ( const std::string &  name,
const std::string &  value 
)

Book string.

Definition at line 965 of file DQMStore.cc.

References bookString(), and pwd_.

966 {
967  return bookString(pwd_, name, value);
968 }
MonitorElement * bookString(const char *name, const char *value)
Book string.
Definition: DQMStore.cc:960
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * DQMStore::bookString ( const std::string &  dir,
const std::string &  name,
const std::string &  value 
)
private

Book string.

Definition at line 944 of file DQMStore.cc.

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

947 {
948  if (collateHistograms_)
949  {
951  return me;
952  }
953 
954  return book(dir, name, "bookString")
956 }
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:1878
uint32_t streamId_
Definition: DQMStore.h:705
uint32_t moduleId_
Definition: DQMStore.h:706
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
uint32_t run_
Definition: DQMStore.h:704
dbl *** dir
Definition: mlp_gen.cc:35
bool collateHistograms_
Definition: DQMStore.h:699
template<typename iFunc >
void DQMStore::bookTransaction ( iFunc  f,
uint32_t  run,
uint32_t  streamId,
uint32_t  moduleId 
)
inline

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

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

go to top directory (ie. root)

Definition at line 684 of file DQMStore.cc.

References setCurrentFolder().

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

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

cd to subdirectory (if there)

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

690 {
692  const std::string *cleaned = 0;
693  cleanTrailingSlashes(subdir, clean, cleaned);
694 
695  if (! dirExists(*cleaned))
696  raiseDQMError("DQMStore", "Cannot 'cd' into non-existent directory '%s'",
697  cleaned->c_str());
698 
699  setCurrentFolder(*cleaned);
700 }
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:78
std::vector< T * > clean
Definition: MVATrainer.cc:156
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:772
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:707
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 2430 of file DQMStore.cc.

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

Referenced by save().

2431 {
2432  assert(! path.empty());
2433 
2434  // Find the first path component.
2435  size_t start = 0;
2436  size_t end = path.find('/', start);
2437  if (end == std::string::npos)
2438  end = path.size();
2439 
2440  while (true)
2441  {
2442  // Check if this subdirectory component exists. If yes, make sure
2443  // it is actually a subdirectory. Otherwise create or cd into it.
2444  std::string part(path, start, end-start);
2445  TObject *o = gDirectory->Get(part.c_str());
2446  if (o && ! dynamic_cast<TDirectory *>(o))
2447  raiseDQMError("DQMStore", "Attempt to create directory '%s' in a file"
2448  " fails because the part '%s' already exists and is not"
2449  " directory", path.c_str(), part.c_str());
2450  else if (! o)
2451  gDirectory->mkdir(part.c_str());
2452 
2453  if (! gDirectory->cd(part.c_str()))
2454  raiseDQMError("DQMStore", "Attempt to create directory '%s' in a file"
2455  " fails because could not cd into subdirectory '%s'",
2456  path.c_str(), part.c_str());
2457 
2458  // Stop if we reached the end, ignoring any trailing '/'.
2459  if (end+1 >= path.size())
2460  break;
2461 
2462  // Find the next path component.
2463  start = end+1;
2464  end = path.find('/', start);
2465  if (end == std::string::npos)
2466  end = path.size();
2467  }
2468 
2469  return true;
2470 }
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
assert(m_qm.get())
#define end
Definition: vmac.h:37
part
Definition: HCALResponse.h:20
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
bool DQMStore::checkBinningMatches ( MonitorElement me,
TH1 *  h,
unsigned  verbose 
)
staticprivate

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

1535 {
1536  if (me->getTH1()->GetNbinsX() != h->GetNbinsX()
1537  || me->getTH1()->GetNbinsY() != h->GetNbinsY()
1538  || me->getTH1()->GetNbinsZ() != h->GetNbinsZ()
1539  || me->getTH1()->GetXaxis()->GetXmin() != h->GetXaxis()->GetXmin()
1540  || me->getTH1()->GetYaxis()->GetXmin() != h->GetYaxis()->GetXmin()
1541  || me->getTH1()->GetZaxis()->GetXmin() != h->GetZaxis()->GetXmin()
1542  || me->getTH1()->GetXaxis()->GetXmax() != h->GetXaxis()->GetXmax()
1543  || me->getTH1()->GetYaxis()->GetXmax() != h->GetYaxis()->GetXmax()
1544  || me->getTH1()->GetZaxis()->GetXmax() != h->GetZaxis()->GetXmax()
1545  || !MonitorElement::CheckBinLabels((TAxis*)me->getTH1()->GetXaxis(),(TAxis*)h->GetXaxis())
1546  || !MonitorElement::CheckBinLabels((TAxis*)me->getTH1()->GetYaxis(),(TAxis*)h->GetYaxis())
1547  || !MonitorElement::CheckBinLabels((TAxis*)me->getTH1()->GetZaxis(),(TAxis*)h->GetZaxis()) )
1548  {
1549  if(verbose > 0)
1550  std::cout << "*** DQMStore: WARNING:"
1551  << "checkBinningMatches: different binning - cannot add object '"
1552  << h->GetName() << "' of type "
1553  << h->IsA()->GetName() << " to existing ME: '"
1554  << me->getFullname() << "'\n";
1555  return false;
1556  }
1557  return true;
1558 }
TH1 * getTH1(void) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
const std::string getFullname(void) const
get full name of ME including Pathname
tuple cout
Definition: gather_cfg.py:121
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 1561 of file DQMStore.cc.

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

Referenced by book1D(), and extract().

1562 {
1563  if (checkBinningMatches(me,h,verbose))
1564  me->getTH1F()->Add(h);
1565 }
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
TH1F * getTH1F(void) const
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
Definition: DQMStore.cc:1534
void DQMStore::collate1DD ( MonitorElement me,
TH1D *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1575 of file DQMStore.cc.

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

Referenced by book1DD(), and extract().

1576 {
1577  if (checkBinningMatches(me,h,verbose))
1578  me->getTH1D()->Add(h);
1579 }
TH1D * getTH1D(void) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
Definition: DQMStore.cc:1534
void DQMStore::collate1S ( MonitorElement me,
TH1S *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1568 of file DQMStore.cc.

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

Referenced by book1S(), and extract().

1569 {
1570  if (checkBinningMatches(me,h,verbose))
1571  me->getTH1S()->Add(h);
1572 }
TH1S * getTH1S(void) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
Definition: DQMStore.cc:1534
void DQMStore::collate2D ( MonitorElement me,
TH2F *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1582 of file DQMStore.cc.

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

Referenced by book2D(), and extract().

1583 {
1584  if (checkBinningMatches(me,h,verbose))
1585  me->getTH2F()->Add(h);
1586 }
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
Definition: DQMStore.cc:1534
TH2F * getTH2F(void) const
void DQMStore::collate2DD ( MonitorElement me,
TH2D *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1596 of file DQMStore.cc.

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

Referenced by book2DD(), and extract().

1597 {
1598  if (checkBinningMatches(me,h,verbose))
1599  me->getTH2D()->Add(h);
1600 }
TH2D * getTH2D(void) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
Definition: DQMStore.cc:1534
void DQMStore::collate2S ( MonitorElement me,
TH2S *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1589 of file DQMStore.cc.

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

Referenced by book2S(), and extract().

1590 {
1591  if (checkBinningMatches(me,h,verbose))
1592  me->getTH2S()->Add(h);
1593 }
TH2S * getTH2S(void) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
Definition: DQMStore.cc:1534
void DQMStore::collate3D ( MonitorElement me,
TH3F *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1603 of file DQMStore.cc.

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

Referenced by book3D(), and extract().

1604 {
1605  if (checkBinningMatches(me,h,verbose))
1606  me->getTH3F()->Add(h);
1607 }
TH3F * getTH3F(void) const
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
Definition: DQMStore.cc:1534
void DQMStore::collateProfile ( MonitorElement me,
TProfile *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1610 of file DQMStore.cc.

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

Referenced by bookProfile(), and extract().

1611 {
1612  if (checkBinningMatches(me,h,verbose))
1613  {
1614  TProfile *meh = me->getTProfile();
1615  me->addProfiles(h, meh, meh, 1, 1);
1616  }
1617 }
void addProfiles(TProfile *h1, TProfile *h2, TProfile *sum, float c1, float c2)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
TProfile * getTProfile(void) const
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
Definition: DQMStore.cc:1534
void DQMStore::collateProfile2D ( MonitorElement me,
TProfile2D *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1620 of file DQMStore.cc.

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

Referenced by bookProfile2D(), and extract().

1621 {
1622  if (checkBinningMatches(me,h,verbose))
1623  {
1624  TProfile2D *meh = me->getTProfile2D();
1625  me->addProfiles(h, meh, meh, 1, 1);
1626  }
1627 }
TProfile2D * getTProfile2D(void) const
void addProfiles(TProfile *h1, TProfile *h2, TProfile *sum, float c1, float c2)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static bool checkBinningMatches(MonitorElement *me, TH1 *h, unsigned verbose)
Definition: DQMStore.cc:1534
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 1738 of file DQMStore.cc.

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

1739 {
1740  MonitorElement proto(&path, std::string());
1741  MEMap::const_iterator e = data_.end();
1742  MEMap::const_iterator i = data_.lower_bound(proto);
1743  return (i != e && isSubdirectory(path, *i->data_.dirname));
1744 }
int i
Definition: DBlmapReader.cc:9
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
MEMap data_
Definition: DQMStore.h:710
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 3244 of file DQMStore.cc.

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

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

3245 {
3246  if (qtests_.count(qtname))
3247  raiseDQMError("DQMStore", "Attempt to create duplicate quality test '%s'",
3248  qtname.c_str());
3249 
3250  QAMap::iterator i = qalgos_.find(algoname);
3251  if (i == qalgos_.end())
3252  raiseDQMError("DQMStore", "Cannot create a quality test using unknown"
3253  " algorithm '%s'", algoname.c_str());
3254 
3255  QCriterion *qc = i->second(qtname);
3256  qc->setVerbose(verboseQT_);
3257 
3258  qtests_[qtname] = qc;
3259  return qc;
3260 }
int i
Definition: DBlmapReader.cc:9
QCMap qtests_
Definition: DQMStore.h:713
unsigned verboseQT_
Definition: DQMStore.h:696
QAMap qalgos_
Definition: DQMStore.h:714
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 2094 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().

2095 {
2096  std::lock_guard<std::mutex> guard(book_mutex_);
2097 
2098  std::string null_str("");
2099  MonitorElement proto(&null_str, null_str, run, 0, 0);
2100  if (enableMultiThread_)
2101  proto.setLumi(lumi);
2102 
2103  std::set<MonitorElement>::const_iterator e = data_.end();
2104  std::set<MonitorElement>::const_iterator i = data_.lower_bound(proto);
2105 
2106  while (i != e) {
2107  if (i->data_.streamId != 0 ||
2108  i->data_.moduleId != 0)
2109  break;
2110  if ((i->data_.lumi != lumi) && enableMultiThread_)
2111  break;
2112  if (i->data_.run != run)
2113  break;
2114 
2115  auto temp = i;
2116  ++i;
2117 
2118  if (verbose_ > 1) {
2119  std::cout << "DQMStore::deleteUnusedLumiHistograms: deleted monitor element '"
2120  << *i->data_.dirname << "/" << i->data_.objname << "'"
2121  << "flags " << i->data_.flags << "\n";
2122  }
2123 
2124  data_.erase(temp);
2125  }
2126 }
int i
Definition: DBlmapReader.cc:9
tuple lumi
Definition: fjr2json.py:35
std::mutex book_mutex_
Definition: DQMStore.h:717
unsigned verbose_
Definition: DQMStore.h:695
MEMap data_
Definition: DQMStore.h:710
tuple cout
Definition: gather_cfg.py:121
bool enableMultiThread_
Definition: DQMStore.h:700
bool DQMStore::dirExists ( const std::string &  path) const
void DQMStore::disableSoftReset ( MonitorElement me)

Definition at line 3378 of file DQMStore.cc.

References MonitorElement::disableSoftReset().

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

3379 {
3380  if (me)
3381  me->disableSoftReset();
3382 }
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 2134 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, DQMNet::QValue::message, gen::n, MonitorElement::object_, DQMNet::QValue::qtname, DQMNet::QValue::qtresult, alignCSCRings::s, s_referenceDirName, s_rxmeqr1(), s_rxmeqr2(), s_rxmeval(), MonitorElement::setEfficiencyFlag(), AlCaHLTBitMon_QueryRunRegistry::string, tag(), relativeConstraints::value, and verbose_.

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

2136 {
2137  // NB: Profile histograms inherit from TH*D, checking order matters.
2138  MonitorElement *refcheck = 0;
2139  if (TProfile *h = dynamic_cast<TProfile *>(obj))
2140  {
2141  MonitorElement *me = findObject(dir, h->GetName());
2142  if (! me)
2143  me = bookProfile(dir, h->GetName(), (TProfile *) h->Clone());
2144  else if (overwrite)
2145  me->copyFrom(h);
2146  else if (isCollateME(me) || collateHistograms)
2147  collateProfile(me, h, verbose_);
2148  refcheck = me;
2149  }
2150  else if (TProfile2D *h = dynamic_cast<TProfile2D *>(obj))
2151  {
2152  MonitorElement *me = findObject(dir, h->GetName());
2153  if (! me)
2154  me = bookProfile2D(dir, h->GetName(), (TProfile2D *) h->Clone());
2155  else if (overwrite)
2156  me->copyFrom(h);
2157  else if (isCollateME(me) || collateHistograms)
2158  collateProfile2D(me, h, verbose_);
2159  refcheck = me;
2160  }
2161  else if (TH1F *h = dynamic_cast<TH1F *>(obj))
2162  {
2163  MonitorElement *me = findObject(dir, h->GetName());
2164  if (! me)
2165  me = book1D(dir, h->GetName(), (TH1F *) h->Clone());
2166  else if (overwrite)
2167  me->copyFrom(h);
2168  else if (isCollateME(me) || collateHistograms)
2169  collate1D(me, h, verbose_);
2170  refcheck = me;
2171  }
2172  else if (TH1S *h = dynamic_cast<TH1S *>(obj))
2173  {
2174  MonitorElement *me = findObject(dir, h->GetName());
2175  if (! me)
2176  me = book1S(dir, h->GetName(), (TH1S *) h->Clone());
2177  else if (overwrite)
2178  me->copyFrom(h);
2179  else if (isCollateME(me) || collateHistograms)
2180  collate1S(me, h, verbose_);
2181  refcheck = me;
2182  }
2183  else if (TH1D *h = dynamic_cast<TH1D *>(obj))
2184  {
2185  MonitorElement *me = findObject(dir, h->GetName());
2186  if (! me)
2187  me = book1DD(dir, h->GetName(), (TH1D *) h->Clone());
2188  else if (overwrite)
2189  me->copyFrom(h);
2190  else if (isCollateME(me) || collateHistograms)
2191  collate1DD(me, h, verbose_);
2192  refcheck = me;
2193  }
2194  else if (TH2F *h = dynamic_cast<TH2F *>(obj))
2195  {
2196  MonitorElement *me = findObject(dir, h->GetName());
2197  if (! me)
2198  me = book2D(dir, h->GetName(), (TH2F *) h->Clone());
2199  else if (overwrite)
2200  me->copyFrom(h);
2201  else if (isCollateME(me) || collateHistograms)
2202  collate2D(me, h, verbose_);
2203  refcheck = me;
2204  }
2205  else if (TH2S *h = dynamic_cast<TH2S *>(obj))
2206  {
2207  MonitorElement *me = findObject(dir, h->GetName());
2208  if (! me)
2209  me = book2S(dir, h->GetName(), (TH2S *) h->Clone());
2210  else if (overwrite)
2211  me->copyFrom(h);
2212  else if (isCollateME(me) || collateHistograms)
2213  collate2S(me, h, verbose_);
2214  refcheck = me;
2215  }
2216  else if (TH2D *h = dynamic_cast<TH2D *>(obj))
2217  {
2218  MonitorElement *me = findObject(dir, h->GetName());
2219  if (! me)
2220  me = book2DD(dir, h->GetName(), (TH2D *) h->Clone());
2221  else if (overwrite)
2222  me->copyFrom(h);
2223  else if (isCollateME(me) || collateHistograms)
2224  collate2DD(me, h, verbose_);
2225  refcheck = me;
2226  }
2227  else if (TH3F *h = dynamic_cast<TH3F *>(obj))
2228  {
2229  MonitorElement *me = findObject(dir, h->GetName());
2230  if (! me)
2231  me = book3D(dir, h->GetName(), (TH3F *) h->Clone());
2232  else if (overwrite)
2233  me->copyFrom(h);
2234  else if (isCollateME(me) || collateHistograms)
2235  collate3D(me, h, verbose_);
2236  refcheck = me;
2237  }
2238  else if (dynamic_cast<TObjString *>(obj))
2239  {
2240  lat::RegexpMatch m;
2241  if (! s_rxmeval.match(obj->GetName(), 0, 0, &m))
2242  {
2243  if (strstr(obj->GetName(), "CMSSW"))
2244  {
2245  if (verbose_)
2246  std::cout << "Input file version: " << obj->GetName() << std::endl;
2247  return true;
2248  }
2249  else if (strstr(obj->GetName(), "DQMPATCH"))
2250  {
2251  if (verbose_)
2252  std::cout << "DQM patch version: " << obj->GetName() << std::endl;
2253  return true;
2254  }
2255  else
2256  {
2257  std::cout << "*** DQMStore: WARNING: cannot extract object '"
2258  << obj->GetName() << "' of type '"
2259  << obj->IsA()->GetName() << "'\n";
2260  return false;
2261  }
2262  }
2263 
2264  std::string label = m.matchString(obj->GetName(), 1);
2265  std::string kind = m.matchString(obj->GetName(), 2);
2266  std::string value = m.matchString(obj->GetName(), 3);
2267 
2268  if (kind == "i")
2269  {
2270  MonitorElement *me = findObject(dir, label);
2271  if (! me || overwrite)
2272  {
2273  if (! me) me = bookInt(dir, label);
2274  me->Fill(atoll(value.c_str()));
2275  }
2276  }
2277  else if (kind == "f")
2278  {
2279  MonitorElement *me = findObject(dir, label);
2280  if (! me || overwrite)
2281  {
2282  if (! me) me = bookFloat(dir, label);
2283  me->Fill(atof(value.c_str()));
2284  }
2285  }
2286  else if (kind == "s")
2287  {
2288  MonitorElement *me = findObject(dir, label);
2289  if (! me)
2290  me = bookString(dir, label, value);
2291  else if (overwrite)
2292  me->Fill(value);
2293  }
2294  else if (kind == "e")
2295  {
2296  MonitorElement *me = findObject(dir, label);
2297  if (! me)
2298  {
2299  std::cout << "*** DQMStore: WARNING: no monitor element '"
2300  << label << "' in directory '"
2301  << dir << "' to be marked as efficiency plot.\n";
2302  return false;
2303  }
2304  me->setEfficiencyFlag();
2305  }
2306  else if (kind == "t")
2307  {
2308  MonitorElement *me = findObject(dir, label);
2309  if (! me)
2310  {
2311  std::cout << "*** DQMStore: WARNING: no monitor element '"
2312  << label << "' in directory '"
2313  << dir << "' for a tag\n";
2314  return false;
2315  }
2316  errno = 0;
2317  char *endp = 0;
2318  unsigned long val = strtoul(value.c_str(), &endp, 10);
2319  if ((val == 0 && errno) || *endp || val > ~uint32_t(0))
2320  {
2321  std::cout << "*** DQMStore: WARNING: cannot restore tag '"
2322  << value << "' for monitor element '"
2323  << label << "' in directory '"
2324  << dir << "' - invalid value\n";
2325  return false;
2326  }
2327  tag(me, val);
2328  }
2329  else if (kind == "qr")
2330  {
2331  // Handle qreports, but skip them while reading in references.
2333  {
2334  size_t dot = label.find('.');
2335  if (dot == std::string::npos)
2336  {
2337  std::cout << "*** DQMStore: WARNING: quality report label in '" << label
2338  << "' is missing a '.' and cannot be extracted\n";
2339  return false;
2340  }
2341 
2342  std::string mename (label, 0, dot);
2343  std::string qrname (label, dot+1, std::string::npos);
2344 
2345  m.reset();
2346  DQMNet::QValue qv;
2347  if (s_rxmeqr1.match(value, 0, 0, &m))
2348  {
2349  qv.code = atoi(m.matchString(value, 1).c_str());
2350  qv.qtresult = strtod(m.matchString(value, 2).c_str(), 0);
2351  qv.message = m.matchString(value, 4);
2352  qv.qtname = qrname;
2353  qv.algorithm = m.matchString(value, 3);
2354  }
2355  else if (s_rxmeqr2.match(value, 0, 0, &m))
2356  {
2357  qv.code = atoi(m.matchString(value, 1).c_str());
2358  qv.qtresult = 0; // unavailable in old format
2359  qv.message = m.matchString(value, 2);
2360  qv.qtname = qrname;
2361  // qv.algorithm unavailable in old format
2362  }
2363  else
2364  {
2365  std::cout << "*** DQMStore: WARNING: quality test value '"
2366  << value << "' is incorrectly formatted\n";
2367  return false;
2368  }
2369 
2370  MonitorElement *me = findObject(dir, mename);
2371  if (! me)
2372  {
2373  std::cout << "*** DQMStore: WARNING: no monitor element '"
2374  << mename << "' in directory '"
2375  << dir << "' for quality test '"
2376  << label << "'\n";
2377  return false;
2378  }
2379 
2380  me->addQReport(qv, /* FIXME: getQTest(qv.qtname)? */ 0);
2381  }
2382  }
2383  else
2384  {
2385  std::cout << "*** DQMStore: WARNING: cannot extract object '"
2386  << obj->GetName() << "' of type '"
2387  << obj->IsA()->GetName() << "'\n";
2388  return false;
2389  }
2390  }
2391  else if (TNamed *n = dynamic_cast<TNamed *>(obj))
2392  {
2393  // For old DQM data.
2394  std::string s;
2395  s.reserve(6 + strlen(n->GetTitle()) + 2*strlen(n->GetName()));
2396  s += '<'; s += n->GetName(); s += '>';
2397  s += n->GetTitle();
2398  s += '<'; s += '/'; s += n->GetName(); s += '>';
2399  TObjString os(s.c_str());
2400  return extract(&os, dir, overwrite, collateHistograms_);
2401  }
2402  else
2403  {
2404  std::cout << "*** DQMStore: WARNING: cannot extract object '"
2405  << obj->GetName() << "' of type '" << obj->IsA()->GetName()
2406  << "' and with title '" << obj->GetTitle() << "'\n";
2407  return false;
2408  }
2409 
2410  // If we just read in a reference monitor element, and there is a
2411  // monitor element with the same name, link the two together. The
2412  // other direction is handled by the initialise() method.
2413  if (refcheck && isSubdirectory(s_referenceDirName, dir))
2414  {
2415  std::string mdir(dir, s_referenceDirName.size()+1, std::string::npos);
2416  if (MonitorElement *master = findObject(mdir, obj->GetName()))
2417  {
2418  master->data_.flags |= DQMNet::DQM_PROP_HAS_REFERENCE;
2419  master->reference_ = refcheck->object_;
2420  }
2421  }
2422 
2423  return true;
2424 }
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:1144
bool isCollateME(MonitorElement *me) const
Definition: DQMStore.cc:3426
void copyFrom(TH1 *from)
std::string algorithm
Definition: DQMNet.h:93
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:994
static void collate3D(MonitorElement *me, TH3F *h, unsigned verbose)
Definition: DQMStore.cc:1603
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:1878
static void collateProfile(MonitorElement *me, TProfile *h, unsigned verbose)
Definition: DQMStore.cc:1610
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:1256
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:1166
static void collate2DD(MonitorElement *me, TH2D *h, unsigned verbose)
Definition: DQMStore.cc:1596
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:1026
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:931
void Fill(long long x)
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1634
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:68
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:960
static void collateProfile2D(MonitorElement *me, TProfile2D *h, unsigned verbose)
Definition: DQMStore.cc:1620
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
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:1308
std::string qtname
Definition: DQMNet.h:92
static void collate1DD(MonitorElement *me, TH1D *h, unsigned verbose)
Definition: DQMStore.cc:1575
unsigned verbose_
Definition: DQMStore.h:695
static const std::string s_referenceDirName
Definition: DQMStore.cc:54
static void collate1D(MonitorElement *me, TH1F *h, unsigned verbose)
Definition: DQMStore.cc:1561
bool extract(TObject *obj, const std::string &dir, bool overwrite, bool collateHistograms)
Definition: DQMStore.cc:2134
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:121
void setEfficiencyFlag(void)
static void collate1S(MonitorElement *me, TH1S *h, unsigned verbose)
Definition: DQMStore.cc:1568
dbl *** dir
Definition: mlp_gen.cc:35
static void collate2D(MonitorElement *me, TH2F *h, unsigned verbose)
Definition: DQMStore.cc:1582
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:901
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:1122
tuple collateHistograms
float qtresult
Definition: DQMNet.h:90
bool collateHistograms_
Definition: DQMStore.h:699
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:1010
static const lat::Regexp s_rxmeqr1("^st:(\\d+):([-+e.\\d]+):([^:]*):(.*)$")
static void collate2S(MonitorElement *me, TH2S *h, unsigned verbose)
Definition: DQMStore.cc:1589
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:1452
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 3056 of file DQMStore.cc.

Referenced by get_info().

3056  {
3057  if (buf.Length() == buf.BufferSize())
3058  return 0;
3059  buf.InitMap();
3060  void *ptr = buf.ReadObjectAny(0);
3061  return reinterpret_cast<TObject *>(ptr);
3062 }
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 1878 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().

1884 {
1885  if (dir.find_first_not_of(s_safe) != std::string::npos)
1886  raiseDQMError("DQMStore", "Monitor element path name '%s' uses"
1887  " unacceptable characters", dir.c_str());
1888  if (name.find_first_not_of(s_safe) != std::string::npos)
1889  raiseDQMError("DQMStore", "Monitor element path name '%s' uses"
1890  " unacceptable characters", name.c_str());
1891 
1892  MonitorElement proto;
1893  proto.data_.dirname = &dir;
1894  proto.data_.objname = name;
1895  proto.data_.run = run;
1896  proto.data_.lumi = lumi;
1897  proto.data_.streamId = streamId;
1898  proto.data_.moduleId = moduleId;
1899 
1900  MEMap::const_iterator mepos = data_.find(proto);
1901  return (mepos == data_.end() ? 0
1902  : const_cast<MonitorElement *>(&*mepos));
1903 }
uint32_t moduleId
Definition: DQMNet.h:104
tuple lumi
Definition: fjr2json.py:35
static const std::string s_safe
Definition: DQMStore.cc:56
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:710
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 2070 of file DQMStore.cc.

References data_, forceResetOnBeginLumi_, MonitorElement::Reset(), reset_, and MonitorElement::resetUpdate().

Referenced by DQMStore().

2071 {
2072  MEMap::iterator mi = data_.begin();
2073  MEMap::iterator me = data_.end();
2074  for ( ; mi != me; ++mi)
2075  {
2076  if (forceResetOnBeginLumi_ && ((*mi).getLumiFlag() == false))
2077  continue;
2078  MonitorElement &me = const_cast<MonitorElement &>(*mi);
2079  me.Reset();
2080  me.resetUpdate();
2081  }
2082 
2083  reset_ = true;
2084 }
void resetUpdate(void)
reset &quot;was updated&quot; flag
bool reset_
Definition: DQMStore.h:697
MEMap data_
Definition: DQMStore.h:710
bool forceResetOnBeginLumi_
Definition: DQMStore.h:702
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 1748 of file DQMStore.cc.

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

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

1749 {
1750  std::string dir;
1751  std::string name;
1752  splitPath(dir, name, path);
1753  MonitorElement proto(&dir, name);
1754  MEMap::const_iterator mepos = data_.find(proto);
1755  return (mepos == data_.end() ? 0
1756  : const_cast<MonitorElement *>(&*mepos));
1757 }
static void splitPath(std::string &dir, std::string &name, const std::string &path)
Definition: DQMStore.cc:95
MEMap data_
Definition: DQMStore.h:710
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 1761 of file DQMStore.cc.

References MonitorElement::data_, data_, DQMNet::DQM_PROP_TAGGED, alignCSCRings::e, DQMNet::CoreObject::flags, i, query::result, DQMNet::CoreObject::tag, and tag().

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

1762 {
1763  // FIXME: Use reverse map [tag -> path] / [tag -> dir]?
1764  std::vector<MonitorElement *> result;
1765  for (MEMap::const_iterator i = data_.begin(), e = data_.end(); i != e; ++i)
1766  {
1767  const MonitorElement &me = *i;
1768  if ((me.data_.flags & DQMNet::DQM_PROP_TAGGED) && me.data_.tag == tag)
1769  result.push_back(const_cast<MonitorElement *>(&me));
1770  }
1771  return result;
1772 }
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
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1634
tuple result
Definition: query.py:137
DQMNet::CoreObject data_
MEMap data_
Definition: DQMStore.h:710
void DQMStore::get_info ( const dqmstorepb::ROOTFilePB_Histo h,
std::string &  dirname,
std::string &  objname,
TObject **  obj 
)
private

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

3067  {
3068 
3069  size_t slash = h.full_pathname().rfind('/');
3070  size_t dirpos = (slash == std::string::npos ? 0 : slash);
3071  size_t namepos = (slash == std::string::npos ? 0 : slash+1);
3072  dirname.assign(h.full_pathname(), 0, dirpos);
3073  objname.assign(h.full_pathname(), namepos, std::string::npos);
3074  TBufferFile buf(TBufferFile::kRead, h.size(),
3075  (void*)h.streamed_histo().data(),
3076  kFALSE);
3077  buf.Reset();
3078  *obj = extractNextObject(buf);
3079  if (!*obj) {
3080  raiseDQMError("DQMStore", "Error reading element:'%s'" , h.full_pathname().c_str());
3081  }
3082 }
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:3056
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 1961 of file DQMStore.cc.

References assert(), clean, cleanTrailingSlashes(), data_, alignCSCRings::e, enableMultiThread_, i, isSubdirectory(), or, query::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().

1964 {
1966  const std::string *cleaned = 0;
1967  cleanTrailingSlashes(path, clean, cleaned);
1968  MonitorElement proto(cleaned, std::string(), runNumber);
1969  proto.setLumi(lumi);
1970 
1971  std::vector<MonitorElement *> result;
1972  MEMap::const_iterator e = data_.end();
1973  MEMap::const_iterator i = data_.lower_bound(proto);
1974  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i) {
1975  if (runNumber != 0) {
1976  if (i->data_.run > runNumber // TODO[rovere]: pleonastic? first we encounter local ME of the same run ...
1977  || i->data_.streamId != 0
1978  || i->data_.moduleId != 0)
1979  break;
1980  }
1981  if (lumi != 0) {
1982  if (i->data_.lumi > lumi
1983  || i->data_.streamId != 0
1984  || i->data_.moduleId != 0)
1985  break;
1986  }
1987  if (runNumber != 0 or lumi !=0) {
1988  assert(i->data_.streamId == 0);
1989  assert(i->data_.moduleId == 0);
1990  }
1991  result.push_back(const_cast<MonitorElement *>(&*i));
1992  }
1993 
1994  if (enableMultiThread_)
1995  {
1996  //save legacy modules when running MT
1997  i = data_.begin();
1998  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i) {
1999  if (i->data_.run != 0 || i->data_.streamId != 0 || i->data_.moduleId != 0) break;
2000  result.push_back(const_cast<MonitorElement *>(&*i));
2001  }
2002  }
2003 
2004  return result;
2005 }
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())
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:78
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
tuple result
Definition: query.py:137
std::vector< T * > clean
Definition: MVATrainer.cc:156
MEMap data_
Definition: DQMStore.h:710
bool enableMultiThread_
Definition: DQMStore.h:700
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 1908 of file DQMStore.cc.

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

1909 {
1910  into.clear();
1911  into.reserve(dirs_.size());
1912 
1913  MEMap::const_iterator me = data_.end();
1914  std::set<std::string>::const_iterator di = dirs_.begin();
1915  std::set<std::string>::const_iterator de = dirs_.end();
1916  char tagbuf[32]; // more than enough for '/' and up to 10 digits
1917 
1918  for ( ; di != de; ++di)
1919  {
1920  MonitorElement proto(&*di, std::string());
1921  MEMap::const_iterator mi = data_.lower_bound(proto);
1922  MEMap::const_iterator m = mi;
1923  size_t sz = di->size() + 2;
1924  size_t nfound = 0;
1925  for ( ; m != me && isSubdirectory(*di, *m->data_.dirname); ++m)
1926  if (*di == *m->data_.dirname && (m->data_.flags & DQMNet::DQM_PROP_TAGGED))
1927  {
1928  // the tags count for '/' + up to 10 digits, otherwise ',' + ME name
1929  sz += 1 + m->data_.objname.size() + 11;
1930  ++nfound;
1931  }
1932 
1933  if (! nfound)
1934  continue;
1935 
1936  std::vector<std::string>::iterator istr
1937  = into.insert(into.end(), std::string());
1938 
1939  istr->reserve(sz);
1940 
1941  *istr += *di;
1942  *istr += ':';
1943  for (sz = 0; mi != m; ++mi)
1944  {
1945  if (*di == *m->data_.dirname && (m->data_.flags & DQMNet::DQM_PROP_TAGGED))
1946  {
1947  sprintf(tagbuf, "/%u", mi->data_.tag);
1948  if (sz > 0)
1949  *istr += ',';
1950  *istr += m->data_.objname;
1951  *istr += tagbuf;
1952  ++sz;
1953  }
1954  }
1955  }
1956 }
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:68
MEMap data_
Definition: DQMStore.h:710
std::set< std::string > dirs_
Definition: DQMStore.h:711
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 1777 of file DQMStore.cc.

References clean, cleanTrailingSlashes(), data_, alignCSCRings::e, i, isSubdirectory(), query::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().

1778 {
1780  const std::string *cleaned = 0;
1781  cleanTrailingSlashes(path, clean, cleaned);
1782  MonitorElement proto(cleaned, std::string());
1783 
1784  std::vector<MonitorElement *> result;
1785  MEMap::const_iterator e = data_.end();
1786  MEMap::const_iterator i = data_.lower_bound(proto);
1787  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i)
1788  if (*cleaned == *i->data_.dirname)
1789  result.push_back(const_cast<MonitorElement *>(&*i));
1790 
1791  return result;
1792 }
int i
Definition: DBlmapReader.cc:9
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:78
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
tuple result
Definition: query.py:137
std::vector< T * > clean
Definition: MVATrainer.cc:156
MEMap data_
Definition: DQMStore.h:710
std::vector< MonitorElement * > DQMStore::getContents ( const std::string &  path,
unsigned int  tag 
) const

same as above for tagged MonitorElements

Definition at line 1796 of file DQMStore.cc.

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

1797 {
1799  const std::string *cleaned = 0;
1800  cleanTrailingSlashes(path, clean, cleaned);
1801  MonitorElement proto(cleaned, std::string());
1802 
1803  std::vector<MonitorElement *> result;
1804  MEMap::const_iterator e = data_.end();
1805  MEMap::const_iterator i = data_.lower_bound(proto);
1806  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i)
1807  if (*cleaned == *i->data_.dirname
1808  && (i->data_.flags & DQMNet::DQM_PROP_TAGGED)
1809  && i->data_.tag == tag)
1810  result.push_back(const_cast<MonitorElement *>(&*i));
1811 
1812  return result;
1813 }
int i
Definition: DBlmapReader.cc:9
static const uint32_t DQM_PROP_TAGGED
Definition: DQMNet.h:54
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:78
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1634
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
tuple result
Definition: query.py:137
std::vector< T * > clean
Definition: MVATrainer.cc:156
MEMap data_
Definition: DQMStore.h:710
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 1820 of file DQMStore.cc.

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

1821 {
1822  into.clear();
1823  into.reserve(dirs_.size());
1824 
1825  MEMap::const_iterator me = data_.end();
1826  std::set<std::string>::const_iterator di = dirs_.begin();
1827  std::set<std::string>::const_iterator de = dirs_.end();
1828  for ( ; di != de; ++di)
1829  {
1830  MonitorElement proto(&*di, std::string());
1831  MEMap::const_iterator mi = data_.lower_bound(proto);
1832  MEMap::const_iterator m = mi;
1833  size_t sz = di->size() + 2;
1834  size_t nfound = 0;
1835  for ( ; m != me && isSubdirectory(*di, *m->data_.dirname); ++m)
1836  if (*di == *m->data_.dirname)
1837  {
1838  sz += m->data_.objname.size() + 1;
1839  ++nfound;
1840  }
1841 
1842  if (! nfound)
1843  continue;
1844 
1845  std::vector<std::string>::iterator istr
1846  = into.insert(into.end(), std::string());
1847 
1848  if (showContents)
1849  {
1850  istr->reserve(sz);
1851 
1852  *istr += *di;
1853  *istr += ':';
1854  for (sz = 0; mi != m; ++mi)
1855  {
1856  if (*di != *mi->data_.dirname)
1857  continue;
1858 
1859  if (sz > 0)
1860  *istr += ',';
1861 
1862  *istr += mi->data_.objname;
1863  ++sz;
1864  }
1865  }
1866  else
1867  {
1868  istr->reserve(di->size() + 2);
1869  *istr += *di;
1870  *istr += ':';
1871  }
1872  }
1873 }
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
MEMap data_
Definition: DQMStore.h:710
std::set< std::string > dirs_
Definition: DQMStore.h:711
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 2010 of file DQMStore.cc.

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

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

2011 {
2012  lat::Regexp rx;
2013  try
2014  {
2015  rx = lat::Regexp(pattern, 0, syntaxType);
2016  rx.study();
2017  }
2018  catch (lat::Error &e)
2019  {
2020  raiseDQMError("DQMStore", "Invalid regular expression '%s': %s",
2021  pattern.c_str(), e.explain().c_str());
2022  }
2023 
2024  std::string path;
2025  std::vector<MonitorElement *> result;
2026  MEMap::const_iterator i = data_.begin();
2027  MEMap::const_iterator e = data_.end();
2028  for ( ; i != e; ++i)
2029  {
2030  path.clear();
2031  mergePath(path, *i->data_.dirname, i->data_.objname);
2032  if (rx.match(path))
2033  result.push_back(const_cast<MonitorElement *>(&*i));
2034  }
2035 
2036  return result;
2037 }
int i
Definition: DBlmapReader.cc:9
static void mergePath(std::string &path, const std::string &dir, const std::string &name)
Definition: DQMStore.cc:108
tuple result
Definition: query.py:137
MEMap data_
Definition: DQMStore.h:710
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 1722 of file DQMStore.cc.

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

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

1723 {
1724  MonitorElement proto(&pwd_, std::string());
1725  std::vector<std::string> result;
1726  MEMap::const_iterator e = data_.end();
1727  MEMap::const_iterator i = data_.lower_bound(proto);
1728  for ( ; i != e && isSubdirectory(pwd_, *i->data_.dirname); ++i)
1729  if (pwd_ == *i->data_.dirname)
1730  result.push_back(i->getName());
1731 
1732  return result;
1733 }
int i
Definition: DBlmapReader.cc:9
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
tuple result
Definition: query.py:137
std::string pwd_
Definition: DQMStore.h:709
MEMap data_
Definition: DQMStore.h:710
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 3339 of file DQMStore.cc.

References clean, cleanTrailingSlashes(), data_, dqm::qstatus::ERROR, isSubdirectory(), dqm::qstatus::OTHER, ntuplemaker::status, dqm::qstatus::STATUS_OK, AlCaHLTBitMon_QueryRunRegistry::string, and dqm::qstatus::WARNING.

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

3340 {
3342  const std::string *cleaned = 0;
3343  cleanTrailingSlashes(path, clean, cleaned);
3344 
3346  MEMap::const_iterator mi = data_.begin();
3347  MEMap::const_iterator me = data_.end();
3348  for ( ; mi != me; ++mi)
3349  {
3350  if (! cleaned->empty() && ! isSubdirectory(*cleaned, *mi->data_.dirname))
3351  continue;
3352 
3353  if (mi->hasError())
3354  return dqm::qstatus::ERROR;
3355  else if (mi->hasWarning())
3356  status = dqm::qstatus::WARNING;
3357  else if (status < dqm::qstatus::WARNING
3358  && mi->hasOtherReport())
3359  status = dqm::qstatus::OTHER;
3360  }
3361  return status;
3362 }
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:78
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
std::vector< T * > clean
Definition: MVATrainer.cc:156
MEMap data_
Definition: DQMStore.h:710
static const int STATUS_OK
tuple status
Definition: ntuplemaker.py:245
static const int ERROR
std::vector< std::string > DQMStore::getSubdirs ( void  ) const

get list of subdirectories of current directory

Definition at line 1699 of file DQMStore.cc.

References dirs_, alignCSCRings::e, i, isSubdirectory(), pwd_, and query::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().

1700 {
1701  std::vector<std::string> result;
1702  std::set<std::string>::const_iterator e = dirs_.end();
1703  std::set<std::string>::const_iterator i = dirs_.find(pwd_);
1704 
1705  // If we didn't find current directory, the tree is empty, so quit.
1706  if (i == e)
1707  return result;
1708 
1709  // Skip the current directory and then start looking for immediate
1710  // subdirectories in the dirs_ list. Stop when we are no longer in
1711  // (direct or indirect) subdirectories of pwd_. Note that we don't
1712  // "know" which order the set will sort A/B, A/B/C and A/D.
1713  while (++i != e && isSubdirectory(pwd_, *i))
1714  if (i->find('/', pwd_.size()+1) == std::string::npos)
1715  result.push_back(*i);
1716 
1717  return result;
1718 }
int i
Definition: DBlmapReader.cc:9
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
tuple result
Definition: query.py:137
std::string pwd_
Definition: DQMStore.h:709
std::set< std::string > dirs_
Definition: DQMStore.h:711
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 555 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().

555  {
556  makeDirectory("");
557  reset();
558 
559  // set steerable parameters
560  verbose_ = pset.getUntrackedParameter<int>("verbose", 0);
561  if (verbose_ > 0)
562  std::cout << "DQMStore: verbosity set to " << verbose_ << std::endl;
563 
564  verboseQT_ = pset.getUntrackedParameter<int>("verboseQT", 0);
565  if (verbose_ > 0)
566  std::cout << "DQMStore: QTest verbosity set to " << verboseQT_ << std::endl;
567 
568  collateHistograms_ = pset.getUntrackedParameter<bool>("collateHistograms", false);
569  if (collateHistograms_)
570  std::cout << "DQMStore: histogram collation is enabled\n";
571 
572  enableMultiThread_ = pset.getUntrackedParameter<bool>("enableMultiThread", false);
573  if (enableMultiThread_)
574  std::cout << "DQMStore: MultiThread option is enabled\n";
575 
576  LSbasedMode_ = pset.getUntrackedParameter<bool>("LSbasedMode", false);
577  if (LSbasedMode_)
578  std::cout << "DQMStore: LSbasedMode option is enabled\n";
579 
580  std::string ref = pset.getUntrackedParameter<std::string>("referenceFileName", "");
581  if (! ref.empty())
582  {
583  std::cout << "DQMStore: using reference file '" << ref << "'\n";
584  readFile(ref, true, "", s_referenceDirName, StripRunDirs, false);
585  }
586 
587  initQCriterion<Comp2RefChi2>(qalgos_);
588  initQCriterion<Comp2RefKolmogorov>(qalgos_);
589  initQCriterion<ContentsXRange>(qalgos_);
590  initQCriterion<ContentsYRange>(qalgos_);
591  initQCriterion<MeanWithinExpected>(qalgos_);
592  initQCriterion<Comp2RefEqualH>(qalgos_);
593  initQCriterion<DeadChannel>(qalgos_);
594  initQCriterion<NoisyChannel>(qalgos_);
595  initQCriterion<ContentsWithinExpected>(qalgos_);
596  initQCriterion<CompareToMedian>(qalgos_);
597  initQCriterion<CompareLastFilledBin>(qalgos_);
598  initQCriterion<CheckVariance>(qalgos_);
599 
600  scaleFlag_ = pset.getUntrackedParameter<double>("ScalingFlag", 0.0);
601  if (verbose_ > 0)
602  std::cout << "DQMStore: Scaling Flag set to " << scaleFlag_ << std::endl;
603 }
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:3001
unsigned verboseQT_
Definition: DQMStore.h:696
double scaleFlag_
Definition: DQMStore.h:698
QAMap qalgos_
Definition: DQMStore.h:714
unsigned verbose_
Definition: DQMStore.h:695
static const std::string s_referenceDirName
Definition: DQMStore.cc:54
tuple cout
Definition: gather_cfg.py:121
void reset(void)
Definition: DQMStore.cc:2046
bool collateHistograms_
Definition: DQMStore.h:699
bool LSbasedMode_
Definition: DQMStore.h:701
void makeDirectory(const std::string &path)
Definition: DQMStore.cc:731
bool enableMultiThread_
Definition: DQMStore.h:700
bool DQMStore::isCollate ( void  ) const

Definition at line 3417 of file DQMStore.cc.

References collateHistograms_.

3418 {
3419  return collateHistograms_;
3420 }
bool collateHistograms_
Definition: DQMStore.h:699
bool DQMStore::isCollateME ( MonitorElement me) const
private

Definition at line 3426 of file DQMStore.cc.

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

Referenced by extract().

3427 { 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:55
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
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 2974 of file DQMStore.cc.

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

Referenced by DQMFileReader::beginJob().

2977 {
2978  bool overwrite = true;
2979  if (collateHistograms_) overwrite = false;
2980  if (verbose_)
2981  {
2982  std::cout << "DQMStore::load: reading from file '" << filename << "'\n";
2983  if (collateHistograms_)
2984  std::cout << "DQMStore::load: in collate mode " << "\n";
2985  else
2986  std::cout << "DQMStore::load: in overwrite mode " << "\n";
2987  }
2988 
2989  if (!s_rxpbfile.match(filename, 0, 0))
2990  return readFile(filename, overwrite, "", "", stripdirs, fileMustExist);
2991  else
2992  return readFilePB(filename, overwrite, "", "", stripdirs, fileMustExist);
2993 }
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:3001
unsigned verbose_
Definition: DQMStore.h:695
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:3085
tuple filename
Definition: lut2db_cfg.py:20
tuple cout
Definition: gather_cfg.py:121
bool collateHistograms_
Definition: DQMStore.h:699
void DQMStore::makeDirectory ( const std::string &  path)
private

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

Definition at line 731 of file DQMStore.cc.

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

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

732 {
733  std::string prev;
734  std::string subdir;
736  prev.reserve(path.size());
737  subdir.reserve(path.size());
738  name.reserve(path.size());
739  size_t prevname = 0;
740  size_t slash = 0;
741 
742  while (true)
743  {
744  // Create this subdirectory component.
745  subdir.clear();
746  subdir.append(path, 0, slash);
747  name.clear();
748  name.append(subdir, prevname, std::string::npos);
749  if (! prev.empty() && findObject(prev, name))
750  raiseDQMError("DQMStore", "Attempt to create subdirectory '%s'"
751  " which already exists as a monitor element",
752  subdir.c_str());
753 
754  if (! dirs_.count(subdir))
755  dirs_.insert(subdir);
756 
757  // Stop if we've reached the end (including possibly a trailing slash).
758  if (slash+1 >= path.size())
759  break;
760 
761  // Find the next slash, making sure we progress. If reach the end,
762  // process the last path component; the next loop round will terminate.
763  prevname = slash ? slash+1 : slash;
764  prev = subdir;
765  if ((slash = path.find('/', ++slash)) == std::string::npos)
766  slash = path.size();
767  }
768 }
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:1878
std::set< std::string > dirs_
Definition: DQMStore.h:711
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
template<typename iFunc >
void DQMStore::meBookerGetter ( iFunc  f)
inline

Definition at line 271 of file DQMStore.h.

References f, ibooker_, and igetter_.

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

271  {
272  f(*ibooker_, *igetter_);
273  }
IGetter * igetter_
Definition: DQMStore.h:719
double f[11][100]
IBooker * ibooker_
Definition: DQMStore.h:718
template<typename iFunc >
void DQMStore::meGetter ( iFunc  f)
inline

Definition at line 280 of file DQMStore.h.

References f, and igetter_.

280  {
281  f(*igetter_);
282  }
IGetter * igetter_
Definition: DQMStore.h:719
double f[11][100]
void DQMStore::mergeAndResetMEsLuminositySummaryCache ( uint32_t  run,
uint32_t  lumi,
uint32_t  streamId,
uint32_t  moduleId 
)

Definition at line 414 of file DQMStore.cc.

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

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

417  {
418  if (verbose_ > 1)
419  std::cout << "DQMStore::mergeAndResetMEsLuminositySummaryCache - Merging objects from run: "
420  << run << " lumi: " << lumi
421  << ", stream: " << streamId
422  << " module: " << moduleId << std::endl;
423  std::string null_str("");
424  MonitorElement proto(&null_str, null_str, run, streamId, moduleId);
425  std::set<MonitorElement>::const_iterator e = data_.end();
426  std::set<MonitorElement>::const_iterator i = data_.lower_bound(proto);
427 
428  while (i != e) {
429  if (i->data_.run != run
430  || i->data_.streamId != streamId
431  || i->data_.moduleId != moduleId)
432  break;
433 
434  // Handle LS-based histograms only.
435  if (not (i->getLumiFlag() || LSbasedMode_)) {
436  ++i;
437  continue;
438  }
439 
440  MonitorElement global_me(*i, MonitorElementNoCloneTag());
441  global_me.globalize();
442  global_me.setLumi(lumi);
443  // Since this accesses the data, the operation must be
444  // be locked.
445  std::lock_guard<std::mutex> guard(book_mutex_);
446  std::set<MonitorElement>::const_iterator me = data_.find(global_me);
447  if (me != data_.end()) {
448  if (verbose_ > 1)
449  std::cout << "Found global Object, using it --> " << me->getFullname() << std::endl;
450 
451  //don't take any action if the ME is an INT || FLOAT || STRING
452  if(me->kind() >= MonitorElement::DQM_KIND_TH1F)
453  {
454  if(me->getTH1()->CanExtendAllAxes() && i->getTH1()->CanExtendAllAxes()) {
455  TList list;
456  list.Add(i->getTH1());
457  if( -1 == me->getTH1()->Merge(&list)) {
458  std::cout << "mergeAndResetMEsLuminositySummaryCache: Failed to merge DQM element "<<me->getFullname();
459  }
460  }
461  else
462  me->getTH1()->Add(i->getTH1());
463  }
464  } else {
465  if (verbose_ > 1)
466  std::cout << "No global Object found. " << std::endl;
467  std::pair<std::set<MonitorElement>::const_iterator, bool> gme;
468 
469  // this makes an actual and a single copy with Clone()'ed th1
470  MonitorElement actual_global_me(*i);
471  actual_global_me.globalize();
472  actual_global_me.setLumi(lumi);
473  gme = data_.insert(std::move(actual_global_me));
474  assert(gme.second);
475  }
476  // make the ME reusable for the next LS
477  const_cast<MonitorElement*>(&*i)->Reset();
478  ++i;
479  }
480 }
int i
Definition: DBlmapReader.cc:9
tuple lumi
Definition: fjr2json.py:35
assert(m_qm.get())
std::mutex book_mutex_
Definition: DQMStore.h:717
def move
Definition: eostools.py:510
unsigned verbose_
Definition: DQMStore.h:695
MEMap data_
Definition: DQMStore.h:710
tuple cout
Definition: gather_cfg.py:121
void Reset(std::vector< TH2F > &depth)
bool LSbasedMode_
Definition: DQMStore.h:701
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 343 of file DQMStore.cc.

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

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

345  {
346  if (verbose_ > 1)
347  std::cout << "DQMStore::mergeAndResetMEsRunSummaryCache - Merging objects from run: "
348  << run
349  << ", stream: " << streamId
350  << " module: " << moduleId << std::endl;
351 
352  if (LSbasedMode_) {
353  return;
354  }
355 
356  std::string null_str("");
357  MonitorElement proto(&null_str, null_str, run, streamId, moduleId);
358  std::set<MonitorElement>::const_iterator e = data_.end();
359  std::set<MonitorElement>::const_iterator i = data_.lower_bound(proto);
360  while (i != e) {
361  if (i->data_.run != run
362  || i->data_.streamId != streamId
363  || i->data_.moduleId != moduleId)
364  break;
365 
366  // Handle Run-based histograms only.
367  if (i->getLumiFlag() || LSbasedMode_) {
368  ++i;
369  continue;
370  }
371 
372  // don't call the copy constructor
373  // we are just searching for a global histogram - a copy is not necessary
374  MonitorElement global_me(*i, MonitorElementNoCloneTag());
375  global_me.globalize();
376 
377  // Since this accesses the data, the operation must be
378  // be locked.
379  std::lock_guard<std::mutex> guard(book_mutex_);
380  std::set<MonitorElement>::const_iterator me = data_.find(global_me);
381  if (me != data_.end()) {
382  if (verbose_ > 1)
383  std::cout << "Found global Object, using it --> " << me->getFullname() << std::endl;
384 
385  //don't take any action if the ME is an INT || FLOAT || STRING
386  if(me->kind() >= MonitorElement::DQM_KIND_TH1F)
387  {
388  if(me->getTH1()->CanExtendAllAxes() && i->getTH1()->CanExtendAllAxes()) {
389  TList list;
390  list.Add(i->getTH1());
391  if( -1 == me->getTH1()->Merge(&list)) {
392  std::cout << "mergeAndResetMEsRunSummaryCache: Failed to merge DQM element "<<me->getFullname();
393  }
394  }
395  else
396  me->getTH1()->Add(i->getTH1());
397  }
398  } else {
399  if (verbose_ > 1)
400  std::cout << "No global Object found. " << std::endl;
401  std::pair<std::set<MonitorElement>::const_iterator, bool> gme;
402 
403  // this makes an actual and a single copy with Clone()'ed th1
404  MonitorElement actual_global_me(*i);
405  actual_global_me.globalize();
406  gme = data_.insert(std::move(actual_global_me));
407  assert(gme.second);
408  }
409  // TODO(rovere): eventually reset the local object and mark it as reusable??
410  ++i;
411  }
412 }
int i
Definition: DBlmapReader.cc:9
assert(m_qm.get())
std::mutex book_mutex_
Definition: DQMStore.h:717
def move
Definition: eostools.py:510
unsigned verbose_
Definition: DQMStore.h:695
MEMap data_
Definition: DQMStore.h:710
tuple cout
Definition: gather_cfg.py:121
bool LSbasedMode_
Definition: DQMStore.h:701
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 557 of file DQMStore.h.

References enableMultiThread_.

557 { return enableMultiThread_; };
bool enableMultiThread_
Definition: DQMStore.h:700
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 2959 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().

2965 {
2966  return readFile(filename,overwrite,onlypath,prepend,stripdirs,fileMustExist);
2967 }
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:3001
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 615 of file DQMStore.cc.

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

Referenced by book().

616 {
617  // the access to the member stream_ is implicitely protected against
618  // concurrency problems because the print_trace method is always called behind
619  // a lock (see bookTransaction).
620  if (!stream_)
621  stream_ = new std::ofstream("histogramBookingBT.log");
622 
623  void *array[10];
624  size_t size;
625  char **strings;
626  int r=0;
627  lat::RegexpMatch m;
628  m.reset();
629 
630  size = backtrace (array, 10);
631  strings = backtrace_symbols (array, size);
632 
633  if ((size > 4)
634  &&s_rxtrace.match(strings[4], 0, 0, &m))
635  {
636  char * demangled = abi::__cxa_demangle(m.matchString(strings[4], 2).c_str(), 0, 0, &r);
637  *stream_ << "\"" << dir << "/"
638  << name << "\" "
639  << (r ? m.matchString(strings[4], 2) : demangled) << " "
640  << m.matchString(strings[4], 1) << "\n";
641  free(demangled);
642  }
643  else
644  *stream_ << "Skipping "<< dir << "/" << name
645  << " with stack size " << size << "\n";
646  /* In this case print the full stack trace, up to main or to the
647  * maximum stack size, i.e. 10. */
648  if (verbose_ > 4)
649  {
650  size_t i;
651  m.reset();
652 
653  for (i = 0; i < size; i++)
654  if (s_rxtrace.match(strings[i], 0, 0, &m))
655  {
656  char * demangled = abi::__cxa_demangle(m.matchString(strings[i], 2).c_str(), 0, 0, &r);
657  *stream_ << "\t\t" << i << "/" << size << " "
658  << (r ? m.matchString(strings[i], 2) : demangled) << " "
659  << m.matchString(strings[i], 1) << std::endl;
660  free (demangled);
661  }
662  }
663  free (strings);
664 }
int i
Definition: DBlmapReader.cc:9
static const lat::Regexp s_rxtrace("(.*)\\((.*)\\+0x.*\\).*")
unsigned verbose_
Definition: DQMStore.h:695
std::ofstream * stream_
Definition: DQMStore.h:707
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 2804 of file DQMStore.cc.

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

Referenced by readFile().

2810 {
2811  unsigned int ntot = 0;
2812  unsigned int count = 0;
2813 
2814  if (! file->cd(curdir.c_str()))
2815  raiseDQMError("DQMStore", "Failed to process directory '%s' while"
2816  " reading file '%s'", curdir.c_str(), file->GetName());
2817 
2818  // Figure out current directory name, but strip out the top
2819  // directory into which we dump everything.
2820  std::string dirpart = curdir;
2821  if (dirpart.compare(0, s_monitorDirName.size(), s_monitorDirName) == 0)
2822  {
2823  if (dirpart.size() == s_monitorDirName.size())
2824  dirpart.clear();
2825  else if (dirpart[s_monitorDirName.size()] == '/')
2826  dirpart.erase(0, s_monitorDirName.size()+1);
2827  }
2828 
2829  // See if we are going to skip this directory.
2830  bool skip = (! onlypath.empty() && ! isSubdirectory(onlypath, dirpart));
2831 
2832  if (prepend == s_collateDirName ||
2833  prepend == s_referenceDirName ||
2834  stripdirs == StripRunDirs )
2835  {
2836  // Remove Run # and RunSummary dirs
2837  // first look for Run summary,
2838  // if that is found and erased, also erase Run dir
2839  size_t slash = dirpart.find('/');
2840  size_t pos = dirpart.find("/Run summary");
2841  if (slash != std::string::npos && pos !=std::string::npos)
2842  {
2843  dirpart.erase(pos,12);
2844 
2845  pos = dirpart.find("Run ");
2846  size_t length = dirpart.find('/',pos+1)-pos+1;
2847  if (pos !=std::string::npos)
2848  dirpart.erase(pos,length);
2849  }
2850  }
2851 
2852  // If we are prepending, add it to the directory name,
2853  // and suppress reading of already existing reference histograms
2854  if (prepend == s_collateDirName ||
2855  prepend == s_referenceDirName)
2856  {
2857  size_t slash = dirpart.find('/');
2858  // If we are reading reference, skip previous reference.
2859  if (slash == std::string::npos // skip if Reference is toplevel folder, i.e. no slash
2860  && slash+1+s_referenceDirName.size() == dirpart.size()
2861  && dirpart.compare(slash+1, s_referenceDirName.size(), s_referenceDirName) == 0)
2862  return 0;
2863 
2864  slash = dirpart.find('/');
2865  // Skip reading of EventInfo subdirectory.
2866  if (slash != std::string::npos
2867  && slash + 10 == dirpart.size()
2868  && dirpart.compare( slash+1 , 9 , "EventInfo") == 0) {
2869  if (verbose_)
2870  std::cout << "DQMStore::readDirectory: skipping '" << dirpart << "'\n";
2871  return 0;
2872  }
2873 
2874  // Add prefix.
2875  if (dirpart.empty())
2876  dirpart = prepend;
2877  else
2878  dirpart = prepend + '/' + dirpart;
2879  }
2880  else if (! prepend.empty())
2881  {
2882  if (dirpart.empty())
2883  dirpart = prepend;
2884  else
2885  dirpart = prepend + '/' + dirpart;
2886  }
2887 
2888  // Loop over the contents of this directory in the file.
2889  // Post-pone string object handling to happen after other
2890  // objects have been read in so we are guaranteed to have
2891  // histograms by the time we read in quality tests and tags.
2892  TKey *key;
2893  TIter next (gDirectory->GetListOfKeys());
2894  std::list<TObject *> delayed;
2895  while ((key = (TKey *) next()))
2896  {
2897  std::auto_ptr<TObject> obj(key->ReadObj());
2898  if (dynamic_cast<TDirectory *>(obj.get()))
2899  {
2900  std::string subdir;
2901  subdir.reserve(curdir.size() + strlen(obj->GetName()) + 2);
2902  subdir += curdir;
2903  if (! curdir.empty())
2904  subdir += '/';
2905  subdir += obj->GetName();
2906 
2907  ntot += readDirectory(file, overwrite, onlypath, prepend, subdir, stripdirs);
2908  }
2909  else if (skip)
2910  ;
2911  else if (dynamic_cast<TObjString *>(obj.get()))
2912  {
2913  delayed.push_back(obj.release());
2914  }
2915  else
2916  {
2917  if (verbose_ > 2)
2918  std::cout << "DQMStore: reading object '" << obj->GetName()
2919  << "' of type '" << obj->IsA()->GetName()
2920  << "' from '" << file->GetName()
2921  << "' into '" << dirpart << "'\n";
2922 
2923  makeDirectory(dirpart);
2924  if (extract(obj.get(), dirpart, overwrite, collateHistograms_))
2925  ++count;
2926  }
2927  }
2928 
2929  while (! delayed.empty())
2930  {
2931  if (verbose_ > 2)
2932  std::cout << "DQMStore: reading object '" << delayed.front()->GetName()
2933  << "' of type '" << delayed.front()->IsA()->GetName()
2934  << "' from '" << file->GetName()
2935  << "' into '" << dirpart << "'\n";
2936 
2937  makeDirectory(dirpart);
2938  if (extract(delayed.front(), dirpart, overwrite, collateHistograms_))
2939  ++count;
2940 
2941  delete delayed.front();
2942  delayed.pop_front();
2943  }
2944 
2945  if (verbose_ > 1)
2946  std::cout << "DQMStore: read " << count << '/' << ntot
2947  << " objects from directory '" << dirpart << "'\n";
2948 
2949  return ntot + count;
2950 }
static const std::string s_collateDirName
Definition: DQMStore.cc:55
static const std::string s_monitorDirName
name of global monitoring folder (containing all sources subdirectories)
Definition: DQMStore.cc:53
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
unsigned verbose_
Definition: DQMStore.h:695
static const std::string s_referenceDirName
Definition: DQMStore.cc:54
unsigned int readDirectory(TFile *file, bool overwrite, const std::string &path, const std::string &prepend, const std::string &curdir, OpenRunDirs stripdirs)
Definition: DQMStore.cc:2804
bool extract(TObject *obj, const std::string &dir, bool overwrite, bool collateHistograms)
Definition: DQMStore.cc:2134
tuple cout
Definition: gather_cfg.py:121
bool collateHistograms_
Definition: DQMStore.h:699
void makeDirectory(const std::string &path)
Definition: DQMStore.cc:731
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 3001 of file DQMStore.cc.

References gather_cfg::cout, data_, cppFunctionSkipper::exception, f, 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().

3007 {
3008 
3009  if (verbose_)
3010  std::cout << "DQMStore::readFile: reading from file '" << filename << "'\n";
3011 
3012  std::auto_ptr<TFile> f;
3013 
3014  try
3015  {
3016  f.reset(TFile::Open(filename.c_str()));
3017  if (! f.get() || f->IsZombie())
3018  raiseDQMError("DQMStore", "Failed to open file '%s'", filename.c_str());
3019  }
3020  catch (std::exception &)
3021  {
3022  if (fileMustExist)
3023  throw;
3024  else
3025  {
3026  if (verbose_)
3027  std::cout << "DQMStore::readFile: file '" << filename << "' does not exist, continuing\n";
3028  return false;
3029  }
3030  }
3031 
3032  unsigned n = readDirectory(f.get(), overwrite, onlypath, prepend, "", stripdirs);
3033  f->Close();
3034 
3035  MEMap::iterator mi = data_.begin();
3036  MEMap::iterator me = data_.end();
3037  for ( ; mi != me; ++mi)
3038  const_cast<MonitorElement &>(*mi).updateQReportStats();
3039 
3040  if (verbose_)
3041  {
3042  std::cout << "DQMStore::open: successfully read " << n
3043  << " objects from file '" << filename << "'";
3044  if (! onlypath.empty())
3045  std::cout << " from directory '" << onlypath << "'";
3046  if (! prepend.empty())
3047  std::cout << " into directory '" << prepend << "'";
3048  std::cout << std::endl;
3049  }
3050  return true;
3051 }
double f[11][100]
unsigned verbose_
Definition: DQMStore.h:695
MEMap data_
Definition: DQMStore.h:710
unsigned int readDirectory(TFile *file, bool overwrite, const std::string &path, const std::string &prepend, const std::string &curdir, OpenRunDirs stripdirs)
Definition: DQMStore.cc:2804
tuple filename
Definition: lut2db_cfg.py:20
tuple cout
Definition: gather_cfg.py:121
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 3085 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, NULL, getGTfromDQMFile::obj, open(), fed_dqm_sourceclient-live_cfg::path, raiseDQMError(), setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and verbose_.

Referenced by load().

3091 {
3092  using google::protobuf::io::FileInputStream;
3093  using google::protobuf::io::FileOutputStream;
3094  using google::protobuf::io::GzipInputStream;
3095  using google::protobuf::io::GzipOutputStream;
3096  using google::protobuf::io::CodedInputStream;
3097  using google::protobuf::io::ArrayInputStream;
3098 
3099  if (verbose_)
3100  std::cout << "DQMStore::readFile: reading from file '" << filename << "'\n";
3101 
3102  int filedescriptor;
3103  if ((filedescriptor = ::open(filename.c_str(), O_RDONLY)) == -1) {
3104  if (fileMustExist)
3105  raiseDQMError("DQMStore", "Failed to open file '%s'", filename.c_str());
3106  else
3107  if (verbose_)
3108  std::cout << "DQMStore::readFile: file '" << filename << "' does not exist, continuing\n";
3109  return false;
3110  }
3111 
3112  dqmstorepb::ROOTFilePB dqmstore_message;
3113  FileInputStream fin(filedescriptor);
3114  GzipInputStream input(&fin);
3115  CodedInputStream input_coded(&input);
3116  input_coded.SetTotalBytesLimit(1024*1024*1024, -1);
3117  if (!dqmstore_message.ParseFromCodedStream(&input_coded)) {
3118  raiseDQMError("DQMStore", "Fatal parsing file '%s'", filename.c_str());
3119  return false;
3120  }
3121  ::close(filedescriptor);
3122 
3123  for (int i = 0; i < dqmstore_message.histo_size(); i++) {
3124  std::string path;
3125  std::string objname;
3126 
3127  TObject *obj = NULL;
3128  const dqmstorepb::ROOTFilePB::Histo &h = dqmstore_message.histo(i);
3129  get_info(h, path, objname, &obj);
3130 
3131  setCurrentFolder(path);
3132  if (obj)
3133  {
3134  /* Before calling the extract() check if histogram exists:
3135  * if it does - flags for the given monitor are already set (and merged)
3136  * else - set the flags after the histogram is created.
3137  */
3138  MonitorElement *me = findObject(path, objname);
3139 
3140  /* Run histograms should be collated and not overwritten,
3141  * Lumi histograms should be overwritten (and collate flag is not checked)
3142  */
3143  bool overwrite = h.flags() & DQMNet::DQM_PROP_LUMI;
3144  bool collate = !(h.flags() & DQMNet::DQM_PROP_LUMI);
3145  extract(static_cast<TObject *>(obj), path, overwrite, collate);
3146 
3147  if (me == nullptr) {
3148  me = findObject(path, objname);
3149  me->data_.flags = h.flags();
3150  }
3151 
3152  delete obj;
3153  }
3154  }
3155 
3156  cd();
3157  return true;
3158 }
int i
Definition: DBlmapReader.cc:9
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:1878
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:684
uint32_t flags
Definition: DQMNet.h:98
#define NULL
Definition: scimark2.h:8
static std::string const input
Definition: EdmProvDump.cc:43
void get_info(const dqmstorepb::ROOTFilePB_Histo &, std::string &dirname, std::string &objname, TObject **obj)
Definition: DQMStore.cc:3064
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
DQMNet::CoreObject data_
const ::dqmstorepb::ROOTFilePB_Histo & histo(int index) const
unsigned verbose_
Definition: DQMStore.h:695
bool extract(TObject *obj, const std::string &dir, bool overwrite, bool collateHistograms)
Definition: DQMStore.cc:2134
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:2959
inline::google::protobuf::uint32 flags() const
tuple cout
Definition: gather_cfg.py:121
static const uint32_t DQM_PROP_LUMI
Definition: DQMNet.h:60
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:707
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 3200 of file DQMStore.cc.

References pwd_.

3201 {
3203 }
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
Definition: DQMStore.cc:3200
std::string pwd_
Definition: DQMStore.h:709
void DQMStore::removeContents ( const std::string &  dir)

remove all monitoring elements from directory;

Definition at line 3186 of file DQMStore.cc.

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

3187 {
3188  MonitorElement proto(&dir, std::string());
3189  MEMap::iterator e = data_.end();
3190  MEMap::iterator i = data_.lower_bound(proto);
3191  while (i != e && isSubdirectory(dir, *i->data_.dirname))
3192  if (dir == *i->data_.dirname)
3193  data_.erase(i++);
3194  else
3195  ++i;
3196 }
int i
Definition: DBlmapReader.cc:9
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
MEMap data_
Definition: DQMStore.h:710
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 3208 of file DQMStore.cc.

References pwd_.

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

3209 {
3211 }
void removeElement(const std::string &name)
Definition: DQMStore.cc:3208
std::string pwd_
Definition: DQMStore.h:709
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 3216 of file DQMStore.cc.

References gather_cfg::cout, and data_.

3217 {
3218  MonitorElement proto(&dir, name);
3219  MEMap::iterator pos = data_.find(proto);
3220  if (pos != data_.end())
3221  data_.erase(pos);
3222  else if (warning)
3223  std::cout << "DQMStore: WARNING: attempt to remove non-existent"
3224  << " monitor element '" << name << "' in '" << dir << "'\n";
3225 }
MEMap data_
Definition: DQMStore.h:710
tuple cout
Definition: gather_cfg.py:121
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 2046 of file DQMStore.cc.

References data_, MonitorElement::Reset(), reset_, MonitorElement::resetMe(), and MonitorElement::resetUpdate().

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

2047 {
2048  MEMap::iterator mi = data_.begin();
2049  MEMap::iterator me = data_.end();
2050  for ( ; mi != me; ++mi)
2051  {
2052  MonitorElement &me = const_cast<MonitorElement &>(*mi);
2053  if (mi->wasUpdated())
2054  {
2055  if (me.resetMe())
2056  me.Reset();
2057  me.resetUpdate();
2058  }
2059  }
2060 
2061  reset_ = true;
2062 }
void resetUpdate(void)
reset &quot;was updated&quot; flag
bool reset_
Definition: DQMStore.h:697
MEMap data_
Definition: DQMStore.h:710
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 3166 of file DQMStore.cc.

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

Referenced by dqmCopyRecursively().

3167 {
3169  const std::string *cleaned = 0;
3170  cleanTrailingSlashes(path, clean, cleaned);
3171  MonitorElement proto(cleaned, std::string());
3172 
3173  MEMap::iterator e = data_.end();
3174  MEMap::iterator i = data_.lower_bound(proto);
3175  while (i != e && isSubdirectory(*cleaned, *i->data_.dirname))
3176  data_.erase(i++);
3177 
3178  std::set<std::string>::iterator de = dirs_.end();
3179  std::set<std::string>::iterator di = dirs_.lower_bound(*cleaned);
3180  while (di != de && isSubdirectory(*cleaned, *di))
3181  dirs_.erase(di++);
3182 }
int i
Definition: DBlmapReader.cc:9
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:78
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
std::vector< T * > clean
Definition: MVATrainer.cc:156
MEMap data_
Definition: DQMStore.h:710
std::set< std::string > dirs_
Definition: DQMStore.h:711
void DQMStore::runQTests ( void  )

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

Definition at line 3318 of file DQMStore.cc.

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

3319 {
3320 
3321  if (verbose_ > 0)
3322  std::cout << "DQMStore: running runQTests() with reset = "
3323  << ( reset_ ? "true" : "false" ) << std::endl;
3324 
3325  // Apply quality tests to each monitor element, skipping references.
3326  MEMap::iterator mi = data_.begin();
3327  MEMap::iterator me = data_.end();
3328  for ( ; mi != me; ++mi)
3329  if (! isSubdirectory(s_referenceDirName, *mi->data_.dirname))
3330  const_cast<MonitorElement &>(*mi).runQTests();
3331 
3332  reset_ = false;
3333 }
void runQTests(void)
run all quality tests
bool reset_
Definition: DQMStore.h:697
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
unsigned verbose_
Definition: DQMStore.h:695
MEMap data_
Definition: DQMStore.h:710
static const std::string s_referenceDirName
Definition: DQMStore.cc:54
tuple cout
Definition: gather_cfg.py:121
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 2602 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, fed_dqm_sourceclient-live_cfg::path, raiseDQMError(), python.rootplot.root2matplotlib::replace(), HcalObjRepresent::Reset(), s_monitorDirName, s_referenceDirName, SaveWithoutReference, SaveWithReference, SaveWithReferenceForQTest, MonitorElement::setLumi(), ntuplemaker::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(), MonitorTrackResiduals::endJob(), SiStripLAProfileBooker::endJob(), dEdxAnalyzer::endJob(), TrackerHitAnalyzer::endJob(), StripValidationPlots::endJob(), TrackEfficiencyMonitor::endJob(), TrackSplittingMonitor::endJob(), APVValidationPlots::endJob(), LogMessageMonitor::endJob(), SiStripOfflineDQM::endJob(), MuonAlignment::endJob(), ValidationHcalIsoTrackAlCaReco::endJob(), SiStripMonitorQuality::endRun(), SiStripMonitorRawData::endRun(), SiStripMonitorPedestals::endRun(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::extractBadAPVSandStrips(), TkHistoMap::save(), DQMFileSaver::saveForFilterUnit(), DQMFileSaver::saveForOffline(), GlobalHitsProdHistStripper::~GlobalHitsProdHistStripper(), and SiPixelTrackingRecHitsValid::~SiPixelTrackingRecHitsValid().

2612 {
2613  std::lock_guard<std::mutex> guard(book_mutex_);
2614 
2615  std::set<std::string>::iterator di, de;
2616  MEMap::iterator mi, me = data_.end();
2617  DQMNet::QReports::const_iterator qi, qe;
2618  int nme=0;
2619 
2620  // TFile flushes to disk with fsync() on every TDirectory written to
2621  // the file. This makes DQM file saving painfully slow, and
2622  // ironically makes it _more_ likely the file saving gets
2623  // interrupted and corrupts the file. The utility class below
2624  // simply ignores the flush synchronisation.
2625  class TFileNoSync : public TFile
2626  {
2627  public:
2628  TFileNoSync(const char *file, const char *opt) : TFile(file, opt) {}
2629  virtual Int_t SysSync(Int_t) override { return 0; }
2630  };
2631 
2632  // open output file, on 1st save recreate, later update
2633  if (verbose_)
2634  std::cout << "\n DQMStore: Opening TFile '" << filename
2635  << "' with option '" << fileupdate <<"'\n";
2636 
2637  TFileNoSync f(filename.c_str(), fileupdate.c_str()); // open file
2638  if(f.IsZombie())
2639  raiseDQMError("DQMStore", "Failed to create/update file '%s'", filename.c_str());
2640  f.cd();
2641 
2642  // Construct a regular expression from the pattern string.
2643  std::auto_ptr<lat::Regexp> rxpat;
2644  if (! pattern.empty())
2645  rxpat.reset(new lat::Regexp(pattern.c_str()));
2646 
2647  // Prepare a path for the reference object selection.
2648  std::string refpath;
2649  refpath.reserve(s_referenceDirName.size() + path.size() + 2);
2650  refpath += s_referenceDirName;
2651  if (! path.empty())
2652  {
2653  refpath += '/';
2654  refpath += path;
2655  }
2656 
2657  // Loop over the directory structure.
2658  for (di = dirs_.begin(), de = dirs_.end(); di != de; ++di)
2659  {
2660  // Check if we should process this directory. We process the
2661  // requested part of the object tree, including references.
2662  if (! path.empty()
2663  && ! isSubdirectory(path, *di)
2664  && ! isSubdirectory(refpath, *di))
2665  continue;
2666 
2667  // Loop over monitor elements in this directory.
2668  MonitorElement proto(&*di, std::string(), run, 0, 0);
2669  if (enableMultiThread_)
2670  proto.setLumi(lumi);
2671 
2672  mi = data_.lower_bound(proto);
2673  for ( ; mi != me && isSubdirectory(*di, *mi->data_.dirname); ++mi)
2674  {
2675  if (verbose_ > 1)
2676  std::cout << "DQMStore::save: Run: " << (*mi).run()
2677  << " Lumi: " << (*mi).lumi()
2678  << " LumiFlag: " << (*mi).getLumiFlag()
2679  << " streamId: " << (*mi).streamId()
2680  << " moduleId: " << (*mi).moduleId()
2681  << " fullpathname: " << (*mi).getFullname() << std::endl;
2682 
2683  // Upper bound in the loop over the MEs
2684  if (enableMultiThread_ && ((*mi).lumi() != lumi))
2685  break;
2686 
2687  // Skip if it isn't a direct child.
2688  if (*di != *mi->data_.dirname) {
2689  if (verbose_ > 1)
2690  std::cout << "DQMStore::save: isn't a direct child. Skipping" << std::endl;
2691  continue;
2692  }
2693 
2694  // Keep backward compatibility with the old way of
2695  // booking/handlind MonitorElements into the DQMStore. If run is
2696  // 0 it means that a booking happened w/ the old non-threadsafe
2697  // style, and we have to ignore the streamId and moduleId as a
2698  // consequence.
2699 
2700  if (run != 0 && (mi->data_.streamId !=0 || mi->data_.moduleId !=0)) {
2701  continue;
2702  }
2703 
2704  // Handle reference histograms, with three distinct cases:
2705  // 1) Skip all references entirely on saving.
2706  // 2) Blanket saving of all references.
2707  // 3) Save only references for monitor elements with qtests.
2708  // The latter two are affected by "path" sub-tree selection,
2709  // i.e. references are saved only in the selected tree part.
2710  if (isSubdirectory(refpath, *mi->data_.dirname))
2711  {
2712  if (ref == SaveWithoutReference)
2713  // Skip the reference entirely.
2714  continue;
2715  else if (ref == SaveWithReference)
2716  // Save all references regardless of qtests.
2717  ;
2718  else if (ref == SaveWithReferenceForQTest)
2719  {
2720  // Save only references for monitor elements with qtests
2721  // with an optional cut on minimum quality test result.
2722  int status = -1;
2723  std::string mname(mi->getFullname(), s_referenceDirName.size()+1, std::string::npos);
2724  MonitorElement *master = get(mname);
2725  if (master)
2726  for (size_t i = 0, e = master->data_.qreports.size(); i != e; ++i)
2727  status = std::max(status, master->data_.qreports[i].code);
2728 
2729  if (! master || status < minStatus)
2730  {
2731  if (verbose_ > 1)
2732  std::cout << "DQMStore::save: skipping monitor element '"
2733  << mi->data_.objname << "' while saving, status is "
2734  << status << ", required minimum status is "
2735  << minStatus << std::endl;
2736  continue;
2737  }
2738  }
2739  }
2740 
2741  if (verbose_ > 1)
2742  std::cout << "DQMStore::save: saving monitor element '"
2743  << mi->data_.objname << "'\n";
2744  nme++; // count saved histograms
2745 
2746  // Create the directory.
2747  gDirectory->cd("/");
2748  if (di->empty())
2750  else if (rxpat.get())
2751  cdInto(s_monitorDirName + '/' + lat::StringOps::replace(*di, *rxpat, rewrite));
2752  else
2753  cdInto(s_monitorDirName + '/' + *di);
2754 
2755  // Save the object.
2756  switch (mi->kind())
2757  {
2761  TObjString(mi->tagString().c_str()).Write();
2762  break;
2763 
2764  default:
2765  mi->object_->Write();
2766  break;
2767  }
2768 
2769  // Save quality reports if this is not in reference section.
2770  if (! isSubdirectory(s_referenceDirName, *mi->data_.dirname))
2771  {
2772  qi = mi->data_.qreports.begin();
2773  qe = mi->data_.qreports.end();
2774  for ( ; qi != qe; ++qi)
2775  TObjString(mi->qualityTagString(*qi).c_str()).Write();
2776  }
2777 
2778  // Save efficiency tag, if any
2779  if (mi->data_.flags & DQMNet::DQM_PROP_EFFICIENCY_PLOT)
2780  TObjString(mi->effLabelString().c_str()).Write();
2781 
2782  // Save tag if any
2783  if (mi->data_.flags & DQMNet::DQM_PROP_TAGGED)
2784  TObjString(mi->tagLabelString().c_str()).Write();
2785 
2786  //reset the ME just written to make it available for the next LS (online)
2787  if (resetMEsAfterWriting)
2788  const_cast<MonitorElement*>(&*mi)->Reset();
2789  }
2790  }
2791 
2792  f.Close();
2793 
2794  // Maybe make some noise.
2795  if (verbose_)
2796  std::cout << "DQMStore::save: successfully wrote " << nme
2797  << " objects from path '" << path
2798  << "' into DQM file '" << filename << "'\n";
2799 }
int i
Definition: DBlmapReader.cc:9
bool cdInto(const std::string &path) const
Definition: DQMStore.cc:2430
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:53
std::mutex book_mutex_
Definition: DQMStore.h:717
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
double f[11][100]
unsigned verbose_
Definition: DQMStore.h:695
MEMap data_
Definition: DQMStore.h:710
static const std::string s_referenceDirName
Definition: DQMStore.cc:54
tuple filename
Definition: lut2db_cfg.py:20
tuple cout
Definition: gather_cfg.py:121
void Reset(std::vector< TH2F > &depth)
tuple status
Definition: ntuplemaker.py:245
std::set< std::string > dirs_
Definition: DQMStore.h:711
bool enableMultiThread_
Definition: DQMStore.h:700
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 2472 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, 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().

2477 {
2478  using google::protobuf::io::FileOutputStream;
2479  using google::protobuf::io::GzipOutputStream;
2480  using google::protobuf::io::StringOutputStream;
2481 
2482  std::lock_guard<std::mutex> guard(book_mutex_);
2483 
2484  std::set<std::string>::iterator di, de;
2485  MEMap::iterator mi, me = data_.end();
2486  dqmstorepb::ROOTFilePB dqmstore_message;
2487  int nme = 0;
2488 
2489  if (verbose_)
2490  std::cout << "\n DQMStore: Opening PBFile '"
2491  << filename << "'"<< std::endl;
2492 
2493  // Loop over the directory structure.
2494  for (di = dirs_.begin(), de = dirs_.end(); di != de; ++di)
2495  {
2496  // Check if we should process this directory. We process the
2497  // requested part of the object tree, including references.
2498  if (! path.empty()
2499  && ! isSubdirectory(path, *di))
2500  continue;
2501 
2502  // Loop over monitor elements in this directory.
2503  MonitorElement proto(&*di, std::string(), run, 0, 0);
2504  if (enableMultiThread_)
2505  proto.setLumi(lumi);
2506 
2507  mi = data_.lower_bound(proto);
2508  for ( ; mi != me && isSubdirectory(*di, *mi->data_.dirname); ++mi)
2509  {
2510  if (verbose_ > 1)
2511  std::cout << "Run: " << (*mi).run()
2512  << " Lumi: " << (*mi).lumi()
2513  << " LumiFlag: " << (*mi).getLumiFlag()
2514  << " streamId: " << (*mi).streamId()
2515  << " moduleId: " << (*mi).moduleId()
2516  << " fullpathname: " << (*mi).getFullname() << std::endl;
2517 
2518  // Upper bound in the loop over the MEs
2519  if (enableMultiThread_ && ((*mi).lumi() != lumi))
2520  break;
2521 
2522  // Skip if it isn't a direct child.
2523  if (*di != *mi->data_.dirname)
2524  continue;
2525 
2526  // Keep backward compatibility with the old way of
2527  // booking/handlind MonitorElements into the DQMStore. If run is
2528  // 0 it means that a booking happened w/ the old non-threadsafe
2529  // style, and we have to ignore the streamId and moduleId as a
2530  // consequence.
2531 
2532  if (run != 0 && (mi->data_.streamId !=0 || mi->data_.moduleId !=0))
2533  continue;
2534 
2535  if (verbose_ > 1)
2536  std::cout << "DQMStore::savePB: saving monitor element '"
2537  << *mi->data_.dirname << "/" << mi->data_.objname << "'"
2538  << "flags " << mi->data_.flags << "\n";
2539 
2540  nme++;
2541  dqmstorepb::ROOTFilePB::Histo* me = dqmstore_message.add_histo();
2542  me->set_full_pathname((*mi->data_.dirname) + '/' + mi->data_.objname);
2543  me->set_flags(mi->data_.flags);
2544 
2545  TObject *toWrite = nullptr;
2546  bool deleteObject = false;
2547 
2548  if (mi->kind() < MonitorElement::DQM_KIND_TH1F) {
2549  toWrite = new TObjString(mi->tagString().c_str());
2550  deleteObject = true;
2551  } else {
2552  toWrite = mi->object_;
2553  }
2554 
2555  TBufferFile buffer(TBufferFile::kWrite);
2556  buffer.WriteObject(toWrite);
2557  me->set_size(buffer.Length());
2558  me->set_streamed_histo((const void*)buffer.Buffer(),
2559  buffer.Length());
2560 
2561  if (deleteObject) {
2562  delete toWrite;
2563  }
2564 
2565  //reset the ME just written to make it available for the next LS (online)
2566  if (resetMEsAfterWriting)
2567  const_cast<MonitorElement*>(&*mi)->Reset();
2568  }
2569  }
2570 
2571  int filedescriptor = ::open(filename.c_str(),
2572  O_WRONLY | O_CREAT | O_TRUNC,
2573  S_IRUSR | S_IWUSR |
2574  S_IRGRP | S_IWGRP |
2575  S_IROTH);
2576  FileOutputStream file_stream(filedescriptor);
2578  options.format = GzipOutputStream::GZIP;
2579  options.compression_level = 6;
2580  GzipOutputStream gzip_stream(&file_stream,
2581  options);
2582  dqmstore_message.SerializeToZeroCopyStream(&gzip_stream);
2583 
2584  // we need to flush it before we close the fd
2585  gzip_stream.Close();
2586  file_stream.Close();
2587  ::close(filedescriptor);
2588 
2589  // Maybe make some noise.
2590  if (verbose_)
2591  std::cout << "DQMStore::savePB: successfully wrote " << nme
2592  << " objects from path '" << path
2593  << "' into DQM file '" << filename << "'\n";
2594 }
tuple lumi
Definition: fjr2json.py:35
void set_flags(::google::protobuf::uint32 value)
std::mutex book_mutex_
Definition: DQMStore.h:717
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
unsigned verbose_
Definition: DQMStore.h:695
void set_size(::google::protobuf::uint32 value)
MEMap data_
Definition: DQMStore.h:710
void set_full_pathname(const ::std::string &value)
std::vector< boost::shared_ptr< fireworks::OptionNode > > Options
inline::dqmstorepb::ROOTFilePB_Histo * add_histo()
tuple filename
Definition: lut2db_cfg.py:20
bool open(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
Definition: DQMStore.cc:2959
tuple cout
Definition: gather_cfg.py:121
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:711
bool enableMultiThread_
Definition: DQMStore.h:700
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 3434 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, 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(), scaleFlag_, and verbose_.

3435 {
3436  if (scaleFlag_ == 0.0) return;
3437  if (verbose_ > 0)
3438  std::cout << " =========== " << " ScaleFlag " << scaleFlag_ << std::endl;
3439  double factor = scaleFlag_;
3440  int events = 1;
3441  if (dirExists("Info/EventInfo")) {
3442  if ( scaleFlag_ == -1.0) {
3443  MonitorElement * scale_me = get("Info/EventInfo/ScaleFactor");
3444  if (scale_me && scale_me->kind()==MonitorElement::DQM_KIND_REAL) factor = scale_me->getFloatValue();
3445  }
3446  MonitorElement * event_me = get("Info/EventInfo/processedEvents");
3447  if (event_me && event_me->kind()==MonitorElement::DQM_KIND_INT) events = event_me->getIntValue();
3448  }
3449  factor = factor/(events*1.0);
3450 
3451  MEMap::iterator mi = data_.begin();
3452  MEMap::iterator me = data_.end();
3453  for ( ; mi != me; ++mi)
3454  {
3455  MonitorElement &me = const_cast<MonitorElement &>(*mi);
3456  switch (me.kind())
3457  {
3459  {
3460  me.getTH1F()->Scale(factor);
3461  break;
3462  }
3464  {
3465  me.getTH1S()->Scale(factor);
3466  break;
3467  }
3469  {
3470  me.getTH1D()->Scale(factor);
3471  break;
3472  }
3474  {
3475  me.getTH2F()->Scale(factor);
3476  break;
3477  }
3479  {
3480  me.getTH2S()->Scale(factor);
3481  break;
3482  }
3484  {
3485  me.getTH2D()->Scale(factor);
3486  break;
3487  }
3489  {
3490  me.getTH3F()->Scale(factor);
3491  break;
3492  }
3494  {
3495  me.getTProfile()->Scale(factor);
3496  break;
3497  }
3499  {
3500  me.getTProfile2D()->Scale(factor);
3501  break;
3502  }
3503  default:
3504  if (verbose_ > 0)
3505  std::cout << " The DQM object '" << me.getFullname() << "' is not scalable object " << std::endl;
3506  continue;
3507  }
3508  }
3509 }
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:698
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:772
unsigned verbose_
Definition: DQMStore.h:695
MEMap data_
Definition: DQMStore.h:710
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:121
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 3387 of file DQMStore.cc.

References MonitorElement::setAccumulate().

3388 {
3389  if (me)
3390  me->setAccumulate(flag);
3391 }
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 707 of file DQMStore.cc.

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

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

708 {
710  const std::string *cleaned = 0;
711  cleanTrailingSlashes(fullpath, clean, cleaned);
712  makeDirectory(*cleaned);
713  pwd_ = *cleaned;
714 }
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:78
std::string pwd_
Definition: DQMStore.h:709
std::vector< T * > clean
Definition: MVATrainer.cc:156
void makeDirectory(const std::string &path)
Definition: DQMStore.cc:731
void DQMStore::setVerbose ( unsigned  level)

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

Definition at line 671 of file DQMStore.cc.

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

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

Definition at line 3397 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(), TrackSplittingMonitor::endJob(), LogMessageMonitor::endJob(), HLTScalersClient::endLuminosityBlock(), TauDQMFileLoader::endRun(), GlobalHitsProdHistStripper::GlobalHitsProdHistStripper(), and LaserDQM::initMonitors().

3398 {
3399  std::vector<std::string> contents;
3400  getContents(contents);
3401 
3402  std::cout << " ------------------------------------------------------------\n"
3403  << " Directory structure: \n"
3404  << " ------------------------------------------------------------\n";
3405 
3406  std::copy(contents.begin(), contents.end(),
3407  std::ostream_iterator<std::string>(std::cout, "\n"));
3408 
3409  std::cout << " ------------------------------------------------------------\n";
3410 }
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1777
tuple cout
Definition: gather_cfg.py:121
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 3370 of file DQMStore.cc.

References MonitorElement::softReset().

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

3371 {
3372  if (me)
3373  me->softReset();
3374 }
void softReset(void)
void DQMStore::tag ( MonitorElement me,
unsigned int  myTag 
)

tag ME as <myTag> (myTag > 0)

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

1635 {
1636  if (! myTag)
1637  raiseDQMError("DQMStore", "Attempt to tag monitor element '%s'"
1638  " with a zero tag", me->getFullname().c_str());
1639  if ((me->data_.flags & DQMNet::DQM_PROP_TAGGED) && myTag != me->data_.tag)
1640  raiseDQMError("DQMStore", "Attempt to tag monitor element '%s'"
1641  " twice with multiple tags", me->getFullname().c_str());
1642 
1643  me->data_.tag = myTag;
1645 }
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 1649 of file DQMStore.cc.

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

Referenced by Inspector.Inspector::SetTag().

1650 {
1651  std::string dir;
1652  std::string name;
1653  splitPath(dir, name, path);
1654 
1655  if (MonitorElement *me = findObject(dir, name))
1656  tag(me, myTag);
1657  else
1658  raiseDQMError("DQMStore", "Attempt to tag non-existent monitor element"
1659  " '%s' with tag %u", path.c_str(), myTag);
1660 
1661 }
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:1878
static void splitPath(std::string &dir, std::string &name, const std::string &path)
Definition: DQMStore.cc:95
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1634
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 1677 of file DQMStore.cc.

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

1678 {
1680  const std::string *cleaned = 0;
1681  cleanTrailingSlashes(path, clean, cleaned);
1682  MonitorElement proto(cleaned, std::string());
1683 
1684  // FIXME: WILDCARDS? Old one supported them, but nobody seemed to use them.
1685  MEMap::iterator e = data_.end();
1686  MEMap::iterator i = data_.lower_bound(proto);
1687  while (i != e && isSubdirectory(*cleaned, *i->data_.dirname))
1688  {
1689  tag(const_cast<MonitorElement *>(&*i), myTag);
1690  ++i;
1691  }
1692 }
int i
Definition: DBlmapReader.cc:9
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:78
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1634
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
std::vector< T * > clean
Definition: MVATrainer.cc:156
MEMap data_
Definition: DQMStore.h:710
void DQMStore::tagContents ( const std::string &  path,
unsigned int  myTag 
)

tag all children of folder (does NOT include subfolders)

Definition at line 1665 of file DQMStore.cc.

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

1666 {
1667  MonitorElement proto(&path, std::string());
1668  MEMap::iterator e = data_.end();
1669  MEMap::iterator i = data_.lower_bound(proto);
1670  for ( ; i != e && path == *i->data_.dirname; ++i)
1671  tag(const_cast<MonitorElement *>(&*i), myTag);
1672 }
int i
Definition: DBlmapReader.cc:9
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1634
MEMap data_
Definition: DQMStore.h:710
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 3265 of file DQMStore.cc.

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

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

3266 {
3267  // Clean the path
3269  const std::string *cleaned = 0;
3270  cleanTrailingSlashes(dir, clean, cleaned);
3271 
3272  // Validate the path.
3273  if (cleaned->find_first_not_of(s_safe) != std::string::npos)
3274  raiseDQMError("DQMStore", "Monitor element path name '%s'"
3275  " uses unacceptable characters", cleaned->c_str());
3276 
3277  // Redirect to the pattern match version.
3278  useQTestByMatch(*cleaned + "/*", qtname);
3279 }
static const std::string s_safe
Definition: DQMStore.cc:56
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:78
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:3283
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 3283 of file DQMStore.cc.

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

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

3284 {
3285  QCriterion *qc = getQCriterion(qtname);
3286  if (! qc)
3287  raiseDQMError("DQMStore", "Cannot apply non-existent quality test '%s'",
3288  qtname.c_str());
3289 
3290  fastmatch * fm = new fastmatch( pattern );
3291 
3292  // Record the test for future reference.
3293  QTestSpec qts(fm, qc);
3294  qtestspecs_.push_back(qts);
3295 
3296  // Apply the quality test.
3297  MEMap::iterator mi = data_.begin();
3298  MEMap::iterator me = data_.end();
3299  std::string path;
3300  int cases = 0;
3301  for ( ; mi != me; ++mi)
3302  {
3303  path.clear();
3304  mergePath(path, *mi->data_.dirname, mi->data_.objname);
3305  if (fm->match(path))
3306  {
3307  ++cases;
3308  const_cast<MonitorElement &>(*mi).addQReport(qts.second);
3309  }
3310  }
3311 
3312  //return the number of matched cases
3313  return cases;
3314 }
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:3233
std::pair< fastmatch *, QCriterion * > QTestSpec
Definition: DQMStore.h:689
static void mergePath(std::string &path, const std::string &dir, const std::string &name)
Definition: DQMStore.cc:108
QTestSpecs qtestspecs_
Definition: DQMStore.h:715
MEMap data_
Definition: DQMStore.h:710
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 724 of file DQMStore.h.

friend class DQMFileSaver
friend

Definition at line 728 of file DQMStore.h.

friend class DQMNet
friend

Definition at line 723 of file DQMStore.h.

friend class DQMRootOutputModule
friend

Definition at line 726 of file DQMStore.h.

friend class DQMRootSource
friend

Definition at line 727 of file DQMStore.h.

friend class DQMService
friend

Definition at line 722 of file DQMStore.h.

friend class DQMStoreExample
friend

Definition at line 725 of file DQMStore.h.

friend class edm::DQMHttpSource
friend

Definition at line 721 of file DQMStore.h.

friend class MEtoEDMConverter
friend

Definition at line 729 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 702 of file DQMStore.h.

Referenced by DQMStore(), and forceReset().

IBooker* DQMStore::ibooker_
private

Definition at line 718 of file DQMStore.h.

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

IGetter* DQMStore::igetter_
private

Definition at line 719 of file DQMStore.h.

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

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

Definition at line 706 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 714 of file DQMStore.h.

Referenced by createQTest(), and initializeFrom().

DQMStore::qtests_
private

All the quality tests.

Definition at line 713 of file DQMStore.h.

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

QTestSpecs DQMStore::qtestspecs_
private

Definition at line 715 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 703 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 697 of file DQMStore.h.

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

uint32_t DQMStore::run_
private

Definition at line 704 of file DQMStore.h.

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

double DQMStore::scaleFlag_
private

Definition at line 698 of file DQMStore.h.

Referenced by initializeFrom(), and scaleElements().

std::ofstream* DQMStore::stream_
private

Definition at line 707 of file DQMStore.h.

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

uint32_t DQMStore::streamId_
private

Definition at line 705 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 696 of file DQMStore.h.

Referenced by createQTest(), and initializeFrom().