1 #ifndef DQMSERVICES_CORE_DQM_STORE_H
2 # define DQMSERVICES_CORE_DQM_STORE_H
4 # if __GNUC__ && ! defined DQM_DEPRECATED
5 # define DQM_DEPRECATED __attribute__((deprecated))
9 # include "classlib/utils/Regexp.h"
15 # include <execinfo.h>
21 namespace lat {
class Regexp; }
49 fastmatch (std::string
const& _fastString);
52 bool match (std::string
const&
s)
const;
57 std::string
const&
input)
const;
60 std::string
const&
input)
const;
92 const std::string &
pwd(
void)
const;
94 void cd(
const std::string &subdir);
112 const std::string &
value);
116 int nchX,
double lowX,
double highX);
118 const std::string &
title,
119 int nchX,
double lowX,
double highX);
122 int nchX,
float *xbinsize);
124 const std::string &
title,
125 int nchX,
float *xbinsize);
131 int nchX,
double lowX,
double highX);
133 const std::string &
title,
134 int nchX,
double lowX,
double highX);
137 int nchX,
float *xbinsize);
139 const std::string &
title,
140 int nchX,
float *xbinsize);
146 int nchX,
double lowX,
double highX);
148 const std::string &
title,
149 int nchX,
double lowX,
double highX);
152 int nchX,
float *xbinsize);
154 const std::string &
title,
155 int nchX,
float *xbinsize);
161 int nchX,
double lowX,
double highX,
162 int nchY,
double lowY,
double highY);
164 const std::string &
title,
165 int nchX,
double lowX,
double highX,
166 int nchY,
double lowY,
double highY);
169 int nchX,
float *xbinsize,
170 int nchY,
float *ybinsize);
172 const std::string &
title,
173 int nchX,
float *xbinsize,
174 int nchY,
float *ybinsize);
180 int nchX,
double lowX,
double highX,
181 int nchY,
double lowY,
double highY);
183 const std::string &
title,
184 int nchX,
double lowX,
double highX,
185 int nchY,
double lowY,
double highY);
188 int nchX,
float *xbinsize,
189 int nchY,
float *ybinsize);
191 const std::string &
title,
192 int nchX,
float *xbinsize,
193 int nchY,
float *ybinsize);
199 int nchX,
double lowX,
double highX,
200 int nchY,
double lowY,
double highY);
202 const std::string &
title,
203 int nchX,
double lowX,
double highX,
204 int nchY,
double lowY,
double highY);
207 int nchX,
float *xbinsize,
208 int nchY,
float *ybinsize);
210 const std::string &
title,
211 int nchX,
float *xbinsize,
212 int nchY,
float *ybinsize);
218 int nchX,
double lowX,
double highX,
219 int nchY,
double lowY,
double highY,
220 int nchZ,
double lowZ,
double highZ);
222 const std::string &
title,
223 int nchX,
double lowX,
double highX,
224 int nchY,
double lowY,
double highY,
225 int nchZ,
double lowZ,
double highZ);
231 int nchX,
double lowX,
double highX,
232 int nchY,
double lowY,
double highY,
233 const char *option =
"s");
235 const std::string &
title,
236 int nchX,
double lowX,
double highX,
237 int nchY,
double lowY,
double highY,
238 const char *option =
"s");
241 int nchX,
double lowX,
double highX,
242 double lowY,
double highY,
243 const char *option =
"s");
245 const std::string &
title,
246 int nchX,
double lowX,
double highX,
247 double lowY,
double highY,
248 const char *option =
"s");
251 int nchX,
double *xbinsize,
252 int nchY,
double lowY,
double highY,
253 const char *option =
"s");
255 const std::string &
title,
256 int nchX,
double *xbinsize,
257 int nchY,
double lowY,
double highY,
258 const char *option =
"s");
261 int nchX,
double *xbinsize,
262 double lowY,
double highY,
263 const char *option =
"s");
265 const std::string &
title,
266 int nchX,
double *xbinsize,
267 double lowY,
double highY,
268 const char *option =
"s");
274 int nchX,
double lowX,
double highX,
275 int nchY,
double lowY,
double highY,
276 int nchZ,
double lowZ,
double highZ,
277 const char *option =
"s");
279 const std::string &
title,
280 int nchX,
double lowX,
double highX,
281 int nchY,
double lowY,
double highY,
282 int nchZ,
double lowZ,
double highZ,
283 const char *option =
"s");
286 int nchX,
double lowX,
double highX,
287 int nchY,
double lowY,
double highY,
288 double lowZ,
double highZ,
289 const char *option =
"s");
291 const std::string &
title,
292 int nchX,
double lowX,
double highX,
293 int nchY,
double lowY,
double highY,
294 double lowZ,
double highZ,
295 const char *option =
"s");
302 void tag(
const std::string &
path,
unsigned int myTag);
308 std::vector<std::string>
getSubdirs(
void)
const;
309 std::vector<std::string>
getMEs(
void)
const;
313 std::vector<MonitorElement *>
get(
unsigned int tag)
const;
314 std::vector<MonitorElement *>
getContents(
const std::string &
path)
const;
315 std::vector<MonitorElement *>
getContents(
const std::string &
path,
unsigned int tag)
const;
316 void getContents(std::vector<std::string> &into,
bool showContents =
true)
const;
323 void rmdir(
const std::string &fullpath);
332 const std::string &
path =
"",
333 const std::string &
pattern =
"",
334 const std::string &rewrite =
"",
337 const std::string &fileupdate =
"RECREATE");
339 bool overwrite =
false,
340 const std::string &
path =
"",
341 const std::string &prepend =
"",
343 bool fileMustExist =
true);
346 bool fileMustExist =
true);
356 void useQTest(
const std::string &
dir,
const std::string &qtname);
370 bool overwrite =
false,
371 const std::string &
path =
"",
372 const std::string &prepend =
"",
374 bool fileMustExist =
true);
378 const std::string &
path,
379 const std::string &prepend,
380 const std::string &curdir,
386 void getAllTags(std::vector<std::string> &into)
const;
388 std::vector<MonitorElement*>
getMatchingContents(
const std::string &
pattern, lat::Regexp::Syntax syntaxType = lat::Regexp::Wildcard)
const;
396 bool extract(TObject *
obj,
const std::string &
dir,
bool overwrite);
401 const std::string &
name,
402 const char *context);
403 template <
class HISTO,
class COLLATE>
405 const char *context,
int kind,
406 HISTO *
h, COLLATE collate);
446 typedef std::set<MonitorElement>
MEMap;
447 typedef std::map<std::string, QCriterion *>
QCMap;
448 typedef std::map<std::string, QCriterion *(*)(const std::string &)>
QAMap;
471 #endif // DQMSERVICES_CORE_DQM_STORE_H
static void collateProfile2D(MonitorElement *me, TProfile2D *h)
QCriterion * getQCriterion(const std::string &qtname) const
bool compare_strings_reverse(std::string const &pattern, std::string const &input) const
std::pair< fastmatch *, QCriterion * > QTestSpec
DQMStore(const edm::ParameterSet &pset, edm::ActivityRegistry &)
MonitorElement * book2S(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2S histogram.
std::map< std::string, QCriterion * > QCMap
bool containsAnyMonitorable(const std::string &path) const
bool isCollateME(MonitorElement *me) const
bool cdInto(const std::string &path) const
int getStatus(const std::string &path="") const
std::vector< std::string > getSubdirs(void) const
MonitorElement * book1D(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1D histogram.
void rmdir(const std::string &fullpath)
bool match(std::string const &s) const
bool readFile(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
static void collate3D(MonitorElement *me, TH3F *h)
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.
static void collate1D(MonitorElement *me, TH1F *h)
void cd(void)
go to top directory (ie. root)
MonitorElement * book2DD(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D double histogram.
static void collate1DD(MonitorElement *me, TH1D *h)
void save(const std::string &filename, const std::string &path="", const std::string &pattern="", const std::string &rewrite="", SaveReferenceTag ref=SaveWithReference, int minStatus=dqm::qstatus::STATUS_OK, const std::string &fileupdate="RECREATE")
std::vector< MonitorElement * > getMatchingContents(const std::string &pattern, lat::Regexp::Syntax syntaxType=lat::Regexp::Wildcard) const
MatchingHeuristicEnum matching_
MonitorElement * book1DD(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
void initializeFrom(const edm::ParameterSet &)
MonitorElement * book(const std::string &dir, const std::string &name, const char *context)
MonitorElement * bookFloat(const char *name)
Book float.
std::vector< MonitorElement * > getAllContents(const std::string &path) const
void tag(MonitorElement *me, unsigned int myTag)
void disableSoftReset(MonitorElement *me)
static void collateProfile(MonitorElement *me, TProfile *h)
fastmatch(std::string const &_fastString)
bool extract(TObject *obj, const std::string &dir, bool overwrite)
void removeContents(void)
erase all monitoring elements in current directory (not including subfolders);
MonitorElement * bookString(const char *name, const char *value)
Book string.
std::set< MonitorElement > MEMap
static void collate1S(MonitorElement *me, TH1S *h)
void removeElement(const std::string &name)
static bool checkBinningMatches(MonitorElement *me, TH1 *h)
MonitorElement * findObject(const std::string &dir, const std::string &name) const
MonitorElement * bookProfile(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY, const char *option="s")
void setVerbose(unsigned level)
void softReset(MonitorElement *me)
std::vector< MonitorElement * > getContents(const std::string &path) const
std::string readSelectedDirectory_
bool dirExists(const std::string &path) const
true if directory exists
void getAllTags(std::vector< std::string > &into) const
const DQMStore & operator=(const DQMStore &)
bool load(const std::string &filename, OpenRunDirs stripdirs=StripRunDirs, bool fileMustExist=true)
void tagAllContents(const std::string &path, unsigned int myTag)
MonitorElement * initialise(MonitorElement *me, const std::string &path)
The Signals That Services Can Subscribe To This is based on ActivityRegistry h
Helper function to determine trigger accepts.
std::list< QTestSpec > QTestSpecs
static void collate2S(MonitorElement *me, TH2S *h)
static void collate2D(MonitorElement *me, TH2F *h)
void print_trace(const std::string &dir, const std::string &name)
int useQTestByMatch(const std::string &pattern, const std::string &qtname)
attach quality test <qc> to monitor elements matching <pattern>.
std::vector< std::string > getMEs(void) const
get list of (non-dir) MEs of current directory
friend class DQMStoreExample
unsigned int readDirectory(TFile *file, bool overwrite, const std::string &path, const std::string &prepend, const std::string &curdir, OpenRunDirs stripdirs)
static void collate2DD(MonitorElement *me, TH2D *h)
void tagContents(const std::string &path, unsigned int myTag)
tag all children of folder (does NOT include subfolders)
std::map< std::string, QCriterion *(*)(const std::string &)> QAMap
void useQTest(const std::string &dir, const std::string &qtname)
void goUp(void)
equivalent to "cd .."
bool open(const std::string &filename, bool overwrite=false, const std::string &path="", const std::string &prepend="", OpenRunDirs stripdirs=KeepRunDirs, bool fileMustExist=true)
static const int STATUS_OK
void setAccumulate(MonitorElement *me, bool flag)
QCriterion * createQTest(const std::string &algoname, const std::string &qtname)
void showDirStructure(void) const
MonitorElement * bookInt(const char *name)
Book int.
MonitorElement * book2D(const char *name, const char *title, int nchX, double lowX, double highX, int nchY, double lowY, double highY)
Book 2D histogram.
std::set< std::string > dirs_
MonitorElement * book1S(const char *name, const char *title, int nchX, double lowX, double highX)
Book 1S histogram.
void makeDirectory(const std::string &path)
get folder corresponding to inpath wrt to root (create subdirs if necessary)
bool compare_strings(std::string const &pattern, std::string const &input) const
void setCurrentFolder(const std::string &fullpath)
const std::string & pwd(void) const
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")