: 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 22 of file SiStripTFile.h.
typedef std::vector<TH1*> SiStripTFile::Histos |
Definition at line 38 of file SiStripTFile.h.
typedef std::map< std::string, Histos > SiStripTFile::HistosMap |
Definition at line 41 of file SiStripTFile.h.
SiStripTFile::SiStripTFile | ( | const char * | fname, |
Option_t * | option = "UPDATE" , |
||
const char * | ftitle = "" , |
||
Int_t | compress = 1 |
||
) |
Constructor
Definition at line 15 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 156 of file SiStripTFile.cc.
References addPath(), sistrip::CONTROL_VIEW, dqmFormat_, sistrip::dqmRoot_, sistrip::mlDqmClient_, SiStripKey::path(), setDQMFormat(), 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 176 of file SiStripTFile.cc.
References dir, and sistrip::dir_.
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 235 of file SiStripTFile.cc.
References begin, end, newFWLiteAna::found, python.cmstools::loop(), and VarParsing::obj.
Referenced by findHistos().
TDirectory * SiStripTFile::dqmTop | ( | ) |
Returns the dqm directory
Definition at line 121 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 218 of file SiStripTFile.cc.
References dirContent(), and mergeVDriftHistosByStation::histos.
bool SiStripTFile::queryDQMFormat | ( | ) |
Checks to see if the file complies with DQM format requirements.
Definition at line 110 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 71 of file SiStripTFile.cc.
References sistrip::CONTROL_VIEW, sistrip::controlView_, dqmFormat_, sistrip::dqmRoot_, dqmTop_, spr::find(), python.cmstools::loop(), VarParsing::obj, sistrip::root_, SiStripEnumsAndStrings::runType(), runType_, sistripTop_, 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 36 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_, sistrip::taskId_, top_, and view_.
Referenced by addDevice().
TDirectory * SiStripTFile::sistripTop | ( | ) |
Returns the sistrip::root_ directory
Definition at line 134 of file SiStripTFile.cc.
References dqmFormat_, sistrip::mlDqmClient_, and sistripTop_.
TDirectory * SiStripTFile::top | ( | ) |
Returns the "top" directory (describing the readout view)
Definition at line 116 of file SiStripTFile.cc.
References top_.
sistrip::View & SiStripTFile::View | ( | ) |
|
private |
True if dqmFormat() operation has been performed
Definition at line 105 of file SiStripTFile.h.
Referenced by addDevice(), dqmTop(), queryDQMFormat(), readDQMFormat(), setDQMFormat(), and sistripTop().
|
private |
dqm directory
Definition at line 99 of file SiStripTFile.h.
Referenced by dqmTop(), readDQMFormat(), and setDQMFormat().
|
private |
RunType
Definition at line 90 of file SiStripTFile.h.
Referenced by readDQMFormat(), runType(), and setDQMFormat().
|
private |
sistrip::root_ directory
Definition at line 102 of file SiStripTFile.h.
Referenced by readDQMFormat(), setDQMFormat(), and sistripTop().
|
private |
Readout view directory
Definition at line 96 of file SiStripTFile.h.
Referenced by readDQMFormat(), setDQMFormat(), and top().
|
private |
Logical view.
Definition at line 93 of file SiStripTFile.h.
Referenced by addDevice(), readDQMFormat(), setDQMFormat(), and View().