6 #include "TDirectory.h"
10 using namespace sistrip;
15 : TFile(fname, option, ftitle, compress),
36 std::stringstream
ss(
"");
44 std::stringstream run_type_label;
45 std::stringstream run_type_title;
48 TNamed run_type_description(run_type_label.str().c_str(), run_type_title.str().c_str());
70 if (
top_ != gDirectory)
82 TObject*
obj = keylist->First();
86 if (obj == keylist->Last()) {
96 obj = keylist->After(obj);
173 std::vector<std::string> directories;
174 directories.reserve(10);
177 std::string::const_iterator it, previous_dir, latest_dir;
179 it = previous_dir = latest_dir = path.begin();
181 it = previous_dir = latest_dir = path.begin() - 1;
184 while (it != path.end()) {
187 previous_dir = latest_dir;
189 directories.push_back(
std::string(previous_dir + 1, latest_dir));
193 if (latest_dir != (path.end() - 1)) {
194 directories.push_back(
std::string(latest_dir + 1, path.end()));
198 TDirectory*
child = gDirectory;
199 for (std::vector<std::string>::const_iterator
dir = directories.begin();
dir != directories.end();
dir++) {
200 if (!dynamic_cast<TDirectory*>(child->Get(
dir->c_str()))) {
201 child = child->mkdir(
dir->c_str());
204 child->Cd(
dir->c_str());
214 std::vector<TDirectory*>
dirs;
220 while (!dirs.empty()) {
222 dirs.erase(dirs.begin());
229 std::vector<TDirectory*>*
dirs,
231 TList* keylist = dir->GetListOfKeys();
233 TObject*
obj = keylist->First();
238 if (obj == keylist->Last()) {
242 if (dynamic_cast<TDirectory*>(dir->Get(obj->GetName()))) {
243 TDirectory*
child =
dynamic_cast<TDirectory*
>(dir->Get(obj->GetName()));
246 dirs->push_back(child);
249 TH1* his =
dynamic_cast<TH1*
>(dir->Get(obj->GetName()));
252 std::vector<TH1*>::iterator ihis = (*histos)[
std::string(dir->GetPath())].
begin();
253 for (; ihis != (*histos)[
std::string(dir->GetPath())].
end(); ihis++) {
254 if ((*ihis)->GetName() == his->GetName()) {
259 (*histos)[
std::string(dir->GetPath())].push_back(his);
262 obj = keylist->After(obj);
void dirContent(TDirectory *, std::vector< TDirectory * > *, std::map< std::string, std::vector< TH1 * > > *)
TDirectory * setDQMFormat(sistrip::RunType, sistrip::View)
static const char mlDqmClient_[]
void find(edm::Handle< EcalRecHitCollection > &hits, DetId thisDet, std::vector< EcalRecHitCollection::const_iterator > &hit, bool debug=false)
TDirectory * addPath(const std::string &)
Utility class that identifies a position within the strip tracker control structure, down to the level of an APV25.
static std::string runType(const sistrip::RunType &)
TDirectory * readDQMFormat()
static const char controlView_[]
static const char taskId_[]
tuple key
prepare the HTCondor submission files and eventually submit them
static const char dqmRoot_[]
const std::string & path() const
sistrip::RunType runType_
sistrip::RunType & runType()
void findHistos(TDirectory *, std::map< std::string, std::vector< TH1 * > > *)
TDirectory * sistripTop()
SiStripTFile(const char *fname, Option_t *option="UPDATE", const char *ftitle="", Int_t compress=1)
static const char root_[]
Log< level::Warning, false > LogWarning
void addDevice(unsigned int key)