: Adds functionality to TFile to ease building and navigation of TFiles containing DQM histograms. More...
#include <SiStripTFile.h>
Public Types | |
typedef std::vector< TH1 * > | Histos |
typedef std::map< std::string, Histos > | HistosMap |
Public Member Functions | |
void | addDevice (unsigned int key) |
TDirectory * | addPath (const std::string &) |
void | dirContent (TDirectory *, std::vector< TDirectory * > *, std::map< std::string, std::vector< TH1 * > > *) |
TDirectory * | dqmTop () |
void | findHistos (TDirectory *, std::map< std::string, std::vector< TH1 * > > *) |
bool | queryDQMFormat () |
TDirectory * | readDQMFormat () |
sistrip::RunType & | runType () |
TDirectory * | setDQMFormat (sistrip::RunType, sistrip::View) |
SiStripTFile (const char *fname, Option_t *option="UPDATE", const char *ftitle="", Int_t compress=1) | |
TDirectory * | sistripTop () |
TDirectory * | top () |
sistrip::View & | View () |
virtual | ~SiStripTFile () |
Private Attributes | |
bool | dqmFormat_ |
TDirectory * | dqmTop_ |
sistrip::RunType | runType_ |
TDirectory * | sistripTop_ |
TDirectory * | top_ |
sistrip::View | view_ |
: Adds functionality to TFile to ease building and navigation of TFiles containing DQM histograms.
Definition at line 21 of file SiStripTFile.h.
typedef std::vector<TH1*> SiStripTFile::Histos |
Definition at line 37 of file SiStripTFile.h.
typedef std::map< std::string, Histos > SiStripTFile::HistosMap |
Definition at line 40 of file SiStripTFile.h.
SiStripTFile::SiStripTFile | ( | const char * | fname, |
Option_t * | option = "UPDATE" , |
||
const char * | ftitle = "" , |
||
Int_t | compress = 1 |
||
) |
Constructor
Definition at line 14 of file SiStripTFile.cc.
References readDQMFormat().
|
virtual |
void SiStripTFile::addDevice | ( | unsigned int | key | ) |
Adds the directory paths for the device of given key. Must use dqmFormat() before this method.
Definition at line 155 of file SiStripTFile.cc.
References addPath(), sistrip::CONTROL_VIEW, dqmFormat_, sistrip::dqmRoot_, sistrip::mlDqmClient_, SiStripKey::path(), setDQMFormat(), AlCaHLTBitMon_QueryRunRegistry::string, sistrip::UNKNOWN_RUN_TYPE, and view_.
TDirectory * SiStripTFile::addPath | ( | const std::string & | path | ) |
Adds a path to the file. Any directories within the path that already exist are not recreated.
Definition at line 175 of file SiStripTFile.cc.
References dir, sistrip::dir_, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by addDevice(), and setDQMFormat().
void SiStripTFile::dirContent | ( | TDirectory * | dir, |
std::vector< TDirectory * > * | dirs, | ||
std::map< std::string, std::vector< TH1 * > > * | histos | ||
) |
Finds histos and sub-dirs found within given directory. Updates map with found histos, indexed by dir path.
Definition at line 234 of file SiStripTFile.cc.
References begin, end, newFWLiteAna::found, cmsHarvester::loop, getGTfromDQMFile::obj, and AlCaHLTBitMon_QueryRunRegistry::string.
Referenced by findHistos().
TDirectory * SiStripTFile::dqmTop | ( | ) |
Returns the dqm directory
Definition at line 120 of file SiStripTFile.cc.
References dqmFormat_, dqmTop_, and sistrip::mlDqmClient_.
void SiStripTFile::findHistos | ( | TDirectory * | dir, |
std::map< std::string, std::vector< TH1 * > > * | histos | ||
) |
Finds TH1 histograms, iterating through sub-directories. Fills a map, indexed by the histogram path.
Definition at line 217 of file SiStripTFile.cc.
References dirContent(), heppy_check::dirs, and mergeVDriftHistosByStation::histos.
bool SiStripTFile::queryDQMFormat | ( | ) |
Checks to see if the file complies with DQM format requirements.
Definition at line 109 of file SiStripTFile.cc.
References dqmFormat_.
TDirectory * SiStripTFile::readDQMFormat | ( | ) |
Checks file complies with DQM format requirements. If so, updates record directory "top-level" directory structure and of readout view and commissioning RunType.
Definition at line 70 of file SiStripTFile.cc.
References sistrip::CONTROL_VIEW, sistrip::controlView_, dqmFormat_, sistrip::dqmRoot_, dqmTop_, spr::find(), cmsHarvester::loop, getGTfromDQMFile::obj, sistrip::root_, SiStripEnumsAndStrings::runType(), runType_, sistripTop_, AlCaHLTBitMon_QueryRunRegistry::string, sistrip::taskId_, top_, and view_.
Referenced by SiStripTFile().
sistrip::RunType & SiStripTFile::runType | ( | ) |
TDirectory * SiStripTFile::setDQMFormat | ( | sistrip::RunType | run_type, |
sistrip::View | view | ||
) |
Formats the commissioning file with the correct "top-level" directory structure. Inserts string defining commissioning RunType in sistrip::root_ directory
Definition at line 35 of file SiStripTFile.cc.
References addPath(), sistrip::CONTROL_VIEW, sistrip::controlView_, sistrip::dir_, dqmFormat_, sistrip::dqmRoot_, dqmTop_, sistrip::mlDqmClient_, sistrip::root_, SiStripEnumsAndStrings::runType(), runType_, sistrip::sep_, sistripTop_, contentValuesCheck::ss, sistrip::taskId_, top_, and view_.
Referenced by addDevice().
TDirectory * SiStripTFile::sistripTop | ( | ) |
Returns the sistrip::root_ directory
Definition at line 133 of file SiStripTFile.cc.
References dqmFormat_, sistrip::mlDqmClient_, and sistripTop_.
TDirectory * SiStripTFile::top | ( | ) |
Returns the "top" directory (describing the readout view)
Definition at line 115 of file SiStripTFile.cc.
References top_.
sistrip::View & SiStripTFile::View | ( | ) |
|
private |
True if dqmFormat() operation has been performed
Definition at line 104 of file SiStripTFile.h.
Referenced by addDevice(), dqmTop(), queryDQMFormat(), readDQMFormat(), setDQMFormat(), and sistripTop().
|
private |
dqm directory
Definition at line 98 of file SiStripTFile.h.
Referenced by dqmTop(), readDQMFormat(), and setDQMFormat().
|
private |
RunType
Definition at line 89 of file SiStripTFile.h.
Referenced by readDQMFormat(), runType(), and setDQMFormat().
|
private |
sistrip::root_ directory
Definition at line 101 of file SiStripTFile.h.
Referenced by readDQMFormat(), setDQMFormat(), and sistripTop().
|
private |
Readout view directory
Definition at line 95 of file SiStripTFile.h.
Referenced by readDQMFormat(), setDQMFormat(), and top().
|
private |
Logical view.
Definition at line 92 of file SiStripTFile.h.
Referenced by addDevice(), readDQMFormat(), setDQMFormat(), and View().