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, float *xbinsize)
 Book 1D variable bin histogram. More...
 
MonitorElementbook1D (const std::string &name, const std::string &title, int nchX, 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, float *xbinsize)
 
MonitorElementbook1DD (const std::string &name, const std::string &title, int nchX, 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, float *xbinsize)
 
MonitorElementbook1S (const std::string &name, const std::string &title, int nchX, 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, float *xbinsize, int nchY, float *ybinsize)
 Book 2D variable bin histogram. More...
 
MonitorElementbook2D (const std::string &name, const std::string &title, int nchX, float *xbinsize, int nchY, 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, float *xbinsize, int nchY, float *ybinsize)
 
MonitorElementbook2DD (const std::string &name, const std::string &title, int nchX, float *xbinsize, int nchY, 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, float *xbinsize, int nchY, float *ybinsize)
 
MonitorElementbook2S (const std::string &name, const std::string &title, int nchX, float *xbinsize, int nchY, 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, double *xbinsize, int nchY, double lowY, double highY, const char *option="s")
 
MonitorElementbookProfile (const std::string &name, const std::string &title, int nchX, double *xbinsize, int nchY, double lowY, double highY, const char *option="s")
 
MonitorElementbookProfile (const char *name, const char *title, int nchX, double *xbinsize, double lowY, double highY, const char *option="s")
 
MonitorElementbookProfile (const std::string &name, const std::string &title, int nchX, 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)
 
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 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)
 
void markForDeletion (uint32_t run, uint32_t lumi)
 
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 686 of file DQMStore.h.

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

Definition at line 688 of file DQMStore.h.

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

Definition at line 687 of file DQMStore.h.

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

Definition at line 684 of file DQMStore.h.

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

454  : verbose_ (1),
455  verboseQT_ (1),
456  reset_ (false),
457  collateHistograms_ (false),
458  enableMultiThread_(false),
459  forceResetOnBeginLumi_(false),
461  run_(0),
462  streamId_(0),
463  moduleId_(0),
464  stream_(nullptr),
465  pwd_ (""),
466  ibooker_(0),
467  igetter_(0)
468 {
469  if (!ibooker_)
470  ibooker_ = new DQMStore::IBooker(this);
471  if (!igetter_)
472  igetter_ = new DQMStore::IGetter(this);
473  initializeFrom(pset);
474 
475  if(pset.getUntrackedParameter<bool>("forceResetOnBeginRun",false)) {
477  }
478  ar.preallocateSignal_.connect([this](edm::service::SystemBounds const& iBounds) {
479  if(iBounds.maxNumberOfStreams() > 1 ) {
480  enableMultiThread_ = true;
481  }
482  });
483  if(pset.getUntrackedParameter<bool>("forceResetOnBeginLumi",false) && enableMultiThread_ == false) {
484  forceResetOnBeginLumi_ = true;
486  }
487 }
IGetter * igetter_
Definition: DQMStore.h:714
T getUntrackedParameter(std::string const &, T const &) const
uint32_t streamId_
Definition: DQMStore.h:700
bool reset_
Definition: DQMStore.h:692
void initializeFrom(const edm::ParameterSet &)
Definition: DQMStore.cc:525
uint32_t moduleId_
Definition: DQMStore.h:701
Preallocate preallocateSignal_
signal is emitted before beginJob
unsigned int maxNumberOfStreams() const
Definition: SystemBounds.h:43
void forceReset(void)
Definition: DQMStore.cc:2029
unsigned verboseQT_
Definition: DQMStore.h:691
void watchPostSourceRun(PostSourceRun::slot_type const &iSlot)
uint32_t run_
Definition: DQMStore.h:699
std::string pwd_
Definition: DQMStore.h:704
IBooker * ibooker_
Definition: DQMStore.h:713
std::string readSelectedDirectory_
Definition: DQMStore.h:698
void watchPostSourceLumi(PostSourceLumi::slot_type const &iSlot)
unsigned verbose_
Definition: DQMStore.h:690
bool forceResetOnBeginLumi_
Definition: DQMStore.h:697
std::ofstream * stream_
Definition: DQMStore.h:702
bool collateHistograms_
Definition: DQMStore.h:694
void connect(U iFunc)
Definition: Signal.h:63
bool enableMultiThread_
Definition: DQMStore.h:695
DQMStore::DQMStore ( const edm::ParameterSet pset)

Definition at line 489 of file DQMStore.cc.

References ibooker_, igetter_, and initializeFrom().

490  : verbose_ (1),
491  verboseQT_ (1),
492  reset_ (false),
493  collateHistograms_ (false),
494  enableMultiThread_(false),
496  run_(0),
497  streamId_(0),
498  moduleId_(0),
499  stream_(nullptr),
500  pwd_ (""),
501  ibooker_(0),
502  igetter_(0)
503 {
504  if (!ibooker_)
505  ibooker_ = new DQMStore::IBooker(this);
506  if (!igetter_)
507  igetter_ = new DQMStore::IGetter(this);
508  initializeFrom(pset);
509 }
IGetter * igetter_
Definition: DQMStore.h:714
uint32_t streamId_
Definition: DQMStore.h:700
bool reset_
Definition: DQMStore.h:692
void initializeFrom(const edm::ParameterSet &)
Definition: DQMStore.cc:525
uint32_t moduleId_
Definition: DQMStore.h:701
unsigned verboseQT_
Definition: DQMStore.h:691
uint32_t run_
Definition: DQMStore.h:699
std::string pwd_
Definition: DQMStore.h:704
IBooker * ibooker_
Definition: DQMStore.h:713
std::string readSelectedDirectory_
Definition: DQMStore.h:698
unsigned verbose_
Definition: DQMStore.h:690
std::ofstream * stream_
Definition: DQMStore.h:702
bool collateHistograms_
Definition: DQMStore.h:694
bool enableMultiThread_
Definition: DQMStore.h:695
DQMStore::~DQMStore ( void  )

Definition at line 511 of file DQMStore.cc.

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

512 {
513  for (QCMap::iterator i = qtests_.begin(), e = qtests_.end(); i != e; ++i)
514  delete i->second;
515 
516  for (QTestSpecs::iterator i = qtestspecs_.begin(), e = qtestspecs_.end(); i != e; ++i)
517  delete i->first;
518 
519  if (stream_)
520  stream_->close();
521  delete stream_;
522 }
int i
Definition: DBlmapReader.cc:9
QCMap qtests_
Definition: DQMStore.h:708
QTestSpecs qtestspecs_
Definition: DQMStore.h:710
if(dp >Float(M_PI)) dp-
std::ofstream * stream_
Definition: DQMStore.h:702
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 819 of file DQMStore.cc.

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

822 {
823  assert(name.find('/') == std::string::npos);
824  if (verbose_ > 3)
825  print_trace(dir, name);
826 
827  // Check if the request monitor element already exists.
829  {
830  if (verbose_ > 1)
831  {
833  mergePath(path, dir, name);
834 
835  std::cout << "DQMStore: "
836  << context << ": monitor element '"
837  << path << "' already exists, resetting" << std::endl;
838  }
839  me->Reset();
840  return me;
841  }
842  else
843  {
844  // Create it and return for initialisation.
845  assert(dirs_.count(dir));
846  MonitorElement proto(&*dirs_.find(dir), name, run_, streamId_, moduleId_);
847  return &const_cast<MonitorElement &>(*data_.insert(proto).first);
848  }
849 }
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:1848
uint32_t streamId_
Definition: DQMStore.h:700
uint32_t moduleId_
Definition: DQMStore.h:701
tuple path
else: Piece not in the list, fine.
uint32_t run_
Definition: DQMStore.h:699
unsigned verbose_
Definition: DQMStore.h:690
MEMap data_
Definition: DQMStore.h:705
void print_trace(const std::string &dir, const std::string &name)
Definition: DQMStore.cc:585
tuple cout
Definition: gather_cfg.py:121
dbl *** dir
Definition: mlp_gen.cc:35
std::set< std::string > dirs_
Definition: DQMStore.h:706
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 750 of file DQMStore.cc.

References collateHistograms_, gather_cfg::cout, data_, dir, dirs_, DQMNet::DQM_PROP_HAS_REFERENCE, findObject(), h, initialise(), mergePath(), moduleId_, mergeVDriftHistosByStation::name, cmsHarvester::path, print_trace(), qtestspecs_, MonitorElement::Reset(), run_, s_referenceDirName, streamId_, AlCaHLTBitMon_QueryRunRegistry::string, and verbose_.

753 {
754  assert(name.find('/') == std::string::npos);
755  if (verbose_ > 3)
756  print_trace(dir, name);
758  mergePath(path, dir, name);
759 
760  // Put us in charge of h.
761  h->SetDirectory(0);
762 
763  // Check if the request monitor element already exists.
765  if (me)
766  {
767  if (collateHistograms_)
768  {
769  collate(me, h, verbose_);
770  delete h;
771  return me;
772  }
773  else
774  {
775  if (verbose_ > 1)
776  std::cout << "DQMStore: "
777  << context << ": monitor element '"
778  << path << "' already exists, collating" << std::endl;
779  me->Reset();
780  collate(me, h, verbose_);
781  delete h;
782  return me;
783  }
784  }
785  else
786  {
787  // Create and initialise core object.
788  assert(dirs_.count(dir));
789  MonitorElement proto(&*dirs_.find(dir), name, run_, streamId_, moduleId_);
790  me = const_cast<MonitorElement &>(*data_.insert(proto).first)
792 
793  // Initialise quality test information.
794  QTestSpecs::iterator qi = qtestspecs_.begin();
795  QTestSpecs::iterator qe = qtestspecs_.end();
796  for ( ; qi != qe; ++qi)
797  {
798  if ( qi->first->match(path) )
799  me->addQReport(qi->second);
800  }
801 
802  // Assign reference if we have one.
803  std::string refdir;
804  refdir.reserve(s_referenceDirName.size() + dir.size() + 2);
805  refdir += s_referenceDirName;
806  refdir += '/';
807  refdir += dir;
808 
809  if (findObject(refdir, name))
810  {
811  me->data_.flags |= DQMNet::DQM_PROP_HAS_REFERENCE;
812  }
813  // Return the monitor element.
814  return me;
815  }
816 }
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:1848
uint32_t streamId_
Definition: DQMStore.h:700
uint32_t moduleId_
Definition: DQMStore.h:701
static const uint32_t DQM_PROP_HAS_REFERENCE
Definition: DQMNet.h:53
QTestSpecs qtestspecs_
Definition: DQMStore.h:710
tuple path
else: Piece not in the list, fine.
uint32_t run_
Definition: DQMStore.h:699
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:690
MEMap data_
Definition: DQMStore.h:705
static const std::string s_referenceDirName
Definition: DQMStore.cc:54
void print_trace(const std::string &dir, const std::string &name)
Definition: DQMStore.cc:585
tuple cout
Definition: gather_cfg.py:121
dbl *** dir
Definition: mlp_gen.cc:35
std::set< std::string > dirs_
Definition: DQMStore.h:706
bool collateHistograms_
Definition: DQMStore.h:694
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 964 of file DQMStore.cc.

References pwd_.

Referenced by L1EmulatorErrorFlagClient::beginJob(), DQMFEDIntegrityClient::beginJob(), EgammaBasicClusters::beginJob(), L1TDTTFClient::beginJob(), HLTMonHcalIsoTrack::beginJob(), EgammaSuperClusters::beginJob(), HLTMonBitSummary::beginJob(), TkAlCaRecoMonitor::beginJob(), ConverterTester::beginJob(), SimplePhotonAnalyzer::beginJob(), TrackEfficiencyClient::beginJob(), L1TDTTF::beginJob(), APVValidationPlots::beginJob(), StripValidationPlots::beginJob(), HLTMon::beginJob(), SusyDQM< Mu, Ele, Jet, Met >::beginJob(), DQMHcalIsoTrackAlCaReco::beginJob(), MuonAlignment::beginJob(), ValidationHcalIsoTrackAlCaReco::beginJob(), MCEmbeddingValidationAnalyzer::beginJob(), CastorHIMonitor::beginRun(), CastorRecHitMonitor::beginRun(), CastorDataIntegrityMonitor::beginRun(), CastorPSMonitor::beginRun(), RPCNoisyStripTest::beginRun(), CastorDigiMonitor::beginRun(), RPCChamberQuality::beginRun(), HcalCoarsePedestalClient::beginRun(), HcalRecHitClient::beginRun(), HcalSummaryClient::beginRun(), CastorTowerJetMonitor::beginRun(), RPCMon_SS_Dbx_Global::beginRun(), RPCOccupancyTest::beginRun(), RPCBxTest::beginRun(), HLTMonBitSummary::beginRun(), RPCMultiplicityTest::beginRun(), RPCClusterSizeTest::beginRun(), BxTiming::beginRun(), RPCEfficiencyPerRingLayer::beginRun(), RPCEfficiencyShiftHisto::beginRun(), CastorLEDMonitor::beginRun(), DQMProvInfo::beginRun(), MuonAlignmentSummary::beginRun(), RPCEfficiencySecond::beginRun(), CastorMonitorModule::beginRun(), V0Validator::beginRun(), HcalDetDiagPedestalMonitor::beginRun(), HcalDetDiagLaserMonitor::beginRun(), L1ValidatorHists::Book(), HLTMonBTagIPSource::book(), HLTMonBTagMuSource::book(), HLTMonBTagClient::book(), MEtoMEComparitor::book(), DQMStore::IBooker::book1D(), book1D(), L1TGMTClient::bookClone1D(), L1TGMTClient::bookClone1DVB(), SiStripBaseCondObjDQM::bookCumulMEs(), RPCEfficiencySecond::bookDetUnitSeg(), TrackerOfflineValidationSummary::bookHarvestingHists(), RPCValidHistograms::bookHistograms(), PixelVTXMonitor::bookHistograms(), DQMLumiMonitor::bookHistograms(), L1TGT::bookHistograms(), EwkElecTauHistManager::bookHistograms(), L1GtHwValidation::bookHistograms(), L1ExtraDQM::L1ExtraMonElement< CollectionType >::bookHistograms(), EwkMuTauHistManager::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(), HLTOniaSource::bookOniaTriggerInvariantMassMEs(), HLTOniaSource::bookOniaTriggerMEs(), SiStripBaseCondObjDQM::bookProfileMEs(), RCTMonitor::BookRCT(), SiStripBaseCondObjDQM::bookSummaryCumulMEs(), HcalTrigPrimMonitor::create_et_histogram(), PFClient_JetRes::createEfficiencyPlots(), PFClient::createEfficiencyPlots(), PFClient::createProjectionPlots(), PFClient_JetRes::createResolutionPlots(), PFClient::createResolutionPlots(), CSCALCTDigiValidation::CSCALCTDigiValidation(), CSCCLCTDigiValidation::CSCCLCTDigiValidation(), CSCComparatorDigiValidation::CSCComparatorDigiValidation(), CSCRecHit2DValidation::CSCRecHit2DValidation(), CSCSegmentValidation::CSCSegmentValidation(), CSCStripDigiValidation::CSCStripDigiValidation(), CSCWireDigiValidation::CSCWireDigiValidation(), dqmRegisterHistogram(), HarvestingAnalyzer::endJob(), BTagValidator::endJob(), HLTScalersClient::endLuminosityBlock(), DQMDcsInfoClient::endRun(), TauDQMHistEffProducer::endRun(), GlobalHitsProdHistStripper::endRun(), extract(), SiStripQualityDQM::fillGrandSummaryMEs(), EgHLTOfflineClient::FillHLTvsOfflineHist(), SiStripSummaryCreator::getSummaryME(), GlobalDigisAnalyzer::GlobalDigisAnalyzer(), GlobalDigisHistogrammer::GlobalDigisHistogrammer(), GlobalHitsAnalyzer::GlobalHitsAnalyzer(), GlobalHitsHistogrammer::GlobalHitsHistogrammer(), GlobalHitsTester::GlobalHitsTester(), HEff1DHit::HEff1DHit(), HEff2DHit::HEff2DHit(), HEff4DHit::HEff4DHit(), SiPixelMuonHLT::Histo_init(), HLTScalersClient::HLTScalersClient(), HRes1DHit::HRes1DHit(), HRes2DHit::HRes2DHit(), HRes4DHit::HRes4DHit(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::initializeDQMHistograms(), LaserDQM::initMonitors(), L1ScalersClient::L1ScalersClient(), EgHLTOfflineClient::makeEffMonElem2Leg(), EgHLTOfflineClient::makeEffMonElemFromPassAndAll(), EgHLTOfflineClient::makeEffMonElemFromPassAndFail(), EgHLTOfflineClient::makeEffMonElemFromPassAndFailAndTagTag(), egHLT::MonElemManagerHist< T >::MonElemManagerHist(), MonitorElementsDb::MonitorElementsDb(), CastorDigiMonitor::perChanHists(), CastorLEDMonitor::perChanHists(), CastorRecHitPerChan::perChanHists(), PerformanceAnalyzer::PerformanceAnalyzer(), BTagHLTOfflineClient::runClient_(), JetMETHLTOfflineClient::runClient_(), HcalNZSMonitor::setup(), HcalTrigPrimMonitor::setup(), HcalRecHitMonitor::setup(), HcalNoiseMonitor::setup(), HcalBeamMonitor::setup(), HcalDataIntegrityTask::setup(), HcalHotCellMonitor::setup(), HcalDeadCellMonitor::setup(), HcalRawDataMonitor::setup(), HcalBaseDQMonitor::setup(), HcalDigiMonitor::setup(), HcalDetDiagTimingMonitor::setup(), HcalDetDiagLEDMonitor::setup(), HLXMonitor::SetupHists(), and HcalDigiMonitor::setupSubdetHists().

966 {
967  return book1D(pwd_, name, new TH1F(name, title, nchX, lowX, highX));
968 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:964
std::string pwd_
Definition: DQMStore.h:704
MonitorElement * DQMStore::book1D ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX 
)

Book 1D histogram.

Definition at line 972 of file DQMStore.cc.

References book1D(), and pwd_.

974 {
975  return book1D(pwd_, name, new TH1F(name.c_str(), title.c_str(), nchX, lowX, highX));
976 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:964
std::string pwd_
Definition: DQMStore.h:704
MonitorElement * DQMStore::book1D ( const char *  name,
const char *  title,
int  nchX,
float *  xbinsize 
)

Book 1D variable bin histogram.

Definition at line 1012 of file DQMStore.cc.

References book1D(), and pwd_.

1014 {
1015  return book1D(pwd_, name, new TH1F(name, title, nchX, xbinsize));
1016 }
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
Definition: DQMStore.cc:964
std::string pwd_
Definition: DQMStore.h:704
MonitorElement * DQMStore::book1D ( const std::string &  name,
const std::string &  title,
int  nchX,
float *  xbinsize 
)

Book 1D variable bin histogram.

Definition at line 1020 of file DQMStore.cc.

References book1D(), and pwd_.

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

Book 1D histogram by cloning an existing histogram.

Definition at line 1028 of file DQMStore.cc.

References book1D(), and pwd_.

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

Book 1D histogram by cloning an existing histogram.

Definition at line 1035 of file DQMStore.cc.

References book1D(), and pwd_.

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

Book 1D histogram based on TH1F.

Definition at line 943 of file DQMStore.cc.

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

944 {
945  return book(dir, name, "book1D", MonitorElement::DQM_KIND_TH1F, h, collate1D);
946 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:819
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:1531
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 996 of file DQMStore.cc.

References pwd_.

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

998 {
999  return book1DD(pwd_, name, new TH1D(name, title, nchX, lowX, highX));
1000 }
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:996
std::string pwd_
Definition: DQMStore.h:704
MonitorElement * DQMStore::book1DD ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX 
)

Book 1S histogram.

Definition at line 1004 of file DQMStore.cc.

References book1DD(), and pwd_.

1006 {
1007  return book1DD(pwd_, name, new TH1D(name.c_str(), title.c_str(), nchX, lowX, highX));
1008 }
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:996
std::string pwd_
Definition: DQMStore.h:704
MonitorElement* DQMStore::book1DD ( const char *  name,
const char *  title,
int  nchX,
float *  xbinsize 
)
MonitorElement* DQMStore::book1DD ( const std::string &  name,
const std::string &  title,
int  nchX,
float *  xbinsize 
)
MonitorElement * DQMStore::book1DD ( const char *  name,
TH1D *  h 
)

Book 1D double histogram by cloning an existing histogram.

Definition at line 1056 of file DQMStore.cc.

References book1DD(), and pwd_.

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

Book 1D double histogram by cloning an existing histogram.

Definition at line 1063 of file DQMStore.cc.

References book1DD(), and pwd_.

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

Book 1D histogram based on TH1D.

Definition at line 957 of file DQMStore.cc.

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

958 {
959  return book(dir, name, "book1DD", MonitorElement::DQM_KIND_TH1D, h, collate1DD);
960 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:819
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:1545
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 980 of file DQMStore.cc.

References pwd_.

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

982 {
983  return book1S(pwd_, name, new TH1S(name, title, nchX, lowX, highX));
984 }
std::string pwd_
Definition: DQMStore.h:704
MonitorElement * book1S(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:980
MonitorElement * DQMStore::book1S ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX 
)

Book 1S histogram.

Definition at line 988 of file DQMStore.cc.

References book1S(), and pwd_.

990 {
991  return book1S(pwd_, name, new TH1S(name.c_str(), title.c_str(), nchX, lowX, highX));
992 }
std::string pwd_
Definition: DQMStore.h:704
MonitorElement * book1S(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:980
MonitorElement* DQMStore::book1S ( const char *  name,
const char *  title,
int  nchX,
float *  xbinsize 
)
MonitorElement* DQMStore::book1S ( const std::string &  name,
const std::string &  title,
int  nchX,
float *  xbinsize 
)
MonitorElement * DQMStore::book1S ( const char *  name,
TH1S *  h 
)

Book 1S histogram by cloning an existing histogram.

Definition at line 1042 of file DQMStore.cc.

References book1S(), and pwd_.

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

Book 1S histogram by cloning an existing histogram.

Definition at line 1049 of file DQMStore.cc.

References book1S(), and pwd_.

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

Book 1D histogram based on TH1S.

Definition at line 950 of file DQMStore.cc.

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

951 {
952  return book(dir, name, "book1S", MonitorElement::DQM_KIND_TH1S, h, collate1S);
953 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:819
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:1538
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 1092 of file DQMStore.cc.

References pwd_.

Referenced by HcalSummaryClient::analyze(), RPCMon_SS_Dbx_Global::analyze(), RPCDaqInfo::beginJob(), DQMFEDIntegrityClient::beginJob(), EgammaBasicClusters::beginJob(), L1TDTTFClient::beginJob(), HLTMonBitSummary::beginJob(), EgammaSuperClusters::beginJob(), HLTMonHcalIsoTrack::beginJob(), TkAlCaRecoMonitor::beginJob(), ConverterTester::beginJob(), L1TDTTF::beginJob(), LaserAlignmentT0ProducerDQM::beginJob(), APVValidationPlots::beginJob(), StripValidationPlots::beginJob(), HcalDCSInfo::beginJob(), HLTMon::beginJob(), SusyDQM< Mu, Ele, Jet, Met >::beginJob(), DQMHcalIsoTrackAlCaReco::beginJob(), MuonAlignment::beginJob(), ValidationHcalIsoTrackAlCaReco::beginJob(), MCEmbeddingValidationAnalyzer::beginJob(), CastorRecHitMonitor::beginRun(), CastorPSMonitor::beginRun(), CastorDataIntegrityMonitor::beginRun(), RPCNoisyStripTest::beginRun(), RPCChamberQuality::beginRun(), HcalDetDiagNoiseMonitorClient::beginRun(), HcalDetDiagPedestalClient::beginRun(), HcalDetDiagTimingClient::beginRun(), HcalDigiClient::beginRun(), HcalHotCellClient::beginRun(), HcalNZSClient::beginRun(), HcalBeamClient::beginRun(), HcalCoarsePedestalClient::beginRun(), HcalTrigPrimClient::beginRun(), HcalDeadCellClient::beginRun(), HcalDetDiagLEDClient::beginRun(), HcalRecHitClient::beginRun(), HcalSummaryClient::beginRun(), RPCDataCertification::beginRun(), RPCDCSSummary::beginRun(), RPCOccupancyTest::beginRun(), HcalRawDataClient::beginRun(), RPCEventSummary::beginRun(), CastorChannelQualityMonitor::beginRun(), RPCDeadChannelTest::beginRun(), RPCMultiplicityTest::beginRun(), RPCClusterSizeTest::beginRun(), RPCEfficiencyShiftHisto::beginRun(), ZDCMonitorClient::beginRun(), DQMProvInfo::beginRun(), MuonAlignmentSummary::beginRun(), RPCEfficiencySecond::beginRun(), CastorMonitorModule::beginRun(), HcalDetDiagPedestalMonitor::beginRun(), HcalDetDiagLaserMonitor::beginRun(), HLTMonBTagIPSource::book(), HLTMonBTagMuSource::book(), HLTMonBTagClient::book(), DQMStore::IBooker::book2D(), book2D(), L1TGMTClient::bookClone2D(), TrackingQualityChecker::bookGlobalStatus(), RPCValidHistograms::bookHistograms(), L1TGT::bookHistograms(), L1TEventInfoClient::bookHistograms(), MCEmbeddingValidationAnalyzer::plotEntryTypeL1ETM::bookHistograms(), HLTOniaSource::bookOniaTriggerMEs(), RCTMonitor::BookRCT(), SiStripCertificationInfo::bookSiStripCertificationMEs(), SiStripQualityChecker::bookStatus(), TrackingCertificationInfo::bookTrackingCertificationMEs(), HcalTrigPrimMonitor::create_errorflag(), HcalTrigPrimMonitor::create_fg_correlation(), HcalTrigPrimMonitor::create_map(), HcalTrigPrimMonitor::create_summary(), HcalTrigPrimMonitor::create_tp_correlation(), CastorLEDMonitor::createFEDmap(), CSCRecHit2DValidation::CSCRecHit2DValidation(), dqmRegisterHistogram(), BTagValidator::endJob(), RPCDcsInfoClient::endRun(), DQMDcsInfoClient::endRun(), extract(), EgHLTOfflineSummaryClient::getEgHLTSumHist_(), GlobalHitsTester::GlobalHitsTester(), SiPixelMuonHLT::Histo_init(), HRes1DHit::HRes1DHit(), HRes2DHit::HRes2DHit(), HRes4DHit::HRes4DHit(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::initializeDQMHistograms(), L1ScalersClient::L1ScalersClient(), egHLT::MonElemManagerHist< T >::MonElemManagerHist(), MonitorElementsDb::MonitorElementsDb(), BTagHLTOfflineClient::runClient_(), JetMETHLTOfflineClient::runClient_(), HcalRecHitMonitor::setup(), HcalNoiseMonitor::setup(), EtaPhiHists::setup(), HcalBeamMonitor::setup(), HcalDeadCellMonitor::setup(), HcalRawDataMonitor::setup(), HcalBaseDQMonitor::setup(), HcalDigiMonitor::setup(), HcalDetDiagTimingMonitor::setup(), HcalDetDiagLEDMonitor::setup(), HLXMonitor::SetupEventInfo(), and HLXMonitor::SetupHists().

1095 {
1096  return book2D(pwd_, name, new TH2F(name, title,
1097  nchX, lowX, highX,
1098  nchY, lowY, highY));
1099 }
std::string pwd_
Definition: DQMStore.h:704
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:1092
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 1103 of file DQMStore.cc.

References book2D(), and pwd_.

1106 {
1107  return book2D(pwd_, name, new TH2F(name.c_str(), title.c_str(),
1108  nchX, lowX, highX,
1109  nchY, lowY, highY));
1110 }
std::string pwd_
Definition: DQMStore.h:704
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:1092
MonitorElement * DQMStore::book2D ( const char *  name,
const char *  title,
int  nchX,
float *  xbinsize,
int  nchY,
float *  ybinsize 
)

Book 2D variable bin histogram.

Definition at line 1158 of file DQMStore.cc.

References book2D(), and pwd_.

1160 {
1161  return book2D(pwd_, name, new TH2F(name, title,
1162  nchX, xbinsize, nchY, ybinsize));
1163 }
std::string pwd_
Definition: DQMStore.h:704
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:1092
MonitorElement * DQMStore::book2D ( const std::string &  name,
const std::string &  title,
int  nchX,
float *  xbinsize,
int  nchY,
float *  ybinsize 
)

Book 2D variable bin histogram.

Definition at line 1167 of file DQMStore.cc.

References book2D(), and pwd_.

1169 {
1170  return book2D(pwd_, name, new TH2F(name.c_str(), title.c_str(),
1171  nchX, xbinsize, nchY, ybinsize));
1172 }
std::string pwd_
Definition: DQMStore.h:704
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:1092
MonitorElement * DQMStore::book2D ( const char *  name,
TH2F *  h 
)

Book 2D histogram by cloning an existing histogram.

Definition at line 1176 of file DQMStore.cc.

References book2D(), and pwd_.

1177 {
1178  return book2D(pwd_, name, static_cast<TH2F *>(source->Clone(name)));
1179 }
std::string pwd_
Definition: DQMStore.h:704
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:1092
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book2D ( const std::string &  name,
TH2F *  h 
)

Book 2D histogram by cloning an existing histogram.

Definition at line 1183 of file DQMStore.cc.

References book2D(), and pwd_.

1184 {
1185  return book2D(pwd_, name, static_cast<TH2F *>(source->Clone(name.c_str())));
1186 }
std::string pwd_
Definition: DQMStore.h:704
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:1092
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book2D ( const std::string &  dir,
const std::string &  name,
TH2F *  h 
)
private

Book 2D histogram based on TH2F.

Definition at line 1071 of file DQMStore.cc.

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

1072 {
1073  return book(dir, name, "book2D", MonitorElement::DQM_KIND_TH2F, h, collate2D);
1074 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:819
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:1552
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 1136 of file DQMStore.cc.

References pwd_.

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

1139 {
1140  return book2DD(pwd_, name, new TH2D(name, title,
1141  nchX, lowX, highX,
1142  nchY, lowY, highY));
1143 }
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:1136
std::string pwd_
Definition: DQMStore.h:704
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 1147 of file DQMStore.cc.

References book2DD(), and pwd_.

1150 {
1151  return book2DD(pwd_, name, new TH2D(name.c_str(), title.c_str(),
1152  nchX, lowX, highX,
1153  nchY, lowY, highY));
1154 }
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:1136
std::string pwd_
Definition: DQMStore.h:704
MonitorElement* DQMStore::book2DD ( const char *  name,
const char *  title,
int  nchX,
float *  xbinsize,
int  nchY,
float *  ybinsize 
)
MonitorElement* DQMStore::book2DD ( const std::string &  name,
const std::string &  title,
int  nchX,
float *  xbinsize,
int  nchY,
float *  ybinsize 
)
MonitorElement * DQMStore::book2DD ( const char *  name,
TH2D *  h 
)

Book 2DS histogram by cloning an existing histogram.

Definition at line 1204 of file DQMStore.cc.

References book2DD(), and pwd_.

1205 {
1206  return book2DD(pwd_, name, static_cast<TH2D *>(source->Clone(name)));
1207 }
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:1136
std::string pwd_
Definition: DQMStore.h:704
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book2DD ( const std::string &  name,
TH2D *  h 
)

Book 2DS histogram by cloning an existing histogram.

Definition at line 1211 of file DQMStore.cc.

References book2DD(), and pwd_.

1212 {
1213  return book2DD(pwd_, name, static_cast<TH2D *>(source->Clone(name.c_str())));
1214 }
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:1136
std::string pwd_
Definition: DQMStore.h:704
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book2DD ( const std::string &  dir,
const std::string &  name,
TH2D *  h 
)
private

Book 2D histogram based on TH2D.

Definition at line 1085 of file DQMStore.cc.

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

1086 {
1087  return book(dir, name, "book2DD", MonitorElement::DQM_KIND_TH2D, h, collate2DD);
1088 }
static void collate2DD(MonitorElement *me, TH2D *h, unsigned verbose)
Definition: DQMStore.cc:1566
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:819
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 1114 of file DQMStore.cc.

References pwd_.

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

1117 {
1118  return book2S(pwd_, name, new TH2S(name, title,
1119  nchX, lowX, highX,
1120  nchY, lowY, highY));
1121 }
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:1114
std::string pwd_
Definition: DQMStore.h:704
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 1125 of file DQMStore.cc.

References book2S(), and pwd_.

1128 {
1129  return book2S(pwd_, name, new TH2S(name.c_str(), title.c_str(),
1130  nchX, lowX, highX,
1131  nchY, lowY, highY));
1132 }
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:1114
std::string pwd_
Definition: DQMStore.h:704
MonitorElement* DQMStore::book2S ( const char *  name,
const char *  title,
int  nchX,
float *  xbinsize,
int  nchY,
float *  ybinsize 
)
MonitorElement* DQMStore::book2S ( const std::string &  name,
const std::string &  title,
int  nchX,
float *  xbinsize,
int  nchY,
float *  ybinsize 
)
MonitorElement * DQMStore::book2S ( const char *  name,
TH2S *  h 
)

Book 2DS histogram by cloning an existing histogram.

Definition at line 1190 of file DQMStore.cc.

References book2S(), and pwd_.

1191 {
1192  return book2S(pwd_, name, static_cast<TH2S *>(source->Clone(name)));
1193 }
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:1114
std::string pwd_
Definition: DQMStore.h:704
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book2S ( const std::string &  name,
TH2S *  h 
)

Book 2DS histogram by cloning an existing histogram.

Definition at line 1197 of file DQMStore.cc.

References book2S(), and pwd_.

1198 {
1199  return book2S(pwd_, name, static_cast<TH2S *>(source->Clone(name.c_str())));
1200 }
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:1114
std::string pwd_
Definition: DQMStore.h:704
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book2S ( const std::string &  dir,
const std::string &  name,
TH2S *  h 
)
private

Book 2D histogram based on TH2S.

Definition at line 1078 of file DQMStore.cc.

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

1079 {
1080  return book(dir, name, "book2S", MonitorElement::DQM_KIND_TH2S, h, collate2S);
1081 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:819
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:1559
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 1226 of file DQMStore.cc.

References pwd_.

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

1230 {
1231  return book3D(pwd_, name, new TH3F(name, title,
1232  nchX, lowX, highX,
1233  nchY, lowY, highY,
1234  nchZ, lowZ, highZ));
1235 }
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:1226
std::string pwd_
Definition: DQMStore.h:704
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 1239 of file DQMStore.cc.

References book3D(), and pwd_.

1243 {
1244  return book3D(pwd_, name, new TH3F(name.c_str(), title.c_str(),
1245  nchX, lowX, highX,
1246  nchY, lowY, highY,
1247  nchZ, lowZ, highZ));
1248 }
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:1226
std::string pwd_
Definition: DQMStore.h:704
MonitorElement * DQMStore::book3D ( const char *  name,
TH3F *  h 
)

Book 3D histogram by cloning an existing histogram.

Definition at line 1252 of file DQMStore.cc.

References book3D(), and pwd_.

1253 {
1254  return book3D(pwd_, name, static_cast<TH3F *>(source->Clone(name)));
1255 }
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:1226
std::string pwd_
Definition: DQMStore.h:704
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book3D ( const std::string &  name,
TH3F *  h 
)

Book 3D histogram by cloning an existing histogram.

Definition at line 1259 of file DQMStore.cc.

References book3D(), and pwd_.

1260 {
1261  return book3D(pwd_, name, static_cast<TH3F *>(source->Clone(name.c_str())));
1262 }
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:1226
std::string pwd_
Definition: DQMStore.h:704
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::book3D ( const std::string &  dir,
const std::string &  name,
TH3F *  h 
)
private

Book 3D histogram based on TH3F.

Definition at line 1219 of file DQMStore.cc.

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

1220 {
1221  return book(dir, name, "book3D", MonitorElement::DQM_KIND_TH3F, h, collate3D);
1222 }
static void collate3D(MonitorElement *me, TH3F *h, unsigned verbose)
Definition: DQMStore.cc:1573
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:819
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)

Book float.

Definition at line 901 of file DQMStore.cc.

References pwd_.

Referenced by RPCDaqInfo::beginJob(), DQMFEDIntegrityClient::beginJob(), ConverterTester::beginJob(), HcalDCSInfo::beginJob(), DQMDaqInfo::beginJob(), CastorPSMonitor::beginRun(), HcalSummaryClient::beginRun(), RPCDataCertification::beginRun(), RPCDCSSummary::beginRun(), RPCEventSummary::beginRun(), CastorChannelQualityMonitor::beginRun(), ZDCMonitorClient::beginRun(), DQMProvInfo::beginRun(), DQMStore::IBooker::bookFloat(), bookFloat(), TrackingQualityChecker::bookGlobalStatus(), L1TEventInfoClient::bookHistograms(), TrackingQualityChecker::bookLSStatus(), SiStripCertificationInfo::bookSiStripCertificationMEs(), SiStripQualityChecker::bookStatus(), SiStripDaqInfo::bookStatus(), SiStripDcsInfo::bookStatus(), TrackingCertificationInfo::bookTrackingCertificationMEs(), TrackingCertificationInfo::bookTrackingCertificationMEsAtLumi(), DQMDcsInfoClient::endRun(), extract(), GlobalHitsTester::GlobalHitsTester(), EgHLTOfflineSummaryClient::runClient_(), HcalCoarsePedestalMonitor::setup(), HcalRecHitMonitor::setup(), HcalHotCellMonitor::setup(), HcalDeadCellMonitor::setup(), HLXMonitor::SetupEventInfo(), PFMETDQMAnalyzer::storeBadEvents(), PFJetDQMAnalyzer::storeBadEvents(), PFCandidateDQMAnalyzer::storeBadEvents(), and SubTaskSummaryStatus::WriteThreshold().

902 { return bookFloat(pwd_, name); }
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:901
std::string pwd_
Definition: DQMStore.h:704
MonitorElement * DQMStore::bookFloat ( const std::string &  name)

Book float.

Definition at line 906 of file DQMStore.cc.

References bookFloat(), and pwd_.

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

Book float.

Definition at line 884 of file DQMStore.cc.

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

885 {
886  if (collateHistograms_)
887  {
889  {
890  me->Fill(0.);
891  return me;
892  }
893  }
894 
895  return book(dir, name, "bookFloat")
897 }
MonitorElement * initialise(Kind kind)
MonitorElement * findObject(const std::string &dir, const std::string &name, const uint32_t run=0, const uint32_t lumi=0, const uint32_t streamId=0, const uint32_t moduleId=0) const
Definition: DQMStore.cc:1848
uint32_t streamId_
Definition: DQMStore.h:700
uint32_t moduleId_
Definition: DQMStore.h:701
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:819
uint32_t run_
Definition: DQMStore.h:699
dbl *** dir
Definition: mlp_gen.cc:35
bool collateHistograms_
Definition: DQMStore.h:694
MonitorElement * DQMStore::bookInt ( const char *  name)
MonitorElement * DQMStore::bookInt ( const std::string &  name)

Book int.

Definition at line 876 of file DQMStore.cc.

References bookInt(), and pwd_.

877 {
878  return bookInt(pwd_, name);
879 }
std::string pwd_
Definition: DQMStore.h:704
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:871
MonitorElement * DQMStore::bookInt ( const std::string &  dir,
const std::string &  name 
)
private

Book int.

Definition at line 854 of file DQMStore.cc.

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

855 {
856  if (collateHistograms_)
857  {
859  {
860  me->Fill(0);
861  return me;
862  }
863  }
864 
865  return book(dir, name, "bookInt")
867 }
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:1848
uint32_t streamId_
Definition: DQMStore.h:700
uint32_t moduleId_
Definition: DQMStore.h:701
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:819
uint32_t run_
Definition: DQMStore.h:699
dbl *** dir
Definition: mlp_gen.cc:35
bool collateHistograms_
Definition: DQMStore.h:694
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 1278 of file DQMStore.cc.

References pwd_.

Referenced by ConverterTester::beginJob(), StripValidationPlots::beginJob(), SiStripLAProfileBooker::beginRun(), BxTiming::beginRun(), DQMLumiMonitor::bookHistograms(), L1TGT::bookHistograms(), DQMStore::IBooker::bookProfile(), bookProfile(), SiStripBaseCondObjDQM::bookSummaryMEs(), SiStripBaseCondObjDQM::bookSummaryProfileMEs(), PFClient::createProfilePlots(), dqmRegisterHistogram(), JetMETDQMPostProcessor::endRun(), extract(), GlobalDigisAnalyzer::GlobalDigisAnalyzer(), GlobalDigisHistogrammer::GlobalDigisHistogrammer(), GlobalHitsTester::GlobalHitsTester(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::initializeDQMHistograms(), MonitorElementsDb::MonitorElementsDb(), HcalNZSMonitor::setup(), HcalTrigPrimMonitor::setup(), HcalRecHitMonitor::setup(), HcalBeamMonitor::setup(), HcalHotCellMonitor::setup(), HcalDeadCellMonitor::setup(), HcalRawDataMonitor::setup(), HcalDigiMonitor::setup(), and HLXMonitor::SetupHists().

1282 {
1283  return bookProfile(pwd_, name, new TProfile(name, title,
1284  nchX, lowX, highX,
1285  lowY, highY,
1286  option));
1287 }
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:1278
std::string pwd_
Definition: DQMStore.h:704
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 1293 of file DQMStore.cc.

References bookProfile(), and pwd_.

1297 {
1298  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1299  nchX, lowX, highX,
1300  lowY, highY,
1301  option));
1302 }
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:1278
std::string pwd_
Definition: DQMStore.h:704
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 1308 of file DQMStore.cc.

References bookProfile(), and pwd_.

1312 {
1313  return bookProfile(pwd_, name, new TProfile(name, title,
1314  nchX, lowX, highX,
1315  lowY, highY,
1316  option));
1317 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1278
std::string pwd_
Definition: DQMStore.h:704
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 1323 of file DQMStore.cc.

References bookProfile(), and pwd_.

1327 {
1328  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1329  nchX, lowX, highX,
1330  lowY, highY,
1331  option));
1332 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1278
std::string pwd_
Definition: DQMStore.h:704
MonitorElement * DQMStore::bookProfile ( const char *  name,
const char *  title,
int  nchX,
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 1338 of file DQMStore.cc.

References bookProfile(), and pwd_.

1342 {
1343  return bookProfile(pwd_, name, new TProfile(name, title,
1344  nchX, xbinsize,
1345  lowY, highY,
1346  option));
1347 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1278
std::string pwd_
Definition: DQMStore.h:704
MonitorElement * DQMStore::bookProfile ( const std::string &  name,
const std::string &  title,
int  nchX,
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 1353 of file DQMStore.cc.

References bookProfile(), and pwd_.

1357 {
1358  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1359  nchX, xbinsize,
1360  lowY, highY,
1361  option));
1362 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1278
std::string pwd_
Definition: DQMStore.h:704
MonitorElement * DQMStore::bookProfile ( const char *  name,
const char *  title,
int  nchX,
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 1368 of file DQMStore.cc.

References bookProfile(), and pwd_.

1372 {
1373  return bookProfile(pwd_, name, new TProfile(name, title,
1374  nchX, xbinsize,
1375  lowY, highY,
1376  option));
1377 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1278
std::string pwd_
Definition: DQMStore.h:704
MonitorElement * DQMStore::bookProfile ( const std::string &  name,
const std::string &  title,
int  nchX,
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 1383 of file DQMStore.cc.

References bookProfile(), and pwd_.

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

Book TProfile by cloning an existing profile.

Definition at line 1396 of file DQMStore.cc.

References bookProfile(), and pwd_.

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

Book TProfile by cloning an existing profile.

Definition at line 1403 of file DQMStore.cc.

References bookProfile(), and pwd_.

1404 {
1405  return bookProfile(pwd_, name, static_cast<TProfile *>(source->Clone(name.c_str())));
1406 }
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:1278
std::string pwd_
Definition: DQMStore.h:704
static std::string const source
Definition: EdmProvDump.cc:43
MonitorElement * DQMStore::bookProfile ( const std::string &  dir,
const std::string &  name,
TProfile *  h 
)
private

Book profile histogram based on TProfile.

Definition at line 1267 of file DQMStore.cc.

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

1268 {
1269  return book(dir, name, "bookProfile",
1271  h, collateProfile);
1272 }
static void collateProfile(MonitorElement *me, TProfile *h, unsigned verbose)
Definition: DQMStore.cc:1580
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:819
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 1422 of file DQMStore.cc.

References pwd_.

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

1427 {
1428  return bookProfile2D(pwd_, name, new TProfile2D(name, title,
1429  nchX, lowX, highX,
1430  nchY, lowY, highY,
1431  lowZ, highZ,
1432  option));
1433 }
std::string pwd_
Definition: DQMStore.h:704
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:1422
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 1439 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1444 {
1445  return bookProfile2D(pwd_, name, new TProfile2D(name.c_str(), title.c_str(),
1446  nchX, lowX, highX,
1447  nchY, lowY, highY,
1448  lowZ, highZ,
1449  option));
1450 }
std::string pwd_
Definition: DQMStore.h:704
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:1422
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 1456 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1461 {
1462  return bookProfile2D(pwd_, name, new TProfile2D(name, title,
1463  nchX, lowX, highX,
1464  nchY, lowY, highY,
1465  lowZ, highZ,
1466  option));
1467 }
std::string pwd_
Definition: DQMStore.h:704
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:1422
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 1473 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1478 {
1479  return bookProfile2D(pwd_, name, new TProfile2D(name.c_str(), title.c_str(),
1480  nchX, lowX, highX,
1481  nchY, lowY, highY,
1482  lowZ, highZ,
1483  option));
1484 }
std::string pwd_
Definition: DQMStore.h:704
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:1422
MonitorElement * DQMStore::bookProfile2D ( const char *  name,
TProfile2D *  h 
)

Book TProfile2D by cloning an existing profile.

Definition at line 1488 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

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

Book TProfile2D by cloning an existing profile.

Definition at line 1495 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

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

Book 2D profile histogram based on TProfile2D.

Definition at line 1411 of file DQMStore.cc.

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

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

Book string.

Definition at line 935 of file DQMStore.cc.

References bookString(), and pwd_.

936 {
937  return bookString(pwd_, name, value);
938 }
MonitorElement * bookString(const char *name, const char *value)
Book string.
Definition: DQMStore.cc:930
std::string pwd_
Definition: DQMStore.h:704
MonitorElement * DQMStore::bookString ( const std::string &  dir,
const std::string &  name,
const std::string &  value 
)
private

Book string.

Definition at line 914 of file DQMStore.cc.

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

917 {
918  if (collateHistograms_)
919  {
921  return me;
922  }
923 
924  return book(dir, name, "bookString")
926 }
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:1848
uint32_t streamId_
Definition: DQMStore.h:700
uint32_t moduleId_
Definition: DQMStore.h:701
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:819
uint32_t run_
Definition: DQMStore.h:699
dbl *** dir
Definition: mlp_gen.cc:35
bool collateHistograms_
Definition: DQMStore.h:694
template<typename iFunc >
void DQMStore::bookTransaction ( iFunc  f,
uint32_t  run,
uint32_t  streamId,
uint32_t  moduleId 
)
inline

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

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

go to top directory (ie. root)

Definition at line 654 of file DQMStore.cc.

References setCurrentFolder().

Referenced by SiStripDcsInfo::addBadModules(), DQMFileReader::beginJob(), DQMDcsInfoClient::beginRun(), DQMProvInfo::beginRun(), V0Validator::beginRun(), TrackingQualityChecker::bookGlobalStatus(), TrackingQualityChecker::bookLSStatus(), SiStripCertificationInfo::bookSiStripCertificationMEs(), SiStripQualityChecker::bookStatus(), SiStripDaqInfo::bookStatus(), SiStripDcsInfo::bookStatus(), TrackingCertificationInfo::bookTrackingCertificationMEs(), TrackingCertificationInfo::bookTrackingCertificationMEsAtLumi(), DQMStore::IBooker::cd(), EMShower::compute(), SiStripTrackerMapCreator::createForOffline(), SiStripSummaryCreator::createSummary(), SiStripActionExecutor::createSummary(), SiStripActionExecutor::createSummaryOffline(), EMShower::EMShower(), APVValidationPlots::endJob(), StripValidationPlots::endJob(), TrackingOfflineDQM::endJob(), SiStripOfflineDQM::endJob(), JetMETDQMPostProcessor::endRun(), RPCDcsInfoClient::endRun(), DQMDcsInfoClient::endRun(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::extractBadAPVSandStrips(), SiStripQualityChecker::fillDetectorStatus(), SiStripQualityChecker::fillDetectorStatusAtLumi(), SiStripQualityChecker::fillFaultyModuleStatus(), TrackingQualityChecker::fillGlobalStatus(), SiStripSummaryCreator::fillGrandSummaryHistos(), TrackingQualityChecker::fillLSStatus(), SiStripCertificationInfo::fillSiStripCertificationMEs(), SiStripCertificationInfo::fillSiStripCertificationMEsAtLumi(), SiStripQualityChecker::fillSubDetStatus(), SiStripSummaryCreator::fillSummaryHistos(), TrackingCertificationInfo::fillTrackingCertificationMEs(), TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi(), TrackingQualityChecker::fillTrackingStatus(), TrackingQualityChecker::fillTrackingStatusAtLumi(), 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(), TrackingUtility::getModuleFolderList(), SiStripUtility::getModuleFolderList(), SiStripSummaryCreator::getSummaryME(), TrackingUtility::getTopFolderPath(), SiStripUtility::getTopFolderPath(), TrackingUtility::goToDir(), SiStripUtility::goToDir(), DQMProvInfo::makeHLTKeyInfo(), DQMProvInfo::makeProvInfo(), SiStripInformationExtractor::printAlarmList(), SiStripActionExecutor::printFaultyModuleList(), SiStripInformationExtractor::printNonGeomHistoList(), SiStripInformationExtractor::printSummaryHistoList(), readFilePB(), ElectronDqmAnalyzerBase::remove_other_dirs(), ZDCMonitorClient::removeAllME(), HLXMonitor::SaveDQMFile(), SiStripTrackerMapCreator::setTkMapFromHistogram(), HLXMonitor::SetupHists(), and dqm_interfaces.DirWalkerFile::walk().

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

cd to subdirectory (if there)

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

660 {
662  const std::string *cleaned = 0;
663  cleanTrailingSlashes(subdir, clean, cleaned);
664 
665  if (! dirExists(*cleaned))
666  raiseDQMError("DQMStore", "Cannot 'cd' into non-existent directory '%s'",
667  cleaned->c_str());
668 
669  setCurrentFolder(*cleaned);
670 }
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:742
void setCurrentFolder(const std::string &fullpath)
Definition: DQMStore.cc:677
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 2385 of file DQMStore.cc.

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

Referenced by save().

2386 {
2387  assert(! path.empty());
2388 
2389  // Find the first path component.
2390  size_t start = 0;
2391  size_t end = path.find('/', start);
2392  if (end == std::string::npos)
2393  end = path.size();
2394 
2395  while (true)
2396  {
2397  // Check if this subdirectory component exists. If yes, make sure
2398  // it is actually a subdirectory. Otherwise create or cd into it.
2399  std::string part(path, start, end-start);
2400  TObject *o = gDirectory->Get(part.c_str());
2401  if (o && ! dynamic_cast<TDirectory *>(o))
2402  raiseDQMError("DQMStore", "Attempt to create directory '%s' in a file"
2403  " fails because the part '%s' already exists and is not"
2404  " directory", path.c_str(), part.c_str());
2405  else if (! o)
2406  gDirectory->mkdir(part.c_str());
2407 
2408  if (! gDirectory->cd(part.c_str()))
2409  raiseDQMError("DQMStore", "Attempt to create directory '%s' in a file"
2410  " fails because could not cd into subdirectory '%s'",
2411  path.c_str(), part.c_str());
2412 
2413  // Stop if we reached the end, ignoring any trailing '/'.
2414  if (end+1 >= path.size())
2415  break;
2416 
2417  // Find the next path component.
2418  start = end+1;
2419  end = path.find('/', start);
2420  if (end == std::string::npos)
2421  end = path.size();
2422  }
2423 
2424  return true;
2425 }
tuple start
Check for commandline option errors.
Definition: dqm_diff.py:58
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 1504 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().

1505 {
1506  if (me->getTH1()->GetNbinsX() != h->GetNbinsX()
1507  || me->getTH1()->GetNbinsY() != h->GetNbinsY()
1508  || me->getTH1()->GetNbinsZ() != h->GetNbinsZ()
1509  || me->getTH1()->GetXaxis()->GetXmin() != h->GetXaxis()->GetXmin()
1510  || me->getTH1()->GetYaxis()->GetXmin() != h->GetYaxis()->GetXmin()
1511  || me->getTH1()->GetZaxis()->GetXmin() != h->GetZaxis()->GetXmin()
1512  || me->getTH1()->GetXaxis()->GetXmax() != h->GetXaxis()->GetXmax()
1513  || me->getTH1()->GetYaxis()->GetXmax() != h->GetYaxis()->GetXmax()
1514  || me->getTH1()->GetZaxis()->GetXmax() != h->GetZaxis()->GetXmax()
1515  || !MonitorElement::CheckBinLabels((TAxis*)me->getTH1()->GetXaxis(),(TAxis*)h->GetXaxis())
1516  || !MonitorElement::CheckBinLabels((TAxis*)me->getTH1()->GetYaxis(),(TAxis*)h->GetYaxis())
1517  || !MonitorElement::CheckBinLabels((TAxis*)me->getTH1()->GetZaxis(),(TAxis*)h->GetZaxis()) )
1518  {
1519  if(verbose > 0)
1520  std::cout << "*** DQMStore: WARNING:"
1521  << "checkBinningMatches: different binning - cannot add object '"
1522  << h->GetName() << "' of type "
1523  << h->IsA()->GetName() << " to existing ME: '"
1524  << me->getFullname() << "'\n";
1525  return false;
1526  }
1527  return true;
1528 }
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 1531 of file DQMStore.cc.

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

Referenced by book1D(), and extract().

1532 {
1533  if (checkBinningMatches(me,h,verbose))
1534  me->getTH1F()->Add(h);
1535 }
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:1504
void DQMStore::collate1DD ( MonitorElement me,
TH1D *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1545 of file DQMStore.cc.

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

Referenced by book1DD(), and extract().

1546 {
1547  if (checkBinningMatches(me,h,verbose))
1548  me->getTH1D()->Add(h);
1549 }
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:1504
void DQMStore::collate1S ( MonitorElement me,
TH1S *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1538 of file DQMStore.cc.

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

Referenced by book1S(), and extract().

1539 {
1540  if (checkBinningMatches(me,h,verbose))
1541  me->getTH1S()->Add(h);
1542 }
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:1504
void DQMStore::collate2D ( MonitorElement me,
TH2F *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1552 of file DQMStore.cc.

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

Referenced by book2D(), and extract().

1553 {
1554  if (checkBinningMatches(me,h,verbose))
1555  me->getTH2F()->Add(h);
1556 }
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:1504
TH2F * getTH2F(void) const
void DQMStore::collate2DD ( MonitorElement me,
TH2D *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1566 of file DQMStore.cc.

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

Referenced by book2DD(), and extract().

1567 {
1568  if (checkBinningMatches(me,h,verbose))
1569  me->getTH2D()->Add(h);
1570 }
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:1504
void DQMStore::collate2S ( MonitorElement me,
TH2S *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1559 of file DQMStore.cc.

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

Referenced by book2S(), and extract().

1560 {
1561  if (checkBinningMatches(me,h,verbose))
1562  me->getTH2S()->Add(h);
1563 }
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:1504
void DQMStore::collate3D ( MonitorElement me,
TH3F *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1573 of file DQMStore.cc.

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

Referenced by book3D(), and extract().

1574 {
1575  if (checkBinningMatches(me,h,verbose))
1576  me->getTH3F()->Add(h);
1577 }
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:1504
void DQMStore::collateProfile ( MonitorElement me,
TProfile *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1580 of file DQMStore.cc.

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

Referenced by bookProfile(), and extract().

1581 {
1582  if (checkBinningMatches(me,h,verbose))
1583  {
1584  TProfile *meh = me->getTProfile();
1585  me->addProfiles(h, meh, meh, 1, 1);
1586  }
1587 }
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:1504
void DQMStore::collateProfile2D ( MonitorElement me,
TProfile2D *  h,
unsigned  verbose 
)
staticprivate

Definition at line 1590 of file DQMStore.cc.

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

Referenced by bookProfile2D(), and extract().

1591 {
1592  if (checkBinningMatches(me,h,verbose))
1593  {
1594  TProfile2D *meh = me->getTProfile2D();
1595  me->addProfiles(h, meh, meh, 1, 1);
1596  }
1597 }
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:1504
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 1708 of file DQMStore.cc.

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

1709 {
1710  MonitorElement proto(&path, std::string());
1711  MEMap::const_iterator e = data_.end();
1712  MEMap::const_iterator i = data_.lower_bound(proto);
1713  return (i != e && isSubdirectory(path, *i->data_.dirname));
1714 }
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:705
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 3195 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().

3196 {
3197  if (qtests_.count(qtname))
3198  raiseDQMError("DQMStore", "Attempt to create duplicate quality test '%s'",
3199  qtname.c_str());
3200 
3201  QAMap::iterator i = qalgos_.find(algoname);
3202  if (i == qalgos_.end())
3203  raiseDQMError("DQMStore", "Cannot create a quality test using unknown"
3204  " algorithm '%s'", algoname.c_str());
3205 
3206  QCriterion *qc = i->second(qtname);
3207  qc->setVerbose(verboseQT_);
3208 
3209  qtests_[qtname] = qc;
3210  return qc;
3211 }
int i
Definition: DBlmapReader.cc:9
QCMap qtests_
Definition: DQMStore.h:708
unsigned verboseQT_
Definition: DQMStore.h:691
QAMap qalgos_
Definition: DQMStore.h:709
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 3329 of file DQMStore.cc.

References MonitorElement::disableSoftReset().

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

3330 {
3331  if (me)
3332  me->disableSoftReset();
3333 }
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 2089 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(), diffTwoXMLs::label, m, autoMagneticFieldProducer_cfi::master, DQMNet::QValue::message, 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().

2091 {
2092  // NB: Profile histograms inherit from TH*D, checking order matters.
2093  MonitorElement *refcheck = 0;
2094  if (TProfile *h = dynamic_cast<TProfile *>(obj))
2095  {
2096  MonitorElement *me = findObject(dir, h->GetName());
2097  if (! me)
2098  me = bookProfile(dir, h->GetName(), (TProfile *) h->Clone());
2099  else if (overwrite)
2100  me->copyFrom(h);
2101  else if (isCollateME(me) || collateHistograms)
2102  collateProfile(me, h, verbose_);
2103  refcheck = me;
2104  }
2105  else if (TProfile2D *h = dynamic_cast<TProfile2D *>(obj))
2106  {
2107  MonitorElement *me = findObject(dir, h->GetName());
2108  if (! me)
2109  me = bookProfile2D(dir, h->GetName(), (TProfile2D *) h->Clone());
2110  else if (overwrite)
2111  me->copyFrom(h);
2112  else if (isCollateME(me) || collateHistograms)
2113  collateProfile2D(me, h, verbose_);
2114  refcheck = me;
2115  }
2116  else if (TH1F *h = dynamic_cast<TH1F *>(obj))
2117  {
2118  MonitorElement *me = findObject(dir, h->GetName());
2119  if (! me)
2120  me = book1D(dir, h->GetName(), (TH1F *) h->Clone());
2121  else if (overwrite)
2122  me->copyFrom(h);
2123  else if (isCollateME(me) || collateHistograms)
2124  collate1D(me, h, verbose_);
2125  refcheck = me;
2126  }
2127  else if (TH1S *h = dynamic_cast<TH1S *>(obj))
2128  {
2129  MonitorElement *me = findObject(dir, h->GetName());
2130  if (! me)
2131  me = book1S(dir, h->GetName(), (TH1S *) h->Clone());
2132  else if (overwrite)
2133  me->copyFrom(h);
2134  else if (isCollateME(me) || collateHistograms)
2135  collate1S(me, h, verbose_);
2136  refcheck = me;
2137  }
2138  else if (TH1D *h = dynamic_cast<TH1D *>(obj))
2139  {
2140  MonitorElement *me = findObject(dir, h->GetName());
2141  if (! me)
2142  me = book1DD(dir, h->GetName(), (TH1D *) h->Clone());
2143  else if (overwrite)
2144  me->copyFrom(h);
2145  else if (isCollateME(me) || collateHistograms)
2146  collate1DD(me, h, verbose_);
2147  refcheck = me;
2148  }
2149  else if (TH2F *h = dynamic_cast<TH2F *>(obj))
2150  {
2151  MonitorElement *me = findObject(dir, h->GetName());
2152  if (! me)
2153  me = book2D(dir, h->GetName(), (TH2F *) h->Clone());
2154  else if (overwrite)
2155  me->copyFrom(h);
2156  else if (isCollateME(me) || collateHistograms)
2157  collate2D(me, h, verbose_);
2158  refcheck = me;
2159  }
2160  else if (TH2S *h = dynamic_cast<TH2S *>(obj))
2161  {
2162  MonitorElement *me = findObject(dir, h->GetName());
2163  if (! me)
2164  me = book2S(dir, h->GetName(), (TH2S *) h->Clone());
2165  else if (overwrite)
2166  me->copyFrom(h);
2167  else if (isCollateME(me) || collateHistograms)
2168  collate2S(me, h, verbose_);
2169  refcheck = me;
2170  }
2171  else if (TH2D *h = dynamic_cast<TH2D *>(obj))
2172  {
2173  MonitorElement *me = findObject(dir, h->GetName());
2174  if (! me)
2175  me = book2DD(dir, h->GetName(), (TH2D *) h->Clone());
2176  else if (overwrite)
2177  me->copyFrom(h);
2178  else if (isCollateME(me) || collateHistograms)
2179  collate2DD(me, h, verbose_);
2180  refcheck = me;
2181  }
2182  else if (TH3F *h = dynamic_cast<TH3F *>(obj))
2183  {
2184  MonitorElement *me = findObject(dir, h->GetName());
2185  if (! me)
2186  me = book3D(dir, h->GetName(), (TH3F *) h->Clone());
2187  else if (overwrite)
2188  me->copyFrom(h);
2189  else if (isCollateME(me) || collateHistograms)
2190  collate3D(me, h, verbose_);
2191  refcheck = me;
2192  }
2193  else if (dynamic_cast<TObjString *>(obj))
2194  {
2195  lat::RegexpMatch m;
2196  if (! s_rxmeval.match(obj->GetName(), 0, 0, &m))
2197  {
2198  if (strstr(obj->GetName(), "CMSSW"))
2199  {
2200  if (verbose_)
2201  std::cout << "Input file version: " << obj->GetName() << std::endl;
2202  return true;
2203  }
2204  else if (strstr(obj->GetName(), "DQMPATCH"))
2205  {
2206  if (verbose_)
2207  std::cout << "DQM patch version: " << obj->GetName() << std::endl;
2208  return true;
2209  }
2210  else
2211  {
2212  std::cout << "*** DQMStore: WARNING: cannot extract object '"
2213  << obj->GetName() << "' of type '"
2214  << obj->IsA()->GetName() << "'\n";
2215  return false;
2216  }
2217  }
2218 
2219  std::string label = m.matchString(obj->GetName(), 1);
2220  std::string kind = m.matchString(obj->GetName(), 2);
2221  std::string value = m.matchString(obj->GetName(), 3);
2222 
2223  if (kind == "i")
2224  {
2225  MonitorElement *me = findObject(dir, label);
2226  if (! me || overwrite)
2227  {
2228  if (! me) me = bookInt(dir, label);
2229  me->Fill(atoll(value.c_str()));
2230  }
2231  }
2232  else if (kind == "f")
2233  {
2234  MonitorElement *me = findObject(dir, label);
2235  if (! me || overwrite)
2236  {
2237  if (! me) me = bookFloat(dir, label);
2238  me->Fill(atof(value.c_str()));
2239  }
2240  }
2241  else if (kind == "s")
2242  {
2243  MonitorElement *me = findObject(dir, label);
2244  if (! me)
2245  me = bookString(dir, label, value);
2246  else if (overwrite)
2247  me->Fill(value);
2248  }
2249  else if (kind == "e")
2250  {
2251  MonitorElement *me = findObject(dir, label);
2252  if (! me)
2253  {
2254  std::cout << "*** DQMStore: WARNING: no monitor element '"
2255  << label << "' in directory '"
2256  << dir << "' to be marked as efficiency plot.\n";
2257  return false;
2258  }
2259  me->setEfficiencyFlag();
2260  }
2261  else if (kind == "t")
2262  {
2263  MonitorElement *me = findObject(dir, label);
2264  if (! me)
2265  {
2266  std::cout << "*** DQMStore: WARNING: no monitor element '"
2267  << label << "' in directory '"
2268  << dir << "' for a tag\n";
2269  return false;
2270  }
2271  errno = 0;
2272  char *endp = 0;
2273  unsigned long val = strtoul(value.c_str(), &endp, 10);
2274  if ((val == 0 && errno) || *endp || val > ~uint32_t(0))
2275  {
2276  std::cout << "*** DQMStore: WARNING: cannot restore tag '"
2277  << value << "' for monitor element '"
2278  << label << "' in directory '"
2279  << dir << "' - invalid value\n";
2280  return false;
2281  }
2282  tag(me, val);
2283  }
2284  else if (kind == "qr")
2285  {
2286  // Handle qreports, but skip them while reading in references.
2288  {
2289  size_t dot = label.find('.');
2290  if (dot == std::string::npos)
2291  {
2292  std::cout << "*** DQMStore: WARNING: quality report label in '" << label
2293  << "' is missing a '.' and cannot be extracted\n";
2294  return false;
2295  }
2296 
2297  std::string mename (label, 0, dot);
2298  std::string qrname (label, dot+1, std::string::npos);
2299 
2300  m.reset();
2301  DQMNet::QValue qv;
2302  if (s_rxmeqr1.match(value, 0, 0, &m))
2303  {
2304  qv.code = atoi(m.matchString(value, 1).c_str());
2305  qv.qtresult = strtod(m.matchString(value, 2).c_str(), 0);
2306  qv.message = m.matchString(value, 4);
2307  qv.qtname = qrname;
2308  qv.algorithm = m.matchString(value, 3);
2309  }
2310  else if (s_rxmeqr2.match(value, 0, 0, &m))
2311  {
2312  qv.code = atoi(m.matchString(value, 1).c_str());
2313  qv.qtresult = 0; // unavailable in old format
2314  qv.message = m.matchString(value, 2);
2315  qv.qtname = qrname;
2316  // qv.algorithm unavailable in old format
2317  }
2318  else
2319  {
2320  std::cout << "*** DQMStore: WARNING: quality test value '"
2321  << value << "' is incorrectly formatted\n";
2322  return false;
2323  }
2324 
2325  MonitorElement *me = findObject(dir, mename);
2326  if (! me)
2327  {
2328  std::cout << "*** DQMStore: WARNING: no monitor element '"
2329  << mename << "' in directory '"
2330  << dir << "' for quality test '"
2331  << label << "'\n";
2332  return false;
2333  }
2334 
2335  me->addQReport(qv, /* FIXME: getQTest(qv.qtname)? */ 0);
2336  }
2337  }
2338  else
2339  {
2340  std::cout << "*** DQMStore: WARNING: cannot extract object '"
2341  << obj->GetName() << "' of type '"
2342  << obj->IsA()->GetName() << "'\n";
2343  return false;
2344  }
2345  }
2346  else if (TNamed *n = dynamic_cast<TNamed *>(obj))
2347  {
2348  // For old DQM data.
2349  std::string s;
2350  s.reserve(6 + strlen(n->GetTitle()) + 2*strlen(n->GetName()));
2351  s += '<'; s += n->GetName(); s += '>';
2352  s += n->GetTitle();
2353  s += '<'; s += '/'; s += n->GetName(); s += '>';
2354  TObjString os(s.c_str());
2355  return extract(&os, dir, overwrite, collateHistograms_);
2356  }
2357  else
2358  {
2359  std::cout << "*** DQMStore: WARNING: cannot extract object '"
2360  << obj->GetName() << "' of type '" << obj->IsA()->GetName()
2361  << "' and with title '" << obj->GetTitle() << "'\n";
2362  return false;
2363  }
2364 
2365  // If we just read in a reference monitor element, and there is a
2366  // monitor element with the same name, link the two together. The
2367  // other direction is handled by the initialise() method.
2368  if (refcheck && isSubdirectory(s_referenceDirName, dir))
2369  {
2370  std::string mdir(dir, s_referenceDirName.size()+1, std::string::npos);
2371  if (MonitorElement *master = findObject(mdir, obj->GetName()))
2372  {
2373  master->data_.flags |= DQMNet::DQM_PROP_HAS_REFERENCE;
2374  master->reference_ = refcheck->object_;
2375  }
2376  }
2377 
2378  return true;
2379 }
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:1114
bool isCollateME(MonitorElement *me) const
Definition: DQMStore.cc:3377
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:964
static void collate3D(MonitorElement *me, TH3F *h, unsigned verbose)
Definition: DQMStore.cc:1573
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:1848
static void collateProfile(MonitorElement *me, TProfile *h, unsigned verbose)
Definition: DQMStore.cc:1580
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:1226
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:1136
static void collate2DD(MonitorElement *me, TH2D *h, unsigned verbose)
Definition: DQMStore.cc:1566
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
Definition: DQMStore.cc:996
MonitorElement * bookFloat(const char *name)
Book float.
Definition: DQMStore.cc:901
void Fill(long long x)
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1604
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:930
static void collateProfile2D(MonitorElement *me, TProfile2D *h, unsigned verbose)
Definition: DQMStore.cc:1590
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:1278
std::string qtname
Definition: DQMNet.h:92
static void collate1DD(MonitorElement *me, TH1D *h, unsigned verbose)
Definition: DQMStore.cc:1545
unsigned verbose_
Definition: DQMStore.h:690
static const std::string s_referenceDirName
Definition: DQMStore.cc:54
static void collate1D(MonitorElement *me, TH1F *h, unsigned verbose)
Definition: DQMStore.cc:1531
bool extract(TObject *obj, const std::string &dir, bool overwrite, bool collateHistograms)
Definition: DQMStore.cc:2089
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:1538
dbl *** dir
Definition: mlp_gen.cc:35
static void collate2D(MonitorElement *me, TH2F *h, unsigned verbose)
Definition: DQMStore.cc:1552
MonitorElement * bookInt(const char *name)
Book int.
Definition: DQMStore.cc:871
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:1092
tuple collateHistograms
float qtresult
Definition: DQMNet.h:90
bool collateHistograms_
Definition: DQMStore.h:694
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:980
static const lat::Regexp s_rxmeqr1("^st:(\\d+):([-+e.\\d]+):([^:]*):(.*)$")
static void collate2S(MonitorElement *me, TH2S *h, unsigned verbose)
Definition: DQMStore.cc:1559
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:1422
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 3007 of file DQMStore.cc.

Referenced by get_info().

3007  {
3008  if (buf.Length() == buf.BufferSize())
3009  return 0;
3010  buf.InitMap();
3011  void *ptr = buf.ReadObjectAny(0);
3012  return reinterpret_cast<TObject *>(ptr);
3013 }
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 1848 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().

1854 {
1855  if (dir.find_first_not_of(s_safe) != std::string::npos)
1856  raiseDQMError("DQMStore", "Monitor element path name '%s' uses"
1857  " unacceptable characters", dir.c_str());
1858  if (name.find_first_not_of(s_safe) != std::string::npos)
1859  raiseDQMError("DQMStore", "Monitor element path name '%s' uses"
1860  " unacceptable characters", name.c_str());
1861 
1862  MonitorElement proto;
1863  proto.data_.dirname = &dir;
1864  proto.data_.objname = name;
1865  proto.data_.run = run;
1866  proto.data_.lumi = lumi;
1867  proto.data_.streamId = streamId;
1868  proto.data_.moduleId = moduleId;
1869 
1870  MEMap::const_iterator mepos = data_.find(proto);
1871  return (mepos == data_.end() ? 0
1872  : const_cast<MonitorElement *>(&*mepos));
1873 }
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:705
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 2029 of file DQMStore.cc.

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

Referenced by DQMStore().

2030 {
2031  MEMap::iterator mi = data_.begin();
2032  MEMap::iterator me = data_.end();
2033  for ( ; mi != me; ++mi)
2034  {
2035  if (forceResetOnBeginLumi_ && ((*mi).getLumiFlag() == false))
2036  continue;
2037  MonitorElement &me = const_cast<MonitorElement &>(*mi);
2038  me.Reset();
2039  me.resetUpdate();
2040  }
2041 
2042  reset_ = true;
2043 }
void resetUpdate(void)
reset &quot;was updated&quot; flag
bool reset_
Definition: DQMStore.h:692
MEMap data_
Definition: DQMStore.h:705
bool forceResetOnBeginLumi_
Definition: DQMStore.h:697
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 1718 of file DQMStore.cc.

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

Referenced by Options.Options::__getitem__(), betterConfigParser.BetterConfigParser::__updateDict(), SiStripDcsInfo::addBadModules(), HcalDigiClient::analyze(), HcalRecHitClient::analyze(), HcalSummaryClient::analyze(), RPCMon_SS_Dbx_Global::analyze(), HcalBaseDQMonitor::analyze(), RPCDBPopConAnalyzer::analyze(), TrackerOfflineValidationSummary::associateModuleHistsWithTree(), L1EmulatorErrorFlagClient::beginJob(), RPCNoisyStripTest::beginRun(), RPCChamberQuality::beginRun(), HcalCoarsePedestalClient::beginRun(), HcalSummaryClient::beginRun(), RPCMon_SS_Dbx_Global::beginRun(), RPCOccupancyTest::beginRun(), RPCBxTest::beginRun(), RPCEventSummary::beginRun(), RPCDeadChannelTest::beginRun(), RPCMultiplicityTest::beginRun(), RPCClusterSizeTest::beginRun(), ZDCMonitorClient::beginRun(), CalibrationScanTask::book(), CalibrationTask::book(), L1TEventInfoClient::bookHistograms(), HcalHotCellClient::calculateProblems(), HcalDigiClient::calculateProblems(), HcalTrigPrimClient::calculateProblems(), HcalCoarsePedestalClient::calculateProblems(), HcalDeadCellClient::calculateProblems(), HcalDetDiagPedestalClient::calculateProblems(), HcalBeamClient::calculateProblems(), HcalRawDataClient::calculateProblems(), RPCOccupancyTest::clientOperation(), RPCEventSummary::clientOperation(), rrapi.RRApi::columns(), EMShower::compute(), rrapi.RRApi::count(), PFClient_JetRes::createEfficiencyPlots(), PFClient::createEfficiencyPlots(), createH2CompTest(), createH2ContentTest(), EgHLTOfflineClient::createHLTvsOfflineHists(), EgHLTOfflineClient::createLooseTightTrigEff(), EgHLTOfflineClient::createN1EffHists(), PFClient::createProfilePlots(), PFClient::createProjectionPlots(), PFClient_JetRes::createResolutionPlots(), PFClient::createResolutionPlots(), SiStripActionExecutor::createShiftReport(), EgHLTOfflineClient::createSingleEffHists(), EgHLTOfflineClient::createTrigTagProbeEffHists(), EgHLTOfflineClient::createTrigTagProbeEffHists2Leg(), EgHLTOfflineClient::createTrigTagProbeEffHistsNewAlgo(), rrapi.RRApi::data(), dqmCopyRecursively(), L1TEventInfoClient::dumpContentMonitorElements(), EMShower::EMShower(), HarvestingAnalyzer::endJob(), MuonAlignment::endJob(), RPCDcsInfoClient::endLuminosityBlock(), DQMDcsInfoClient::endLuminosityBlock(), SiStripMonitorDigi::endLuminosityBlock(), HcalLSbyLSMonitor::endLuminosityBlock(), L1ScalersClient::endLuminosityBlock(), TrackEfficiencyClient::endLuminosityBlock(), HLTScalersClient::endLuminosityBlock(), JetMETDQMPostProcessor::endRun(), RPCDcsInfoClient::endRun(), DQMDcsInfoClient::endRun(), RPCRecHitProbabilityClient::endRun(), TauDQMHistEffProducer::endRun(), RPCEfficiencyShiftHisto::endRun(), RPCEfficiencyPerRingLayer::endRun(), MuonAlignmentSummary::endRun(), RPCEfficiencySecond::endRun(), TauDQMHistPlotter::endRun(), ZDCMonitorClient::errorSummary(), SiStripQualityChecker::fillDetectorStatusAtLumi(), SiStripQualityChecker::fillFaultyModuleStatus(), DQMFEDIntegrityClient::fillHistograms(), EgHLTOfflineClient::FillHLTvsOfflineHist(), RPCChamberQuality::fillMonitorElements(), HcalSummaryClient::fillReportSummary(), HcalSummaryClient::fillReportSummaryLSbyLS(), SiStripCertificationInfo::fillSiStripCertificationMEs(), SiStripCertificationInfo::fillSiStripCertificationMEsAtLumi(), TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi(), PFDQMEventSelector::filter(), SiStripDaqInfo::findExcludedModule(), ElectronDqmAnalyzerBase::get(), L1TGMTClient::get1DHisto(), L1TGMTClient::get2DHisto(), getAnyHisto(), betterConfigParser.BetterConfigParser::getCompares(), SiStripTrackerMapCreator::getDetectorFlagAndComment(), EgHLTOfflineSummaryClient::getEgHLTSumHist_(), betterConfigParser.BetterConfigParser::getGeneral(), HcalRawDataClient::getHardwareSpaceHistos(), getHisto(), getHisto2(), getHistoTH3F(), getHistoTProfile(), getHistoTProfile2D(), rpcdqmclient::clientTools::getMEs(), SiStripQualityChecker::getModuleStatus(), RPCDqmClient::getMonitorElements(), betterConfigParser.BetterConfigParser::getResultingSection(), getTH1F(), L1TDTTFClient::getTH1F(), getTH2F(), L1TDTTFClient::getTH2F(), getTH3F(), getTProfile(), getTProfile2D(), htmlErrors(), HcalDetDiagLEDClient::htmlOutput(), HcalDetDiagPedestalClient::htmlOutput(), HcalBaseDQMonitor::IsAllowedCalibType(), TkHistoMap::loadTkHistoMap(), EgHLTOfflineClient::makeEffMonElem2Leg(), EgHLTOfflineClient::makeEffMonElemFromPassAndAll(), EgHLTOfflineClient::makeEffMonElemFromPassAndFail(), EgHLTOfflineClient::makeEffMonElemFromPassAndFailAndTagTag(), SiStripHistoPlotter::makePlot(), RPCChamberQuality::performeClientOperation(), SiStripInformationExtractor::plotHistosFromLayout(), TrackingActionExecutor::printShiftHistoParameters(), SiStripActionExecutor::printShiftHistoParameters(), QTestStatusChecker::processAlarms(), L1TEventInfoClient::readQtResults(), rrapi.RRApi::report(), rrapi.RRApi::reports(), CastorLEDMonitor::reset(), resetME(), EgHLTOfflineSummaryClient::runClient_(), L1EmulatorErrorFlagClient::setSummary(), PFJetDQMAnalyzer::storeBadEvents(), PFMETDQMAnalyzer::storeBadEvents(), PFCandidateDQMAnalyzer::storeBadEvents(), rrapi.RRApi::tables(), rrapi.RRApi::tags(), rrapi.RRApi::templates(), HcalDetDiagLEDClient::validHtmlOutput(), HcalDetDiagPedestalClient::validHtmlOutput(), rrapi.RRApi::workspaces(), and SubTaskSummaryStatus::WriteThreshold().

1719 {
1720  std::string dir;
1721  std::string name;
1722  splitPath(dir, name, path);
1723  MonitorElement proto(&dir, name);
1724  MEMap::const_iterator mepos = data_.find(proto);
1725  return (mepos == data_.end() ? 0
1726  : const_cast<MonitorElement *>(&*mepos));
1727 }
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:705
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 1731 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().

1732 {
1733  // FIXME: Use reverse map [tag -> path] / [tag -> dir]?
1734  std::vector<MonitorElement *> result;
1735  for (MEMap::const_iterator i = data_.begin(), e = data_.end(); i != e; ++i)
1736  {
1737  const MonitorElement &me = *i;
1738  if ((me.data_.flags & DQMNet::DQM_PROP_TAGGED) && me.data_.tag == tag)
1739  result.push_back(const_cast<MonitorElement *>(&me));
1740  }
1741  return result;
1742 }
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:1604
tuple result
Definition: query.py:137
DQMNet::CoreObject data_
MEMap data_
Definition: DQMStore.h:705
void DQMStore::get_info ( const dqmstorepb::ROOTFilePB_Histo h,
std::string &  dirname,
std::string &  objname,
TObject **  obj 
)
private

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

3018  {
3019 
3020  size_t slash = h.full_pathname().rfind('/');
3021  size_t dirpos = (slash == std::string::npos ? 0 : slash);
3022  size_t namepos = (slash == std::string::npos ? 0 : slash+1);
3023  dirname.assign(h.full_pathname(), 0, dirpos);
3024  objname.assign(h.full_pathname(), namepos, std::string::npos);
3025  TBufferFile buf(TBufferFile::kRead, h.size(),
3026  (void*)h.streamed_histo().data(),
3027  kFALSE);
3028  buf.Reset();
3029  *obj = extractNextObject(buf);
3030  if (!*obj) {
3031  raiseDQMError("DQMStore", "Error reading element:'%s'" , h.full_pathname().c_str());
3032  }
3033 }
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:3007
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 1931 of file DQMStore.cc.

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

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

1934 {
1936  const std::string *cleaned = 0;
1937  cleanTrailingSlashes(path, clean, cleaned);
1938  MonitorElement proto(cleaned, std::string(), runNumber);
1939  proto.setLumi(lumi);
1940 
1941  std::vector<MonitorElement *> result;
1942  MEMap::const_iterator e = data_.end();
1943  MEMap::const_iterator i = data_.lower_bound(proto);
1944  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i) {
1945  if (runNumber != 0) {
1946  if (i->data_.run > runNumber // TODO[rovere]: pleonastic? first we encounter local ME of the same run ...
1947  || i->data_.streamId != 0
1948  || i->data_.moduleId != 0)
1949  break;
1950  }
1951  if (lumi != 0) {
1952  if (i->data_.lumi > lumi
1953  || i->data_.streamId != 0
1954  || i->data_.moduleId != 0)
1955  break;
1956  }
1957  if (runNumber != 0 or lumi !=0) {
1958  assert(i->data_.streamId == 0);
1959  assert(i->data_.moduleId == 0);
1960  }
1961  result.push_back(const_cast<MonitorElement *>(&*i));
1962  }
1963  return result;
1964 }
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
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:705
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 1878 of file DQMStore.cc.

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

1879 {
1880  into.clear();
1881  into.reserve(dirs_.size());
1882 
1883  MEMap::const_iterator me = data_.end();
1884  std::set<std::string>::const_iterator di = dirs_.begin();
1885  std::set<std::string>::const_iterator de = dirs_.end();
1886  char tagbuf[32]; // more than enough for '/' and up to 10 digits
1887 
1888  for ( ; di != de; ++di)
1889  {
1890  MonitorElement proto(&*di, std::string());
1891  MEMap::const_iterator mi = data_.lower_bound(proto);
1892  MEMap::const_iterator m = mi;
1893  size_t sz = di->size() + 2;
1894  size_t nfound = 0;
1895  for ( ; m != me && isSubdirectory(*di, *m->data_.dirname); ++m)
1896  if (*di == *m->data_.dirname && (m->data_.flags & DQMNet::DQM_PROP_TAGGED))
1897  {
1898  // the tags count for '/' + up to 10 digits, otherwise ',' + ME name
1899  sz += 1 + m->data_.objname.size() + 11;
1900  ++nfound;
1901  }
1902 
1903  if (! nfound)
1904  continue;
1905 
1906  std::vector<std::string>::iterator istr
1907  = into.insert(into.end(), std::string());
1908 
1909  istr->reserve(sz);
1910 
1911  *istr += *di;
1912  *istr += ':';
1913  for (sz = 0; mi != m; ++mi)
1914  {
1915  if (*di == *m->data_.dirname && (m->data_.flags & DQMNet::DQM_PROP_TAGGED))
1916  {
1917  sprintf(tagbuf, "/%u", mi->data_.tag);
1918  if (sz > 0)
1919  *istr += ',';
1920  *istr += m->data_.objname;
1921  *istr += tagbuf;
1922  ++sz;
1923  }
1924  }
1925  }
1926 }
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:705
std::set< std::string > dirs_
Definition: DQMStore.h:706
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 1747 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(), TrackingCertificationInfo::fillTrackingCertificationMEs(), TrackingCertificationInfo::fillTrackingCertificationMEsAtLumi(), TrackingQualityChecker::fillTrackingStatus(), TrackingQualityChecker::fillTrackingStatusAtLumi(), QTestStatusChecker::fullPathNames(), DQMStore::IGetter::getContents(), SiStripSummaryCreator::getSummaryME(), SiStripHistoPlotter::makeCondDBPlots(), SiStripInformationExtractor::printAlarmList(), SiStripActionExecutor::printFaultyModuleList(), SiStripInformationExtractor::printNonGeomHistoList(), SiStripInformationExtractor::printSummaryHistoList(), BTagHLTOfflineClient::runClient_(), JetMETHLTOfflineClient::runClient_(), SiStripTrackerMapCreator::setTkMapFromHistogram(), and showDirStructure().

1748 {
1750  const std::string *cleaned = 0;
1751  cleanTrailingSlashes(path, clean, cleaned);
1752  MonitorElement proto(cleaned, std::string());
1753 
1754  std::vector<MonitorElement *> result;
1755  MEMap::const_iterator e = data_.end();
1756  MEMap::const_iterator i = data_.lower_bound(proto);
1757  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i)
1758  if (*cleaned == *i->data_.dirname)
1759  result.push_back(const_cast<MonitorElement *>(&*i));
1760 
1761  return result;
1762 }
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:705
std::vector< MonitorElement * > DQMStore::getContents ( const std::string &  path,
unsigned int  tag 
) const

same as above for tagged MonitorElements

Definition at line 1766 of file DQMStore.cc.

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

1767 {
1769  const std::string *cleaned = 0;
1770  cleanTrailingSlashes(path, clean, cleaned);
1771  MonitorElement proto(cleaned, std::string());
1772 
1773  std::vector<MonitorElement *> result;
1774  MEMap::const_iterator e = data_.end();
1775  MEMap::const_iterator i = data_.lower_bound(proto);
1776  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i)
1777  if (*cleaned == *i->data_.dirname
1778  && (i->data_.flags & DQMNet::DQM_PROP_TAGGED)
1779  && i->data_.tag == tag)
1780  result.push_back(const_cast<MonitorElement *>(&*i));
1781 
1782  return result;
1783 }
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:1604
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:705
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 1790 of file DQMStore.cc.

References data_, dirs_, isSubdirectory(), m, contentValuesCheck::nfound, and AlCaHLTBitMon_QueryRunRegistry::string.

1791 {
1792  into.clear();
1793  into.reserve(dirs_.size());
1794 
1795  MEMap::const_iterator me = data_.end();
1796  std::set<std::string>::const_iterator di = dirs_.begin();
1797  std::set<std::string>::const_iterator de = dirs_.end();
1798  for ( ; di != de; ++di)
1799  {
1800  MonitorElement proto(&*di, std::string());
1801  MEMap::const_iterator mi = data_.lower_bound(proto);
1802  MEMap::const_iterator m = mi;
1803  size_t sz = di->size() + 2;
1804  size_t nfound = 0;
1805  for ( ; m != me && isSubdirectory(*di, *m->data_.dirname); ++m)
1806  if (*di == *m->data_.dirname)
1807  {
1808  sz += m->data_.objname.size() + 1;
1809  ++nfound;
1810  }
1811 
1812  if (! nfound)
1813  continue;
1814 
1815  std::vector<std::string>::iterator istr
1816  = into.insert(into.end(), std::string());
1817 
1818  if (showContents)
1819  {
1820  istr->reserve(sz);
1821 
1822  *istr += *di;
1823  *istr += ':';
1824  for (sz = 0; mi != m; ++mi)
1825  {
1826  if (*di != *mi->data_.dirname)
1827  continue;
1828 
1829  if (sz > 0)
1830  *istr += ',';
1831 
1832  *istr += mi->data_.objname;
1833  ++sz;
1834  }
1835  }
1836  else
1837  {
1838  istr->reserve(di->size() + 2);
1839  *istr += *di;
1840  *istr += ':';
1841  }
1842  }
1843 }
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
MEMap data_
Definition: DQMStore.h:705
std::set< std::string > dirs_
Definition: DQMStore.h:706
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 1969 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_().

1970 {
1971  lat::Regexp rx;
1972  try
1973  {
1974  rx = lat::Regexp(pattern, 0, syntaxType);
1975  rx.study();
1976  }
1977  catch (lat::Error &e)
1978  {
1979  raiseDQMError("DQMStore", "Invalid regular expression '%s': %s",
1980  pattern.c_str(), e.explain().c_str());
1981  }
1982 
1983  std::string path;
1984  std::vector<MonitorElement *> result;
1985  MEMap::const_iterator i = data_.begin();
1986  MEMap::const_iterator e = data_.end();
1987  for ( ; i != e; ++i)
1988  {
1989  path.clear();
1990  mergePath(path, *i->data_.dirname, i->data_.objname);
1991  if (rx.match(path))
1992  result.push_back(const_cast<MonitorElement *>(&*i));
1993  }
1994 
1995  return result;
1996 }
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:705
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 1692 of file DQMStore.cc.

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

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

1693 {
1694  MonitorElement proto(&pwd_, std::string());
1695  std::vector<std::string> result;
1696  MEMap::const_iterator e = data_.end();
1697  MEMap::const_iterator i = data_.lower_bound(proto);
1698  for ( ; i != e && isSubdirectory(pwd_, *i->data_.dirname); ++i)
1699  if (pwd_ == *i->data_.dirname)
1700  result.push_back(i->getName());
1701 
1702  return result;
1703 }
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:704
MEMap data_
Definition: DQMStore.h:705
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 3290 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().

3291 {
3293  const std::string *cleaned = 0;
3294  cleanTrailingSlashes(path, clean, cleaned);
3295 
3297  MEMap::const_iterator mi = data_.begin();
3298  MEMap::const_iterator me = data_.end();
3299  for ( ; mi != me; ++mi)
3300  {
3301  if (! cleaned->empty() && ! isSubdirectory(*cleaned, *mi->data_.dirname))
3302  continue;
3303 
3304  if (mi->hasError())
3305  return dqm::qstatus::ERROR;
3306  else if (mi->hasWarning())
3307  status = dqm::qstatus::WARNING;
3308  else if (status < dqm::qstatus::WARNING
3309  && mi->hasOtherReport())
3310  status = dqm::qstatus::OTHER;
3311  }
3312  return status;
3313 }
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:705
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 1669 of file DQMStore.cc.

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

Referenced by SiStripSummaryCreator::createSummary(), dqmCopyRecursively(), JetMETDQMPostProcessor::endRun(), TauDQMFileLoader::endRun(), SiStripSummaryCreator::fillGrandSummaryHistos(), SiStripQualityChecker::fillSubDetStatus(), SiStripSummaryCreator::fillSummaryHistos(), TrackingUtility::getModuleFolderList(), SiStripUtility::getModuleFolderList(), SiStripSummaryCreator::getSummaryME(), TrackingUtility::goToDir(), SiStripUtility::goToDir(), SiStripInformationExtractor::printAlarmList(), SiStripInformationExtractor::printNonGeomHistoList(), SiStripInformationExtractor::printSummaryHistoList(), ElectronDqmAnalyzerBase::remove_other_dirs(), BTagHLTOfflineClient::runClient_(), JetMETHLTOfflineClient::runClient_(), HLXMonitor::SaveDQMFile(), SiStripTrackerMapCreator::setTkMapFromHistogram(), and HLXMonitor::SetupHists().

1670 {
1671  std::vector<std::string> result;
1672  std::set<std::string>::const_iterator e = dirs_.end();
1673  std::set<std::string>::const_iterator i = dirs_.find(pwd_);
1674 
1675  // If we didn't find current directory, the tree is empty, so quit.
1676  if (i == e)
1677  return result;
1678 
1679  // Skip the current directory and then start looking for immediate
1680  // subdirectories in the dirs_ list. Stop when we are no longer in
1681  // (direct or indirect) subdirectories of pwd_. Note that we don't
1682  // "know" which order the set will sort A/B, A/B/C and A/D.
1683  while (++i != e && isSubdirectory(pwd_, *i))
1684  if (i->find('/', pwd_.size()+1) == std::string::npos)
1685  result.push_back(*i);
1686 
1687  return result;
1688 }
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:704
std::set< std::string > dirs_
Definition: DQMStore.h:706
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 525 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().

525  {
526  makeDirectory("");
527  reset();
528 
529  // set steerable parameters
530  verbose_ = pset.getUntrackedParameter<int>("verbose", 0);
531  if (verbose_ > 0)
532  std::cout << "DQMStore: verbosity set to " << verbose_ << std::endl;
533 
534  verboseQT_ = pset.getUntrackedParameter<int>("verboseQT", 0);
535  if (verbose_ > 0)
536  std::cout << "DQMStore: QTest verbosity set to " << verboseQT_ << std::endl;
537 
538  collateHistograms_ = pset.getUntrackedParameter<bool>("collateHistograms", false);
539  if (collateHistograms_)
540  std::cout << "DQMStore: histogram collation is enabled\n";
541 
542  enableMultiThread_ = pset.getUntrackedParameter<bool>("enableMultiThread", false);
543  if (enableMultiThread_)
544  std::cout << "DQMStore: MultiThread option is enabled\n";
545 
546  LSbasedMode_ = pset.getUntrackedParameter<bool>("LSbasedMode", false);
547  if (LSbasedMode_)
548  std::cout << "DQMStore: LSbasedMode option is enabled\n";
549 
550  std::string ref = pset.getUntrackedParameter<std::string>("referenceFileName", "");
551  if (! ref.empty())
552  {
553  std::cout << "DQMStore: using reference file '" << ref << "'\n";
554  readFile(ref, true, "", s_referenceDirName, StripRunDirs, false);
555  }
556 
557  initQCriterion<Comp2RefChi2>(qalgos_);
558  initQCriterion<Comp2RefKolmogorov>(qalgos_);
559  initQCriterion<ContentsXRange>(qalgos_);
560  initQCriterion<ContentsYRange>(qalgos_);
561  initQCriterion<MeanWithinExpected>(qalgos_);
562  initQCriterion<Comp2RefEqualH>(qalgos_);
563  initQCriterion<DeadChannel>(qalgos_);
564  initQCriterion<NoisyChannel>(qalgos_);
565  initQCriterion<ContentsWithinExpected>(qalgos_);
566  initQCriterion<CompareToMedian>(qalgos_);
567  initQCriterion<CompareLastFilledBin>(qalgos_);
568  initQCriterion<CheckVariance>(qalgos_);
569 
570  scaleFlag_ = pset.getUntrackedParameter<double>("ScalingFlag", 0.0);
571  if (verbose_ > 0)
572  std::cout << "DQMStore: Scaling Flag set to " << scaleFlag_ << std::endl;
573 }
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:2952
unsigned verboseQT_
Definition: DQMStore.h:691
double scaleFlag_
Definition: DQMStore.h:693
QAMap qalgos_
Definition: DQMStore.h:709
unsigned verbose_
Definition: DQMStore.h:690
static const std::string s_referenceDirName
Definition: DQMStore.cc:54
tuple cout
Definition: gather_cfg.py:121
void reset(void)
Definition: DQMStore.cc:2005
bool collateHistograms_
Definition: DQMStore.h:694
bool LSbasedMode_
Definition: DQMStore.h:696
void makeDirectory(const std::string &path)
Definition: DQMStore.cc:701
bool enableMultiThread_
Definition: DQMStore.h:695
bool DQMStore::isCollate ( void  ) const

Definition at line 3368 of file DQMStore.cc.

References collateHistograms_.

3369 {
3370  return collateHistograms_;
3371 }
bool collateHistograms_
Definition: DQMStore.h:694
bool DQMStore::isCollateME ( MonitorElement me) const
private

Definition at line 3377 of file DQMStore.cc.

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

Referenced by extract().

3378 { 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 2925 of file DQMStore.cc.

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

Referenced by DQMFileReader::beginJob().

2928 {
2929  bool overwrite = true;
2930  if (collateHistograms_) overwrite = false;
2931  if (verbose_)
2932  {
2933  std::cout << "DQMStore::load: reading from file '" << filename << "'\n";
2934  if (collateHistograms_)
2935  std::cout << "DQMStore::load: in collate mode " << "\n";
2936  else
2937  std::cout << "DQMStore::load: in overwrite mode " << "\n";
2938  }
2939 
2940  if (!s_rxpbfile.match(filename, 0, 0))
2941  return readFile(filename, overwrite, "", "", stripdirs, fileMustExist);
2942  else
2943  return readFilePB(filename, overwrite, "", "", stripdirs, fileMustExist);
2944 }
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:2952
unsigned verbose_
Definition: DQMStore.h:690
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:3036
tuple filename
Definition: lut2db_cfg.py:20
tuple cout
Definition: gather_cfg.py:121
bool collateHistograms_
Definition: DQMStore.h:694
void DQMStore::makeDirectory ( const std::string &  path)
private

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

Definition at line 701 of file DQMStore.cc.

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

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

702 {
703  std::string prev;
704  std::string subdir;
706  prev.reserve(path.size());
707  subdir.reserve(path.size());
708  name.reserve(path.size());
709  size_t prevname = 0;
710  size_t slash = 0;
711 
712  while (true)
713  {
714  // Create this subdirectory component.
715  subdir.clear();
716  subdir.append(path, 0, slash);
717  name.clear();
718  name.append(subdir, prevname, std::string::npos);
719  if (! prev.empty() && findObject(prev, name))
720  raiseDQMError("DQMStore", "Attempt to create subdirectory '%s'"
721  " which already exists as a monitor element",
722  subdir.c_str());
723 
724  if (! dirs_.count(subdir))
725  dirs_.insert(subdir);
726 
727  // Stop if we've reached the end (including possibly a trailing slash).
728  if (slash+1 >= path.size())
729  break;
730 
731  // Find the next slash, making sure we progress. If reach the end,
732  // process the last path component; the next loop round will terminate.
733  prevname = slash ? slash+1 : slash;
734  prev = subdir;
735  if ((slash = path.find('/', ++slash)) == std::string::npos)
736  slash = path.size();
737  }
738 }
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:1848
tuple path
else: Piece not in the list, fine.
std::set< std::string > dirs_
Definition: DQMStore.h:706
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
void DQMStore::markForDeletion ( uint32_t  run,
uint32_t  lumi 
)
private

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

Definition at line 2050 of file DQMStore.cc.

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

2052 {
2053 
2054  std::string null_str("");
2055  MonitorElement proto(&null_str, null_str, run, 0, 0);
2056  if (enableMultiThread_)
2057  proto.setLumi(lumi);
2058 
2059  std::set<MonitorElement>::const_iterator e = data_.end();
2060  std::set<MonitorElement>::const_iterator i = data_.lower_bound(proto);
2061 
2062  while (i != e) {
2063  if (i->data_.streamId != 0 ||
2064  i->data_.moduleId != 0)
2065  break;
2066  if ((i->data_.lumi != lumi) && enableMultiThread_)
2067  break;
2068  if (i->data_.run != run)
2069  break;
2070 
2071  const_cast<MonitorElement*>(&*i)->markToDelete();
2072 
2073  if (verbose_ > 1)
2074  std::cout << "DQMStore::markForDeletion: marked monitor element '"
2075  << *i->data_.dirname << "/" << i->data_.objname << "'"
2076  << "flags " << i->data_.flags << "\n";
2077 
2078  ++i;
2079  }
2080 }
int i
Definition: DBlmapReader.cc:9
tuple lumi
Definition: fjr2json.py:35
unsigned verbose_
Definition: DQMStore.h:690
MEMap data_
Definition: DQMStore.h:705
tuple cout
Definition: gather_cfg.py:121
bool enableMultiThread_
Definition: DQMStore.h:695
template<typename iFunc >
void DQMStore::meBookerGetter ( iFunc  f)
inline

Definition at line 267 of file DQMStore.h.

References f, ibooker_, and igetter_.

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

267  {
268  f(*ibooker_, *igetter_);
269  }
IGetter * igetter_
Definition: DQMStore.h:714
double f[11][100]
IBooker * ibooker_
Definition: DQMStore.h:713
template<typename iFunc >
void DQMStore::meGetter ( iFunc  f)
inline

Definition at line 276 of file DQMStore.h.

References f, and igetter_.

276  {
277  f(*igetter_);
278  }
IGetter * igetter_
Definition: DQMStore.h:714
double f[11][100]
void DQMStore::mergeAndResetMEsLuminositySummaryCache ( uint32_t  run,
uint32_t  lumi,
uint32_t  streamId,
uint32_t  moduleId 
)

Definition at line 387 of file DQMStore.cc.

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

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

390  {
391  if (verbose_ > 1)
392  std::cout << "DQMStore::mergeAndResetMEsLuminositySummaryCache - Merging objects from run: "
393  << run << " lumi: " << lumi
394  << ", stream: " << streamId
395  << " module: " << moduleId << std::endl;
396  std::string null_str("");
397  MonitorElement proto(&null_str, null_str, run, streamId, moduleId);
398  std::set<MonitorElement>::const_iterator e = data_.end();
399  std::set<MonitorElement>::const_iterator i = data_.lower_bound(proto);
400 
401  while (i != e) {
402  if (i->data_.run != run
403  || i->data_.streamId != streamId
404  || i->data_.moduleId != moduleId)
405  break;
406 
407  // Handle LS-based histograms only.
408  if (not (i->getLumiFlag() || LSbasedMode_)) {
409  ++i;
410  continue;
411  }
412 
413  MonitorElement global_me(*i);
414  global_me.globalize();
415  global_me.setLumi(lumi);
416  // Since this accesses the data, the operation must be
417  // be locked.
418  std::lock_guard<std::mutex> guard(book_mutex_);
419  std::set<MonitorElement>::const_iterator me = data_.find(global_me);
420  if (me != data_.end()) {
421  if (verbose_ > 1)
422  std::cout << "Found global Object, using it --> " << me->getFullname() << std::endl;
423 
424  //don't take any action if the ME is an INT || FLOAT || STRING
425  if (me->kind() >= MonitorElement::DQM_KIND_TH1F)
426  me->getTH1()->Add(i->getTH1());
427  } else {
428  if (verbose_ > 1)
429  std::cout << "No global Object found. " << std::endl;
430  std::pair<std::set<MonitorElement>::const_iterator, bool> gme;
431  gme = data_.insert(global_me);
432  assert(gme.second);
433  }
434  // make the ME reusable for the next LS
435  const_cast<MonitorElement*>(&*i)->Reset();
436  ++i;
437 
438  // check and remove the global lumi based histo belonging to the previous LSs
439  // if properly flagged as DQMNet::DQM_PROP_MARKTODELETE
440  global_me.setLumi(1);
441  std::set<MonitorElement>::const_iterator i_lumi = data_.lower_bound(global_me);
442  while (i_lumi->data_.lumi != lumi) {
443  auto temp = i_lumi++;
444  if (i_lumi->getFullname() == i->getFullname() && i_lumi->markedToDelete())
445  {
446  data_.erase(temp);
447  }
448  }
449  }
450 }
int i
Definition: DBlmapReader.cc:9
tuple lumi
Definition: fjr2json.py:35
std::mutex book_mutex_
Definition: DQMStore.h:712
unsigned verbose_
Definition: DQMStore.h:690
MEMap data_
Definition: DQMStore.h:705
tuple cout
Definition: gather_cfg.py:121
void Reset(std::vector< TH2F > &depth)
bool LSbasedMode_
Definition: DQMStore.h:696
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 332 of file DQMStore.cc.

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

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

334  {
335  if (verbose_ > 1)
336  std::cout << "DQMStore::mergeAndResetMEsRunSummaryCache - Merging objects from run: "
337  << run
338  << ", stream: " << streamId
339  << " module: " << moduleId << std::endl;
340 
341  if (LSbasedMode_) {
342  return;
343  }
344 
345  std::string null_str("");
346  MonitorElement proto(&null_str, null_str, run, streamId, moduleId);
347  std::set<MonitorElement>::const_iterator e = data_.end();
348  std::set<MonitorElement>::const_iterator i = data_.lower_bound(proto);
349  while (i != e) {
350  if (i->data_.run != run
351  || i->data_.streamId != streamId
352  || i->data_.moduleId != moduleId)
353  break;
354 
355  // Handle Run-based histograms only.
356  if (i->getLumiFlag() || LSbasedMode_) {
357  ++i;
358  continue;
359  }
360 
361  MonitorElement global_me(*i);
362  global_me.globalize();
363  // Since this accesses the data, the operation must be
364  // be locked.
365  std::lock_guard<std::mutex> guard(book_mutex_);
366  std::set<MonitorElement>::const_iterator me = data_.find(global_me);
367  if (me != data_.end()) {
368  if (verbose_ > 1)
369  std::cout << "Found global Object, using it --> " << me->getFullname() << std::endl;
370 
371  //don't take any action if the ME is an INT || FLOAT || STRING
372  if(me->kind() >= MonitorElement::DQM_KIND_TH1F)
373  me->getTH1()->Add(i->getTH1());
374 
375  } else {
376  if (verbose_ > 1)
377  std::cout << "No global Object found. " << std::endl;
378  std::pair<std::set<MonitorElement>::const_iterator, bool> gme;
379  gme = data_.insert(global_me);
380  assert(gme.second);
381  }
382  // TODO(rovere): eventually reset the local object and mark it as reusable??
383  ++i;
384  }
385 }
int i
Definition: DBlmapReader.cc:9
std::mutex book_mutex_
Definition: DQMStore.h:712
unsigned verbose_
Definition: DQMStore.h:690
MEMap data_
Definition: DQMStore.h:705
tuple cout
Definition: gather_cfg.py:121
bool LSbasedMode_
Definition: DQMStore.h:696
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 2910 of file DQMStore.cc.

References readFile().

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

2916 {
2917  return readFile(filename,overwrite,onlypath,prepend,stripdirs,fileMustExist);
2918 }
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:2952
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 585 of file DQMStore.cc.

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

Referenced by book().

586 {
587  // the access to the member stream_ is implicitely protected against
588  // concurrency problems because the print_trace method is always called behind
589  // a lock (see bookTransaction).
590  if (!stream_)
591  stream_ = new ofstream("histogramBookingBT.log");
592 
593  void *array[10];
594  size_t size;
595  char **strings;
596  int r=0;
597  lat::RegexpMatch m;
598  m.reset();
599 
600  size = backtrace (array, 10);
601  strings = backtrace_symbols (array, size);
602 
603  if ((size > 4)
604  &&s_rxtrace.match(strings[4], 0, 0, &m))
605  {
606  char * demangled = abi::__cxa_demangle(m.matchString(strings[4], 2).c_str(), 0, 0, &r);
607  *stream_ << "\"" << dir << "/"
608  << name << "\" "
609  << (r ? m.matchString(strings[4], 2) : demangled) << " "
610  << m.matchString(strings[4], 1) << "\n";
611  free(demangled);
612  }
613  else
614  *stream_ << "Skipping "<< dir << "/" << name
615  << " with stack size " << size << "\n";
616  /* In this case print the full stack trace, up to main or to the
617  * maximum stack size, i.e. 10. */
618  if (verbose_ > 4)
619  {
620  size_t i;
621  m.reset();
622 
623  for (i = 0; i < size; i++)
624  if (s_rxtrace.match(strings[i], 0, 0, &m))
625  {
626  char * demangled = abi::__cxa_demangle(m.matchString(strings[i], 2).c_str(), 0, 0, &r);
627  *stream_ << "\t\t" << i << "/" << size << " "
628  << (r ? m.matchString(strings[i], 2) : demangled) << " "
629  << m.matchString(strings[i], 1) << std::endl;
630  free (demangled);
631  }
632  }
633  free (strings);
634 }
int i
Definition: DBlmapReader.cc:9
static const lat::Regexp s_rxtrace("(.*)\\((.*)\\+0x.*\\).*")
unsigned verbose_
Definition: DQMStore.h:690
std::ofstream * stream_
Definition: DQMStore.h:702
dbl *** dir
Definition: mlp_gen.cc:35
tuple size
Write out results.
const std::string & DQMStore::pwd ( void  ) const

return pathname of current directory

Definition at line 649 of file DQMStore.cc.

References pwd_.

Referenced by SiStripDcsInfo::addBadModules(), SiStripSpyMonitorModule::beginJob(), CalibrationScanTask::book(), FineDelayTask::book(), LatencyTask::book(), CalibrationTask::book(), RPCValidHistograms::bookHistograms(), SiStripTrackerMapCreator::createForOffline(), SiStripSummaryCreator::createSummary(), JetMETDQMPostProcessor::endRun(), SiStripQualityChecker::fillDetectorStatus(), SiStripQualityChecker::fillDetectorStatusAtLumi(), SiStripQualityChecker::fillFaultyModuleStatus(), SiStripSummaryCreator::fillGrandSummaryHistos(), SiStripCertificationInfo::fillSiStripCertificationMEs(), SiStripSummaryCreator::fillSummaryHistos(), TrackingQualityChecker::fillTrackingStatus(), TrackingQualityChecker::fillTrackingStatusAtLumi(), SiStripDaqInfo::findExcludedModule(), TrackingUtility::getModuleFolderList(), SiStripUtility::getModuleFolderList(), SiStripQualityChecker::getModuleStatus(), SiStripSummaryCreator::getSummaryME(), TrackingUtility::getTopFolderPath(), SiStripUtility::getTopFolderPath(), TrackingUtility::goToDir(), SiStripUtility::goToDir(), SiStripInformationExtractor::printAlarmList(), SiStripActionExecutor::printFaultyModuleList(), SiStripInformationExtractor::printNonGeomHistoList(), SiStripInformationExtractor::printSummaryHistoList(), ElectronDqmAnalyzerBase::remove_other_dirs(), SiStripTrackerMapCreator::setTkMapFromHistogram(), and SubTaskSummaryStatus::WriteThreshold().

650 { return pwd_; }
std::string pwd_
Definition: DQMStore.h:704
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 2755 of file DQMStore.cc.

References collateHistograms_, prof2calltree::count, gather_cfg::cout, extract(), isSubdirectory(), combine::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().

2761 {
2762  unsigned int ntot = 0;
2763  unsigned int count = 0;
2764 
2765  if (! file->cd(curdir.c_str()))
2766  raiseDQMError("DQMStore", "Failed to process directory '%s' while"
2767  " reading file '%s'", curdir.c_str(), file->GetName());
2768 
2769  // Figure out current directory name, but strip out the top
2770  // directory into which we dump everything.
2771  std::string dirpart = curdir;
2772  if (dirpart.compare(0, s_monitorDirName.size(), s_monitorDirName) == 0)
2773  {
2774  if (dirpart.size() == s_monitorDirName.size())
2775  dirpart.clear();
2776  else if (dirpart[s_monitorDirName.size()] == '/')
2777  dirpart.erase(0, s_monitorDirName.size()+1);
2778  }
2779 
2780  // See if we are going to skip this directory.
2781  bool skip = (! onlypath.empty() && ! isSubdirectory(onlypath, dirpart));
2782 
2783  if (prepend == s_collateDirName ||
2784  prepend == s_referenceDirName ||
2785  stripdirs == StripRunDirs )
2786  {
2787  // Remove Run # and RunSummary dirs
2788  // first look for Run summary,
2789  // if that is found and erased, also erase Run dir
2790  size_t slash = dirpart.find('/');
2791  size_t pos = dirpart.find("/Run summary");
2792  if (slash != std::string::npos && pos !=std::string::npos)
2793  {
2794  dirpart.erase(pos,12);
2795 
2796  pos = dirpart.find("Run ");
2797  size_t length = dirpart.find('/',pos+1)-pos+1;
2798  if (pos !=std::string::npos)
2799  dirpart.erase(pos,length);
2800  }
2801  }
2802 
2803  // If we are prepending, add it to the directory name,
2804  // and suppress reading of already existing reference histograms
2805  if (prepend == s_collateDirName ||
2806  prepend == s_referenceDirName)
2807  {
2808  size_t slash = dirpart.find('/');
2809  // If we are reading reference, skip previous reference.
2810  if (slash == std::string::npos // skip if Reference is toplevel folder, i.e. no slash
2811  && slash+1+s_referenceDirName.size() == dirpart.size()
2812  && dirpart.compare(slash+1, s_referenceDirName.size(), s_referenceDirName) == 0)
2813  return 0;
2814 
2815  slash = dirpart.find('/');
2816  // Skip reading of EventInfo subdirectory.
2817  if (slash != std::string::npos
2818  && slash + 10 == dirpart.size()
2819  && dirpart.compare( slash+1 , 9 , "EventInfo") == 0) {
2820  if (verbose_)
2821  std::cout << "DQMStore::readDirectory: skipping '" << dirpart << "'\n";
2822  return 0;
2823  }
2824 
2825  // Add prefix.
2826  if (dirpart.empty())
2827  dirpart = prepend;
2828  else
2829  dirpart = prepend + '/' + dirpart;
2830  }
2831  else if (! prepend.empty())
2832  {
2833  if (dirpart.empty())
2834  dirpart = prepend;
2835  else
2836  dirpart = prepend + '/' + dirpart;
2837  }
2838 
2839  // Loop over the contents of this directory in the file.
2840  // Post-pone string object handling to happen after other
2841  // objects have been read in so we are guaranteed to have
2842  // histograms by the time we read in quality tests and tags.
2843  TKey *key;
2844  TIter next (gDirectory->GetListOfKeys());
2845  std::list<TObject *> delayed;
2846  while ((key = (TKey *) next()))
2847  {
2848  std::auto_ptr<TObject> obj(key->ReadObj());
2849  if (dynamic_cast<TDirectory *>(obj.get()))
2850  {
2851  std::string subdir;
2852  subdir.reserve(curdir.size() + strlen(obj->GetName()) + 2);
2853  subdir += curdir;
2854  if (! curdir.empty())
2855  subdir += '/';
2856  subdir += obj->GetName();
2857 
2858  ntot += readDirectory(file, overwrite, onlypath, prepend, subdir, stripdirs);
2859  }
2860  else if (skip)
2861  ;
2862  else if (dynamic_cast<TObjString *>(obj.get()))
2863  {
2864  delayed.push_back(obj.release());
2865  }
2866  else
2867  {
2868  if (verbose_ > 2)
2869  std::cout << "DQMStore: reading object '" << obj->GetName()
2870  << "' of type '" << obj->IsA()->GetName()
2871  << "' from '" << file->GetName()
2872  << "' into '" << dirpart << "'\n";
2873 
2874  makeDirectory(dirpart);
2875  if (extract(obj.get(), dirpart, overwrite, collateHistograms_))
2876  ++count;
2877  }
2878  }
2879 
2880  while (! delayed.empty())
2881  {
2882  if (verbose_ > 2)
2883  std::cout << "DQMStore: reading object '" << delayed.front()->GetName()
2884  << "' of type '" << delayed.front()->IsA()->GetName()
2885  << "' from '" << file->GetName()
2886  << "' into '" << dirpart << "'\n";
2887 
2888  makeDirectory(dirpart);
2889  if (extract(delayed.front(), dirpart, overwrite, collateHistograms_))
2890  ++count;
2891 
2892  delete delayed.front();
2893  delayed.pop_front();
2894  }
2895 
2896  if (verbose_ > 1)
2897  std::cout << "DQMStore: read " << count << '/' << ntot
2898  << " objects from directory '" << dirpart << "'\n";
2899 
2900  return ntot + count;
2901 }
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:690
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:2755
bool extract(TObject *obj, const std::string &dir, bool overwrite, bool collateHistograms)
Definition: DQMStore.cc:2089
list key
Definition: combine.py:13
tuple cout
Definition: gather_cfg.py:121
bool collateHistograms_
Definition: DQMStore.h:694
void makeDirectory(const std::string &path)
Definition: DQMStore.cc:701
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 2952 of file DQMStore.cc.

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

2958 {
2959 
2960  if (verbose_)
2961  std::cout << "DQMStore::readFile: reading from file '" << filename << "'\n";
2962 
2963  std::auto_ptr<TFile> f;
2964 
2965  try
2966  {
2967  f.reset(TFile::Open(filename.c_str()));
2968  if (! f.get() || f->IsZombie())
2969  raiseDQMError("DQMStore", "Failed to open file '%s'", filename.c_str());
2970  }
2971  catch (std::exception &)
2972  {
2973  if (fileMustExist)
2974  throw;
2975  else
2976  {
2977  if (verbose_)
2978  std::cout << "DQMStore::readFile: file '" << filename << "' does not exist, continuing\n";
2979  return false;
2980  }
2981  }
2982 
2983  unsigned n = readDirectory(f.get(), overwrite, onlypath, prepend, "", stripdirs);
2984  f->Close();
2985 
2986  MEMap::iterator mi = data_.begin();
2987  MEMap::iterator me = data_.end();
2988  for ( ; mi != me; ++mi)
2989  const_cast<MonitorElement &>(*mi).updateQReportStats();
2990 
2991  if (verbose_)
2992  {
2993  std::cout << "DQMStore::open: successfully read " << n
2994  << " objects from file '" << filename << "'";
2995  if (! onlypath.empty())
2996  std::cout << " from directory '" << onlypath << "'";
2997  if (! prepend.empty())
2998  std::cout << " into directory '" << prepend << "'";
2999  std::cout << std::endl;
3000  }
3001  return true;
3002 }
double f[11][100]
unsigned verbose_
Definition: DQMStore.h:690
MEMap data_
Definition: DQMStore.h:705
unsigned int readDirectory(TFile *file, bool overwrite, const std::string &path, const std::string &prepend, const std::string &curdir, OpenRunDirs stripdirs)
Definition: DQMStore.cc:2755
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 3036 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().

3042 {
3043  using google::protobuf::io::FileInputStream;
3044  using google::protobuf::io::FileOutputStream;
3045  using google::protobuf::io::GzipInputStream;
3046  using google::protobuf::io::GzipOutputStream;
3047  using google::protobuf::io::CodedInputStream;
3048  using google::protobuf::io::ArrayInputStream;
3049 
3050  if (verbose_)
3051  std::cout << "DQMStore::readFile: reading from file '" << filename << "'\n";
3052 
3053  int filedescriptor;
3054  if ((filedescriptor = ::open(filename.c_str(), O_RDONLY)) == -1) {
3055  if (fileMustExist)
3056  raiseDQMError("DQMStore", "Failed to open file '%s'", filename.c_str());
3057  else
3058  if (verbose_)
3059  std::cout << "DQMStore::readFile: file '" << filename << "' does not exist, continuing\n";
3060  return false;
3061  }
3062 
3063  dqmstorepb::ROOTFilePB dqmstore_message;
3064  FileInputStream fin(filedescriptor);
3065  GzipInputStream input(&fin);
3066  CodedInputStream input_coded(&input);
3067  input_coded.SetTotalBytesLimit(1024*1024*1024, -1);
3068  if (!dqmstore_message.ParseFromCodedStream(&input_coded)) {
3069  raiseDQMError("DQMStore", "Fatal parsing file '%s'", filename.c_str());
3070  return false;
3071  }
3072  ::close(filedescriptor);
3073 
3074  for (int i = 0; i < dqmstore_message.histo_size(); i++) {
3075  std::string path;
3076  std::string objname;
3077 
3078  TObject *obj = NULL;
3079  const dqmstorepb::ROOTFilePB::Histo &h = dqmstore_message.histo(i);
3080  get_info(h, path, objname, &obj);
3081 
3082  setCurrentFolder(path);
3083  if (obj)
3084  {
3085  /* Before calling the extract() check if histogram exists:
3086  * if it does - flags for the given monitor are already set (and merged)
3087  * else - set the flags after the histogram is created.
3088  */
3089  MonitorElement *me = findObject(path, objname);
3090 
3091  /* Run histograms should be collated and not overwritten,
3092  * Lumi histograms should be overwritten (and collate flag is not checked)
3093  */
3094  bool overwrite = h.flags() & DQMNet::DQM_PROP_LUMI;
3095  bool collate = !(h.flags() & DQMNet::DQM_PROP_LUMI);
3096  extract(static_cast<TObject *>(obj), path, overwrite, collate);
3097 
3098  if (me == nullptr) {
3099  me = findObject(path, objname);
3100  me->data_.flags = h.flags();
3101  }
3102 
3103  delete obj;
3104  }
3105  }
3106 
3107  cd();
3108  return true;
3109 }
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:1848
void cd(void)
go to top directory (ie. root)
Definition: DQMStore.cc:654
uint32_t flags
Definition: DQMNet.h:98
#define NULL
Definition: scimark2.h:8
static std::string const input
Definition: EdmProvDump.cc:44
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:3015
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:690
bool extract(TObject *obj, const std::string &dir, bool overwrite, bool collateHistograms)
Definition: DQMStore.cc:2089
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:2910
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:677
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
void DQMStore::removeContents ( void  )
void DQMStore::removeContents ( const std::string &  dir)

remove all monitoring elements from directory;

Definition at line 3137 of file DQMStore.cc.

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

3138 {
3139  MonitorElement proto(&dir, std::string());
3140  MEMap::iterator e = data_.end();
3141  MEMap::iterator i = data_.lower_bound(proto);
3142  while (i != e && isSubdirectory(dir, *i->data_.dirname))
3143  if (dir == *i->data_.dirname)
3144  data_.erase(i++);
3145  else
3146  ++i;
3147 }
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:705
dbl *** dir
Definition: mlp_gen.cc:35
void DQMStore::removeElement ( const std::string &  name)
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 3167 of file DQMStore.cc.

References gather_cfg::cout, and data_.

3168 {
3169  MonitorElement proto(&dir, name);
3170  MEMap::iterator pos = data_.find(proto);
3171  if (pos == data_.end() && warning)
3172  std::cout << "DQMStore: WARNING: attempt to remove non-existent"
3173  << " monitor element '" << name << "' in '" << dir << "'\n";
3174  else
3175  data_.erase(pos);
3176 }
MEMap data_
Definition: DQMStore.h:705
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 2005 of file DQMStore.cc.

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

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

2006 {
2007  MEMap::iterator mi = data_.begin();
2008  MEMap::iterator me = data_.end();
2009  for ( ; mi != me; ++mi)
2010  {
2011  MonitorElement &me = const_cast<MonitorElement &>(*mi);
2012  if (mi->wasUpdated())
2013  {
2014  if (me.resetMe())
2015  me.Reset();
2016  me.resetUpdate();
2017  }
2018  }
2019 
2020  reset_ = true;
2021 }
void resetUpdate(void)
reset &quot;was updated&quot; flag
bool reset_
Definition: DQMStore.h:692
MEMap data_
Definition: DQMStore.h:705
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 3117 of file DQMStore.cc.

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

Referenced by HLTMon::beginJob(), L1TGT::beginRun(), L1ExtraRecoDQM::beginRun(), L1GtHwValidation::beginRun(), L1ExtraDQM::beginRun(), dqmCopyRecursively(), ElectronDqmAnalyzerBase::remove_other_dirs(), and ZDCMonitorClient::removeAllME().

3118 {
3120  const std::string *cleaned = 0;
3121  cleanTrailingSlashes(path, clean, cleaned);
3122  MonitorElement proto(cleaned, std::string());
3123 
3124  MEMap::iterator e = data_.end();
3125  MEMap::iterator i = data_.lower_bound(proto);
3126  while (i != e && isSubdirectory(*cleaned, *i->data_.dirname))
3127  data_.erase(i++);
3128 
3129  std::set<std::string>::iterator de = dirs_.end();
3130  std::set<std::string>::iterator di = dirs_.lower_bound(*cleaned);
3131  while (di != de && isSubdirectory(*cleaned, *di))
3132  dirs_.erase(di++);
3133 }
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:705
std::set< std::string > dirs_
Definition: DQMStore.h:706
void DQMStore::runQTests ( void  )

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

Definition at line 3269 of file DQMStore.cc.

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

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

3270 {
3271 
3272  if (verbose_ > 0)
3273  std::cout << "DQMStore: running runQTests() with reset = "
3274  << ( reset_ ? "true" : "false" ) << std::endl;
3275 
3276  // Apply quality tests to each monitor element, skipping references.
3277  MEMap::iterator mi = data_.begin();
3278  MEMap::iterator me = data_.end();
3279  for ( ; mi != me; ++mi)
3280  if (! isSubdirectory(s_referenceDirName, *mi->data_.dirname))
3281  const_cast<MonitorElement &>(*mi).runQTests();
3282 
3283  reset_ = false;
3284 }
void runQTests(void)
run all quality tests
bool reset_
Definition: DQMStore.h:692
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
unsigned verbose_
Definition: DQMStore.h:690
MEMap data_
Definition: DQMStore.h:705
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 2555 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, 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(), CalibrationTask::checkAndSave(), CalibrationScanTask::checkAndSave(), Vispa.Main.TabController.TabController::checkModificationTimestamp(), PerformanceAnalyzer::endJob(), CSCRecHitValidation::endJob(), CSCDigiValidation::endJob(), TauDQMSimpleFileSaver::endJob(), ElectronDqmAnalyzerBase::endJob(), TrackingTruthValid::endJob(), SiStripDigiValid::endJob(), SiPixelDigiValid::endJob(), HLTMonBTagMuSource::endJob(), HLTMonBTagClient::endJob(), HLTMonBTagIPSource::endJob(), SiStripMonitorHLT::endJob(), SiStripMonitorFilter::endJob(), MonitorLTC::endJob(), EgammaBasicClusters::endJob(), EgammaSuperClusters::endJob(), TkAlCaRecoMonitor::endJob(), LaserDQM::endJob(), HLTMonHcalIsoTrack::endJob(), MonitorTrackResiduals::endJob(), SiStripLAProfileBooker::endJob(), SiStripMonitorDigi::endJob(), BxTiming::endJob(), BTagValidator::endJob(), TrackerHitAnalyzer::endJob(), dEdxAnalyzer::endJob(), SiStripMonitorCluster::endJob(), LaserAlignmentT0ProducerDQM::endJob(), TrackEfficiencyMonitor::endJob(), TrackSplittingMonitor::endJob(), APVValidationPlots::endJob(), StripValidationPlots::endJob(), L1TDTTF::endJob(), TrackingMonitor::endJob(), HLTMon::endJob(), SiStripSpyMonitorModule::endJob(), LogMessageMonitor::endJob(), SiStripMonitorTrack::endJob(), TrackingOfflineDQM::endJob(), SiStripOfflineDQM::endJob(), SiStripFEDMonitorPlugin::endJob(), DQMHcalIsoTrackAlCaReco::endJob(), SiStripCMMonitorPlugin::endJob(), MuonAlignment::endJob(), RCTMonitor::endJob(), ValidationHcalIsoTrackAlCaReco::endJob(), SiPixelMuonHLT::endJob(), RPCEfficiencyPerRingLayer::endRun(), RPCEfficiencyShiftHisto::endRun(), SiStripMonitorRawData::endRun(), SiStripMonitorQuality::endRun(), SiStripMonitorPedestals::endRun(), RPCEfficiencySecond::endRun(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::extractBadAPVSandStrips(), TkHistoMap::save(), HLXMonitor::SaveDQMFile(), SiPixelHistoricInfoEDAClient::saveFile(), CSCDigiValidation::~CSCDigiValidation(), CSCRecHitValidation::~CSCRecHitValidation(), EcalDigisValidation::~EcalDigisValidation(), GlobalDigisHistogrammer::~GlobalDigisHistogrammer(), GlobalHitsHistogrammer::~GlobalHitsHistogrammer(), GlobalHitsProdHistStripper::~GlobalHitsProdHistStripper(), GlobalHitsTester::~GlobalHitsTester(), and SiPixelTrackingRecHitsValid::~SiPixelTrackingRecHitsValid().

2565 {
2566  std::set<std::string>::iterator di, de;
2567  MEMap::iterator mi, me = data_.end();
2568  DQMNet::QReports::const_iterator qi, qe;
2569  int nme=0;
2570 
2571  // TFile flushes to disk with fsync() on every TDirectory written to
2572  // the file. This makes DQM file saving painfully slow, and
2573  // ironically makes it _more_ likely the file saving gets
2574  // interrupted and corrupts the file. The utility class below
2575  // simply ignores the flush synchronisation.
2576  class TFileNoSync : public TFile
2577  {
2578  public:
2579  TFileNoSync(const char *file, const char *opt) : TFile(file, opt) {}
2580  virtual Int_t SysSync(Int_t) override { return 0; }
2581  };
2582 
2583  // open output file, on 1st save recreate, later update
2584  if (verbose_)
2585  std::cout << "\n DQMStore: Opening TFile '" << filename
2586  << "' with option '" << fileupdate <<"'\n";
2587 
2588  TFileNoSync f(filename.c_str(), fileupdate.c_str()); // open file
2589  if(f.IsZombie())
2590  raiseDQMError("DQMStore", "Failed to create/update file '%s'", filename.c_str());
2591  f.cd();
2592 
2593  // Construct a regular expression from the pattern string.
2594  std::auto_ptr<lat::Regexp> rxpat;
2595  if (! pattern.empty())
2596  rxpat.reset(new lat::Regexp(pattern.c_str()));
2597 
2598  // Prepare a path for the reference object selection.
2599  std::string refpath;
2600  refpath.reserve(s_referenceDirName.size() + path.size() + 2);
2601  refpath += s_referenceDirName;
2602  if (! path.empty())
2603  {
2604  refpath += '/';
2605  refpath += path;
2606  }
2607 
2608  // Loop over the directory structure.
2609  for (di = dirs_.begin(), de = dirs_.end(); di != de; ++di)
2610  {
2611  // Check if we should process this directory. We process the
2612  // requested part of the object tree, including references.
2613  if (! path.empty()
2614  && ! isSubdirectory(path, *di)
2615  && ! isSubdirectory(refpath, *di))
2616  continue;
2617 
2618  // Loop over monitor elements in this directory.
2619  MonitorElement proto(&*di, std::string(), run, 0, 0);
2620  if (enableMultiThread_)
2621  proto.setLumi(lumi);
2622 
2623  mi = data_.lower_bound(proto);
2624  for ( ; mi != me && isSubdirectory(*di, *mi->data_.dirname); ++mi)
2625  {
2626  if (verbose_ > 1)
2627  std::cout << "DQMStore::save: Run: " << (*mi).run()
2628  << " Lumi: " << (*mi).lumi()
2629  << " LumiFlag: " << (*mi).getLumiFlag()
2630  << " streamId: " << (*mi).streamId()
2631  << " moduleId: " << (*mi).moduleId()
2632  << " fullpathname: " << (*mi).getFullname() << std::endl;
2633 
2634  // Upper bound in the loop over the MEs
2635  if (enableMultiThread_ && ((*mi).lumi() != lumi))
2636  break;
2637 
2638  // Skip if it isn't a direct child.
2639  if (*di != *mi->data_.dirname) {
2640  if (verbose_ > 1)
2641  std::cout << "DQMStore::save: isn't a direct child. Skipping" << std::endl;
2642  continue;
2643  }
2644 
2645  // Keep backward compatibility with the old way of
2646  // booking/handlind MonitorElements into the DQMStore. If run is
2647  // 0 it means that a booking happened w/ the old non-threadsafe
2648  // style, and we have to ignore the streamId and moduleId as a
2649  // consequence.
2650 
2651  if (run != 0 && (mi->data_.streamId !=0 || mi->data_.moduleId !=0)) {
2652  continue;
2653  }
2654 
2655  // Handle reference histograms, with three distinct cases:
2656  // 1) Skip all references entirely on saving.
2657  // 2) Blanket saving of all references.
2658  // 3) Save only references for monitor elements with qtests.
2659  // The latter two are affected by "path" sub-tree selection,
2660  // i.e. references are saved only in the selected tree part.
2661  if (isSubdirectory(refpath, *mi->data_.dirname))
2662  {
2663  if (ref == SaveWithoutReference)
2664  // Skip the reference entirely.
2665  continue;
2666  else if (ref == SaveWithReference)
2667  // Save all references regardless of qtests.
2668  ;
2669  else if (ref == SaveWithReferenceForQTest)
2670  {
2671  // Save only references for monitor elements with qtests
2672  // with an optional cut on minimum quality test result.
2673  int status = -1;
2674  std::string mname(mi->getFullname(), s_referenceDirName.size()+1, std::string::npos);
2675  MonitorElement *master = get(mname);
2676  if (master)
2677  for (size_t i = 0, e = master->data_.qreports.size(); i != e; ++i)
2678  status = std::max(status, master->data_.qreports[i].code);
2679 
2680  if (! master || status < minStatus)
2681  {
2682  if (verbose_ > 1)
2683  std::cout << "DQMStore::save: skipping monitor element '"
2684  << mi->data_.objname << "' while saving, status is "
2685  << status << ", required minimum status is "
2686  << minStatus << std::endl;
2687  continue;
2688  }
2689  }
2690  }
2691 
2692  if (verbose_ > 1)
2693  std::cout << "DQMStore::save: saving monitor element '"
2694  << mi->data_.objname << "'\n";
2695  nme++; // count saved histograms
2696 
2697  // Create the directory.
2698  gDirectory->cd("/");
2699  if (di->empty())
2701  else if (rxpat.get())
2702  cdInto(s_monitorDirName + '/' + lat::StringOps::replace(*di, *rxpat, rewrite));
2703  else
2704  cdInto(s_monitorDirName + '/' + *di);
2705 
2706  // Save the object.
2707  switch (mi->kind())
2708  {
2712  TObjString(mi->tagString().c_str()).Write();
2713  break;
2714 
2715  default:
2716  mi->object_->Write();
2717  break;
2718  }
2719 
2720  // Save quality reports if this is not in reference section.
2721  if (! isSubdirectory(s_referenceDirName, *mi->data_.dirname))
2722  {
2723  qi = mi->data_.qreports.begin();
2724  qe = mi->data_.qreports.end();
2725  for ( ; qi != qe; ++qi)
2726  TObjString(mi->qualityTagString(*qi).c_str()).Write();
2727  }
2728 
2729  // Save efficiency tag, if any
2730  if (mi->data_.flags & DQMNet::DQM_PROP_EFFICIENCY_PLOT)
2731  TObjString(mi->effLabelString().c_str()).Write();
2732 
2733  // Save tag if any
2734  if (mi->data_.flags & DQMNet::DQM_PROP_TAGGED)
2735  TObjString(mi->tagLabelString().c_str()).Write();
2736 
2737  //reset the ME just written to make it available for the next LS (online)
2738  if (resetMEsAfterWriting)
2739  const_cast<MonitorElement*>(&*mi)->Reset();
2740  }
2741  }
2742 
2743  f.Close();
2744 
2745  // Maybe make some noise.
2746  if (verbose_)
2747  std::cout << "DQMStore::save: successfully wrote " << nme
2748  << " objects from path '" << path
2749  << "' into DQM file '" << filename << "'\n";
2750 }
int i
Definition: DBlmapReader.cc:9
bool cdInto(const std::string &path) const
Definition: DQMStore.cc:2385
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.
const T & max(const T &a, const T &b)
double f[11][100]
unsigned verbose_
Definition: DQMStore.h:690
MEMap data_
Definition: DQMStore.h:705
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:706
bool enableMultiThread_
Definition: DQMStore.h:695
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 2427 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_.

2432 {
2433  using google::protobuf::io::FileOutputStream;
2434  using google::protobuf::io::GzipOutputStream;
2435  using google::protobuf::io::StringOutputStream;
2436 
2437  std::set<std::string>::iterator di, de;
2438  MEMap::iterator mi, me = data_.end();
2439  dqmstorepb::ROOTFilePB dqmstore_message;
2440  int nme = 0;
2441 
2442  if (verbose_)
2443  std::cout << "\n DQMStore: Opening PBFile '"
2444  << filename << "'"<< std::endl;
2445 
2446  // Loop over the directory structure.
2447  for (di = dirs_.begin(), de = dirs_.end(); di != de; ++di)
2448  {
2449  // Check if we should process this directory. We process the
2450  // requested part of the object tree, including references.
2451  if (! path.empty()
2452  && ! isSubdirectory(path, *di))
2453  continue;
2454 
2455  // Loop over monitor elements in this directory.
2456  MonitorElement proto(&*di, std::string(), run, 0, 0);
2457  if (enableMultiThread_)
2458  proto.setLumi(lumi);
2459 
2460  mi = data_.lower_bound(proto);
2461  for ( ; mi != me && isSubdirectory(*di, *mi->data_.dirname); ++mi)
2462  {
2463  if (verbose_ > 1)
2464  std::cout << "Run: " << (*mi).run()
2465  << " Lumi: " << (*mi).lumi()
2466  << " LumiFlag: " << (*mi).getLumiFlag()
2467  << " streamId: " << (*mi).streamId()
2468  << " moduleId: " << (*mi).moduleId()
2469  << " fullpathname: " << (*mi).getFullname() << std::endl;
2470 
2471  // Upper bound in the loop over the MEs
2472  if (enableMultiThread_ && ((*mi).lumi() != lumi))
2473  break;
2474 
2475  // Skip if it isn't a direct child.
2476  if (*di != *mi->data_.dirname)
2477  continue;
2478 
2479  // Keep backward compatibility with the old way of
2480  // booking/handlind MonitorElements into the DQMStore. If run is
2481  // 0 it means that a booking happened w/ the old non-threadsafe
2482  // style, and we have to ignore the streamId and moduleId as a
2483  // consequence.
2484 
2485  if (run != 0 && (mi->data_.streamId !=0 || mi->data_.moduleId !=0))
2486  continue;
2487 
2488  if (verbose_ > 1)
2489  std::cout << "DQMStore::savePB: saving monitor element '"
2490  << *mi->data_.dirname << "/" << mi->data_.objname << "'"
2491  << "flags " << mi->data_.flags << "\n";
2492 
2493  nme++;
2494  dqmstorepb::ROOTFilePB::Histo* me = dqmstore_message.add_histo();
2495  me->set_full_pathname((*mi->data_.dirname) + '/' + mi->data_.objname);
2496  me->set_flags(mi->data_.flags);
2497 
2498  TObject *toWrite = nullptr;
2499  bool deleteObject = false;
2500 
2501  if (mi->kind() < MonitorElement::DQM_KIND_TH1F) {
2502  toWrite = new TObjString(mi->tagString().c_str());
2503  deleteObject = true;
2504  } else {
2505  toWrite = mi->object_;
2506  }
2507 
2508  TBufferFile buffer(TBufferFile::kWrite);
2509  buffer.WriteObject(toWrite);
2510  me->set_size(buffer.Length());
2511  me->set_streamed_histo((const void*)buffer.Buffer(),
2512  buffer.Length());
2513 
2514  if (deleteObject) {
2515  delete toWrite;
2516  }
2517 
2518  //reset the ME just written to make it available for the next LS (online)
2519  if (resetMEsAfterWriting)
2520  const_cast<MonitorElement*>(&*mi)->Reset();
2521  }
2522  }
2523 
2524  int filedescriptor = ::open(filename.c_str(),
2525  O_WRONLY | O_CREAT | O_TRUNC,
2526  S_IRUSR | S_IWUSR |
2527  S_IRGRP | S_IWGRP |
2528  S_IROTH);
2529  FileOutputStream file_stream(filedescriptor);
2531  options.format = GzipOutputStream::GZIP;
2532  options.compression_level = 6;
2533  GzipOutputStream gzip_stream(&file_stream,
2534  options);
2535  dqmstore_message.SerializeToZeroCopyStream(&gzip_stream);
2536 
2537  // we need to flush it before we close the fd
2538  gzip_stream.Close();
2539  file_stream.Close();
2540  ::close(filedescriptor);
2541 
2542  // Maybe make some noise.
2543  if (verbose_)
2544  std::cout << "DQMStore::savePB: successfully wrote " << nme
2545  << " objects from path '" << path
2546  << "' into DQM file '" << filename << "'\n";
2547 }
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:690
void set_size(::google::protobuf::uint32 value)
MEMap data_
Definition: DQMStore.h:705
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:2910
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:706
bool enableMultiThread_
Definition: DQMStore.h:695
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 3385 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_.

3386 {
3387  if (scaleFlag_ == 0.0) return;
3388  if (verbose_ > 0)
3389  std::cout << " =========== " << " ScaleFlag " << scaleFlag_ << std::endl;
3390  double factor = scaleFlag_;
3391  int events = 1;
3392  if (dirExists("Info/EventInfo")) {
3393  if ( scaleFlag_ == -1.0) {
3394  MonitorElement * scale_me = get("Info/EventInfo/ScaleFactor");
3395  if (scale_me && scale_me->kind()==MonitorElement::DQM_KIND_REAL) factor = scale_me->getFloatValue();
3396  }
3397  MonitorElement * event_me = get("Info/EventInfo/processedEvents");
3398  if (event_me && event_me->kind()==MonitorElement::DQM_KIND_INT) events = event_me->getIntValue();
3399  }
3400  factor = factor/(events*1.0);
3401 
3402  MEMap::iterator mi = data_.begin();
3403  MEMap::iterator me = data_.end();
3404  for ( ; mi != me; ++mi)
3405  {
3406  MonitorElement &me = const_cast<MonitorElement &>(*mi);
3407  switch (me.kind())
3408  {
3410  {
3411  me.getTH1F()->Scale(factor);
3412  break;
3413  }
3415  {
3416  me.getTH1S()->Scale(factor);
3417  break;
3418  }
3420  {
3421  me.getTH1D()->Scale(factor);
3422  break;
3423  }
3425  {
3426  me.getTH2F()->Scale(factor);
3427  break;
3428  }
3430  {
3431  me.getTH2S()->Scale(factor);
3432  break;
3433  }
3435  {
3436  me.getTH2D()->Scale(factor);
3437  break;
3438  }
3440  {
3441  me.getTH3F()->Scale(factor);
3442  break;
3443  }
3445  {
3446  me.getTProfile()->Scale(factor);
3447  break;
3448  }
3450  {
3451  me.getTProfile2D()->Scale(factor);
3452  break;
3453  }
3454  default:
3455  if (verbose_ > 0)
3456  std::cout << " The DQM object '" << me.getFullname() << "' is not scalable object " << std::endl;
3457  continue;
3458  }
3459  }
3460 }
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:693
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:742
unsigned verbose_
Definition: DQMStore.h:690
MEMap data_
Definition: DQMStore.h:705
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 3338 of file DQMStore.cc.

References MonitorElement::setAccumulate().

3339 {
3340  if (me)
3341  me->setAccumulate(flag);
3342 }
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 677 of file DQMStore.cc.

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

Referenced by SiStripDcsInfo::addBadModules(), HcalSummaryClient::analyze(), RPCMon_SS_Dbx_Global::analyze(), PFCandidateDQMAnalyzer::beginJob(), PFJetDQMAnalyzer::beginJob(), PFMETDQMAnalyzer::beginJob(), ElectronDqmAnalyzerBase::beginJob(), HLTMonBTagClient::beginJob(), HLTMonBTagMuSource::beginJob(), HLTMonBTagIPSource::beginJob(), ScoutingAnalyzerBase::beginJob(), DQMFileReader::beginJob(), L1EmulatorErrorFlagClient::beginJob(), RPCDaqInfo::beginJob(), DQMFEDIntegrityClient::beginJob(), L1ScalersClient::beginJob(), L1TDTTFClient::beginJob(), EgammaBasicClusters::beginJob(), HLTMonBitSummary::beginJob(), HLTMonHcalIsoTrack::beginJob(), EgammaSuperClusters::beginJob(), TkAlCaRecoMonitor::beginJob(), AcceptanceHistoProducer::beginJob(), ConverterTester::beginJob(), TrackEfficiencyClient::beginJob(), L1TDTTF::beginJob(), LaserAlignmentT0ProducerDQM::beginJob(), APVValidationPlots::beginJob(), StripValidationPlots::beginJob(), DQMDaqInfo::beginJob(), HcalDCSInfo::beginJob(), HLTMon::beginJob(), SiStripSpyMonitorModule::beginJob(), SusyDQM< Mu, Ele, Jet, Met >::beginJob(), SiStripFEDMonitorPlugin::beginJob(), SiStripCMMonitorPlugin::beginJob(), DQMHcalIsoTrackAlCaReco::beginJob(), MuonAlignment::beginJob(), ValidationHcalIsoTrackAlCaReco::beginJob(), HLTScalersClient::beginJob(), MCEmbeddingValidationAnalyzer::beginJob(), CastorRecHitMonitor::beginRun(), CastorHIMonitor::beginRun(), CastorPSMonitor::beginRun(), CastorDataIntegrityMonitor::beginRun(), RPCNoisyStripTest::beginRun(), CastorDigiMonitor::beginRun(), RPCChamberQuality::beginRun(), HcalDigiClient::beginRun(), HcalDetDiagTimingClient::beginRun(), HcalHotCellClient::beginRun(), HcalNZSClient::beginRun(), HcalTrigPrimClient::beginRun(), HcalBeamClient::beginRun(), HcalCoarsePedestalClient::beginRun(), HcalDetDiagLEDClient::beginRun(), HcalDeadCellClient::beginRun(), HcalDetDiagNoiseMonitorClient::beginRun(), HcalDetDiagPedestalClient::beginRun(), HcalRecHitMonitor::beginRun(), HcalRecHitClient::beginRun(), HcalSummaryClient::beginRun(), RPCDCSSummary::beginRun(), RPCMon_SS_Dbx_Global::beginRun(), RPCOccupancyTest::beginRun(), HcalRawDataClient::beginRun(), CastorTowerJetMonitor::beginRun(), RPCBxTest::beginRun(), RPCDataCertification::beginRun(), RPCEventSummary::beginRun(), L1TGMTClient::beginRun(), DQMDcsInfoClient::beginRun(), HLTOniaSource::beginRun(), RPCDeadChannelTest::beginRun(), CastorChannelQualityMonitor::beginRun(), HLTMonBitSummary::beginRun(), RPCMultiplicityTest::beginRun(), RPCClusterSizeTest::beginRun(), BxTiming::beginRun(), RPCEfficiencyPerRingLayer::beginRun(), RPCEfficiencyShiftHisto::beginRun(), ZDCMonitorClient::beginRun(), CastorLEDMonitor::beginRun(), DQMProvInfo::beginRun(), MuonAlignmentSummary::beginRun(), HcalMonitorClient::beginRun(), RPCDBPopConAnalyzer::beginRun(), L1TGT::beginRun(), L1Validator::beginRun(), RPCEfficiencySecond::beginRun(), L1ExtraRecoDQM::beginRun(), CastorMonitorModule::beginRun(), V0Validator::beginRun(), L1GtHwValidation::beginRun(), HcalDetDiagPedestalMonitor::beginRun(), L1ExtraDQM::beginRun(), HcalDetDiagLaserMonitor::beginRun(), CalibrationScanTask::book(), CalibrationTask::book(), FineDelayTask::book(), LatencyTask::book(), MEtoMEComparitor::book(), L1TGMTClient::bookClone1DVB(), RPCEfficiencySecond::bookDetUnitSeg(), TrackingQualityChecker::bookGlobalStatus(), TrackerOfflineValidationSummary::bookHarvestingHists(), RPCValidHistograms::bookHistograms(), PixelVTXMonitor::bookHistograms(), DQMLumiMonitor::bookHistograms(), L1TGT::bookHistograms(), EwkElecTauHistManager::bookHistograms(), L1GtHwValidation::bookHistograms(), L1TEventInfoClient::bookHistograms(), EwkMuTauHistManager::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(), TrackingQualityChecker::bookLSStatus(), RCTMonitor::BookRCT(), SiStripCertificationInfo::bookSiStripCertificationMEs(), SiStripQualityChecker::bookStatus(), SiStripDaqInfo::bookStatus(), SiStripDcsInfo::bookStatus(), TrackingCertificationInfo::bookTrackingCertificationMEs(), TrackingCertificationInfo::bookTrackingCertificationMEsAtLumi(), BTagHLTOfflineClient::BTagHLTOfflineClient(), BxTiming::BxTiming(), CastorMonitorModule::CastorMonitorModule(), cd(), HcalCoarsePedestalMonitor::cleanup(), HcalNZSMonitor::cleanup(), HcalTrigPrimMonitor::cleanup(), HcalNoiseMonitor::cleanup(), HcalRecHitMonitor::cleanup(), HcalLSbyLSMonitor::cleanup(), HcalDataIntegrityTask::cleanup(), HcalHotCellMonitor::cleanup(), HcalBeamMonitor::cleanup(), HcalDeadCellMonitor::cleanup(), HcalDigiMonitor::cleanup(), HcalDetDiagTimingMonitor::cleanup(), HcalDetDiagLEDMonitor::cleanup(), CastorBaseMonitor::clearME(), L1GtHwValidation::compareDaqRecord(), L1GtHwValidation::compareFDL(), L1GtHwValidation::compareGTFE(), HcalTrigPrimMonitor::create_errorflag(), HcalTrigPrimMonitor::create_et_histogram(), HcalTrigPrimMonitor::create_fg_correlation(), HcalTrigPrimMonitor::create_map(), HcalTrigPrimMonitor::create_summary(), HcalTrigPrimMonitor::create_tp_correlation(), PFClient_JetRes::createEfficiencyPlots(), PFClient::createEfficiencyPlots(), CastorLEDMonitor::createFEDmap(), PFClient::createProfilePlots(), PFClient::createProjectionPlots(), PFClient_JetRes::createResolutionPlots(), PFClient::createResolutionPlots(), CSCDigiValidation::CSCDigiValidation(), CSCRecHit2DValidation::CSCRecHit2DValidation(), CSCSegmentValidation::CSCSegmentValidation(), dqmCopyRecursively(), EgHLTOfflineClient::EgHLTOfflineClient(), ElectronDqmAnalyzerBase::endJob(), HarvestingAnalyzer::endJob(), BTagValidator::endJob(), ElectronDqmAnalyzerBase::endLuminosityBlock(), HcalLSbyLSMonitor::endLuminosityBlock(), HLTScalersClient::endLuminosityBlock(), ElectronDqmAnalyzerBase::endRun(), RPCDcsInfoClient::endRun(), DQMDcsInfoClient::endRun(), TauDQMHistEffProducer::endRun(), TauDQMFileLoader::endRun(), GlobalHitsProdHistStripper::endRun(), SiStripQualityChecker::fillFaultyModuleStatus(), SiStripQualityDQM::fillGrandSummaryMEs(), HcalSummaryClient::fillReportSummary(), HcalSummaryClient::fillReportSummaryLSbyLS(), TrackerOfflineValidationSummary::fillTree(), SiStripDaqInfo::findExcludedModule(), TkHistoMap::folderDefinition(), EgHLTOfflineSummaryClient::getEgHLTSumHist_(), GlobalDigisAnalyzer::GlobalDigisAnalyzer(), GlobalDigisHistogrammer::GlobalDigisHistogrammer(), GlobalHitsAnalyzer::GlobalHitsAnalyzer(), GlobalHitsHistogrammer::GlobalHitsHistogrammer(), GlobalHitsTester::GlobalHitsTester(), goUp(), HEff1DHit::HEff1DHit(), HEff2DHit::HEff2DHit(), HEff4DHit::HEff4DHit(), SiPixelMuonHLT::Histo_init(), HLTMon::HLTMon(), HLTScalersClient::HLTScalersClient(), HRes1DHit::HRes1DHit(), HRes2DHit::HRes2DHit(), HRes4DHit::HRes4DHit(), SiStripBadAPVandHotStripAlgorithmFromClusterOccupancy::initializeDQMHistograms(), LaserDQM::initMonitors(), JetMETHLTOfflineClient::JetMETHLTOfflineClient(), L1ExtraDQM::L1ExtraDQM(), L1ExtraRecoDQM::L1ExtraRecoDQM(), L1GtHwValidation::L1GtHwValidation(), L1ScalersClient::L1ScalersClient(), L1TDTTF::L1TDTTF(), L1TGMTClient::makeEfficiency1D(), L1TGMTClient::makeEfficiency2D(), DQMProvInfo::makeHLTKeyInfo(), DQMProvInfo::makeProvInfo(), L1TGMTClient::makeRatio1D(), MonitorElementsDb::MonitorElementsDb(), CastorDigiMonitor::perChanHists(), CastorLEDMonitor::perChanHists(), CastorRecHitPerChan::perChanHists(), PerformanceAnalyzer::PerformanceAnalyzer(), readFilePB(), ElectronDqmAnalyzerBase::remove(), BTagHLTOfflineClient::runClient_(), JetMETHLTOfflineClient::runClient_(), EgHLTOfflineSummaryClient::runClient_(), EgHLTOfflineClient::runClient_(), SiStripFolderOrganizer::setDetectorFolder(), SiPixelFolderOrganizer::setFedFolder(), SiStripFolderOrganizer::setLayerFolder(), SiPixelFolderOrganizer::setModuleFolder(), SiStripFolderOrganizer::setSiStripControlFolder(), SiStripFolderOrganizer::setSiStripFolder(), SiStripFolderOrganizer::setSiStripTopControlFolder(), HcalNZSMonitor::setup(), HcalTrigPrimMonitor::setup(), HcalCoarsePedestalMonitor::setup(), HcalRecHitMonitor::setup(), HcalNoiseMonitor::setup(), HcalBeamMonitor::setup(), HcalLSbyLSMonitor::setup(), HcalDataIntegrityTask::setup(), HcalHotCellMonitor::setup(), HcalDeadCellMonitor::setup(), HcalRawDataMonitor::setup(), HcalBaseDQMonitor::setup(), HcalDigiMonitor::setup(), HcalDetDiagTimingMonitor::setup(), HcalDetDiagLEDMonitor::setup(), HLXMonitor::SetupEventInfo(), HLXMonitor::SetupHists(), HcalDigiMonitor::setupSubdetHists(), PFCandidateDQMAnalyzer::storeBadEvents(), PFMETDQMAnalyzer::storeBadEvents(), PFJetDQMAnalyzer::storeBadEvents(), and SubTaskSummaryStatus::WriteThreshold().

678 {
680  const std::string *cleaned = 0;
681  cleanTrailingSlashes(fullpath, clean, cleaned);
682  makeDirectory(*cleaned);
683  pwd_ = *cleaned;
684 }
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:78
std::string pwd_
Definition: DQMStore.h:704
std::vector< T * > clean
Definition: MVATrainer.cc:156
void makeDirectory(const std::string &path)
Definition: DQMStore.cc:701
void DQMStore::setVerbose ( unsigned  level)
void DQMStore::showDirStructure ( void  ) const

Definition at line 3348 of file DQMStore.cc.

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

Referenced by HcalBeamClient::beginJob(), HcalCoarsePedestalClient::beginJob(), HcalDetDiagNoiseMonitorClient::beginJob(), HcalTrigPrimClient::beginJob(), HcalDetDiagPedestalClient::beginJob(), HcalDetDiagTimingClient::beginJob(), HcalDigiClient::beginJob(), HcalDeadCellClient::beginJob(), HcalHotCellClient::beginJob(), HcalNZSClient::beginJob(), HcalDetDiagLEDClient::beginJob(), HcalRecHitClient::beginJob(), HcalRawDataClient::beginJob(), HcalBaseDQClient::beginJob(), EgammaBasicClusters::beginJob(), EgammaSuperClusters::beginJob(), TrackerHitAnalyzer::bookHistograms(), EcalBarrelMonitorDbModule::EcalBarrelMonitorDbModule(), BTagValidator::endJob(), dEdxAnalyzer::endJob(), LaserAlignmentT0ProducerDQM::endJob(), TrackEfficiencyMonitor::endJob(), TrackSplittingMonitor::endJob(), TrackingMonitor::endJob(), LogMessageMonitor::endJob(), RCTMonitor::endJob(), HLTScalersClient::endLuminosityBlock(), TauDQMFileLoader::endRun(), GlobalDigisAnalyzer::GlobalDigisAnalyzer(), GlobalDigisHistogrammer::GlobalDigisHistogrammer(), GlobalHitsAnalyzer::GlobalHitsAnalyzer(), GlobalHitsHistogrammer::GlobalHitsHistogrammer(), GlobalHitsProdHistStripper::GlobalHitsProdHistStripper(), ZDCMonitorClient::initialize(), LaserDQM::initMonitors(), and HLXMonitor::SetupHists().

3349 {
3350  std::vector<std::string> contents;
3351  getContents(contents);
3352 
3353  std::cout << " ------------------------------------------------------------\n"
3354  << " Directory structure: \n"
3355  << " ------------------------------------------------------------\n";
3356 
3357  std::copy(contents.begin(), contents.end(),
3358  std::ostream_iterator<std::string>(std::cout, "\n"));
3359 
3360  std::cout << " ------------------------------------------------------------\n";
3361 }
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1747
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 3321 of file DQMStore.cc.

References MonitorElement::softReset().

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

3322 {
3323  if (me)
3324  me->softReset();
3325 }
void softReset(void)
void DQMStore::tag ( MonitorElement me,
unsigned int  myTag 
)

tag ME as <myTag> (myTag > 0)

Definition at line 1604 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(), RPCDqmClient::getMonitorElements(), GlobalHitsTester::GlobalHitsTester(), Inspector.Inspector::SetTag(), tag(), tagAllContents(), and tagContents().

1605 {
1606  if (! myTag)
1607  raiseDQMError("DQMStore", "Attempt to tag monitor element '%s'"
1608  " with a zero tag", me->getFullname().c_str());
1609  if ((me->data_.flags & DQMNet::DQM_PROP_TAGGED) && myTag != me->data_.tag)
1610  raiseDQMError("DQMStore", "Attempt to tag monitor element '%s'"
1611  " twice with multiple tags", me->getFullname().c_str());
1612 
1613  me->data_.tag = myTag;
1615 }
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 1619 of file DQMStore.cc.

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

Referenced by Inspector.Inspector::SetTag().

1620 {
1621  std::string dir;
1622  std::string name;
1623  splitPath(dir, name, path);
1624 
1625  if (MonitorElement *me = findObject(dir, name))
1626  tag(me, myTag);
1627  else
1628  raiseDQMError("DQMStore", "Attempt to tag non-existent monitor element"
1629  " '%s' with tag %u", path.c_str(), myTag);
1630 
1631 }
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:1848
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:1604
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 1647 of file DQMStore.cc.

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

1648 {
1650  const std::string *cleaned = 0;
1651  cleanTrailingSlashes(path, clean, cleaned);
1652  MonitorElement proto(cleaned, std::string());
1653 
1654  // FIXME: WILDCARDS? Old one supported them, but nobody seemed to use them.
1655  MEMap::iterator e = data_.end();
1656  MEMap::iterator i = data_.lower_bound(proto);
1657  while (i != e && isSubdirectory(*cleaned, *i->data_.dirname))
1658  {
1659  tag(const_cast<MonitorElement *>(&*i), myTag);
1660  ++i;
1661  }
1662 }
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:1604
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:705
void DQMStore::tagContents ( const std::string &  path,
unsigned int  myTag 
)

tag all children of folder (does NOT include subfolders)

Definition at line 1635 of file DQMStore.cc.

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

Referenced by HLXMonitor::SetupHists().

1636 {
1637  MonitorElement proto(&path, std::string());
1638  MEMap::iterator e = data_.end();
1639  MEMap::iterator i = data_.lower_bound(proto);
1640  for ( ; i != e && path == *i->data_.dirname; ++i)
1641  tag(const_cast<MonitorElement *>(&*i), myTag);
1642 }
int i
Definition: DBlmapReader.cc:9
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1604
tuple path
else: Piece not in the list, fine.
MEMap data_
Definition: DQMStore.h:705
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 3216 of file DQMStore.cc.

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

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

3217 {
3218  // Clean the path
3220  const std::string *cleaned = 0;
3221  cleanTrailingSlashes(dir, clean, cleaned);
3222 
3223  // Validate the path.
3224  if (cleaned->find_first_not_of(s_safe) != std::string::npos)
3225  raiseDQMError("DQMStore", "Monitor element path name '%s'"
3226  " uses unacceptable characters", cleaned->c_str());
3227 
3228  // Redirect to the pattern match version.
3229  useQTestByMatch(*cleaned + "/*", qtname);
3230 }
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:3234
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 3234 of file DQMStore.cc.

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

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

3235 {
3236  QCriterion *qc = getQCriterion(qtname);
3237  if (! qc)
3238  raiseDQMError("DQMStore", "Cannot apply non-existent quality test '%s'",
3239  qtname.c_str());
3240 
3241  fastmatch * fm = new fastmatch( pattern );
3242 
3243  // Record the test for future reference.
3244  QTestSpec qts(fm, qc);
3245  qtestspecs_.push_back(qts);
3246 
3247  // Apply the quality test.
3248  MEMap::iterator mi = data_.begin();
3249  MEMap::iterator me = data_.end();
3250  std::string path;
3251  int cases = 0;
3252  for ( ; mi != me; ++mi)
3253  {
3254  path.clear();
3255  mergePath(path, *mi->data_.dirname, mi->data_.objname);
3256  if (fm->match(path))
3257  {
3258  ++cases;
3259  const_cast<MonitorElement &>(*mi).addQReport(qts.second);
3260  }
3261  }
3262 
3263  //return the number of matched cases
3264  return cases;
3265 }
QCriterion * getQCriterion(const std::string &qtname) const
Definition: DQMStore.cc:3184
std::pair< fastmatch *, QCriterion * > QTestSpec
Definition: DQMStore.h:684
static void mergePath(std::string &path, const std::string &dir, const std::string &name)
Definition: DQMStore.cc:108
QTestSpecs qtestspecs_
Definition: DQMStore.h:710
tuple path
else: Piece not in the list, fine.
MEMap data_
Definition: DQMStore.h:705
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 719 of file DQMStore.h.

friend class DQMFileSaver
friend

Definition at line 723 of file DQMStore.h.

friend class DQMNet
friend

Definition at line 718 of file DQMStore.h.

friend class DQMRootOutputModule
friend

Definition at line 721 of file DQMStore.h.

friend class DQMRootSource
friend

Definition at line 722 of file DQMStore.h.

friend class DQMService
friend

Definition at line 717 of file DQMStore.h.

friend class DQMStoreExample
friend

Definition at line 720 of file DQMStore.h.

friend class edm::DQMHttpSource
friend

Definition at line 716 of file DQMStore.h.

friend class MEtoEDMConverter
friend

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

Referenced by DQMStore(), and forceReset().

IBooker* DQMStore::ibooker_
private

Definition at line 713 of file DQMStore.h.

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

IGetter* DQMStore::igetter_
private

Definition at line 714 of file DQMStore.h.

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

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

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

Referenced by createQTest(), and initializeFrom().

DQMStore::qtests_
private

All the quality tests.

Definition at line 708 of file DQMStore.h.

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

QTestSpecs DQMStore::qtestspecs_
private

Definition at line 710 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 698 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 692 of file DQMStore.h.

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

uint32_t DQMStore::run_
private

Definition at line 699 of file DQMStore.h.

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

double DQMStore::scaleFlag_
private

Definition at line 693 of file DQMStore.h.

Referenced by initializeFrom(), and scaleElements().

std::ofstream* DQMStore::stream_
private

Definition at line 702 of file DQMStore.h.

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

uint32_t DQMStore::streamId_
private

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

Referenced by createQTest(), and initializeFrom().