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)
 
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)
 
void markForDeletion (uint32_t run, uint32_t lumi)
 
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 495 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().

496  : verbose_ (1),
497  verboseQT_ (1),
498  reset_ (false),
499  collateHistograms_ (false),
500  enableMultiThread_(false),
501  forceResetOnBeginLumi_(false),
503  run_(0),
504  streamId_(0),
505  moduleId_(0),
506  stream_(nullptr),
507  pwd_ (""),
508  ibooker_(0),
509  igetter_(0)
510 {
511  if (!ibooker_)
512  ibooker_ = new DQMStore::IBooker(this);
513  if (!igetter_)
514  igetter_ = new DQMStore::IGetter(this);
515  initializeFrom(pset);
516 
517  if(pset.getUntrackedParameter<bool>("forceResetOnBeginRun",false)) {
519  }
520  ar.preallocateSignal_.connect([this](edm::service::SystemBounds const& iBounds) {
521  if(iBounds.maxNumberOfStreams() > 1 ) {
522  enableMultiThread_ = true;
523  }
524  });
525  if(pset.getUntrackedParameter<bool>("forceResetOnBeginLumi",false) && enableMultiThread_ == false) {
526  forceResetOnBeginLumi_ = true;
528  }
529 }
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:567
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:2082
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 531 of file DQMStore.cc.

References ibooker_, igetter_, and initializeFrom().

532  : verbose_ (1),
533  verboseQT_ (1),
534  reset_ (false),
535  collateHistograms_ (false),
536  enableMultiThread_(false),
538  run_(0),
539  streamId_(0),
540  moduleId_(0),
541  stream_(nullptr),
542  pwd_ (""),
543  ibooker_(0),
544  igetter_(0)
545 {
546  if (!ibooker_)
547  ibooker_ = new DQMStore::IBooker(this);
548  if (!igetter_)
549  igetter_ = new DQMStore::IGetter(this);
550  initializeFrom(pset);
551 }
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:567
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 553 of file DQMStore.cc.

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

554 {
555  for (QCMap::iterator i = qtests_.begin(), e = qtests_.end(); i != e; ++i)
556  delete i->second;
557 
558  for (QTestSpecs::iterator i = qtestspecs_.begin(), e = qtestspecs_.end(); i != e; ++i)
559  delete i->first;
560 
561  if (stream_)
562  stream_->close();
563  delete stream_;
564 }
int i
Definition: DBlmapReader.cc:9
QCMap qtests_
Definition: DQMStore.h:713
QTestSpecs qtestspecs_
Definition: DQMStore.h:715
std::ofstream * stream_
Definition: DQMStore.h:707
if(conf.exists("allCellsPositionCalc"))
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 861 of file DQMStore.cc.

References assert(), gather_cfg::cout, data_, dirs_, findObject(), mergePath(), moduleId_, eostools::move(), mergeVDriftHistosByStation::name, cmsHarvester::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().

864 {
865  assert(name.find('/') == std::string::npos);
866  if (verbose_ > 3)
867  print_trace(dir, name);
868 
869  // Check if the request monitor element already exists.
871  {
872  if (verbose_ > 1)
873  {
875  mergePath(path, dir, name);
876 
877  std::cout << "DQMStore: "
878  << context << ": monitor element '"
879  << path << "' already exists, resetting" << std::endl;
880  }
881  me->Reset();
882  return me;
883  }
884  else
885  {
886  // Create it and return for initialisation.
887  assert(dirs_.count(dir));
888  MonitorElement proto(&*dirs_.find(dir), name, run_, streamId_, moduleId_);
889  return &const_cast<MonitorElement &>(*data_.insert(std::move(proto)).first);
890  }
891 }
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:1890
uint32_t streamId_
Definition: DQMStore.h:705
assert(m_qm.get())
uint32_t moduleId_
Definition: DQMStore.h:706
tuple path
else: Piece not in the list, fine.
def move
Definition: eostools.py:508
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:627
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 792 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, cmsHarvester::path, print_trace(), qtestspecs_, MonitorElement::Reset(), run_, s_referenceDirName, streamId_, AlCaHLTBitMon_QueryRunRegistry::string, and verbose_.

795 {
796  assert(name.find('/') == std::string::npos);
797  if (verbose_ > 3)
798  print_trace(dir, name);
800  mergePath(path, dir, name);
801 
802  // Put us in charge of h.
803  h->SetDirectory(0);
804 
805  // Check if the request monitor element already exists.
807  if (me)
808  {
809  if (collateHistograms_)
810  {
811  collate(me, h, verbose_);
812  delete h;
813  return me;
814  }
815  else
816  {
817  if (verbose_ > 1)
818  std::cout << "DQMStore: "
819  << context << ": monitor element '"
820  << path << "' already exists, collating" << std::endl;
821  me->Reset();
822  collate(me, h, verbose_);
823  delete h;
824  return me;
825  }
826  }
827  else
828  {
829  // Create and initialise core object.
830  assert(dirs_.count(dir));
831  MonitorElement proto(&*dirs_.find(dir), name, run_, streamId_, moduleId_);
832  me = const_cast<MonitorElement &>(*data_.insert(std::move(proto)).first)
834 
835  // Initialise quality test information.
836  QTestSpecs::iterator qi = qtestspecs_.begin();
837  QTestSpecs::iterator qe = qtestspecs_.end();
838  for ( ; qi != qe; ++qi)
839  {
840  if ( qi->first->match(path) )
841  me->addQReport(qi->second);
842  }
843 
844  // Assign reference if we have one.
845  std::string refdir;
846  refdir.reserve(s_referenceDirName.size() + dir.size() + 2);
847  refdir += s_referenceDirName;
848  refdir += '/';
849  refdir += dir;
850 
851  if (findObject(refdir, name))
852  {
853  me->data_.flags |= DQMNet::DQM_PROP_HAS_REFERENCE;
854  }
855  // Return the monitor element.
856  return me;
857  }
858 }
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:1890
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
tuple path
else: Piece not in the list, fine.
def move
Definition: eostools.py:508
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:627
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 1006 of file DQMStore.cc.

References pwd_.

Referenced by DQMFEDIntegrityClient::beginJob(), EgammaBasicClusters::beginJob(), EgammaSuperClusters::beginJob(), ConverterTester::beginJob(), SimplePhotonAnalyzer::beginJob(), StripValidationPlots::beginJob(), APVValidationPlots::beginJob(), MuonAlignment::beginJob(), ValidationHcalIsoTrackAlCaReco::beginJob(), MCEmbeddingValidationAnalyzer::beginJob(), RPCBxTest::beginRun(), DQMProvInfo::beginRun(), MuonAlignmentSummary::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(), EgHLTOfflineClient::FillHLTvsOfflineHist(), SiStripSummaryCreator::getSummaryME(), HEff1DHit::HEff1DHit(), HEff2DHit::HEff2DHit(), HEff4DHit::HEff4DHit(), HLTScalersClient::HLTScalersClient(), HRes1DHit::HRes1DHit(), HRes2DHit::HRes2DHit(), HRes4DHit::HRes4DHit(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::initializeDQMHistograms(), LaserDQM::initMonitors(), L1ScalersClient::L1ScalersClient(), EgHLTOfflineClient::makeEffMonElem2Leg(), EgHLTOfflineClient::makeEffMonElemFromPassAndAll(), EgHLTOfflineClient::makeEffMonElemFromPassAndFail(), EgHLTOfflineClient::makeEffMonElemFromPassAndFailAndTagTag(), and MonitorElementsDb::MonitorElementsDb().

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

References book1D(), and pwd_.

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

References book1D(), and pwd_.

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

References book1D(), and pwd_.

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

References book1D(), and pwd_.

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

References book1D(), and pwd_.

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

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

986 {
987  return book(dir, name, "book1D", MonitorElement::DQM_KIND_TH1F, h, collate1D);
988 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:861
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:1573
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 1038 of file DQMStore.cc.

References pwd_.

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

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

References book1DD(), and pwd_.

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

References book1DD(), and pwd_.

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

References book1DD(), and pwd_.

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

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

1000 {
1001  return book(dir, name, "book1DD", MonitorElement::DQM_KIND_TH1D, h, collate1DD);
1002 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:861
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:1587
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 1022 of file DQMStore.cc.

References pwd_.

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

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

Book 1S histogram.

Definition at line 1030 of file DQMStore.cc.

References book1S(), and pwd_.

1032 {
1033  return book1S(pwd_, name, new TH1S(name.c_str(), title.c_str(), nchX, lowX, highX));
1034 }
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:1022
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 1084 of file DQMStore.cc.

References book1S(), and pwd_.

1085 {
1086  return book1S(pwd_, name, static_cast<TH1S *>(source->Clone(name)));
1087 }
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:1022
MonitorElement * DQMStore::book1S ( const std::string &  name,
TH1S *  h 
)

Book 1S histogram by cloning an existing histogram.

Definition at line 1091 of file DQMStore.cc.

References book1S(), and pwd_.

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

Book 1D histogram based on TH1S.

Definition at line 992 of file DQMStore.cc.

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

993 {
994  return book(dir, name, "book1S", MonitorElement::DQM_KIND_TH1S, h, collate1S);
995 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:861
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:1580
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 
)

Book 2D histogram.

Definition at line 1134 of file DQMStore.cc.

References pwd_.

Referenced by DQMFEDIntegrityClient::beginJob(), EgammaBasicClusters::beginJob(), EgammaSuperClusters::beginJob(), ConverterTester::beginJob(), APVValidationPlots::beginJob(), StripValidationPlots::beginJob(), HcalDCSInfo::beginJob(), MuonAlignment::beginJob(), ValidationHcalIsoTrackAlCaReco::beginJob(), MCEmbeddingValidationAnalyzer::beginJob(), DQMProvInfo::beginRun(), ZDCMonitorClient::beginRun(), MuonAlignmentSummary::beginRun(), DQMStore::IBooker::book2D(), book2D(), MCEmbeddingValidationAnalyzer::plotEntryTypeL1ETM::bookHistograms(), SiStripCertificationInfo::bookSiStripCertificationMEs(), SiStripQualityChecker::bookStatus(), dqmRegisterHistogram(), DQMDcsInfoClient::endRun(), extract(), EgHLTOfflineSummaryClient::getEgHLTSumHist_(), HRes1DHit::HRes1DHit(), HRes2DHit::HRes2DHit(), HRes4DHit::HRes4DHit(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::initializeDQMHistograms(), L1ScalersClient::L1ScalersClient(), and MonitorElementsDb::MonitorElementsDb().

1137 {
1138  return book2D(pwd_, name, new TH2F(name, title,
1139  nchX, lowX, highX,
1140  nchY, lowY, highY));
1141 }
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:1134
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 1145 of file DQMStore.cc.

References book2D(), and pwd_.

1148 {
1149  return book2D(pwd_, name, new TH2F(name.c_str(), title.c_str(),
1150  nchX, lowX, highX,
1151  nchY, lowY, highY));
1152 }
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:1134
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 1200 of file DQMStore.cc.

References book2D(), and pwd_.

1202 {
1203  return book2D(pwd_, name, new TH2F(name, title,
1204  nchX, xbinsize, nchY, ybinsize));
1205 }
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:1134
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 1209 of file DQMStore.cc.

References book2D(), and pwd_.

1211 {
1212  return book2D(pwd_, name, new TH2F(name.c_str(), title.c_str(),
1213  nchX, xbinsize, nchY, ybinsize));
1214 }
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:1134
MonitorElement * DQMStore::book2D ( const char *  name,
TH2F *  h 
)

Book 2D histogram by cloning an existing histogram.

Definition at line 1218 of file DQMStore.cc.

References book2D(), and pwd_.

1219 {
1220  return book2D(pwd_, name, static_cast<TH2F *>(source->Clone(name)));
1221 }
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:1134
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 1225 of file DQMStore.cc.

References book2D(), and pwd_.

1226 {
1227  return book2D(pwd_, name, static_cast<TH2F *>(source->Clone(name.c_str())));
1228 }
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:1134
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 1113 of file DQMStore.cc.

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

1114 {
1115  return book(dir, name, "book2D", MonitorElement::DQM_KIND_TH2F, h, collate2D);
1116 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:861
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:1594
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 1178 of file DQMStore.cc.

References pwd_.

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

1181 {
1182  return book2DD(pwd_, name, new TH2D(name, title,
1183  nchX, lowX, highX,
1184  nchY, lowY, highY));
1185 }
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:1178
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 1189 of file DQMStore.cc.

References book2DD(), and pwd_.

1192 {
1193  return book2DD(pwd_, name, new TH2D(name.c_str(), title.c_str(),
1194  nchX, lowX, highX,
1195  nchY, lowY, highY));
1196 }
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:1178
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 1246 of file DQMStore.cc.

References book2DD(), and pwd_.

1247 {
1248  return book2DD(pwd_, name, static_cast<TH2D *>(source->Clone(name)));
1249 }
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:1178
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 1253 of file DQMStore.cc.

References book2DD(), and pwd_.

1254 {
1255  return book2DD(pwd_, name, static_cast<TH2D *>(source->Clone(name.c_str())));
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:1178
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 1127 of file DQMStore.cc.

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

1128 {
1129  return book(dir, name, "book2DD", MonitorElement::DQM_KIND_TH2D, h, collate2DD);
1130 }
static void collate2DD(MonitorElement *me, TH2D *h, unsigned verbose)
Definition: DQMStore.cc:1608
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:861
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 1156 of file DQMStore.cc.

References pwd_.

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

1159 {
1160  return book2S(pwd_, name, new TH2S(name, title,
1161  nchX, lowX, highX,
1162  nchY, lowY, highY));
1163 }
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:1156
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 1167 of file DQMStore.cc.

References book2S(), and pwd_.

1170 {
1171  return book2S(pwd_, name, new TH2S(name.c_str(), title.c_str(),
1172  nchX, lowX, highX,
1173  nchY, lowY, highY));
1174 }
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:1156
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 1232 of file DQMStore.cc.

References book2S(), and pwd_.

1233 {
1234  return book2S(pwd_, name, static_cast<TH2S *>(source->Clone(name)));
1235 }
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:1156
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 1239 of file DQMStore.cc.

References book2S(), and pwd_.

1240 {
1241  return book2S(pwd_, name, static_cast<TH2S *>(source->Clone(name.c_str())));
1242 }
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:1156
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 1120 of file DQMStore.cc.

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

1121 {
1122  return book(dir, name, "book2S", MonitorElement::DQM_KIND_TH2S, h, collate2S);
1123 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:861
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:1601
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 1268 of file DQMStore.cc.

References pwd_.

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

1272 {
1273  return book3D(pwd_, name, new TH3F(name, title,
1274  nchX, lowX, highX,
1275  nchY, lowY, highY,
1276  nchZ, lowZ, highZ));
1277 }
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:1268
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 1281 of file DQMStore.cc.

References book3D(), and pwd_.

1285 {
1286  return book3D(pwd_, name, new TH3F(name.c_str(), title.c_str(),
1287  nchX, lowX, highX,
1288  nchY, lowY, highY,
1289  nchZ, lowZ, highZ));
1290 }
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:1268
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 1294 of file DQMStore.cc.

References book3D(), and pwd_.

1295 {
1296  return book3D(pwd_, name, static_cast<TH3F *>(source->Clone(name)));
1297 }
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:1268
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 1301 of file DQMStore.cc.

References book3D(), and pwd_.

1302 {
1303  return book3D(pwd_, name, static_cast<TH3F *>(source->Clone(name.c_str())));
1304 }
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:1268
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 1261 of file DQMStore.cc.

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

1262 {
1263  return book(dir, name, "book3D", MonitorElement::DQM_KIND_TH3F, h, collate3D);
1264 }
static void collate3D(MonitorElement *me, TH3F *h, unsigned verbose)
Definition: DQMStore.cc:1615
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:861
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 948 of file DQMStore.cc.

References bookFloat(), and pwd_.

949 {
950  return bookFloat(pwd_, name);
951 }
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:943
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * DQMStore::bookFloat ( const std::string &  dir,
const std::string &  name 
)
private

Book float.

Definition at line 926 of file DQMStore.cc.

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

927 {
928  if (collateHistograms_)
929  {
931  {
932  me->Fill(0.);
933  return me;
934  }
935  }
936 
937  return book(dir, name, "bookFloat")
939 }
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:1890
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:861
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 918 of file DQMStore.cc.

References bookInt(), and pwd_.

919 {
920  return bookInt(pwd_, name);
921 }
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:913
MonitorElement * DQMStore::bookInt ( const std::string &  dir,
const std::string &  name 
)
private

Book int.

Definition at line 896 of file DQMStore.cc.

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

897 {
898  if (collateHistograms_)
899  {
901  {
902  me->Fill(0);
903  return me;
904  }
905  }
906 
907  return book(dir, name, "bookInt")
909 }
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:1890
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:861
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 1320 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().

1324 {
1325  return bookProfile(pwd_, name, new TProfile(name, title,
1326  nchX, lowX, highX,
1327  lowY, highY,
1328  option));
1329 }
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:1320
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 1335 of file DQMStore.cc.

References bookProfile(), and pwd_.

1339 {
1340  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1341  nchX, lowX, highX,
1342  lowY, highY,
1343  option));
1344 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1320
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 1350 of file DQMStore.cc.

References bookProfile(), and pwd_.

1354 {
1355  return bookProfile(pwd_, name, new TProfile(name, title,
1356  nchX, lowX, highX,
1357  lowY, highY,
1358  option));
1359 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1320
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 1365 of file DQMStore.cc.

References bookProfile(), and pwd_.

1369 {
1370  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1371  nchX, lowX, highX,
1372  lowY, highY,
1373  option));
1374 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1320
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 1380 of file DQMStore.cc.

References bookProfile(), and pwd_.

1384 {
1385  return bookProfile(pwd_, name, new TProfile(name, title,
1386  nchX, xbinsize,
1387  lowY, highY,
1388  option));
1389 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1320
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 1395 of file DQMStore.cc.

References bookProfile(), and pwd_.

1399 {
1400  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1401  nchX, xbinsize,
1402  lowY, highY,
1403  option));
1404 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1320
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 1410 of file DQMStore.cc.

References bookProfile(), and pwd_.

1414 {
1415  return bookProfile(pwd_, name, new TProfile(name, title,
1416  nchX, xbinsize,
1417  lowY, highY,
1418  option));
1419 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1320
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 1425 of file DQMStore.cc.

References bookProfile(), and pwd_.

1429 {
1430  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1431  nchX, xbinsize,
1432  lowY, highY,
1433  option));
1434 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1320
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 1438 of file DQMStore.cc.

References bookProfile(), and pwd_.

1439 {
1440  return bookProfile(pwd_, name, static_cast<TProfile *>(source->Clone(name)));
1441 }
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:1320
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 1445 of file DQMStore.cc.

References bookProfile(), and pwd_.

1446 {
1447  return bookProfile(pwd_, name, static_cast<TProfile *>(source->Clone(name.c_str())));
1448 }
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:1320
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 1309 of file DQMStore.cc.

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

1310 {
1311  return book(dir, name, "bookProfile",
1313  h, collateProfile);
1314 }
static void collateProfile(MonitorElement *me, TProfile *h, unsigned verbose)
Definition: DQMStore.cc:1622
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:861
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 1464 of file DQMStore.cc.

References pwd_.

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

1469 {
1470  return bookProfile2D(pwd_, name, new TProfile2D(name, title,
1471  nchX, lowX, highX,
1472  nchY, lowY, highY,
1473  lowZ, highZ,
1474  option));
1475 }
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:1464
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 1481 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1486 {
1487  return bookProfile2D(pwd_, name, new TProfile2D(name.c_str(), title.c_str(),
1488  nchX, lowX, highX,
1489  nchY, lowY, highY,
1490  lowZ, highZ,
1491  option));
1492 }
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:1464
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 1498 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1503 {
1504  return bookProfile2D(pwd_, name, new TProfile2D(name, title,
1505  nchX, lowX, highX,
1506  nchY, lowY, highY,
1507  lowZ, highZ,
1508  option));
1509 }
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:1464
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 1515 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1520 {
1521  return bookProfile2D(pwd_, name, new TProfile2D(name.c_str(), title.c_str(),
1522  nchX, lowX, highX,
1523  nchY, lowY, highY,
1524  lowZ, highZ,
1525  option));
1526 }
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:1464
MonitorElement * DQMStore::bookProfile2D ( const char *  name,
TProfile2D *  h 
)

Book TProfile2D by cloning an existing profile.

Definition at line 1530 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1531 {
1532  return bookProfile2D(pwd_, name, static_cast<TProfile2D *>(source->Clone(name)));
1533 }
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:1464
MonitorElement * DQMStore::bookProfile2D ( const std::string &  name,
TProfile2D *  h 
)

Book TProfile2D by cloning an existing profile.

Definition at line 1537 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

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

Book 2D profile histogram based on TProfile2D.

Definition at line 1453 of file DQMStore.cc.

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

1454 {
1455  return book(dir, name, "bookProfile2D",
1457  h, collateProfile2D);
1458 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:861
static void collateProfile2D(MonitorElement *me, TProfile2D *h, unsigned verbose)
Definition: DQMStore.cc:1632
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 
)

Book string.

Definition at line 972 of file DQMStore.cc.

References pwd_.

Referenced by DQMFileReader::beginJob(), ConverterTester::beginJob(), DQMDcsInfoClient::beginRun(), DQMStore::IBooker::bookString(), bookString(), extract(), DQMProvInfo::makeHLTKeyInfo(), and DQMProvInfo::makeProvInfo().

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

Book string.

Definition at line 977 of file DQMStore.cc.

References bookString(), and pwd_.

978 {
979  return bookString(pwd_, name, value);
980 }
MonitorElement * bookString(const char *name, const char *value)
Book string.
Definition: DQMStore.cc:972
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 956 of file DQMStore.cc.

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

959 {
960  if (collateHistograms_)
961  {
963  return me;
964  }
965 
966  return book(dir, name, "bookString")
968 }
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:1890
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:861
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 696 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(), APVValidationPlots::endJob(), StripValidationPlots::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(), ZDCMonitorClient::removeAllME(), SiStripTrackerMapCreator::setTkMapFromHistogram(), and dqm_interfaces.DirWalkerFile::walk().

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

cd to subdirectory (if there)

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

702 {
704  const std::string *cleaned = 0;
705  cleanTrailingSlashes(subdir, clean, cleaned);
706 
707  if (! dirExists(*cleaned))
708  raiseDQMError("DQMStore", "Cannot 'cd' into non-existent directory '%s'",
709  cleaned->c_str());
710 
711  setCurrentFolder(*cleaned);
712 }
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:784
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:719
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 2438 of file DQMStore.cc.

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

Referenced by save().

2439 {
2440  assert(! path.empty());
2441 
2442  // Find the first path component.
2443  size_t start = 0;
2444  size_t end = path.find('/', start);
2445  if (end == std::string::npos)
2446  end = path.size();
2447 
2448  while (true)
2449  {
2450  // Check if this subdirectory component exists. If yes, make sure
2451  // it is actually a subdirectory. Otherwise create or cd into it.
2452  std::string part(path, start, end-start);
2453  TObject *o = gDirectory->Get(part.c_str());
2454  if (o && ! dynamic_cast<TDirectory *>(o))
2455  raiseDQMError("DQMStore", "Attempt to create directory '%s' in a file"
2456  " fails because the part '%s' already exists and is not"
2457  " directory", path.c_str(), part.c_str());
2458  else if (! o)
2459  gDirectory->mkdir(part.c_str());
2460 
2461  if (! gDirectory->cd(part.c_str()))
2462  raiseDQMError("DQMStore", "Attempt to create directory '%s' in a file"
2463  " fails because could not cd into subdirectory '%s'",
2464  path.c_str(), part.c_str());
2465 
2466  // Stop if we reached the end, ignoring any trailing '/'.
2467  if (end+1 >= path.size())
2468  break;
2469 
2470  // Find the next path component.
2471  start = end+1;
2472  end = path.find('/', start);
2473  if (end == std::string::npos)
2474  end = path.size();
2475  }
2476 
2477  return true;
2478 }
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
assert(m_qm.get())
tuple path
else: Piece not in the list, fine.
#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 1546 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().

1547 {
1548  if (me->getTH1()->GetNbinsX() != h->GetNbinsX()
1549  || me->getTH1()->GetNbinsY() != h->GetNbinsY()
1550  || me->getTH1()->GetNbinsZ() != h->GetNbinsZ()
1551  || me->getTH1()->GetXaxis()->GetXmin() != h->GetXaxis()->GetXmin()
1552  || me->getTH1()->GetYaxis()->GetXmin() != h->GetYaxis()->GetXmin()
1553  || me->getTH1()->GetZaxis()->GetXmin() != h->GetZaxis()->GetXmin()
1554  || me->getTH1()->GetXaxis()->GetXmax() != h->GetXaxis()->GetXmax()
1555  || me->getTH1()->GetYaxis()->GetXmax() != h->GetYaxis()->GetXmax()
1556  || me->getTH1()->GetZaxis()->GetXmax() != h->GetZaxis()->GetXmax()
1557  || !MonitorElement::CheckBinLabels((TAxis*)me->getTH1()->GetXaxis(),(TAxis*)h->GetXaxis())
1558  || !MonitorElement::CheckBinLabels((TAxis*)me->getTH1()->GetYaxis(),(TAxis*)h->GetYaxis())
1559  || !MonitorElement::CheckBinLabels((TAxis*)me->getTH1()->GetZaxis(),(TAxis*)h->GetZaxis()) )
1560  {
1561  if(verbose > 0)
1562  std::cout << "*** DQMStore: WARNING:"
1563  << "checkBinningMatches: different binning - cannot add object '"
1564  << h->GetName() << "' of type "
1565  << h->IsA()->GetName() << " to existing ME: '"
1566  << me->getFullname() << "'\n";
1567  return false;
1568  }
1569  return true;
1570 }
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 1573 of file DQMStore.cc.

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

Referenced by book1D(), and extract().

1574 {
1575  if (checkBinningMatches(me,h,verbose))
1576  me->getTH1F()->Add(h);
1577 }
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:1546
void DQMStore::collate1DD ( MonitorElement me,
TH1D *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1587 of file DQMStore.cc.

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

Referenced by book1DD(), and extract().

1588 {
1589  if (checkBinningMatches(me,h,verbose))
1590  me->getTH1D()->Add(h);
1591 }
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:1546
void DQMStore::collate1S ( MonitorElement me,
TH1S *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1580 of file DQMStore.cc.

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

Referenced by book1S(), and extract().

1581 {
1582  if (checkBinningMatches(me,h,verbose))
1583  me->getTH1S()->Add(h);
1584 }
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:1546
void DQMStore::collate2D ( MonitorElement me,
TH2F *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1594 of file DQMStore.cc.

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

Referenced by book2D(), and extract().

1595 {
1596  if (checkBinningMatches(me,h,verbose))
1597  me->getTH2F()->Add(h);
1598 }
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:1546
TH2F * getTH2F(void) const
void DQMStore::collate2DD ( MonitorElement me,
TH2D *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1608 of file DQMStore.cc.

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

Referenced by book2DD(), and extract().

1609 {
1610  if (checkBinningMatches(me,h,verbose))
1611  me->getTH2D()->Add(h);
1612 }
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:1546
void DQMStore::collate2S ( MonitorElement me,
TH2S *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1601 of file DQMStore.cc.

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

Referenced by book2S(), and extract().

1602 {
1603  if (checkBinningMatches(me,h,verbose))
1604  me->getTH2S()->Add(h);
1605 }
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:1546
void DQMStore::collate3D ( MonitorElement me,
TH3F *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1615 of file DQMStore.cc.

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

Referenced by book3D(), and extract().

1616 {
1617  if (checkBinningMatches(me,h,verbose))
1618  me->getTH3F()->Add(h);
1619 }
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:1546
void DQMStore::collateProfile ( MonitorElement me,
TProfile *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1622 of file DQMStore.cc.

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

Referenced by bookProfile(), and extract().

1623 {
1624  if (checkBinningMatches(me,h,verbose))
1625  {
1626  TProfile *meh = me->getTProfile();
1627  me->addProfiles(h, meh, meh, 1, 1);
1628  }
1629 }
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:1546
void DQMStore::collateProfile2D ( MonitorElement me,
TProfile2D *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1632 of file DQMStore.cc.

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

Referenced by bookProfile2D(), and extract().

1633 {
1634  if (checkBinningMatches(me,h,verbose))
1635  {
1636  TProfile2D *meh = me->getTProfile2D();
1637  me->addProfiles(h, meh, meh, 1, 1);
1638  }
1639 }
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:1546
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 1750 of file DQMStore.cc.

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

1751 {
1752  MonitorElement proto(&path, std::string());
1753  MEMap::const_iterator e = data_.end();
1754  MEMap::const_iterator i = data_.lower_bound(proto);
1755  return (i != e && isSubdirectory(path, *i->data_.dirname));
1756 }
int i
Definition: DBlmapReader.cc:9
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
tuple path
else: Piece not in the list, fine.
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 3248 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().

3249 {
3250  if (qtests_.count(qtname))
3251  raiseDQMError("DQMStore", "Attempt to create duplicate quality test '%s'",
3252  qtname.c_str());
3253 
3254  QAMap::iterator i = qalgos_.find(algoname);
3255  if (i == qalgos_.end())
3256  raiseDQMError("DQMStore", "Cannot create a quality test using unknown"
3257  " algorithm '%s'", algoname.c_str());
3258 
3259  QCriterion *qc = i->second(qtname);
3260  qc->setVerbose(verboseQT_);
3261 
3262  qtests_[qtname] = qc;
3263  return qc;
3264 }
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
bool DQMStore::dirExists ( const std::string &  path) const
void DQMStore::disableSoftReset ( MonitorElement me)

Definition at line 3382 of file DQMStore.cc.

References MonitorElement::disableSoftReset().

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

3383 {
3384  if (me)
3385  me->disableSoftReset();
3386 }
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 2142 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().

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

Referenced by get_info().

3060  {
3061  if (buf.Length() == buf.BufferSize())
3062  return 0;
3063  buf.InitMap();
3064  void *ptr = buf.ReadObjectAny(0);
3065  return reinterpret_cast<TObject *>(ptr);
3066 }
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 1890 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().

1896 {
1897  if (dir.find_first_not_of(s_safe) != std::string::npos)
1898  raiseDQMError("DQMStore", "Monitor element path name '%s' uses"
1899  " unacceptable characters", dir.c_str());
1900  if (name.find_first_not_of(s_safe) != std::string::npos)
1901  raiseDQMError("DQMStore", "Monitor element path name '%s' uses"
1902  " unacceptable characters", name.c_str());
1903 
1904  MonitorElement proto;
1905  proto.data_.dirname = &dir;
1906  proto.data_.objname = name;
1907  proto.data_.run = run;
1908  proto.data_.lumi = lumi;
1909  proto.data_.streamId = streamId;
1910  proto.data_.moduleId = moduleId;
1911 
1912  MEMap::const_iterator mepos = data_.find(proto);
1913  return (mepos == data_.end() ? 0
1914  : const_cast<MonitorElement *>(&*mepos));
1915 }
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 2082 of file DQMStore.cc.

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

Referenced by DQMStore().

2083 {
2084  MEMap::iterator mi = data_.begin();
2085  MEMap::iterator me = data_.end();
2086  for ( ; mi != me; ++mi)
2087  {
2088  if (forceResetOnBeginLumi_ && ((*mi).getLumiFlag() == false))
2089  continue;
2090  MonitorElement &me = const_cast<MonitorElement &>(*mi);
2091  me.Reset();
2092  me.resetUpdate();
2093  }
2094 
2095  reset_ = true;
2096 }
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 1760 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(), ZDCMonitorClient::beginRun(), CalibrationScanTask::book(), CalibrationTask::book(), rrapi.RRApi::columns(), rrapi.RRApi::count(), createH2CompTest(), createH2ContentTest(), EgHLTOfflineClient::createHLTvsOfflineHists(), EgHLTOfflineClient::createLooseTightTrigEff(), EgHLTOfflineClient::createN1EffHists(), SiStripActionExecutor::createShiftReport(), EgHLTOfflineClient::createSingleEffHists(), EgHLTOfflineClient::createTrigTagProbeEffHists(), EgHLTOfflineClient::createTrigTagProbeEffHists2Leg(), EgHLTOfflineClient::createTrigTagProbeEffHistsNewAlgo(), rrapi.RRApi::data(), dqmCopyRecursively(), HarvestingAnalyzer::endJob(), MuonAlignment::endJob(), DQMDcsInfoClient::endLuminosityBlock(), SiStripMonitorDigi::endLuminosityBlock(), L1ScalersClient::endLuminosityBlock(), HLTScalersClient::endLuminosityBlock(), DQMDcsInfoClient::endRun(), TauDQMHistEffProducer::endRun(), MuonAlignmentSummary::endRun(), TauDQMHistPlotter::endRun(), ZDCMonitorClient::errorSummary(), SiStripQualityChecker::fillDetectorStatusAtLumi(), SiStripQualityChecker::fillFaultyModuleStatus(), DQMFEDIntegrityClient::fillHistograms(), EgHLTOfflineClient::FillHLTvsOfflineHist(), 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(), EgHLTOfflineClient::makeEffMonElem2Leg(), EgHLTOfflineClient::makeEffMonElemFromPassAndAll(), EgHLTOfflineClient::makeEffMonElemFromPassAndFail(), EgHLTOfflineClient::makeEffMonElemFromPassAndFailAndTagTag(), SiStripHistoPlotter::makePlot(), SiStripInformationExtractor::plotHistosFromLayout(), SiStripActionExecutor::printShiftHistoParameters(), QTestStatusChecker::processAlarms(), rrapi.RRApi::report(), rrapi.RRApi::reports(), resetME(), EgHLTOfflineSummaryClient::runClient_(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), rrapi.RRApi::workspaces(), and SubTaskSummaryStatus::WriteThreshold().

1761 {
1762  std::string dir;
1763  std::string name;
1764  splitPath(dir, name, path);
1765  MonitorElement proto(&dir, name);
1766  MEMap::const_iterator mepos = data_.find(proto);
1767  return (mepos == data_.end() ? 0
1768  : const_cast<MonitorElement *>(&*mepos));
1769 }
static void splitPath(std::string &dir, std::string &name, const std::string &path)
Definition: DQMStore.cc:95
tuple path
else: Piece not in the list, fine.
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 1773 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().

1774 {
1775  // FIXME: Use reverse map [tag -> path] / [tag -> dir]?
1776  std::vector<MonitorElement *> result;
1777  for (MEMap::const_iterator i = data_.begin(), e = data_.end(); i != e; ++i)
1778  {
1779  const MonitorElement &me = *i;
1780  if ((me.data_.flags & DQMNet::DQM_PROP_TAGGED) && me.data_.tag == tag)
1781  result.push_back(const_cast<MonitorElement *>(&me));
1782  }
1783  return result;
1784 }
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:1646
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 3068 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().

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

1976 {
1978  const std::string *cleaned = 0;
1979  cleanTrailingSlashes(path, clean, cleaned);
1980  MonitorElement proto(cleaned, std::string(), runNumber);
1981  proto.setLumi(lumi);
1982 
1983  std::vector<MonitorElement *> result;
1984  MEMap::const_iterator e = data_.end();
1985  MEMap::const_iterator i = data_.lower_bound(proto);
1986  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i) {
1987  if (runNumber != 0) {
1988  if (i->data_.run > runNumber // TODO[rovere]: pleonastic? first we encounter local ME of the same run ...
1989  || i->data_.streamId != 0
1990  || i->data_.moduleId != 0)
1991  break;
1992  }
1993  if (lumi != 0) {
1994  if (i->data_.lumi > lumi
1995  || i->data_.streamId != 0
1996  || i->data_.moduleId != 0)
1997  break;
1998  }
1999  if (runNumber != 0 or lumi !=0) {
2000  assert(i->data_.streamId == 0);
2001  assert(i->data_.moduleId == 0);
2002  }
2003  result.push_back(const_cast<MonitorElement *>(&*i));
2004  }
2005 
2006  if (enableMultiThread_)
2007  {
2008  //save legacy modules when running MT
2009  i = data_.begin();
2010  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i) {
2011  if (i->data_.run != 0 || i->data_.streamId != 0 || i->data_.moduleId != 0) break;
2012  result.push_back(const_cast<MonitorElement *>(&*i));
2013  }
2014  }
2015 
2016  return result;
2017 }
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 path
else: Piece not in the list, fine.
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 1920 of file DQMStore.cc.

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

1921 {
1922  into.clear();
1923  into.reserve(dirs_.size());
1924 
1925  MEMap::const_iterator me = data_.end();
1926  std::set<std::string>::const_iterator di = dirs_.begin();
1927  std::set<std::string>::const_iterator de = dirs_.end();
1928  char tagbuf[32]; // more than enough for '/' and up to 10 digits
1929 
1930  for ( ; di != de; ++di)
1931  {
1932  MonitorElement proto(&*di, std::string());
1933  MEMap::const_iterator mi = data_.lower_bound(proto);
1934  MEMap::const_iterator m = mi;
1935  size_t sz = di->size() + 2;
1936  size_t nfound = 0;
1937  for ( ; m != me && isSubdirectory(*di, *m->data_.dirname); ++m)
1938  if (*di == *m->data_.dirname && (m->data_.flags & DQMNet::DQM_PROP_TAGGED))
1939  {
1940  // the tags count for '/' + up to 10 digits, otherwise ',' + ME name
1941  sz += 1 + m->data_.objname.size() + 11;
1942  ++nfound;
1943  }
1944 
1945  if (! nfound)
1946  continue;
1947 
1948  std::vector<std::string>::iterator istr
1949  = into.insert(into.end(), std::string());
1950 
1951  istr->reserve(sz);
1952 
1953  *istr += *di;
1954  *istr += ':';
1955  for (sz = 0; mi != m; ++mi)
1956  {
1957  if (*di == *m->data_.dirname && (m->data_.flags & DQMNet::DQM_PROP_TAGGED))
1958  {
1959  sprintf(tagbuf, "/%u", mi->data_.tag);
1960  if (sz > 0)
1961  *istr += ',';
1962  *istr += m->data_.objname;
1963  *istr += tagbuf;
1964  ++sz;
1965  }
1966  }
1967  }
1968 }
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 1789 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().

1790 {
1792  const std::string *cleaned = 0;
1793  cleanTrailingSlashes(path, clean, cleaned);
1794  MonitorElement proto(cleaned, std::string());
1795 
1796  std::vector<MonitorElement *> result;
1797  MEMap::const_iterator e = data_.end();
1798  MEMap::const_iterator i = data_.lower_bound(proto);
1799  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i)
1800  if (*cleaned == *i->data_.dirname)
1801  result.push_back(const_cast<MonitorElement *>(&*i));
1802 
1803  return result;
1804 }
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 path
else: Piece not in the list, fine.
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 1808 of file DQMStore.cc.

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

1809 {
1811  const std::string *cleaned = 0;
1812  cleanTrailingSlashes(path, clean, cleaned);
1813  MonitorElement proto(cleaned, std::string());
1814 
1815  std::vector<MonitorElement *> result;
1816  MEMap::const_iterator e = data_.end();
1817  MEMap::const_iterator i = data_.lower_bound(proto);
1818  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i)
1819  if (*cleaned == *i->data_.dirname
1820  && (i->data_.flags & DQMNet::DQM_PROP_TAGGED)
1821  && i->data_.tag == tag)
1822  result.push_back(const_cast<MonitorElement *>(&*i));
1823 
1824  return result;
1825 }
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:1646
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
tuple path
else: Piece not in the list, fine.
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 1832 of file DQMStore.cc.

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

1833 {
1834  into.clear();
1835  into.reserve(dirs_.size());
1836 
1837  MEMap::const_iterator me = data_.end();
1838  std::set<std::string>::const_iterator di = dirs_.begin();
1839  std::set<std::string>::const_iterator de = dirs_.end();
1840  for ( ; di != de; ++di)
1841  {
1842  MonitorElement proto(&*di, std::string());
1843  MEMap::const_iterator mi = data_.lower_bound(proto);
1844  MEMap::const_iterator m = mi;
1845  size_t sz = di->size() + 2;
1846  size_t nfound = 0;
1847  for ( ; m != me && isSubdirectory(*di, *m->data_.dirname); ++m)
1848  if (*di == *m->data_.dirname)
1849  {
1850  sz += m->data_.objname.size() + 1;
1851  ++nfound;
1852  }
1853 
1854  if (! nfound)
1855  continue;
1856 
1857  std::vector<std::string>::iterator istr
1858  = into.insert(into.end(), std::string());
1859 
1860  if (showContents)
1861  {
1862  istr->reserve(sz);
1863 
1864  *istr += *di;
1865  *istr += ':';
1866  for (sz = 0; mi != m; ++mi)
1867  {
1868  if (*di != *mi->data_.dirname)
1869  continue;
1870 
1871  if (sz > 0)
1872  *istr += ',';
1873 
1874  *istr += mi->data_.objname;
1875  ++sz;
1876  }
1877  }
1878  else
1879  {
1880  istr->reserve(di->size() + 2);
1881  *istr += *di;
1882  *istr += ':';
1883  }
1884  }
1885 }
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 2022 of file DQMStore.cc.

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

Referenced by EgHLTOfflineSummaryClient::getQTestResults_().

2023 {
2024  lat::Regexp rx;
2025  try
2026  {
2027  rx = lat::Regexp(pattern, 0, syntaxType);
2028  rx.study();
2029  }
2030  catch (lat::Error &e)
2031  {
2032  raiseDQMError("DQMStore", "Invalid regular expression '%s': %s",
2033  pattern.c_str(), e.explain().c_str());
2034  }
2035 
2036  std::string path;
2037  std::vector<MonitorElement *> result;
2038  MEMap::const_iterator i = data_.begin();
2039  MEMap::const_iterator e = data_.end();
2040  for ( ; i != e; ++i)
2041  {
2042  path.clear();
2043  mergePath(path, *i->data_.dirname, i->data_.objname);
2044  if (rx.match(path))
2045  result.push_back(const_cast<MonitorElement *>(&*i));
2046  }
2047 
2048  return result;
2049 }
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 path
else: Piece not in the list, fine.
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 1734 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().

1735 {
1736  MonitorElement proto(&pwd_, std::string());
1737  std::vector<std::string> result;
1738  MEMap::const_iterator e = data_.end();
1739  MEMap::const_iterator i = data_.lower_bound(proto);
1740  for ( ; i != e && isSubdirectory(pwd_, *i->data_.dirname); ++i)
1741  if (pwd_ == *i->data_.dirname)
1742  result.push_back(i->getName());
1743 
1744  return result;
1745 }
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 3343 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().

3344 {
3346  const std::string *cleaned = 0;
3347  cleanTrailingSlashes(path, clean, cleaned);
3348 
3350  MEMap::const_iterator mi = data_.begin();
3351  MEMap::const_iterator me = data_.end();
3352  for ( ; mi != me; ++mi)
3353  {
3354  if (! cleaned->empty() && ! isSubdirectory(*cleaned, *mi->data_.dirname))
3355  continue;
3356 
3357  if (mi->hasError())
3358  return dqm::qstatus::ERROR;
3359  else if (mi->hasWarning())
3360  status = dqm::qstatus::WARNING;
3361  else if (status < dqm::qstatus::WARNING
3362  && mi->hasOtherReport())
3363  status = dqm::qstatus::OTHER;
3364  }
3365  return status;
3366 }
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
tuple path
else: Piece not in the list, fine.
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 1711 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(), and SiStripTrackerMapCreator::setTkMapFromHistogram().

1712 {
1713  std::vector<std::string> result;
1714  std::set<std::string>::const_iterator e = dirs_.end();
1715  std::set<std::string>::const_iterator i = dirs_.find(pwd_);
1716 
1717  // If we didn't find current directory, the tree is empty, so quit.
1718  if (i == e)
1719  return result;
1720 
1721  // Skip the current directory and then start looking for immediate
1722  // subdirectories in the dirs_ list. Stop when we are no longer in
1723  // (direct or indirect) subdirectories of pwd_. Note that we don't
1724  // "know" which order the set will sort A/B, A/B/C and A/D.
1725  while (++i != e && isSubdirectory(pwd_, *i))
1726  if (i->find('/', pwd_.size()+1) == std::string::npos)
1727  result.push_back(*i);
1728 
1729  return result;
1730 }
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 567 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().

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

Definition at line 3421 of file DQMStore.cc.

References collateHistograms_.

3422 {
3423  return collateHistograms_;
3424 }
bool collateHistograms_
Definition: DQMStore.h:699
bool DQMStore::isCollateME ( MonitorElement me) const
private

Definition at line 3430 of file DQMStore.cc.

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

Referenced by extract().

3431 { 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 2978 of file DQMStore.cc.

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

Referenced by DQMFileReader::beginJob().

2981 {
2982  bool overwrite = true;
2983  if (collateHistograms_) overwrite = false;
2984  if (verbose_)
2985  {
2986  std::cout << "DQMStore::load: reading from file '" << filename << "'\n";
2987  if (collateHistograms_)
2988  std::cout << "DQMStore::load: in collate mode " << "\n";
2989  else
2990  std::cout << "DQMStore::load: in overwrite mode " << "\n";
2991  }
2992 
2993  if (!s_rxpbfile.match(filename, 0, 0))
2994  return readFile(filename, overwrite, "", "", stripdirs, fileMustExist);
2995  else
2996  return readFilePB(filename, overwrite, "", "", stripdirs, fileMustExist);
2997 }
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:3005
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:3089
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 743 of file DQMStore.cc.

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

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

744 {
745  std::string prev;
746  std::string subdir;
748  prev.reserve(path.size());
749  subdir.reserve(path.size());
750  name.reserve(path.size());
751  size_t prevname = 0;
752  size_t slash = 0;
753 
754  while (true)
755  {
756  // Create this subdirectory component.
757  subdir.clear();
758  subdir.append(path, 0, slash);
759  name.clear();
760  name.append(subdir, prevname, std::string::npos);
761  if (! prev.empty() && findObject(prev, name))
762  raiseDQMError("DQMStore", "Attempt to create subdirectory '%s'"
763  " which already exists as a monitor element",
764  subdir.c_str());
765 
766  if (! dirs_.count(subdir))
767  dirs_.insert(subdir);
768 
769  // Stop if we've reached the end (including possibly a trailing slash).
770  if (slash+1 >= path.size())
771  break;
772 
773  // Find the next slash, making sure we progress. If reach the end,
774  // process the last path component; the next loop round will terminate.
775  prevname = slash ? slash+1 : slash;
776  prev = subdir;
777  if ((slash = path.find('/', ++slash)) == std::string::npos)
778  slash = path.size();
779  }
780 }
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:1890
tuple path
else: Piece not in the list, fine.
std::set< std::string > dirs_
Definition: DQMStore.h:711
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
void DQMStore::markForDeletion ( uint32_t  run,
uint32_t  lumi 
)

Mark a set of histograms for deletion based on run, lumi and path

Definition at line 2103 of file DQMStore.cc.

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

2105 {
2106 
2107  std::string null_str("");
2108  MonitorElement proto(&null_str, null_str, run, 0, 0);
2109  if (enableMultiThread_)
2110  proto.setLumi(lumi);
2111 
2112  std::set<MonitorElement>::const_iterator e = data_.end();
2113  std::set<MonitorElement>::const_iterator i = data_.lower_bound(proto);
2114 
2115  while (i != e) {
2116  if (i->data_.streamId != 0 ||
2117  i->data_.moduleId != 0)
2118  break;
2119  if ((i->data_.lumi != lumi) && enableMultiThread_)
2120  break;
2121  if (i->data_.run != run)
2122  break;
2123 
2124  const_cast<MonitorElement*>(&*i)->markToDelete();
2125 
2126  if (verbose_ > 1)
2127  std::cout << "DQMStore::markForDeletion: marked monitor element '"
2128  << *i->data_.dirname << "/" << i->data_.objname << "'"
2129  << "flags " << i->data_.flags << "\n";
2130 
2131  ++i;
2132  }
2133 }
int i
Definition: DBlmapReader.cc:9
tuple lumi
Definition: fjr2json.py:35
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
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, groupFilesInBlocks::temp, 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  // check and remove the global lumi based histo belonging to the previous LSs
481  // if properly flagged as DQMNet::DQM_PROP_MARKTODELETE
482  global_me.setLumi(1);
483  std::set<MonitorElement>::const_iterator i_lumi = data_.lower_bound(global_me);
484  while (i_lumi->data_.lumi != lumi) {
485  auto temp = i_lumi++;
486  if (i_lumi->getName() == i->getName() && i_lumi->getPathname() == i->getPathname() && i_lumi->markedToDelete())
487  {
488  data_.erase(temp);
489  }
490  }
491  }
492 }
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:508
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:508
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 2963 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(), ZDCMonitorClient::initialize(), PFDQMEventSelector::openInputFile(), SiStripOfflineDQM::openInputFile(), DQMHistoryServiceBase::openRequestedFile(), BuildTrackerMapPlugin::read(), readFilePB(), savePB(), and StatisticsFilter::StatisticsFilter().

2969 {
2970  return readFile(filename,overwrite,onlypath,prepend,stripdirs,fileMustExist);
2971 }
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:3005
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 627 of file DQMStore.cc.

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

Referenced by book().

628 {
629  // the access to the member stream_ is implicitely protected against
630  // concurrency problems because the print_trace method is always called behind
631  // a lock (see bookTransaction).
632  if (!stream_)
633  stream_ = new std::ofstream("histogramBookingBT.log");
634 
635  void *array[10];
636  size_t size;
637  char **strings;
638  int r=0;
639  lat::RegexpMatch m;
640  m.reset();
641 
642  size = backtrace (array, 10);
643  strings = backtrace_symbols (array, size);
644 
645  if ((size > 4)
646  &&s_rxtrace.match(strings[4], 0, 0, &m))
647  {
648  char * demangled = abi::__cxa_demangle(m.matchString(strings[4], 2).c_str(), 0, 0, &r);
649  *stream_ << "\"" << dir << "/"
650  << name << "\" "
651  << (r ? m.matchString(strings[4], 2) : demangled) << " "
652  << m.matchString(strings[4], 1) << "\n";
653  free(demangled);
654  }
655  else
656  *stream_ << "Skipping "<< dir << "/" << name
657  << " with stack size " << size << "\n";
658  /* In this case print the full stack trace, up to main or to the
659  * maximum stack size, i.e. 10. */
660  if (verbose_ > 4)
661  {
662  size_t i;
663  m.reset();
664 
665  for (i = 0; i < size; i++)
666  if (s_rxtrace.match(strings[i], 0, 0, &m))
667  {
668  char * demangled = abi::__cxa_demangle(m.matchString(strings[i], 2).c_str(), 0, 0, &r);
669  *stream_ << "\t\t" << i << "/" << size << " "
670  << (r ? m.matchString(strings[i], 2) : demangled) << " "
671  << m.matchString(strings[i], 1) << std::endl;
672  free (demangled);
673  }
674  }
675  free (strings);
676 }
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 2808 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().

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

3011 {
3012 
3013  if (verbose_)
3014  std::cout << "DQMStore::readFile: reading from file '" << filename << "'\n";
3015 
3016  std::auto_ptr<TFile> f;
3017 
3018  try
3019  {
3020  f.reset(TFile::Open(filename.c_str()));
3021  if (! f.get() || f->IsZombie())
3022  raiseDQMError("DQMStore", "Failed to open file '%s'", filename.c_str());
3023  }
3024  catch (std::exception &)
3025  {
3026  if (fileMustExist)
3027  throw;
3028  else
3029  {
3030  if (verbose_)
3031  std::cout << "DQMStore::readFile: file '" << filename << "' does not exist, continuing\n";
3032  return false;
3033  }
3034  }
3035 
3036  unsigned n = readDirectory(f.get(), overwrite, onlypath, prepend, "", stripdirs);
3037  f->Close();
3038 
3039  MEMap::iterator mi = data_.begin();
3040  MEMap::iterator me = data_.end();
3041  for ( ; mi != me; ++mi)
3042  const_cast<MonitorElement &>(*mi).updateQReportStats();
3043 
3044  if (verbose_)
3045  {
3046  std::cout << "DQMStore::open: successfully read " << n
3047  << " objects from file '" << filename << "'";
3048  if (! onlypath.empty())
3049  std::cout << " from directory '" << onlypath << "'";
3050  if (! prepend.empty())
3051  std::cout << " into directory '" << prepend << "'";
3052  std::cout << std::endl;
3053  }
3054  return true;
3055 }
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:2808
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 3089 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(), cmsHarvester::path, raiseDQMError(), setCurrentFolder(), AlCaHLTBitMon_QueryRunRegistry::string, and verbose_.

Referenced by load().

3095 {
3096  using google::protobuf::io::FileInputStream;
3097  using google::protobuf::io::FileOutputStream;
3098  using google::protobuf::io::GzipInputStream;
3099  using google::protobuf::io::GzipOutputStream;
3100  using google::protobuf::io::CodedInputStream;
3101  using google::protobuf::io::ArrayInputStream;
3102 
3103  if (verbose_)
3104  std::cout << "DQMStore::readFile: reading from file '" << filename << "'\n";
3105 
3106  int filedescriptor;
3107  if ((filedescriptor = ::open(filename.c_str(), O_RDONLY)) == -1) {
3108  if (fileMustExist)
3109  raiseDQMError("DQMStore", "Failed to open file '%s'", filename.c_str());
3110  else
3111  if (verbose_)
3112  std::cout << "DQMStore::readFile: file '" << filename << "' does not exist, continuing\n";
3113  return false;
3114  }
3115 
3116  dqmstorepb::ROOTFilePB dqmstore_message;
3117  FileInputStream fin(filedescriptor);
3118  GzipInputStream input(&fin);
3119  CodedInputStream input_coded(&input);
3120  input_coded.SetTotalBytesLimit(1024*1024*1024, -1);
3121  if (!dqmstore_message.ParseFromCodedStream(&input_coded)) {
3122  raiseDQMError("DQMStore", "Fatal parsing file '%s'", filename.c_str());
3123  return false;
3124  }
3125  ::close(filedescriptor);
3126 
3127  for (int i = 0; i < dqmstore_message.histo_size(); i++) {
3128  std::string path;
3129  std::string objname;
3130 
3131  TObject *obj = NULL;
3132  const dqmstorepb::ROOTFilePB::Histo &h = dqmstore_message.histo(i);
3133  get_info(h, path, objname, &obj);
3134 
3135  setCurrentFolder(path);
3136  if (obj)
3137  {
3138  /* Before calling the extract() check if histogram exists:
3139  * if it does - flags for the given monitor are already set (and merged)
3140  * else - set the flags after the histogram is created.
3141  */
3142  MonitorElement *me = findObject(path, objname);
3143 
3144  /* Run histograms should be collated and not overwritten,
3145  * Lumi histograms should be overwritten (and collate flag is not checked)
3146  */
3147  bool overwrite = h.flags() & DQMNet::DQM_PROP_LUMI;
3148  bool collate = !(h.flags() & DQMNet::DQM_PROP_LUMI);
3149  extract(static_cast<TObject *>(obj), path, overwrite, collate);
3150 
3151  if (me == nullptr) {
3152  me = findObject(path, objname);
3153  me->data_.flags = h.flags();
3154  }
3155 
3156  delete obj;
3157  }
3158  }
3159 
3160  cd();
3161  return true;
3162 }
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:1890
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:696
uint32_t flags
Definition: DQMNet.h:98
#define NULL
Definition: scimark2.h:8
static std::string const input
Definition: EdmProvDump.cc:43
tuple path
else: Piece not in the list, fine.
void get_info(const dqmstorepb::ROOTFilePB_Histo &, std::string &dirname, std::string &objname, TObject **obj)
Definition: DQMStore.cc:3068
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:2142
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:2963
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:719
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 3204 of file DQMStore.cc.

References pwd_.

Referenced by ZDCMonitorClient::removeAllME().

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

remove all monitoring elements from directory;

Definition at line 3190 of file DQMStore.cc.

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

3191 {
3192  MonitorElement proto(&dir, std::string());
3193  MEMap::iterator e = data_.end();
3194  MEMap::iterator i = data_.lower_bound(proto);
3195  while (i != e && isSubdirectory(dir, *i->data_.dirname))
3196  if (dir == *i->data_.dirname)
3197  data_.erase(i++);
3198  else
3199  ++i;
3200 }
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 3212 of file DQMStore.cc.

References pwd_.

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

3213 {
3215 }
void removeElement(const std::string &name)
Definition: DQMStore.cc:3212
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 3220 of file DQMStore.cc.

References gather_cfg::cout, and data_.

3221 {
3222  MonitorElement proto(&dir, name);
3223  MEMap::iterator pos = data_.find(proto);
3224  if (pos == data_.end() && warning)
3225  std::cout << "DQMStore: WARNING: attempt to remove non-existent"
3226  << " monitor element '" << name << "' in '" << dir << "'\n";
3227  else
3228  data_.erase(pos);
3229 }
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 2058 of file DQMStore.cc.

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

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

2059 {
2060  MEMap::iterator mi = data_.begin();
2061  MEMap::iterator me = data_.end();
2062  for ( ; mi != me; ++mi)
2063  {
2064  MonitorElement &me = const_cast<MonitorElement &>(*mi);
2065  if (mi->wasUpdated())
2066  {
2067  if (me.resetMe())
2068  me.Reset();
2069  me.resetUpdate();
2070  }
2071  }
2072 
2073  reset_ = true;
2074 }
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 3170 of file DQMStore.cc.

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

Referenced by dqmCopyRecursively(), and ZDCMonitorClient::removeAllME().

3171 {
3173  const std::string *cleaned = 0;
3174  cleanTrailingSlashes(path, clean, cleaned);
3175  MonitorElement proto(cleaned, std::string());
3176 
3177  MEMap::iterator e = data_.end();
3178  MEMap::iterator i = data_.lower_bound(proto);
3179  while (i != e && isSubdirectory(*cleaned, *i->data_.dirname))
3180  data_.erase(i++);
3181 
3182  std::set<std::string>::iterator de = dirs_.end();
3183  std::set<std::string>::iterator di = dirs_.lower_bound(*cleaned);
3184  while (di != de && isSubdirectory(*cleaned, *di))
3185  dirs_.erase(di++);
3186 }
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 path
else: Piece not in the list, fine.
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 3322 of file DQMStore.cc.

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

Referenced by ZDCMonitorClient::analyze(), and ZDCMonitorClient::report().

3323 {
3324 
3325  if (verbose_ > 0)
3326  std::cout << "DQMStore: running runQTests() with reset = "
3327  << ( reset_ ? "true" : "false" ) << std::endl;
3328 
3329  // Apply quality tests to each monitor element, skipping references.
3330  MEMap::iterator mi = data_.begin();
3331  MEMap::iterator me = data_.end();
3332  for ( ; mi != me; ++mi)
3333  if (! isSubdirectory(s_referenceDirName, *mi->data_.dirname))
3334  const_cast<MonitorElement &>(*mi).runQTests();
3335 
3336  reset_ = false;
3337 }
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 2608 of file DQMStore.cc.

References 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, cmsHarvester::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(), TauDQMSimpleFileSaver::endJob(), TrackingTruthValid::endJob(), SiStripDigiValid::endJob(), SiPixelDigiValid::endJob(), EgammaBasicClusters::endJob(), EgammaSuperClusters::endJob(), LaserDQM::endJob(), MonitorTrackResiduals::endJob(), SiStripLAProfileBooker::endJob(), TrackerHitAnalyzer::endJob(), dEdxAnalyzer::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(), EcalDigisValidation::~EcalDigisValidation(), GlobalHitsProdHistStripper::~GlobalHitsProdHistStripper(), and SiPixelTrackingRecHitsValid::~SiPixelTrackingRecHitsValid().

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

References dqmstorepb::ROOTFilePB::add_histo(), 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_.

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

3439 {
3440  if (scaleFlag_ == 0.0) return;
3441  if (verbose_ > 0)
3442  std::cout << " =========== " << " ScaleFlag " << scaleFlag_ << std::endl;
3443  double factor = scaleFlag_;
3444  int events = 1;
3445  if (dirExists("Info/EventInfo")) {
3446  if ( scaleFlag_ == -1.0) {
3447  MonitorElement * scale_me = get("Info/EventInfo/ScaleFactor");
3448  if (scale_me && scale_me->kind()==MonitorElement::DQM_KIND_REAL) factor = scale_me->getFloatValue();
3449  }
3450  MonitorElement * event_me = get("Info/EventInfo/processedEvents");
3451  if (event_me && event_me->kind()==MonitorElement::DQM_KIND_INT) events = event_me->getIntValue();
3452  }
3453  factor = factor/(events*1.0);
3454 
3455  MEMap::iterator mi = data_.begin();
3456  MEMap::iterator me = data_.end();
3457  for ( ; mi != me; ++mi)
3458  {
3459  MonitorElement &me = const_cast<MonitorElement &>(*mi);
3460  switch (me.kind())
3461  {
3463  {
3464  me.getTH1F()->Scale(factor);
3465  break;
3466  }
3468  {
3469  me.getTH1S()->Scale(factor);
3470  break;
3471  }
3473  {
3474  me.getTH1D()->Scale(factor);
3475  break;
3476  }
3478  {
3479  me.getTH2F()->Scale(factor);
3480  break;
3481  }
3483  {
3484  me.getTH2S()->Scale(factor);
3485  break;
3486  }
3488  {
3489  me.getTH2D()->Scale(factor);
3490  break;
3491  }
3493  {
3494  me.getTH3F()->Scale(factor);
3495  break;
3496  }
3498  {
3499  me.getTProfile()->Scale(factor);
3500  break;
3501  }
3503  {
3504  me.getTProfile2D()->Scale(factor);
3505  break;
3506  }
3507  default:
3508  if (verbose_ > 0)
3509  std::cout << " The DQM object '" << me.getFullname() << "' is not scalable object " << std::endl;
3510  continue;
3511  }
3512  }
3513 }
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:784
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 3391 of file DQMStore.cc.

References MonitorElement::setAccumulate().

3392 {
3393  if (me)
3394  me->setAccumulate(flag);
3395 }
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 719 of file DQMStore.cc.

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

Referenced by SiStripDcsInfo::addBadModules(), DQMFileReader::beginJob(), DQMFEDIntegrityClient::beginJob(), L1ScalersClient::beginJob(), EgammaBasicClusters::beginJob(), EgammaSuperClusters::beginJob(), AcceptanceHistoProducer::beginJob(), ConverterTester::beginJob(), APVValidationPlots::beginJob(), StripValidationPlots::beginJob(), DQMDaqInfo::beginJob(), HcalDCSInfo::beginJob(), MuonAlignment::beginJob(), ValidationHcalIsoTrackAlCaReco::beginJob(), HLTScalersClient::beginJob(), MCEmbeddingValidationAnalyzer::beginJob(), RPCBxTest::beginRun(), DQMDcsInfoClient::beginRun(), ZDCMonitorClient::beginRun(), DQMProvInfo::beginRun(), MuonAlignmentSummary::beginRun(), CalibrationTask::book(), FineDelayTask::book(), LatencyTask::book(), CalibrationScanTask::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(), EgHLTOfflineClient::EgHLTOfflineClient(), 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_(), EgHLTOfflineClient::runClient_(), SiStripFolderOrganizer::setDetectorFolder(), SiPixelFolderOrganizer::setFedFolder(), SiStripFolderOrganizer::setLayerFolder(), SiPixelFolderOrganizer::setModuleFolder(), SiStripFolderOrganizer::setSiStripControlFolder(), SiStripFolderOrganizer::setSiStripFolder(), SiStripFolderOrganizer::setSiStripTopControlFolder(), and SubTaskSummaryStatus::WriteThreshold().

720 {
722  const std::string *cleaned = 0;
723  cleanTrailingSlashes(fullpath, clean, cleaned);
724  makeDirectory(*cleaned);
725  pwd_ = *cleaned;
726 }
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:743
void DQMStore::setVerbose ( unsigned  level)
void DQMStore::showDirStructure ( void  ) const

Definition at line 3401 of file DQMStore.cc.

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

Referenced by EgammaBasicClusters::beginJob(), EgammaSuperClusters::beginJob(), TrackerHitAnalyzer::bookHistograms(), EcalBarrelMonitorDbModule::EcalBarrelMonitorDbModule(), dEdxAnalyzer::endJob(), TrackEfficiencyMonitor::endJob(), TrackSplittingMonitor::endJob(), LogMessageMonitor::endJob(), HLTScalersClient::endLuminosityBlock(), TauDQMFileLoader::endRun(), GlobalHitsProdHistStripper::GlobalHitsProdHistStripper(), ZDCMonitorClient::initialize(), and LaserDQM::initMonitors().

3402 {
3403  std::vector<std::string> contents;
3404  getContents(contents);
3405 
3406  std::cout << " ------------------------------------------------------------\n"
3407  << " Directory structure: \n"
3408  << " ------------------------------------------------------------\n";
3409 
3410  std::copy(contents.begin(), contents.end(),
3411  std::ostream_iterator<std::string>(std::cout, "\n"));
3412 
3413  std::cout << " ------------------------------------------------------------\n";
3414 }
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1789
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 3374 of file DQMStore.cc.

References MonitorElement::softReset().

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

3375 {
3376  if (me)
3377  me->softReset();
3378 }
void softReset(void)
void DQMStore::tag ( MonitorElement me,
unsigned int  myTag 
)

tag ME as <myTag> (myTag > 0)

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

1647 {
1648  if (! myTag)
1649  raiseDQMError("DQMStore", "Attempt to tag monitor element '%s'"
1650  " with a zero tag", me->getFullname().c_str());
1651  if ((me->data_.flags & DQMNet::DQM_PROP_TAGGED) && myTag != me->data_.tag)
1652  raiseDQMError("DQMStore", "Attempt to tag monitor element '%s'"
1653  " twice with multiple tags", me->getFullname().c_str());
1654 
1655  me->data_.tag = myTag;
1657 }
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 1661 of file DQMStore.cc.

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

Referenced by Inspector.Inspector::SetTag().

1662 {
1663  std::string dir;
1664  std::string name;
1665  splitPath(dir, name, path);
1666 
1667  if (MonitorElement *me = findObject(dir, name))
1668  tag(me, myTag);
1669  else
1670  raiseDQMError("DQMStore", "Attempt to tag non-existent monitor element"
1671  " '%s' with tag %u", path.c_str(), myTag);
1672 
1673 }
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:1890
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:1646
tuple path
else: Piece not in the list, fine.
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 1689 of file DQMStore.cc.

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

1690 {
1692  const std::string *cleaned = 0;
1693  cleanTrailingSlashes(path, clean, cleaned);
1694  MonitorElement proto(cleaned, std::string());
1695 
1696  // FIXME: WILDCARDS? Old one supported them, but nobody seemed to use them.
1697  MEMap::iterator e = data_.end();
1698  MEMap::iterator i = data_.lower_bound(proto);
1699  while (i != e && isSubdirectory(*cleaned, *i->data_.dirname))
1700  {
1701  tag(const_cast<MonitorElement *>(&*i), myTag);
1702  ++i;
1703  }
1704 }
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:1646
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
tuple path
else: Piece not in the list, fine.
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 1677 of file DQMStore.cc.

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

1678 {
1679  MonitorElement proto(&path, std::string());
1680  MEMap::iterator e = data_.end();
1681  MEMap::iterator i = data_.lower_bound(proto);
1682  for ( ; i != e && path == *i->data_.dirname; ++i)
1683  tag(const_cast<MonitorElement *>(&*i), myTag);
1684 }
int i
Definition: DBlmapReader.cc:9
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1646
tuple path
else: Piece not in the list, fine.
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 3269 of file DQMStore.cc.

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

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

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

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

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

3288 {
3289  QCriterion *qc = getQCriterion(qtname);
3290  if (! qc)
3291  raiseDQMError("DQMStore", "Cannot apply non-existent quality test '%s'",
3292  qtname.c_str());
3293 
3294  fastmatch * fm = new fastmatch( pattern );
3295 
3296  // Record the test for future reference.
3297  QTestSpec qts(fm, qc);
3298  qtestspecs_.push_back(qts);
3299 
3300  // Apply the quality test.
3301  MEMap::iterator mi = data_.begin();
3302  MEMap::iterator me = data_.end();
3303  std::string path;
3304  int cases = 0;
3305  for ( ; mi != me; ++mi)
3306  {
3307  path.clear();
3308  mergePath(path, *mi->data_.dirname, mi->data_.objname);
3309  if (fm->match(path))
3310  {
3311  ++cases;
3312  const_cast<MonitorElement &>(*mi).addQReport(qts.second);
3313  }
3314  }
3315 
3316  //return the number of matched cases
3317  return cases;
3318 }
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:3237
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
tuple path
else: Piece not in the list, fine.
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().