CMS 3D CMS Logo

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

#include <DQMStore.h>

Classes

class  IBooker
 
class  IGetter
 

Public Types

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

Public Member Functions

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

Private Types

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

Private Member Functions

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

Static Private Member Functions

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

Private Attributes

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

Friends

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

Detailed Description

Definition at line 75 of file DQMStore.h.

Member Typedef Documentation

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

Definition at line 691 of file DQMStore.h.

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

Definition at line 693 of file DQMStore.h.

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

Definition at line 692 of file DQMStore.h.

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

Definition at line 689 of file DQMStore.h.

Definition at line 690 of file DQMStore.h.

Member Enumeration Documentation

Enumerator
KeepRunDirs 
StripRunDirs 

Definition at line 84 of file DQMStore.h.

Enumerator
SaveWithoutReference 
SaveWithReference 
SaveWithReferenceForQTest 

Definition at line 78 of file DQMStore.h.

Constructor & Destructor Documentation

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

Definition at line 483 of file DQMStore.cc.

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

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

Definition at line 519 of file DQMStore.cc.

References ibooker_, igetter_, and initializeFrom().

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

Definition at line 541 of file DQMStore.cc.

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

542 {
543  for (QCMap::iterator i = qtests_.begin(), e = qtests_.end(); i != e; ++i)
544  delete i->second;
545 
546  for (QTestSpecs::iterator i = qtestspecs_.begin(), e = qtestspecs_.end(); i != e; ++i)
547  delete i->first;
548 
549  if (stream_)
550  stream_->close();
551  delete stream_;
552 }
int i
Definition: DBlmapReader.cc:9
QCMap qtests_
Definition: DQMStore.h:713
QTestSpecs qtestspecs_
Definition: DQMStore.h:715
std::ofstream * stream_
Definition: DQMStore.h:707
if(conf.exists("allCellsPositionCalc"))
for(const auto &isodef:isoDefs)
DQMStore::DQMStore ( const DQMStore )
private

Member Function Documentation

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

Definition at line 849 of file DQMStore.cc.

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

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

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

Definition at line 780 of file DQMStore.cc.

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

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

Book 1D histogram.

Definition at line 994 of file DQMStore.cc.

References pwd_.

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

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

Book 1D histogram.

Definition at line 1002 of file DQMStore.cc.

References book1D(), and pwd_.

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

Book 1D variable bin histogram.

Definition at line 1042 of file DQMStore.cc.

References book1D(), and pwd_.

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

Book 1D variable bin histogram.

Definition at line 1050 of file DQMStore.cc.

References book1D(), and pwd_.

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

Book 1D histogram by cloning an existing histogram.

Definition at line 1058 of file DQMStore.cc.

References book1D(), and pwd_.

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

Book 1D histogram by cloning an existing histogram.

Definition at line 1065 of file DQMStore.cc.

References book1D(), and pwd_.

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

Book 1D histogram based on TH1F.

Definition at line 973 of file DQMStore.cc.

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

974 {
975  return book(dir, name, "book1D", MonitorElement::DQM_KIND_TH1F, h, collate1D);
976 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static void collate1D(MonitorElement *me, TH1F *h, unsigned verbose)
Definition: DQMStore.cc:1561
dbl *** dir
Definition: mlp_gen.cc:35
MonitorElement * DQMStore::book1DD ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX 
)

Book 1S histogram.

Definition at line 1026 of file DQMStore.cc.

References pwd_.

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

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

Book 1S histogram.

Definition at line 1034 of file DQMStore.cc.

References book1DD(), and pwd_.

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

Book 1D double histogram by cloning an existing histogram.

Definition at line 1086 of file DQMStore.cc.

References book1DD(), and pwd_.

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

Book 1D double histogram by cloning an existing histogram.

Definition at line 1093 of file DQMStore.cc.

References book1DD(), and pwd_.

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

Book 1D histogram based on TH1D.

Definition at line 987 of file DQMStore.cc.

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

988 {
989  return book(dir, name, "book1DD", MonitorElement::DQM_KIND_TH1D, h, collate1DD);
990 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static void collate1DD(MonitorElement *me, TH1D *h, unsigned verbose)
Definition: DQMStore.cc:1575
dbl *** dir
Definition: mlp_gen.cc:35
MonitorElement * DQMStore::book1S ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX 
)

Book 1S histogram.

Definition at line 1010 of file DQMStore.cc.

References pwd_.

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

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

Book 1S histogram.

Definition at line 1018 of file DQMStore.cc.

References book1S(), and pwd_.

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

Book 1S histogram by cloning an existing histogram.

Definition at line 1072 of file DQMStore.cc.

References book1S(), and pwd_.

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

Book 1S histogram by cloning an existing histogram.

Definition at line 1079 of file DQMStore.cc.

References book1S(), and pwd_.

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

Book 1D histogram based on TH1S.

Definition at line 980 of file DQMStore.cc.

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

981 {
982  return book(dir, name, "book1S", MonitorElement::DQM_KIND_TH1S, h, collate1S);
983 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
static void collate1S(MonitorElement *me, TH1S *h, unsigned verbose)
Definition: DQMStore.cc:1568
dbl *** dir
Definition: mlp_gen.cc:35
MonitorElement * DQMStore::book2D ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY 
)
MonitorElement * DQMStore::book2D ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY 
)

Book 2D histogram.

Definition at line 1133 of file DQMStore.cc.

References book2D(), and pwd_.

1136 {
1137  return book2D(pwd_, name, new TH2F(name.c_str(), title.c_str(),
1138  nchX, lowX, highX,
1139  nchY, lowY, highY));
1140 }
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1122
MonitorElement * DQMStore::book2D ( const char *  name,
const char *  title,
int  nchX,
const float *  xbinsize,
int  nchY,
const float *  ybinsize 
)

Book 2D variable bin histogram.

Definition at line 1188 of file DQMStore.cc.

References book2D(), and pwd_.

1190 {
1191  return book2D(pwd_, name, new TH2F(name, title,
1192  nchX, xbinsize, nchY, ybinsize));
1193 }
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1122
MonitorElement * DQMStore::book2D ( const std::string &  name,
const std::string &  title,
int  nchX,
const float *  xbinsize,
int  nchY,
const float *  ybinsize 
)

Book 2D variable bin histogram.

Definition at line 1197 of file DQMStore.cc.

References book2D(), and pwd_.

1199 {
1200  return book2D(pwd_, name, new TH2F(name.c_str(), title.c_str(),
1201  nchX, xbinsize, nchY, ybinsize));
1202 }
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1122
MonitorElement * DQMStore::book2D ( const char *  name,
TH2F *  h 
)

Book 2D histogram by cloning an existing histogram.

Definition at line 1206 of file DQMStore.cc.

References book2D(), and pwd_.

1207 {
1208  return book2D(pwd_, name, static_cast<TH2F *>(source->Clone(name)));
1209 }
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
Definition: DQMStore.cc:1122
static std::string const source
Definition: EdmProvDump.cc:42
MonitorElement * DQMStore::book2D ( const std::string &  name,
TH2F *  h 
)

Book 2D histogram by cloning an existing histogram.

Definition at line 1213 of file DQMStore.cc.

References book2D(), and pwd_.

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

Book 2D histogram based on TH2F.

Definition at line 1101 of file DQMStore.cc.

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

1102 {
1103  return book(dir, name, "book2D", MonitorElement::DQM_KIND_TH2F, h, collate2D);
1104 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
dbl *** dir
Definition: mlp_gen.cc:35
static void collate2D(MonitorElement *me, TH2F *h, unsigned verbose)
Definition: DQMStore.cc:1582
MonitorElement * DQMStore::book2DD ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY 
)

Book 2D double histogram.

Definition at line 1166 of file DQMStore.cc.

References pwd_.

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

1169 {
1170  return book2DD(pwd_, name, new TH2D(name, title,
1171  nchX, lowX, highX,
1172  nchY, lowY, highY));
1173 }
MonitorElement * book2DD(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D double histogram.
Definition: DQMStore.cc:1166
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * DQMStore::book2DD ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY 
)

Book 2S histogram.

Definition at line 1177 of file DQMStore.cc.

References book2DD(), and pwd_.

1180 {
1181  return book2DD(pwd_, name, new TH2D(name.c_str(), title.c_str(),
1182  nchX, lowX, highX,
1183  nchY, lowY, highY));
1184 }
MonitorElement * book2DD(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D double histogram.
Definition: DQMStore.cc:1166
std::string pwd_
Definition: DQMStore.h:709
MonitorElement* DQMStore::book2DD ( const char *  name,
const char *  title,
int  nchX,
const float *  xbinsize,
int  nchY,
const float *  ybinsize 
)
MonitorElement* DQMStore::book2DD ( const std::string &  name,
const std::string &  title,
int  nchX,
const float *  xbinsize,
int  nchY,
const float *  ybinsize 
)
MonitorElement * DQMStore::book2DD ( const char *  name,
TH2D *  h 
)

Book 2DS histogram by cloning an existing histogram.

Definition at line 1234 of file DQMStore.cc.

References book2DD(), and pwd_.

1235 {
1236  return book2DD(pwd_, name, static_cast<TH2D *>(source->Clone(name)));
1237 }
MonitorElement * book2DD(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D double histogram.
Definition: DQMStore.cc:1166
std::string pwd_
Definition: DQMStore.h:709
static std::string const source
Definition: EdmProvDump.cc:42
MonitorElement * DQMStore::book2DD ( const std::string &  name,
TH2D *  h 
)

Book 2DS histogram by cloning an existing histogram.

Definition at line 1241 of file DQMStore.cc.

References book2DD(), and pwd_.

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

Book 2D histogram based on TH2D.

Definition at line 1115 of file DQMStore.cc.

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

1116 {
1117  return book(dir, name, "book2DD", MonitorElement::DQM_KIND_TH2D, h, collate2DD);
1118 }
static void collate2DD(MonitorElement *me, TH2D *h, unsigned verbose)
Definition: DQMStore.cc:1596
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
dbl *** dir
Definition: mlp_gen.cc:35
MonitorElement * DQMStore::book2S ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY 
)

Book 2S histogram.

Definition at line 1144 of file DQMStore.cc.

References pwd_.

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

1147 {
1148  return book2S(pwd_, name, new TH2S(name, title,
1149  nchX, lowX, highX,
1150  nchY, lowY, highY));
1151 }
MonitorElement * book2S(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2S histogram.
Definition: DQMStore.cc:1144
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * DQMStore::book2S ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY 
)

Book 2S histogram.

Definition at line 1155 of file DQMStore.cc.

References book2S(), and pwd_.

1158 {
1159  return book2S(pwd_, name, new TH2S(name.c_str(), title.c_str(),
1160  nchX, lowX, highX,
1161  nchY, lowY, highY));
1162 }
MonitorElement * book2S(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2S histogram.
Definition: DQMStore.cc:1144
std::string pwd_
Definition: DQMStore.h:709
MonitorElement* DQMStore::book2S ( const char *  name,
const char *  title,
int  nchX,
const float *  xbinsize,
int  nchY,
const float *  ybinsize 
)
MonitorElement* DQMStore::book2S ( const std::string &  name,
const std::string &  title,
int  nchX,
const float *  xbinsize,
int  nchY,
const float *  ybinsize 
)
MonitorElement * DQMStore::book2S ( const char *  name,
TH2S *  h 
)

Book 2DS histogram by cloning an existing histogram.

Definition at line 1220 of file DQMStore.cc.

References book2S(), and pwd_.

1221 {
1222  return book2S(pwd_, name, static_cast<TH2S *>(source->Clone(name)));
1223 }
MonitorElement * book2S(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2S histogram.
Definition: DQMStore.cc:1144
std::string pwd_
Definition: DQMStore.h:709
static std::string const source
Definition: EdmProvDump.cc:42
MonitorElement * DQMStore::book2S ( const std::string &  name,
TH2S *  h 
)

Book 2DS histogram by cloning an existing histogram.

Definition at line 1227 of file DQMStore.cc.

References book2S(), and pwd_.

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

Book 2D histogram based on TH2S.

Definition at line 1108 of file DQMStore.cc.

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

1109 {
1110  return book(dir, name, "book2S", MonitorElement::DQM_KIND_TH2S, h, collate2S);
1111 }
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
dbl *** dir
Definition: mlp_gen.cc:35
static void collate2S(MonitorElement *me, TH2S *h, unsigned verbose)
Definition: DQMStore.cc:1589
MonitorElement * DQMStore::book3D ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY,
int  nchZ,
double  lowZ,
double  highZ 
)

Book 3D histogram.

Definition at line 1256 of file DQMStore.cc.

References pwd_.

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

1260 {
1261  return book3D(pwd_, name, new TH3F(name, title,
1262  nchX, lowX, highX,
1263  nchY, lowY, highY,
1264  nchZ, lowZ, highZ));
1265 }
MonitorElement * book3D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ)
Book 3D histogram.
Definition: DQMStore.cc:1256
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * DQMStore::book3D ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY,
int  nchZ,
double  lowZ,
double  highZ 
)

Book 3D histogram.

Definition at line 1269 of file DQMStore.cc.

References book3D(), and pwd_.

1273 {
1274  return book3D(pwd_, name, new TH3F(name.c_str(), title.c_str(),
1275  nchX, lowX, highX,
1276  nchY, lowY, highY,
1277  nchZ, lowZ, highZ));
1278 }
MonitorElement * book3D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ)
Book 3D histogram.
Definition: DQMStore.cc:1256
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * DQMStore::book3D ( const char *  name,
TH3F *  h 
)

Book 3D histogram by cloning an existing histogram.

Definition at line 1282 of file DQMStore.cc.

References book3D(), and pwd_.

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

Book 3D histogram by cloning an existing histogram.

Definition at line 1289 of file DQMStore.cc.

References book3D(), and pwd_.

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

Book 3D histogram based on TH3F.

Definition at line 1249 of file DQMStore.cc.

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

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

Book float.

Definition at line 936 of file DQMStore.cc.

References bookFloat(), and pwd_.

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

Book float.

Definition at line 914 of file DQMStore.cc.

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

915 {
916  if (collateHistograms_)
917  {
919  {
920  me->Fill(0.);
921  return me;
922  }
923  }
924 
925  return book(dir, name, "bookFloat")
927 }
MonitorElement * initialise(Kind kind)
MonitorElement * findObject(const std::string &dir, const std::string &name, const uint32_t run=0, const uint32_t lumi=0, const uint32_t streamId=0, const uint32_t moduleId=0) const
Definition: DQMStore.cc:1878
uint32_t streamId_
Definition: DQMStore.h:705
uint32_t moduleId_
Definition: DQMStore.h:706
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
uint32_t run_
Definition: DQMStore.h:704
dbl *** dir
Definition: mlp_gen.cc:35
bool collateHistograms_
Definition: DQMStore.h:699
MonitorElement * DQMStore::bookInt ( const char *  name)
MonitorElement * DQMStore::bookInt ( const std::string &  name)

Book int.

Definition at line 906 of file DQMStore.cc.

References bookInt(), and pwd_.

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

Book int.

Definition at line 884 of file DQMStore.cc.

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

885 {
886  if (collateHistograms_)
887  {
889  {
890  me->Fill(0);
891  return me;
892  }
893  }
894 
895  return book(dir, name, "bookInt")
897 }
MonitorElement * initialise(Kind kind)
MonitorElement * findObject(const std::string &dir, const std::string &name, const uint32_t run=0, const uint32_t lumi=0, const uint32_t streamId=0, const uint32_t moduleId=0) const
Definition: DQMStore.cc:1878
uint32_t streamId_
Definition: DQMStore.h:705
uint32_t moduleId_
Definition: DQMStore.h:706
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
uint32_t run_
Definition: DQMStore.h:704
dbl *** dir
Definition: mlp_gen.cc:35
bool collateHistograms_
Definition: DQMStore.h:699
MonitorElement * DQMStore::bookProfile ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY,
const char *  option = "s" 
)

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

Definition at line 1308 of file DQMStore.cc.

References pwd_.

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

1312 {
1313  return bookProfile(pwd_, name, new TProfile(name, title,
1314  nchX, lowX, highX,
1315  lowY, highY,
1316  option));
1317 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1308
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * DQMStore::bookProfile ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY,
const char *  option = "s" 
)

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

Definition at line 1323 of file DQMStore.cc.

References bookProfile(), and pwd_.

1327 {
1328  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1329  nchX, lowX, highX,
1330  lowY, highY,
1331  option));
1332 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1308
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * DQMStore::bookProfile ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX,
double  lowY,
double  highY,
const char *  option = "s" 
)

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

Definition at line 1338 of file DQMStore.cc.

References bookProfile(), and pwd_.

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

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

Definition at line 1353 of file DQMStore.cc.

References bookProfile(), and pwd_.

1357 {
1358  return bookProfile(pwd_, name, new TProfile(name.c_str(), title.c_str(),
1359  nchX, lowX, highX,
1360  lowY, highY,
1361  option));
1362 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1308
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * DQMStore::bookProfile ( const char *  name,
const char *  title,
int  nchX,
const double *  xbinsize,
int  nchY,
double  lowY,
double  highY,
const char *  option = "s" 
)

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

Definition at line 1368 of file DQMStore.cc.

References bookProfile(), and pwd_.

1372 {
1373  return bookProfile(pwd_, name, new TProfile(name, title,
1374  nchX, xbinsize,
1375  lowY, highY,
1376  option));
1377 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1308
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * DQMStore::bookProfile ( const std::string &  name,
const std::string &  title,
int  nchX,
const double *  xbinsize,
int  nchY,
double  lowY,
double  highY,
const char *  option = "s" 
)

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

Definition at line 1383 of file DQMStore.cc.

References bookProfile(), and pwd_.

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

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

Definition at line 1398 of file DQMStore.cc.

References bookProfile(), and pwd_.

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

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

Definition at line 1413 of file DQMStore.cc.

References bookProfile(), and pwd_.

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

Book TProfile by cloning an existing profile.

Definition at line 1426 of file DQMStore.cc.

References bookProfile(), and pwd_.

1427 {
1428  return bookProfile(pwd_, name, static_cast<TProfile *>(source->Clone(name)));
1429 }
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
Definition: DQMStore.cc:1308
std::string pwd_
Definition: DQMStore.h:709
static std::string const source
Definition: EdmProvDump.cc:42
MonitorElement * DQMStore::bookProfile ( const std::string &  name,
TProfile *  h 
)

Book TProfile by cloning an existing profile.

Definition at line 1433 of file DQMStore.cc.

References bookProfile(), and pwd_.

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

Book profile histogram based on TProfile.

Definition at line 1297 of file DQMStore.cc.

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

1298 {
1299  return book(dir, name, "bookProfile",
1301  h, collateProfile);
1302 }
static void collateProfile(MonitorElement *me, TProfile *h, unsigned verbose)
Definition: DQMStore.cc:1610
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
Definition: DQMStore.cc:849
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
Definition: Activities.doc:4
dbl *** dir
Definition: mlp_gen.cc:35
MonitorElement * DQMStore::bookProfile2D ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY,
int  nchZ,
double  lowZ,
double  highZ,
const char *  option = "s" 
)

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

Definition at line 1452 of file DQMStore.cc.

References pwd_.

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

1457 {
1458  return bookProfile2D(pwd_, name, new TProfile2D(name, title,
1459  nchX, lowX, highX,
1460  nchY, lowY, highY,
1461  lowZ, highZ,
1462  option));
1463 }
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
Definition: DQMStore.cc:1452
MonitorElement * DQMStore::bookProfile2D ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY,
int  nchZ,
double  lowZ,
double  highZ,
const char *  option = "s" 
)

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

Definition at line 1469 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1474 {
1475  return bookProfile2D(pwd_, name, new TProfile2D(name.c_str(), title.c_str(),
1476  nchX, lowX, highX,
1477  nchY, lowY, highY,
1478  lowZ, highZ,
1479  option));
1480 }
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
Definition: DQMStore.cc:1452
MonitorElement * DQMStore::bookProfile2D ( const char *  name,
const char *  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY,
double  lowZ,
double  highZ,
const char *  option = "s" 
)

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

Definition at line 1486 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1491 {
1492  return bookProfile2D(pwd_, name, new TProfile2D(name, title,
1493  nchX, lowX, highX,
1494  nchY, lowY, highY,
1495  lowZ, highZ,
1496  option));
1497 }
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
Definition: DQMStore.cc:1452
MonitorElement * DQMStore::bookProfile2D ( const std::string &  name,
const std::string &  title,
int  nchX,
double  lowX,
double  highX,
int  nchY,
double  lowY,
double  highY,
double  lowZ,
double  highZ,
const char *  option = "s" 
)

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

Definition at line 1503 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

1508 {
1509  return bookProfile2D(pwd_, name, new TProfile2D(name.c_str(), title.c_str(),
1510  nchX, lowX, highX,
1511  nchY, lowY, highY,
1512  lowZ, highZ,
1513  option));
1514 }
std::string pwd_
Definition: DQMStore.h:709
MonitorElement * bookProfile2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, int nchZ, double lowZ, double highZ, const char *option="s")
Definition: DQMStore.cc:1452
MonitorElement * DQMStore::bookProfile2D ( const char *  name,
TProfile2D *  h 
)

Book TProfile2D by cloning an existing profile.

Definition at line 1518 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

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

Book TProfile2D by cloning an existing profile.

Definition at line 1525 of file DQMStore.cc.

References bookProfile2D(), and pwd_.

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

Book 2D profile histogram based on TProfile2D.

Definition at line 1441 of file DQMStore.cc.

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

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

Book string.

Definition at line 960 of file DQMStore.cc.

References pwd_.

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

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

Book string.

Definition at line 965 of file DQMStore.cc.

References bookString(), and pwd_.

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

Book string.

Definition at line 944 of file DQMStore.cc.

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

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

Definition at line 241 of file DQMStore.h.

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

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

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

go to top directory (ie. root)

Definition at line 684 of file DQMStore.cc.

References setCurrentFolder().

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

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

cd to subdirectory (if there)

Definition at line 689 of file DQMStore.cc.

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

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

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

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

Definition at line 2432 of file DQMStore.cc.

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

Referenced by save().

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

Definition at line 1534 of file DQMStore.cc.

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

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

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

Definition at line 1561 of file DQMStore.cc.

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

Referenced by book1D(), and extract().

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

Definition at line 1575 of file DQMStore.cc.

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

Referenced by book1DD(), and extract().

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

Definition at line 1568 of file DQMStore.cc.

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

Referenced by book1S(), and extract().

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

Definition at line 1582 of file DQMStore.cc.

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

Referenced by book2D(), and extract().

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

Definition at line 1596 of file DQMStore.cc.

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

Referenced by book2DD(), and extract().

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

Definition at line 1589 of file DQMStore.cc.

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

Referenced by book2S(), and extract().

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

Definition at line 1603 of file DQMStore.cc.

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

Referenced by book3D(), and extract().

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

Definition at line 1610 of file DQMStore.cc.

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

Referenced by bookProfile(), and extract().

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

Definition at line 1620 of file DQMStore.cc.

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

Referenced by bookProfile2D(), and extract().

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

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

Definition at line 1738 of file DQMStore.cc.

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

1739 {
1740  MonitorElement proto(&path, std::string());
1741  MEMap::const_iterator e = data_.end();
1742  MEMap::const_iterator i = data_.lower_bound(proto);
1743  return (i != e && isSubdirectory(path, *i->data_.dirname));
1744 }
int i
Definition: DBlmapReader.cc:9
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
MEMap data_
Definition: DQMStore.h:710
QCriterion * DQMStore::createQTest ( const std::string &  algoname,
const std::string &  qtname 
)

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

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

3247 {
3248  if (qtests_.count(qtname))
3249  raiseDQMError("DQMStore", "Attempt to create duplicate quality test '%s'",
3250  qtname.c_str());
3251 
3252  QAMap::iterator i = qalgos_.find(algoname);
3253  if (i == qalgos_.end())
3254  raiseDQMError("DQMStore", "Cannot create a quality test using unknown"
3255  " algorithm '%s'", algoname.c_str());
3256 
3257  QCriterion *qc = i->second(qtname);
3258  qc->setVerbose(verboseQT_);
3259 
3260  qtests_[qtname] = qc;
3261  return qc;
3262 }
int i
Definition: DBlmapReader.cc:9
QCMap qtests_
Definition: DQMStore.h:713
unsigned verboseQT_
Definition: DQMStore.h:696
QAMap qalgos_
Definition: DQMStore.h:714
void setVerbose(int verbose)
probability limits for warnings, errors
Definition: QTest.h:116
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
void DQMStore::deleteUnusedLumiHistograms ( uint32_t  run,
uint32_t  lumi 
)

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

Definition at line 2094 of file DQMStore.cc.

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

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

Definition at line 3380 of file DQMStore.cc.

References MonitorElement::disableSoftReset().

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

3381 {
3382  if (me)
3383  me->disableSoftReset();
3384 }
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 2136 of file DQMStore.cc.

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

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

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

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

Definition at line 3058 of file DQMStore.cc.

Referenced by get_info().

3058  {
3059  if (buf.Length() == buf.BufferSize())
3060  return 0;
3061  buf.InitMap();
3062  void *ptr = buf.ReadObjectAny(0);
3063  return reinterpret_cast<TObject *>(ptr);
3064 }
MonitorElement * DQMStore::findObject ( const std::string &  dir,
const std::string &  name,
const uint32_t  run = 0,
const uint32_t  lumi = 0,
const uint32_t  streamId = 0,
const uint32_t  moduleId = 0 
) const
private

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

Definition at line 1878 of file DQMStore.cc.

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

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

1884 {
1885  if (dir.find_first_not_of(s_safe) != std::string::npos)
1886  raiseDQMError("DQMStore", "Monitor element path name '%s' uses"
1887  " unacceptable characters", dir.c_str());
1888  if (name.find_first_not_of(s_safe) != std::string::npos)
1889  raiseDQMError("DQMStore", "Monitor element path name '%s' uses"
1890  " unacceptable characters", name.c_str());
1891 
1892  MonitorElement proto;
1893  proto.data_.dirname = &dir;
1894  proto.data_.objname = name;
1895  proto.data_.run = run;
1896  proto.data_.lumi = lumi;
1897  proto.data_.streamId = streamId;
1898  proto.data_.moduleId = moduleId;
1899 
1900  MEMap::const_iterator mepos = data_.find(proto);
1901  return (mepos == data_.end() ? 0
1902  : const_cast<MonitorElement *>(&*mepos));
1903 }
uint32_t moduleId
Definition: DQMNet.h:104
tuple lumi
Definition: fjr2json.py:35
static const std::string s_safe
Definition: DQMStore.cc:56
const std::string * dirname
Definition: DQMNet.h:105
uint32_t run
Definition: DQMNet.h:101
uint32_t lumi
Definition: DQMNet.h:102
std::string objname
Definition: DQMNet.h:106
DQMNet::CoreObject data_
MEMap data_
Definition: DQMStore.h:710
dbl *** dir
Definition: mlp_gen.cc:35
uint32_t streamId
Definition: DQMNet.h:103
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
void DQMStore::forceReset ( void  )
private

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

Definition at line 2070 of file DQMStore.cc.

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

Referenced by DQMStore().

2071 {
2072  MEMap::iterator mi = data_.begin();
2073  MEMap::iterator me = data_.end();
2074  for ( ; mi != me; ++mi)
2075  {
2076  if (forceResetOnBeginLumi_ && ((*mi).getLumiFlag() == false))
2077  continue;
2078  MonitorElement &me = const_cast<MonitorElement &>(*mi);
2079  me.Reset();
2080  me.resetUpdate();
2081  }
2082 
2083  reset_ = true;
2084 }
void resetUpdate(void)
reset &quot;was updated&quot; flag
bool reset_
Definition: DQMStore.h:697
MEMap data_
Definition: DQMStore.h:710
bool forceResetOnBeginLumi_
Definition: DQMStore.h:702
void Reset(void)
reset ME (ie. contents, errors, etc)
MonitorElement * DQMStore::get ( const std::string &  path) const

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

Definition at line 1748 of file DQMStore.cc.

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

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

1749 {
1750  std::string dir;
1751  std::string name;
1752  splitPath(dir, name, path);
1753  MonitorElement proto(&dir, name);
1754  MEMap::const_iterator mepos = data_.find(proto);
1755  return (mepos == data_.end() ? 0
1756  : const_cast<MonitorElement *>(&*mepos));
1757 }
static void splitPath(std::string &dir, std::string &name, const std::string &path)
Definition: DQMStore.cc:95
MEMap data_
Definition: DQMStore.h:710
dbl *** dir
Definition: mlp_gen.cc:35
std::vector< MonitorElement * > DQMStore::get ( unsigned int  tag) const

get all MonitorElements tagged as <tag>

Definition at line 1761 of file DQMStore.cc.

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

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

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

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

3069  {
3070 
3071  size_t slash = h.full_pathname().rfind('/');
3072  size_t dirpos = (slash == std::string::npos ? 0 : slash);
3073  size_t namepos = (slash == std::string::npos ? 0 : slash+1);
3074  dirname.assign(h.full_pathname(), 0, dirpos);
3075  objname.assign(h.full_pathname(), namepos, std::string::npos);
3076  TBufferFile buf(TBufferFile::kRead, h.size(),
3077  (void*)h.streamed_histo().data(),
3078  kFALSE);
3079  buf.Reset();
3080  *obj = extractNextObject(buf);
3081  if (!*obj) {
3082  raiseDQMError("DQMStore", "Error reading element:'%s'" , h.full_pathname().c_str());
3083  }
3084 }
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:3058
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
std::vector< MonitorElement * > DQMStore::getAllContents ( const std::string &  path,
uint32_t  runNumber = 0,
uint32_t  lumi = 0 
) const

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

Definition at line 1961 of file DQMStore.cc.

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

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

1964 {
1966  const std::string *cleaned = 0;
1967  cleanTrailingSlashes(path, clean, cleaned);
1968  MonitorElement proto(cleaned, std::string(), runNumber);
1969  proto.setLumi(lumi);
1970 
1971  std::vector<MonitorElement *> result;
1972  MEMap::const_iterator e = data_.end();
1973  MEMap::const_iterator i = data_.lower_bound(proto);
1974  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i) {
1975  if (runNumber != 0) {
1976  if (i->data_.run > runNumber // TODO[rovere]: pleonastic? first we encounter local ME of the same run ...
1977  || i->data_.streamId != 0
1978  || i->data_.moduleId != 0)
1979  break;
1980  }
1981  if (lumi != 0) {
1982  if (i->data_.lumi > lumi
1983  || i->data_.streamId != 0
1984  || i->data_.moduleId != 0)
1985  break;
1986  }
1987  if (runNumber != 0 or lumi !=0) {
1988  assert(i->data_.streamId == 0);
1989  assert(i->data_.moduleId == 0);
1990  }
1991  result.push_back(const_cast<MonitorElement *>(&*i));
1992  }
1993 
1994  if (enableMultiThread_)
1995  {
1996  //save legacy modules when running MT
1997  i = data_.begin();
1998  for ( ; i != e && isSubdirectory(*cleaned, *i->data_.dirname); ++i) {
1999  if (i->data_.run != 0 || i->data_.streamId != 0 || i->data_.moduleId != 0) break;
2000  result.push_back(const_cast<MonitorElement *>(&*i));
2001  }
2002  }
2003 
2004  return result;
2005 }
int i
Definition: DBlmapReader.cc:9
The Signals That Services Can Subscribe To This is based on ActivityRegistry and is current per Services can connect to the signals distributed by the ActivityRegistry in order to monitor the activity of the application Each possible callback has some defined which we here list in angle e< void, edm::EventIDconst &, edm::Timestampconst & > We also list in braces which AR_WATCH_USING_METHOD_ is used for those or
Definition: Activities.doc:12
tuple lumi
Definition: fjr2json.py:35
assert(m_qm.get())
static void cleanTrailingSlashes(const std::string &path, std::string &clean, const std::string *&cleaned)
Definition: DQMStore.cc:78
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
tuple result
Definition: query.py:137
std::vector< T * > clean
Definition: MVATrainer.cc:156
MEMap data_
Definition: DQMStore.h:710
bool enableMultiThread_
Definition: DQMStore.h:700
void DQMStore::getAllTags ( std::vector< std::string > &  into) const

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

Definition at line 1908 of file DQMStore.cc.

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

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

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

Definition at line 1777 of file DQMStore.cc.

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

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

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

same as above for tagged MonitorElements

Definition at line 1796 of file DQMStore.cc.

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

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

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

Definition at line 1820 of file DQMStore.cc.

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

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

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

Definition at line 2010 of file DQMStore.cc.

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

Referenced by EgHLTOfflineSummaryClient::getQTestResults_().

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

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

Definition at line 1722 of file DQMStore.cc.

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

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

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

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

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

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

get list of subdirectories of current directory

Definition at line 1699 of file DQMStore.cc.

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

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

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

Referenced by book().

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

Definition at line 555 of file DQMStore.cc.

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

Referenced by DQMStore().

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

Definition at line 3419 of file DQMStore.cc.

References collateHistograms_.

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

Definition at line 3428 of file DQMStore.cc.

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

Referenced by extract().

3429 { 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 2976 of file DQMStore.cc.

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

Referenced by DQMFileReader::beginJob().

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

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

Definition at line 731 of file DQMStore.cc.

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

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

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

Definition at line 271 of file DQMStore.h.

References f, ibooker_, and igetter_.

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

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

Definition at line 280 of file DQMStore.h.

References f, and igetter_.

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

Definition at line 414 of file DQMStore.cc.

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

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

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

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

Definition at line 343 of file DQMStore.cc.

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

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

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

Definition at line 557 of file DQMStore.h.

References enableMultiThread_.

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

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

Definition at line 2961 of file DQMStore.cc.

References readFile().

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

2967 {
2968  return readFile(filename,overwrite,onlypath,prepend,stripdirs,fileMustExist);
2969 }
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:3003
tuple filename
Definition: lut2db_cfg.py:20
const DQMStore& DQMStore::operator= ( const DQMStore )
private
void DQMStore::print_trace ( const std::string &  dir,
const std::string &  name 
)
private

Definition at line 615 of file DQMStore.cc.

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

Referenced by book().

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

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

Definition at line 2806 of file DQMStore.cc.

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

Referenced by readFile().

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

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

Definition at line 3003 of file DQMStore.cc.

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

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

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

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

Referenced by load().

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

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

Definition at line 3202 of file DQMStore.cc.

References pwd_.

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

remove all monitoring elements from directory;

Definition at line 3188 of file DQMStore.cc.

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

3189 {
3190  MonitorElement proto(&dir, std::string());
3191  MEMap::iterator e = data_.end();
3192  MEMap::iterator i = data_.lower_bound(proto);
3193  while (i != e && isSubdirectory(dir, *i->data_.dirname))
3194  if (dir == *i->data_.dirname)
3195  data_.erase(i++);
3196  else
3197  ++i;
3198 }
int i
Definition: DBlmapReader.cc:9
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
MEMap data_
Definition: DQMStore.h:710
dbl *** dir
Definition: mlp_gen.cc:35
void DQMStore::removeElement ( const std::string &  name)

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

Definition at line 3210 of file DQMStore.cc.

References pwd_.

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

3211 {
3213 }
void removeElement(const std::string &name)
Definition: DQMStore.cc:3210
std::string pwd_
Definition: DQMStore.h:709
void DQMStore::removeElement ( const std::string &  dir,
const std::string &  name,
bool  warning = true 
)

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

Definition at line 3218 of file DQMStore.cc.

References gather_cfg::cout, and data_.

3219 {
3220  MonitorElement proto(&dir, name);
3221  MEMap::iterator pos = data_.find(proto);
3222  if (pos != data_.end())
3223  data_.erase(pos);
3224  else if (warning)
3225  std::cout << "DQMStore: WARNING: attempt to remove non-existent"
3226  << " monitor element '" << name << "' in '" << dir << "'\n";
3227 }
MEMap data_
Definition: DQMStore.h:710
tuple cout
Definition: gather_cfg.py:121
dbl *** dir
Definition: mlp_gen.cc:35
void DQMStore::reset ( void  )
private

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

Definition at line 2046 of file DQMStore.cc.

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

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

2047 {
2048  MEMap::iterator mi = data_.begin();
2049  MEMap::iterator me = data_.end();
2050  for ( ; mi != me; ++mi)
2051  {
2052  MonitorElement &me = const_cast<MonitorElement &>(*mi);
2053  if (mi->wasUpdated())
2054  {
2055  if (me.resetMe())
2056  me.Reset();
2057  me.resetUpdate();
2058  }
2059  }
2060 
2061  reset_ = true;
2062 }
void resetUpdate(void)
reset &quot;was updated&quot; flag
bool reset_
Definition: DQMStore.h:697
MEMap data_
Definition: DQMStore.h:710
bool resetMe(void) const
true if ME should be reset at end of monitoring cycle
void Reset(void)
reset ME (ie. contents, errors, etc)
void DQMStore::rmdir ( const std::string &  path)

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

Definition at line 3168 of file DQMStore.cc.

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

Referenced by dqmCopyRecursively().

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

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

Definition at line 3320 of file DQMStore.cc.

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

3321 {
3322 
3323  if (verbose_ > 0)
3324  std::cout << "DQMStore: running runQTests() with reset = "
3325  << ( reset_ ? "true" : "false" ) << std::endl;
3326 
3327  // Apply quality tests to each monitor element, skipping references.
3328  MEMap::iterator mi = data_.begin();
3329  MEMap::iterator me = data_.end();
3330  for ( ; mi != me; ++mi)
3331  if (! isSubdirectory(s_referenceDirName, *mi->data_.dirname))
3332  const_cast<MonitorElement &>(*mi).runQTests();
3333 
3334  reset_ = false;
3335 }
void runQTests(void)
run all quality tests
bool reset_
Definition: DQMStore.h:697
static bool isSubdirectory(const std::string &ofdir, const std::string &path)
Definition: DQMStore.cc:68
unsigned verbose_
Definition: DQMStore.h:695
MEMap data_
Definition: DQMStore.h:710
static const std::string s_referenceDirName
Definition: DQMStore.cc:54
tuple cout
Definition: gather_cfg.py:121
void DQMStore::save ( const std::string &  filename,
const std::string &  path = "",
const std::string &  pattern = "",
const std::string &  rewrite = "",
const uint32_t  run = 0,
const uint32_t  lumi = 0,
SaveReferenceTag  ref = SaveWithReference,
int  minStatus = dqm::qstatus::STATUS_OK,
const std::string &  fileupdate = "RECREATE",
const bool  resetMEsAfterWriting = false 
)

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

Definition at line 2604 of file DQMStore.cc.

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

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

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

Definition at line 2474 of file DQMStore.cc.

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

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

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

Definition at line 3436 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_.

3437 {
3438  if (scaleFlag_ == 0.0) return;
3439  if (verbose_ > 0)
3440  std::cout << " =========== " << " ScaleFlag " << scaleFlag_ << std::endl;
3441  double factor = scaleFlag_;
3442  int events = 1;
3443  if (dirExists("Info/EventInfo")) {
3444  if ( scaleFlag_ == -1.0) {
3445  MonitorElement * scale_me = get("Info/EventInfo/ScaleFactor");
3446  if (scale_me && scale_me->kind()==MonitorElement::DQM_KIND_REAL) factor = scale_me->getFloatValue();
3447  }
3448  MonitorElement * event_me = get("Info/EventInfo/processedEvents");
3449  if (event_me && event_me->kind()==MonitorElement::DQM_KIND_INT) events = event_me->getIntValue();
3450  }
3451  factor = factor/(events*1.0);
3452 
3453  MEMap::iterator mi = data_.begin();
3454  MEMap::iterator me = data_.end();
3455  for ( ; mi != me; ++mi)
3456  {
3457  MonitorElement &me = const_cast<MonitorElement &>(*mi);
3458  switch (me.kind())
3459  {
3461  {
3462  me.getTH1F()->Scale(factor);
3463  break;
3464  }
3466  {
3467  me.getTH1S()->Scale(factor);
3468  break;
3469  }
3471  {
3472  me.getTH1D()->Scale(factor);
3473  break;
3474  }
3476  {
3477  me.getTH2F()->Scale(factor);
3478  break;
3479  }
3481  {
3482  me.getTH2S()->Scale(factor);
3483  break;
3484  }
3486  {
3487  me.getTH2D()->Scale(factor);
3488  break;
3489  }
3491  {
3492  me.getTH3F()->Scale(factor);
3493  break;
3494  }
3496  {
3497  me.getTProfile()->Scale(factor);
3498  break;
3499  }
3501  {
3502  me.getTProfile2D()->Scale(factor);
3503  break;
3504  }
3505  default:
3506  if (verbose_ > 0)
3507  std::cout << " The DQM object '" << me.getFullname() << "' is not scalable object " << std::endl;
3508  continue;
3509  }
3510  }
3511 }
TH2S * getTH2S(void) const
TH1S * getTH1S(void) const
TProfile2D * getTProfile2D(void) const
TH3F * getTH3F(void) const
TH1D * getTH1D(void) const
TH2D * getTH2D(void) const
double scaleFlag_
Definition: DQMStore.h:698
double getFloatValue(void) const
Kind kind(void) const
Get the type of the monitor element.
const std::string getFullname(void) const
get full name of ME including Pathname
bool dirExists(const std::string &path) const
true if directory exists
Definition: DQMStore.cc:772
unsigned verbose_
Definition: DQMStore.h:695
MEMap data_
Definition: DQMStore.h:710
int64_t getIntValue(void) const
TH1F * getTH1F(void) const
tuple events
Definition: patZpeak.py:19
TProfile * getTProfile(void) const
tuple cout
Definition: gather_cfg.py:121
TH2F * getTH2F(void) const
void DQMStore::setAccumulate ( MonitorElement me,
bool  flag 
)
private

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

Definition at line 3389 of file DQMStore.cc.

References MonitorElement::setAccumulate().

3390 {
3391  if (me)
3392  me->setAccumulate(flag);
3393 }
void setAccumulate(bool)
void DQMStore::setCurrentFolder ( const std::string &  fullpath)

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

Definition at line 707 of file DQMStore.cc.

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

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

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

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

Definition at line 671 of file DQMStore.cc.

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

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

Definition at line 3399 of file DQMStore.cc.

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

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

3400 {
3401  std::vector<std::string> contents;
3402  getContents(contents);
3403 
3404  std::cout << " ------------------------------------------------------------\n"
3405  << " Directory structure: \n"
3406  << " ------------------------------------------------------------\n";
3407 
3408  std::copy(contents.begin(), contents.end(),
3409  std::ostream_iterator<std::string>(std::cout, "\n"));
3410 
3411  std::cout << " ------------------------------------------------------------\n";
3412 }
std::vector< MonitorElement * > getContents(const std::string &path) const
Definition: DQMStore.cc:1777
tuple cout
Definition: gather_cfg.py:121
void DQMStore::softReset ( MonitorElement me)

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

Definition at line 3372 of file DQMStore.cc.

References MonitorElement::softReset().

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

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

tag ME as <myTag> (myTag > 0)

Definition at line 1634 of file DQMStore.cc.

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

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

1635 {
1636  if (! myTag)
1637  raiseDQMError("DQMStore", "Attempt to tag monitor element '%s'"
1638  " with a zero tag", me->getFullname().c_str());
1639  if ((me->data_.flags & DQMNet::DQM_PROP_TAGGED) && myTag != me->data_.tag)
1640  raiseDQMError("DQMStore", "Attempt to tag monitor element '%s'"
1641  " twice with multiple tags", me->getFullname().c_str());
1642 
1643  me->data_.tag = myTag;
1645 }
uint32_t flags
Definition: DQMNet.h:98
static const uint32_t DQM_PROP_TAGGED
Definition: DQMNet.h:54
uint32_t tag
Definition: DQMNet.h:99
const std::string getFullname(void) const
get full name of ME including Pathname
DQMNet::CoreObject data_
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
void DQMStore::tag ( const std::string &  path,
unsigned int  myTag 
)

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

Definition at line 1649 of file DQMStore.cc.

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

Referenced by Inspector.Inspector::SetTag().

1650 {
1651  std::string dir;
1652  std::string name;
1653  splitPath(dir, name, path);
1654 
1655  if (MonitorElement *me = findObject(dir, name))
1656  tag(me, myTag);
1657  else
1658  raiseDQMError("DQMStore", "Attempt to tag non-existent monitor element"
1659  " '%s' with tag %u", path.c_str(), myTag);
1660 
1661 }
MonitorElement * findObject(const std::string &dir, const std::string &name, const uint32_t run=0, const uint32_t lumi=0, const uint32_t streamId=0, const uint32_t moduleId=0) const
Definition: DQMStore.cc:1878
static void splitPath(std::string &dir, std::string &name, const std::string &path)
Definition: DQMStore.cc:95
void tag(MonitorElement *me, unsigned int myTag)
Definition: DQMStore.cc:1634
dbl *** dir
Definition: mlp_gen.cc:35
void raiseDQMError(const char *context, const char *fmt,...)
Definition: DQMError.cc:11
void DQMStore::tagAllContents ( const std::string &  path,
unsigned int  myTag 
)

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

Definition at line 1677 of file DQMStore.cc.

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

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

tag all children of folder (does NOT include subfolders)

Definition at line 1665 of file DQMStore.cc.

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

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

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

Definition at line 3267 of file DQMStore.cc.

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

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

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

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

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

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

Friends And Related Function Documentation

friend class DQMArchiver
friend

Definition at line 724 of file DQMStore.h.

friend class DQMFileSaver
friend

Definition at line 728 of file DQMStore.h.

friend class DQMNet
friend

Definition at line 723 of file DQMStore.h.

friend class DQMRootOutputModule
friend

Definition at line 726 of file DQMStore.h.

friend class DQMRootSource
friend

Definition at line 727 of file DQMStore.h.

friend class DQMService
friend

Definition at line 722 of file DQMStore.h.

friend class DQMStoreExample
friend

Definition at line 725 of file DQMStore.h.

friend class edm::DQMHttpSource
friend

Definition at line 721 of file DQMStore.h.

friend class MEtoEDMConverter
friend

Definition at line 729 of file DQMStore.h.

Member Data Documentation

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

Definition at line 702 of file DQMStore.h.

Referenced by DQMStore(), and forceReset().

IBooker* DQMStore::ibooker_
private

Definition at line 718 of file DQMStore.h.

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

IGetter* DQMStore::igetter_
private

Definition at line 719 of file DQMStore.h.

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

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

Definition at line 706 of file DQMStore.h.

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

DQMStore::pwd_
private
DQMStore::qalgos_
private

Set of all the available quality test algorithms.

Definition at line 714 of file DQMStore.h.

Referenced by createQTest(), and initializeFrom().

DQMStore::qtests_
private

All the quality tests.

Definition at line 713 of file DQMStore.h.

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

QTestSpecs DQMStore::qtestspecs_
private

Definition at line 715 of file DQMStore.h.

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

DQMStore::readSelectedDirectory_
private

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

Definition at line 703 of file DQMStore.h.

DQMStore::reset_
private

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

Definition at line 697 of file DQMStore.h.

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

uint32_t DQMStore::run_
private

Definition at line 704 of file DQMStore.h.

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

double DQMStore::scaleFlag_
private

Definition at line 698 of file DQMStore.h.

Referenced by initializeFrom(), and scaleElements().

std::ofstream* DQMStore::stream_
private

Definition at line 707 of file DQMStore.h.

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

uint32_t DQMStore::streamId_
private

Definition at line 705 of file DQMStore.h.

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

DQMStore::verbose_
private
DQMStore::verboseQT_
private

Verbose flag for xml-based QTests.

Definition at line 696 of file DQMStore.h.

Referenced by createQTest(), and initializeFrom().