6 #include "TDirectory.h"
10 using namespace sistrip;
18 TFile(fname,option,ftitle,compress),
42 std::stringstream
ss(
"");
50 std::stringstream run_type_label;
51 std::stringstream run_type_title;
54 TNamed run_type_description(run_type_label.str().c_str(),run_type_title.str().c_str());
60 <<
"[CommissioningFile::setDQMFormat]: Currently only implemented for Control View."
86 TObject*
obj = keylist->First();
90 if (obj == keylist->Last()) {loop =
false;}
98 obj = keylist->After(obj);
123 <<
"[SiStripTFile::dqm]: Error requested dqm directory when not in dqm format."
136 <<
"[SiStripTFile::dqm]: Error requested dqm directory when not in dqm format."
167 <<
"[CommissioningFile::addDevice]: Currently only implemented for Control View."
184 std::vector<std::string> directories; directories.reserve(10);
187 std::string::const_iterator it, previous_dir, latest_dir;
189 it = previous_dir = latest_dir = path.begin();}
190 else {it = previous_dir = latest_dir = path.begin()-1;}
192 while (it != path.end()) {
195 previous_dir = latest_dir;
197 directories.push_back(
std::string(previous_dir+1, latest_dir));
201 if (latest_dir != (path.end()-1)) {
202 directories.push_back(
std::string(latest_dir+1, path.end()));}
205 TDirectory*
child = gDirectory;
206 for (std::vector<std::string>::const_iterator
dir = directories.begin();
dir != directories.end();
dir++) {
207 if (!dynamic_cast<TDirectory*>(child->Get(
dir->c_str()))) {
208 child = child->mkdir(
dir->c_str());
210 else {child->Cd(
dir->c_str()); child = gDirectory;}
219 std::vector< TDirectory* >
dirs;
225 while ( !dirs.empty() ) {
227 dirs.erase(dirs.begin());
235 std::vector<TDirectory*>*
dirs,
238 TList* keylist = dir->GetListOfKeys();
241 TObject*
obj = keylist->First();
246 if (obj == keylist->Last()) {loop =
false;}
248 if (dynamic_cast<TDirectory*>(dir->Get(obj->GetName()))) {
249 TDirectory*
child =
dynamic_cast<TDirectory*
>(dir->Get(obj->GetName()));
252 dirs->push_back(child);
255 TH1* his =
dynamic_cast<TH1*
>( dir->Get(obj->GetName()) );
258 std::vector<TH1*>::iterator ihis = (*histos)[
std::string(dir->GetPath())].
begin();
259 for ( ; ihis != (*histos)[
std::string(dir->GetPath())].
end(); ihis++ ) {
260 if ( (*ihis)->GetName() == his->GetName() ) { found =
true; }
262 if ( !found ) { (*histos)[
std::string(dir->GetPath())].push_back(his); }
264 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 &)
tuple path
else: Piece not in the list, fine.
TDirectory * readDQMFormat()
static const char controlView_[]
static const char taskId_[]
static const char dqmRoot_[]
const std::string & path() const
sistrip::RunType runType_
string key
FastSim: produces sample of signal events, overlayed with premixed minbias events.
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_[]
volatile std::atomic< bool > shutdown_flag false
void addDevice(unsigned int key)