ATLAS Offline Software
hcg.cxx
Go to the documentation of this file.
1 //
2 // @file hanconfig.cxx
3 // navigates through the directory structure of a monitoring
4 // root files and write out some han config boiler plate
5 //
6 // @author M.Sutton
7 //
8 //
9 //
10 
11 
12 #include <iostream>
13 #include <vector>
14 #include <string>
15 #include <map>
16 #include <set>
17 
18 #include <cstdlib>
19 #include <cstdio>
20 
21 #include <fstream>
22 
23 #include <sys/stat.h>
24 
25 #include "simpletimer.h"
26 #include "node.h"
27 #include "addnode.h"
28 #include "spacer.h"
29 
30 #include "TStyle.h"
31 #include "TCanvas.h"
32 #include "TKey.h"
33 #include "TH1D.h"
34 #include "TH2D.h"
35 #include "TProfile.h"
36 #include "TFile.h"
37 #include "TClass.h"
38 #include "TDirectory.h"
39 
40 #include "TPad.h"
41 #include <algorithm>
42 
45 
47 std::vector<std::string> files;
48 std::vector<TFile*> fptr;
49 
50 std::vector<std::string> savedhistos;
51 std::vector<std::string> mapped;
52 
53 
55 std::string date() {
56  time_t t;
57  time(&t);
58  std::string a = ctime(&t);
59  std::string b = "";
60  for ( unsigned i=0 ; i<a.size()-1 ; i++ ) b+=a[i];
61  return b;
62 }
63 
64 
65 bool file_exists( const std::string& file ) {
66  struct stat buff;
67  return stat(file.c_str(),&buff)==0;
68 }
69 
70 bool verbose = false;
71 
73 std::ostream* outp = &std::cout;
74 
75 
76 bool allhists = true;
77 
78 std::string base = "HLT";
79 
80 std::string outref = "";
81 
82 std::string algorithm = "HLT_Histogram_Not_Empty&GatherData";
83 
85 // struct timeval global_timer;
86 
87 
88 std::string description = "https://twiki.cern.ch/twiki/bin/view/Atlas/HltTrackingDataQualityMonitoring#Tier0";
89 
90 
92 std::map<std::string, std::string> remap;
93 
95 std::set<std::string> exclude;
96 
99 std::map<std::string, int> dirs;
100 
101 
102 std::vector<std::string> tags;
103 
104 template<typename T>
105 std::ostream& operator<<( std::ostream& s, const std::vector<T>& v ) {
106  if ( v.empty() ) return s;
107  for ( size_t i=0 ; i<v.size() ; i++ ) s << v[i] << "\n";
108  return s;
109 }
110 
111 bool contains( const std::string& s, const std::string& regx ) { return s.find(regx)!=std::string::npos; }
112 
113 
114 
115 template<typename T>
116 std::ostream& operator<<( std::ostream& s, const std::vector<T*>& v ) {
117  if ( v.empty() ) return s;
118  for ( int i=0 ; i<v.size() ; i++ ) s << *v[i] << "\n";
119  return s;
120 }
121 
122 
123 
126 template<class T>
127 T* get( TKey* tobj ) {
128  TObject* a = tobj->ReadObj()->Clone();
129  ((TH1*)a)->SetDirectory(0);
130  return (T*)a;
131 }
132 
133 
135 std::string find( const std::string& s ) {
136  std::map<std::string, std::string>::const_iterator itr = remap.find(s);
137  if ( itr!=remap.end() ) return itr->second;
138  else return s;
139 }
140 
141 
143 int count( std::string s, const std::string& regx ) {
144  size_t p = s.find( regx );
145  int i=0;
146  while ( p!=std::string::npos ) {
147  i++;
148  s.erase( 0, p+1 );
149  p = s.find( regx );
150  }
151  return i;
152 }
153 
154 
155 
156 
157 // chop tokens off the front of a string
158 std::string chop(std::string& s1, const std::string& s2)
159 {
160  std::string::size_type pos = s1.find(s2);
161  std::string s3;
162  if ( pos == std::string::npos ) {
163  s3 = s1;
164  s1.erase(0, s1.size());
165  }
166  else {
167  s3 = s1.substr(0, pos);
168  s1.erase(0, pos+s2.size());
169  }
170  return s3;
171 }
172 
173 
174 std::vector<std::string> split( const std::string& s, const std::string& t=":" ) {
175 
176  std::string s2 = s;
177  size_t pos = s2.find(t);
178 
179  std::vector<std::string> tags;
180 
181  while ( pos!=std::string::npos ) {
182  tags.push_back( chop(s2,t) );
183  pos = s2.find(t);
184  }
185 
186  tags.push_back(s2);
187 
188  return tags;
189 }
190 
191 
192 // chop tokens off the front of a string but not including
193 // chop character
194 std::string chopex(std::string& s1, const std::string& s2)
195 {
196  std::string::size_type pos = s1.find(s2);
197  std::string s3;
198  if ( pos == std::string::npos ) {
199  s3 = s1;
200  s1.clear();
201  }
202  else {
203  s3 = s1.substr(0, pos);
204  s1.erase(0, pos+s2.size());
205  }
206  return s3;
207 }
208 
209 
210 // chomp them off the end
211 std::string chomp(std::string& s1, const std::string& s2)
212 {
213  std::string::size_type pos = s1.find(s2);
214  std::string s3;
215  if ( pos == std::string::npos ) {
216  s3 = s1;
217  s1.clear();
218  }
219  else {
220  s3 = s1.substr(pos+s2.size(),s1.size());
221  s1.erase(pos,s1.size());
222  }
223  return s3;
224 }
225 
226 
227 
228 // chop tokens off the end of a string, leave string unchanged
229 // return choped string
230 std::string choptoken(std::string& s1, const std::string& s2)
231 {
232  std::string s3 = "";
233  std::string::size_type pos = s1.find(s2);
234  if ( pos != std::string::npos ) {
235  s3 = s1.substr(0, pos+s2.size());
236  s1.erase(0, pos+s2.size());
237  }
238  return s3;
239 }
240 
241 
242 // chop tokens off the end of a string, leave string unchanged
243 // return choped string
244 std::string chomptoken(std::string& s1, const std::string& s2)
245 {
246  std::string s3 = "";
247  std::string::size_type pos = s1.find(s2);
248  if ( pos != std::string::npos ) {
249  s3 = s1.substr(pos, s1.size());
250  s1.erase(pos, s1.size());
251  }
252  return s3;
253 }
254 
255 
256 // chop tokens off the front of a string
257 std::string chopfirst(std::string& s1, const std::string& s2)
258 {
259  std::string s3;
260  std::string::size_type pos = s1.find_first_not_of(s2);
261  if ( pos != std::string::npos ) {
262  s3 = s1.substr(0, pos);
263  s1.erase(0, pos);
264  }
265  else {
266  s3 = s1;
267  s1.clear();
268  }
269  return s3;
270 }
271 
272 
273 std::string choplast(std::string& s1, const std::string& s2)
274 {
275  std::string s3 = "";
276  std::string::size_type pos = s1.find_last_not_of(s2);
277  if ( pos != std::string::npos ) {
278  s3 = s1.substr(pos+1, s1.size());
279  s1.erase(pos+1, s1.size());
280  }
281  return s3;
282 }
283 
284 
285 
286 // chop tokens off the front and end of a string
287 std::string chopends(std::string& s1, const std::string& s2)
288 {
289  chopfirst(s1, s2);
290  choplast(s1, s2);
291  return s1;
292 }
293 
294 
295 
296 // remove strings from a string
297 void removespace(std::string& s, const std::string& s2)
298 {
299  std::string::size_type pos;
300  while ( (pos = s.find(s2))!=std::string::npos ) {
301  s.erase(pos, s2.size());
302  }
303 }
304 
305 
306 // replace from a string
307 std::string replace( std::string s, const std::string& s2, const std::string& s3) {
308  std::string::size_type pos;
309  // while ( (pos = s.find(" "))!=std::string::npos ) {
310  // s.replace(pos, 1, "-");
311  while ( (pos = s.find(s2))!=std::string::npos ) {
312  s.replace(pos, s2.size(), s3);
313  if ( contains(s3,s2) ) break;
314  }
315  return s;
316 }
317 
318 
319 // remove regx from a string
320 void depunctuate(std::string& s, const std::string& regex=":")
321 {
322  std::string::size_type pos;
323  while ( (pos = s.find(regex))!=std::string::npos ) {
324  s.erase(pos, regex.size());
325  }
326 }
327 
328 
329 
330 std::vector<std::string> maphist( const std::vector<std::string>& v ) {
331  mapped.clear();
332  for ( unsigned i=0 ; i<v.size() ; i++ ) {
333  if ( contains( v[i], "Expert" ) ){
334  std::string tmp = v[i];
335  std::string path = chop( tmp, "Expert/" );
336  path += "Chains/";
337  // std::cerr << " " << v[i] << "\np:" << path << "\t-> " << tmp << std::endl;
338  tmp = replace( tmp, "/", "__" );
339  path += tmp;
340  mapped.push_back( path );
341  // std::cerr << i << "\t" << mapped.back() << std::endl;
342  }
343  else {
344  mapped.push_back( v[i] );
345  }
346  }
347 
348  return mapped;
349 }
350 
351 
352 
353 
354 
356 bool match( std::string s1, std::string s2 ) {
357 
358  int i1 = std::count( s1.begin(), s1.end(), '/' );
359  int i2 = std::count( s2.begin(), s2.end(), '/' );
360 
361  int i = ( i1<i2 ? i1 : i2 );
362 
363  // std::cerr << "match s1 " << s1 << " " << s2 << std::endl;
364 
365  for ( i++ ; i-- ; ) {
366  size_t p1 = s1.find('/');
367  size_t p2 = s2.find('/');
368 
369  std::string ss1 = s1.substr( 0, p1 );
370  std::string ss2 = s2.substr( 0, p2 );
371 
372  s1.erase( 0, p1+1 );
373  s2.erase( 0, p2+1 );
374 
375  // std::cerr << i << "\tmatch :" << ss1 << ":" << ss2 << "::\t " << s1 << ":" << s2 << "\tresult " << (ss1!=ss2 ) << std::endl;
376 
377  if ( ss1!=ss2 ) return false;
378 
379  }
380 
381  return true;
382 
383 }
384 
385 
388 
389 bool matchdir( const std::string& s ) {
390  bool matched = false;
391  // int idepth = count( s, "/" );
392  std::map<std::string,int>::const_iterator itr = dirs.begin();
393  while ( itr!=dirs.end() ) {
394  if ( match( s, itr->first) ) matched = true;
395  // std::cerr << "\tmatchdir :" << s << "::" << itr->first << ": " << itr->second << std::endl;
396  if ( matched ) return true;
397  ++itr;
398  }
399  return false;
400 }
401 
402 bool matchcwd( const std::string& s ) {
403  if ( dirs.size()==0 ) return true;
404  std::map<std::string,int>::const_iterator itr = dirs.begin();
405  while ( itr!=dirs.end() ) {
406  if ( s.find(itr->first)!=std::string::npos ) return true;
407  ++itr;
408  }
409  return false;
410 }
411 
412 
413 
414 std::string matchcwdstr( const std::string& s ) {
415  if ( dirs.size()==0 ) return "";
416  std::map<std::string,int>::const_iterator itr = dirs.begin();
417  while ( itr!=dirs.end() ) {
418  if ( s.find(itr->first)!=std::string::npos ) return itr->first;
419  ++itr;
420  }
421  return "";
422 }
423 
424 
425 std::map<std::string,int>::const_iterator matchcwditr( const std::string& s ) {
426  if ( dirs.size()==0 ) return dirs.end();
427  std::map<std::string,int>::const_iterator itr = dirs.begin();
428  while ( itr!=dirs.end() ) {
429  if ( s.find(itr->first)!=std::string::npos ) return itr;
430  ++itr;
431  }
432  return dirs.end();
433 }
434 
435 
436 
437 class reference {
438 
439 public:
440 
441  reference( const std::string& n, const std::string& f ) :
442  m_name(n), m_file(f) {
443 
445 
446  std::cerr << "opening file " << f << std::endl;
447 
448  TFile* r = TFile::Open(f.c_str());
449  if ( r==0 ) {
450  std::cerr << "cannot open root file " << f << std::endl;
451  std::exit(-1);
452  }
453 
454  r->cd();
455 
456  TList* tl = gDirectory->GetListOfKeys();
457 
459 
460  for ( int i=0 ; i<tl->GetSize() ; i++ ) {
461 
462  TKey* tobj = (TKey*)tl->At(i);
463 
464  if ( std::string(tobj->GetClassName()).find("TDirectory")!=std::string::npos ) {
465  // (*outp) << ns << "Directory " << tobj->GetName() << std::endl;
466 
467  TDirectory* tnd = (TDirectory*)tobj->ReadObj();
468 
469  std::string dir = tnd->GetName();
470 
471  if ( contains( dir, "run_" ) ) {
472  dir.erase( 0, std::string( "run_").size() );
473  m_run = std::atoi( dir.c_str() );
474 
475  break;
476  }
477 
478  }
479  }
480 
481  r->Close();
482  }
483 
484 
486 
487 
488  std::string name() const { return m_name; }
489  std::string file() const { return m_file; }
490 
491  int run() const { return m_run; }
492 
493 private:
494 
495  std::string m_name;
496  std::string m_file;
497 
498  int m_run;
499 
500 };
501 
502 
503 
504 std::ostream& operator<<( std::ostream& s, const reference& r ) {
505  static bool first = true;
506  if ( first ) {
507  s << "##########################\n";
508  s << "# References\n";
509  s << "##########################\n\n";
510  first = false;
511  }
512  s << "reference " << r.name() << " {\n";
513  s << "\t\tfile = " << r.file() << "\n";
514  s << "\t\tpath = run_" << r.run() << "\n";
515  s << "\t\tname = same_name" << "\n";
516  s << "}\n\n";
517  return s;
518 }
519 
520 
521 
522 std::vector<reference> references;
523 
524 
525 
526 class header {
527 
528 public:
529 
530  header( ) {
531 
532  std::string user = std::getenv("USER");
533 
534  (*outp) << "######################################################################\n";
535  (*outp) << "# $Id: collisions_run.config " << date() << " " << user << " $\n";
536  (*outp) << "######################################################################\n";
537 
538  (*outp) << "\n";
539  (*outp) << "#######################\n";
540  (*outp) << "# HLTidtrk\n";
541  (*outp) << "#######################\n";
542 
543  (*outp) << "\n\n";
544  }
545 
546 };
547 
548 
550 
551 class menu {
552 
553 public:
554 
555  menu( node& n ) {
556 
557  (*outp) << "\n\n";
558  (*outp) << "#######################\n";
559  (*outp) << "# Output\n";
560  (*outp) << "#######################\n\n\n";
561 
562  makemenu( n );
563 
564  }
565 
566 
567  void makemenu( node& n, const std::string& space="", std::string path="", std::string rawpath="", bool found=false ) {
568 
569  bool print = false;
570 
571  if ( n.name()==base ) found = true;
572 
573  if ( n.type()==node::DIRECTORY ) print = found;
574  if ( n.name()=="top_level" ) print = true;
575 
576  if ( n.size() ) {
577 
579 
580  // bool exclude_dir = false;
581 
582  if ( exclude.find(n.name())!=exclude.end() ) {
583  print = false;
584  // exclude_dir = true;
585  return;
586  }
587 
588  // if ( found && ( dirs.size() && dirs.find(n.name())==dirs.end() ) ) print = false;
589 
590  std::string newspacer = space;
591 
592  if ( print ) newspacer += spacer;
593 
594  std::string output_name = find(n.name());
595 
596 
597  if ( print && n.type()==node::DIRECTORY ) {
598  if ( path=="" ) path += output_name;
599  else path += "/" + output_name;
600  if ( rawpath=="" ) rawpath += n.name();
601  else rawpath += "/" + n.name();
602  }
603 
604  // std::cerr << "path " << path << "\tmatchdir " << matchdir( path ) << std::endl;
605 
606  if ( found && ( dirs.size() && (!matchdir( path ) && !matchdir( rawpath ) ) ) ) return;
607 
608  if ( print ) (*outp) << space << "output " << output_name << " {" << "\n"; // " \t\t(" << path << " size " << n.size() << ")\n";
609 
610  for ( unsigned i=0 ; i<n.size() ; i++ ) {
611  if ( n[i]->type()!=node::HISTOGRAM ) makemenu( *n[i], newspacer, path, rawpath, found ) ;
612  }
613 
614  if ( print ) (*outp) << space << "}\n";
615  }
616 
617  }
618 
619 };
620 
621 
622 
623 
625 
626 class ass {
627 
628 public:
629 
630  ass( node& n, bool ah=true ) : m_allhists(ah) {
631  (*outp) << "\n\n";
632  (*outp) << "#######################\n";
633  (*outp) << "# Histogram Assessments\n";
634  (*outp) << "#######################\n\n";
635  makeass( n );
636  }
637 
638 
639  void makeass( node& n, const std::string& space="", std::string path="", std::string rawpath="", bool found=false ) {
640 
641  static std::string savedir = "";
642 
643  bool print = false;
644 
645  if ( n.name()==base ) found = true;
646 
647  if ( n.type()==node::DIRECTORY ) print = found;
649 
650  if ( n.size() ) {
651 
653 
654  std::string newspacer = space;
655 
656  if ( exclude.find(n.name())!=exclude.end() ) {
657  print = false;
658  return;
659  }
660 
661  // if ( found && dirs.size() && dirs.find(n.name())==dirs.end() ) print = false;
662 
663  if ( print ) newspacer += spacer;
664 
665  std::string output_name = find(n.name());
666 
667  if ( print && n.type()==node::DIRECTORY ) {
668  if ( path=="" ) path += output_name;
669  else path += "/" + output_name;
670  if ( rawpath=="" ) rawpath += n.name();
671  else rawpath += "/" + n.name();
672  }
673 
674  if ( found && ( dirs.size() && !matchdir( path ) && !matchdir( rawpath ) ) ) return;
675 
676  if ( print ) (*outp) << space << "dir " << n.name() << " {" << "\n"; // " \t\t(" << path << ")\n";
677 
678  bool first_hists = true;
679 
680  for ( unsigned i=0 ; i<n.size() ; i++ ) {
681  if ( n[i]->type()!=node::HISTOGRAM ) makeass( *n[i], newspacer, path, rawpath, found ) ;
682  else if ( n[i]->type()==node::HISTOGRAM ) {
683  if ( !m_allhists ) {
684  if ( first_hists ) {
685  (*outp) << space << "\t" << "hist .* {\n";
686  (*outp) << space << "\t\t" << "regex \t= 1\n";
687  (*outp) << space << "\t\t" << "algorithm \t= " << algorithm << "\n";
688  (*outp) << space << "\t\t" << "description \t= " << description << "\n";
689  (*outp) << space << "\t\t" << "output \t= " << path << "\n";
690  (*outp) << space << "\t\t" << "display \t= StatBox\n";
692  for ( unsigned it=0 ; it<tags.size() ; it++ ) (*outp) << space << "\t\t" << replace(tags[it],"=","\t=") << "\n";
693  (*outp) << space << "\t" << "}\n";
694  }
695  first_hists = false;
696  }
697  else {
698  (*outp) << space << "\t" << "hist " << n[i]->name() << " {\n";
699  (*outp) << space << "\t\t" << "algorithm \t= " << algorithm << "\n";
700  (*outp) << space << "\t\t" << "description \t= " << description << "\n";
701  (*outp) << space << "\t\t" << "output \t= " << path << "\n";
702  (*outp) << space << "\t\t" << "display \t= StatBox\n";
704  for ( unsigned it=0 ; it<tags.size() ; it++ ) (*outp) << space << "\t\t" << replace(tags[it],"=","\t=") << "\n";
705  (*outp) << space << "\t" << "}\n";
706 
707  // TH1* ase = (TH1*)(n[i]->object());
708  // if ( ase ) std::cerr << space << "\t\t" << "entries = " << ase->GetEntries() << "\n";
709  // if ( ase ) std::cerr << space << "\t\t" << "entries = \"" << ase->GetTitle() << "\"\n";
710 
711  }
712  }
713  }
714 
715  if ( print ) (*outp) << space << "}\n";
716  }
717 
718  }
719 
720 private:
721 
723 
724 };
725 
726 
727 
728 
729 
730 
731 bool found_dir = false;
732 
733 std::string currentfile = "";
734 
735 
737 
738 void search( TDirectory* td, const std::string& s, std::string cwd, node* n ) {
739 
741  if ( td==0 ) return;
742 
743  if ( std::string(td->GetName()).find("_LB")!=std::string::npos ) return;
744  if ( std::string(td->GetName()).find("lb_")!=std::string::npos ) return;
745 
746  // std::cout << "search() in " << s << td->GetName() << ": :" << cwd << ":" << std::endl;
747 
748  static int ir = 0;
749 
750  ir++;
751 
753 
754  if ( ir>10 ) {
755  std::cerr << "search() WARNING too many levels of directories (max 10) !!!\n";
756  return;
757  }
758 
759 
760  TDirectory* here = gDirectory;
761 
762  // gDirectory->pwd();
763 
764  td->cd();
765 
766  if ( cwd!="" ) cwd += "/";
767  cwd += td->GetName();
768 
769  node* np = n;
770 
771  std::string fulldir = td->GetName();
772 
773 
774  bool first_found = false;
775  if ( !found_dir && matchcwd( cwd ) ) {
776 
777  std::string ase = matchcwdstr( cwd );
778 
779  if ( (cwd+"/").find( ase+"/" )!=std::string::npos ) {
780 
781  found_dir = true;
782  first_found = true;
783 
784  std::cerr << "matched dirs " << cwd << " " << matchdir( cwd ) << std::endl;
785 
786 
787  std::map<std::string,int>::const_iterator fitr = matchcwditr( cwd );
788 
789  if ( fitr!=dirs.end() ) {
790 
791  if ( fitr->second>0 ) {
792 
793  std::vector<std::string> subpath;
794 
795  std::string sp = fitr->first;
796 
797  while( sp.size() ) subpath.push_back( chop(sp,"/") );
798 
799  for ( unsigned ip=0 ; ip<subpath.size()-1 ; ip++ ) {
800  // std::cerr << "subpath " << ip << " " << subpath[ip] << std::endl;
801 
802  node* np_ = addnode( np, subpath[ip] );
803 
804  np = np_;
805 
806  }
807  }
808  }
809 
810  }
811  }
812 
813 
814  if ( found_dir ) {
815  node* np_ = addnode( np, fulldir, td );
816  np = np_;
817  }
818 
819  if ( found_dir && verbose ) std::cerr << s << cwd << std::endl;
820 
821 
822  TList* tl = gDirectory->GetListOfKeys();
823 
824  // struct timeval tv = simpletimer_start();
825 
826  // (*outp) << "\ttl " << tl << std::endl;
827 
829 
830  for ( int i=0 ; i<tl->GetSize() ; i++ ) {
831 
832  TKey* tobj = (TKey*)tl->At(i);
833 
834  if ( tobj==0 ) continue;
835 
836  // (*outp) << "tobj " << tobj;
837  // if ( tobj ) (*outp) << " : \t" << tobj->GetName();
838  // (*outp) << std::endl;
839 
840  if ( std::string(tobj->GetClassName()).find("TDirectory")!=std::string::npos ) {
841  // (*outp) << ns << "Directory " << tobj->GetName() << std::endl;
842 
843  TDirectory* tnd = (TDirectory*)tobj->ReadObj();
844 
845 
847  if ( tnd ) search( tnd, s+spacer, cwd, np );
848 
849  }
850  else {
851 
853 
854  if ( found_dir ) {
855  if ( std::string(tobj->GetClassName()).find("TH1")!=std::string::npos ||
856  std::string(tobj->GetClassName()).find("TH2")!=std::string::npos ||
857  std::string(tobj->GetClassName()).find("TProfile")!=std::string::npos ) {
858 
859  // TH1* th = (TH1*)tobj->ReadObj();
860 
861  // node* h = addnode( np, "", get<TObject>(tobj), node::HISTOGRAM );
862  // node* h =
863  addnode( np, tobj->GetName(), get<TObject>(tobj), node::HISTOGRAM );
864 
865 
867  std::string subdir = cwd;
868  chop( subdir, currentfile+"/" );
869 
871  savedhistos.push_back( subdir+"/"+tobj->GetName() );
872 
874  if ( std::string(tobj->GetName())=="Chain" ) {
875  double N = ((TH1*)get<TObject>(tobj))->GetEntries();
876 
877  // std::cout << "entries " << np->name() << " " << " " << np->parent()->name() << " " << N << std::endl;
878  // std::cout << "\tentries " << np->parent()->name() << "/" << np->name() << "\t" << N << std::endl;
879  std::cout << "\t" << subdir << "\t" << N << std::endl;
880 
881  node* p = np->parent();
882  if ( p && p->name()!="Shifter" ) {
883 
884  p->addrate( p->name(), N );
885 
886  node* p2 = p->parent();
887  if ( p2 ) p2->addrate( p->name(), N );
888  }
889  }
890 
891  }
892 
893  // if ( !status ) std::cerr << "bad status" << std::endl;
894  }
895  }
896 
897  }
898 
899 
900  // double _t = simpletimer_stop(tv);
901 
902  // double global_time = simpletimer_stop(global_timer);
903 
904  ir--;
905 
906  here->cd();
907 
908  if ( first_found ) found_dir = false;
909 
910 }
911 
912 
913 
914 
915 
916 
917 
918 
919 
920 
921 int cost( std::vector<std::string>& files, node& n, const std::string& directory="", bool deleteref=false, bool relocate=false ) {
922 
923  std::cerr << "processing ..." << std::endl;
924 
925  // std::cerr << "opening root files" << std::endl;
926 
927  fptr.resize(files.size());
928 
929 
930  for ( unsigned i=0 ; i<files.size() ; i++ ) {
931 
932  currentfile = files[i];
933 
934  std::cerr << "opening " << currentfile << std::endl;
935 
936  if ( !contains( files[i], "root://eosatlas") && !file_exists( files[i] ) ){
937  std::cerr << "file " << files[i] << " does not exist" << std::endl;
938  return -1;
939  }
940 
942  fptr[i] = TFile::Open( files[i].c_str() );
943 
944  if ( fptr[i]==0 || fptr[i]->IsZombie() ) {
945  std::cerr << "file " << files[i] << " cannot be opened" << std::endl;
946  return -1;
947  }
948 
949  fptr[i]->cd();
950 
951  if ( directory!="" ) fptr[i]->cd(directory.c_str());
952 
953  TDirectory* here = gDirectory;
954 
955  // global_timer = simpletimer_start();
956 
957  // int tcount = 0;
958 
961 
962  search( gDirectory, "", "", &n );
963 
964  here->cd();
965 
966 
970  if ( deleteref || relocate ) {
971 
972  std::cerr << "remapping" << std::endl;
973 
974  if ( relocate ) mapped = maphist( savedhistos );
975 
976  if ( relocate && !deleteref ) std::cerr << "saving histograms to file .newhist.root ... " << std::endl;
977 
978  if ( outref=="" ) outref = ".newhist.root";
979  TFile* fnew = new TFile( outref.c_str(), "recreate" );
980  fnew->cd();
981 
982  TDirectory* base = gDirectory;
983 
984  if ( mapped.size() != savedhistos.size() ) mapped = savedhistos;
985 
986  for ( unsigned ih=0 ; ih<savedhistos.size() ; ih++ ) {
987 
988  std::vector<std::string> dirs = split( mapped[ih], "/" );
989 
990  for ( unsigned jh=0 ; jh<dirs.size()-1 ; jh++ ) {
992  TDirectory* renedir = gDirectory->GetDirectory( dirs[jh].c_str() );
993  if ( renedir==0 ) gDirectory->mkdir( dirs[jh].c_str() );
994  gDirectory->cd( dirs[jh].c_str() );
995  }
996 
997  TH1* href = (TH1*)fptr[i]->Get( savedhistos[ih].c_str() );
998  if ( href ) {
999  // std::cerr << ih << " " << savedhistos[ih] << " 0x" << href << std::endl;
1000  href->Write( dirs.back().c_str() );
1001  }
1002 
1003  base->cd();
1004  }
1005 
1006 
1007  }
1008 
1009  std::cerr << "closing files" << std::endl;
1010 
1011  fptr[i]->Close();
1012 
1013  delete fptr[i];
1014 
1015  if ( deleteref ) {
1016  if ( outref==".newhist.root" ) {
1017  std::cerr << "replacing histogram file" << std::endl;
1018  std::string cmd = std::string("mv ") + files[i] + " " + files[i] + ".bak";
1019  std::system( cmd.c_str() );
1020  cmd = std::string("mv .newhist.root ") + files[i];
1021  std::system( cmd.c_str() );
1022  }
1023  }
1024 
1025  }
1026 
1027  return 0;
1028 }
1029 
1030 
1031 
1032 
1033 
1034 int usage(std::ostream& s, int , char** argv, int status=-1) {
1035  s << "Usage: " << argv[0] << " [OPTIONS] input1.root ... inputN.root\n\n";
1036  s << " -o FILENAME \tname of output (filename required)\n";
1037  s << " -b, --base DIR \tuse directory DIR as the base for the han config\n";
1038  s << " -d, --dir DIR \tonly directories below DIR where DIR is a structure such as HLT/TRIDT etc\n";
1039  s << " -x, DIR \texclude directory DIR\n";
1040  s << " -r SRC DST \tremap directory SRC to directory DST\n";
1041  s << " -ds, --desc DESCRIP \tuse DESCRIP as the description\n";
1042  s << " -t, --tag VALUE \tadd the VALUE to the list of command per histogram\n";
1043  s << " -a, --algorithm VALUE \tuse VALUE as the execution algorithm for each histogram\n";
1044  s << " -wc, --wildcard \tprint use hist * rather than a separate entry for each histogram\n";
1045  s << " -dr, --deleteref \tdelete unselected histograms\n";
1046  s << " -or, --outref FILENAME \tdelete file to write reduced output to (overwrites input otherwise) \n";
1047  s << " -rh, --relocate \trelocate selected histograms\n";
1048  s << " -ref, --reference TAG FILE \tadd FILE as a reference file with tag TAG\n";
1049  s << " -rc, --refconf FILE \tadd FILE to the config as a reference block\n";
1050  s << " -v, --verbose \tprint verbose output\n";
1051  s << " -h, --help \tdisplay this help\n";
1052  s << std::endl;
1053  return status;
1054 }
1055 
1056 
1057 std::vector<std::string> refblock;
1058 
1059 void referenceblock( const std::string& file ) {
1060  std::ifstream strm(file.c_str());
1061  for ( std::string line ; getline( strm, line ); ) refblock.push_back( line );
1062 }
1063 
1064 
1065 int main(int argc, char** argv) {
1066 
1067  // std::string cock = "HLT_j150_bperf_split/InDetTrigTrackingxAODCnv_BjetPrmVtx_FTF_SuperRoi/Chain";
1068 
1069  // replace
1070 
1071  // std::cout << replace
1072 
1073  gStyle->SetPadRightMargin(0.05);
1074  gStyle->SetPadTopMargin(0.075);
1075 
1076  // TCanvas* tg = new TCanvas("tg", "tg", 650, 900 );
1077  TCanvas* tg = new TCanvas("tg", "tg", 700, 600 );
1078  tg->cd();
1079 
1080  gStyle->SetStatY(0.4);
1081  // Set y-position (fraction of pad size)
1082  gStyle->SetStatX(0.89);
1083  // Set x-position (fraction of pad size)
1084  gStyle->SetStatW(0.25);
1085  // Set width of stat-box (fraction of pad size)
1086  gStyle->SetStatH(0.16);
1087 
1088 
1089  // if ( argc<3 ) usage( std::cerr << "not enough command options", argc, argv );
1090  if ( argc<2 ) return usage( std::cerr, argc, argv );
1091 
1092 
1093  for ( int i=1 ; i<argc ; i++ ) {
1094  if ( std::string(argv[i])=="-h" || std::string(argv[i])=="--help" ) return usage( *outp, argc, argv, 0 );
1095  }
1096 
1097  std::string dir = "";
1098 
1099  std::vector<std::string> subdirs;
1100 
1101 
1102  bool deleteref = false;
1103  bool relocate = false;
1104 
1105  std::string outfile = "";
1106 
1107  int offset = 1;
1108 
1109 
1110  for ( int i=1 ; i<argc ; i++ ) {
1111  if ( std::string(argv[i])=="-v" || std::string(argv[i])=="--verbose" ) verbose = true;
1112  else if ( std::string(argv[i])=="-o" ) {
1113  ++i;
1114  if ( i<argc-offset ) outfile = argv[i];
1115  else return usage( std::cerr, argc, argv );
1116  }
1117  else if ( std::string(argv[i])=="-or" || std::string(argv[i])=="--outrefr" ) {
1118  ++i;
1119  if ( i<argc-offset ) outref = argv[i];
1120  else return usage( std::cerr, argc, argv );
1121  }
1122  else if ( std::string(argv[i])=="-ref" || std::string(argv[i])=="--reference" ) {
1123  std::string reftag;
1124  std::string reffile;
1125  ++i;
1126  if ( i<argc-offset ) reftag = argv[i];
1127  else return usage( std::cerr, argc, argv );
1128  ++i;
1129  if ( i<argc-offset ) reffile = argv[i];
1130  else return usage( std::cerr, argc, argv );
1131  references.push_back( reference( reftag, reffile ) );
1132  // std::cerr << references.back() << std::endl;
1133  }
1134  else if ( std::string(argv[i])=="-rc" || std::string(argv[i])=="-refconf" ) {
1135  ++i;
1136  if ( i<argc-offset ) referenceblock( argv[i] );
1137  else return usage( std::cerr, argc, argv );
1138  }
1139  else if ( std::string(argv[i])=="-dr" || std::string(argv[i])=="--deleteref" ) deleteref = true;
1140  else if ( std::string(argv[i])=="-rh" || std::string(argv[i])=="--relocate" ) relocate = true;
1141  else if ( std::string(argv[i])=="-wc" || std::string(argv[i])=="--wildcard" ) allhists = false;
1142  else if ( std::string(argv[i])=="-d" || std::string(argv[i])=="--dir" ) {
1143  ++i;
1144 
1145  if ( i<argc-offset ) {
1146  std::string stringdir(argv[i]);
1147  dirs.insert( std::map<std::string,int>::value_type( stringdir, std::count( stringdir.begin(), stringdir.end(), '/' ) ) );
1148 
1149  std::string tdir = argv[i];
1150 
1151  // std::cerr << "dirs " << argv[i] << std::endl;
1152 
1153  do {
1154  subdirs.push_back( chop( tdir, "/" ) );
1155  // std::cerr << "chop " << subdirs.back() << std::endl;
1156  }
1157  while ( tdir.size() );
1158  }
1159  else return usage( std::cerr, argc, argv );
1160  }
1161  else if ( std::string(argv[i])=="-x" ) {
1162  ++i;
1163  if ( i<argc-offset ) exclude.insert( argv[i] );
1164  else return usage( std::cerr, argc, argv );
1165  }
1166  else if ( std::string(argv[i])=="-ds" || std::string(argv[i]).find("--desc")==0 ) {
1167  ++i;
1168  if ( i<argc-offset ) description = argv[i];
1169  else return usage( std::cerr, argc, argv );
1170  }
1171  else if ( std::string(argv[i])=="-b" || std::string(argv[i])=="--base" ) {
1172  ++i;
1173  if ( i<argc-offset ) base = argv[i] ;
1174  else return usage( std::cerr, argc, argv );
1175  }
1176  else if ( std::string(argv[i])=="-a" || std::string(argv[i])=="--algorithm" ) {
1177  ++i;
1178  if ( i<argc-offset ) algorithm = argv[i] ;
1179  else return usage( std::cerr, argc, argv );
1180  }
1181  // else if ( std::string(argv[i])=="-o" ) {
1182  // ++i;
1183  // if ( i<argc ) output_file = argv[i];
1184  // else return usage( std::cerr, argc, argv );
1185  // }
1186  else if ( std::string(argv[i])=="-t" || std::string(argv[i])=="--tag" ) {
1187  ++i;
1188  if ( i<argc-offset ) tags.push_back( argv[i] );
1189  else return usage( std::cerr, argc, argv );
1190  }
1191  else if ( std::string(argv[i])=="-r" ) {
1192  std::string src;
1193  std::string dest;
1194  if ( i<argc+2-offset ) {
1195  src = argv[++i];
1196  dest = argv[++i];
1197  remap.insert( std::map<std::string,std::string>::value_type( src, dest ) );
1198  } else return usage( std::cerr, argc, argv );
1199  }
1200  else {
1201  offset = 0;
1202  files.push_back(argv[i]);
1203  }
1204  }
1205 
1206  // std::cout << "tags " << tags.size() << " " << tags << std::endl;
1207 
1208  if ( base == "" ) base = dir;
1209 
1211  // if ( output_file == "" ) return usage( std::cerr, argc, argv );
1212 
1213  // dataset data("test_EF");
1214  // files = data.datafiles();
1215 
1217 
1218  if ( files.size()<1 ) return usage( std::cerr, argc, argv );
1219 
1220 
1221  // time the actual running of the cost() routine
1222 
1223  if ( verbose ) std::cerr << "timing" << std::endl;
1224 
1225  struct timeval tv = simpletimer_start();
1226 
1228 
1229  node n(0, "" );
1230  n.name( "top_level" );
1231 
1232  int status = cost( files, n, "", deleteref, relocate );
1233 
1234  // std::cerr << "\n\nnodes " << n << std::endl;
1235 
1236  if ( status ) return status;
1237 
1238  if ( outfile!="" ) outp = new std::ofstream(outfile.c_str());
1239 
1240  header h;
1241 
1242  for ( unsigned ir=0 ; ir<references.size() ; ir++ ) (*outp) << references[ir] << std::endl;
1243 
1244  if ( refblock.size() ) (*outp) << refblock << std::endl;
1245 
1247  menu m( n );
1248 
1250  ass( n, allhists );
1251 
1253  (*outp) << std::endl;
1254 
1255  double t = simpletimer_stop(tv);
1256 
1257  if ( t>1000 ) std::cerr << "total time " << t*0.001 << " s" << std::endl;
1258  else std::cerr << "total time " << t << " ms" << std::endl;
1259 
1260  return 0;
1261 }
outp
std::ostream * outp
send output to here ...
Definition: hcg.cxx:73
verbose
bool verbose
Definition: hcg.cxx:70
matchcwdstr
std::string matchcwdstr(const std::string &s)
Definition: hcg.cxx:414
base
std::string base
Definition: hcg.cxx:78
header::header
header()
Definition: hcg.cxx:530
replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition: hcg.cxx:307
get_hdefs.buff
buff
Definition: get_hdefs.py:64
beamspotman.r
def r
Definition: beamspotman.py:676
cost
int cost(std::vector< std::string > &files, node &n, const std::string &directory="", bool deleteref=false, bool relocate=false)
Definition: hcg.cxx:921
ReadCellNoiseFromCoolCompare.s1
s1
Definition: ReadCellNoiseFromCoolCompare.py:378
python.CaloRecoConfig.f
f
Definition: CaloRecoConfig.py:127
chomp
std::string chomp(std::string &s1, const std::string &s2)
Definition: hcg.cxx:211
checkFileSG.line
line
Definition: checkFileSG.py:75
addnode.h
python.SystemOfUnits.s
int s
Definition: SystemOfUnits.py:131
algorithm
std::string algorithm
Definition: hcg.cxx:82
header
Definition: hcg.cxx:526
matchcwditr
std::map< std::string, int >::const_iterator matchcwditr(const std::string &s)
Definition: hcg.cxx:425
python.SystemOfUnits.m
int m
Definition: SystemOfUnits.py:91
python.PerfMonSerializer.p
def p
Definition: PerfMonSerializer.py:743
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:126
simpletimer_start
struct timeval simpletimer_start(void)
Definition: DataQuality/HanConfigGenerator/src/simpletimer.h:23
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
ass::ass
ass(node &n, bool ah=true)
Definition: hcg.cxx:630
WriteCellNoiseToCool.src
src
Definition: WriteCellNoiseToCool.py:513
chopends
std::string chopends(std::string &s1, const std::string &s2)
Definition: hcg.cxx:287
date
std::string date()
sadly, includes a return at the end
Definition: hcg.cxx:55
rerun_display.cmd
string cmd
Definition: rerun_display.py:67
chopex
std::string chopex(std::string &s1, const std::string &s2)
Definition: hcg.cxx:194
found_dir
bool found_dir
Definition: hcg.cxx:731
skel.it
it
Definition: skel.GENtoEVGEN.py:424
reference::m_file
std::string m_file
Definition: hcg.cxx:496
chop
std::string chop(std::string &s1, const std::string &s2)
Definition: hcg.cxx:158
refblock
std::vector< std::string > refblock
Definition: hcg.cxx:1057
perfmonmt-printer.dest
dest
Definition: perfmonmt-printer.py:189
JetTiledMap::N
@ N
Definition: TiledEtaPhiMap.h:44
reference
Definition: hcg.cxx:437
exclude
std::set< std::string > exclude
list of directories to be excluded
Definition: hcg.cxx:95
addnode
node * addnode(node *np, const std::string &name, TObject *td, node::TYPE t)
add a submode with a specific name, or return the existing node if one already exists
Definition: addnode.cxx:25
LArCellConditions.argv
argv
Definition: LArCellConditions.py:112
read_hist_ntuple.t
t
Definition: read_hist_ntuple.py:5
PlotPulseshapeFromCool.np
np
Definition: PlotPulseshapeFromCool.py:64
ass::m_allhists
bool m_allhists
Definition: hcg.cxx:722
references
std::vector< reference > references
Definition: hcg.cxx:522
grepfile.reffile
reffile
Definition: grepfile.py:26
search
void search(TDirectory *td, const std::string &s, std::string cwd, node *n)
recursive directory search for TH1 and TH2 and TProfiles
Definition: hcg.cxx:738
spacer
const std::string spacer
Definition: spacer.h:24
reference::m_name
std::string m_name
Definition: hcg.cxx:495
reference::file
std::string file() const
Definition: hcg.cxx:489
PrepareReferenceFile.regex
regex
Definition: PrepareReferenceFile.py:43
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
ATLAS_NO_CHECK_FILE_THREAD_SAFETY
Definition: hcg.cxx:44
main
int main(int argc, char **argv)
Definition: hcg.cxx:1065
menu
make the sidebar many part of the config
Definition: hcg.cxx:551
chopfirst
std::string chopfirst(std::string &s1, const std::string &s2)
Definition: hcg.cxx:257
tags
std::vector< std::string > tags
Definition: hcg.cxx:102
reference::m_run
int m_run
Definition: hcg.cxx:498
Get
T * Get(TFile &f, const std::string &n, const std::string &dir="", const chainmap_t *chainmap=0, std::vector< std::string > *saved=0)
get a histogram given a path, and an optional initial directory if histogram is not found,...
Definition: comparitor.cxx:178
maphist
std::vector< std::string > maphist(const std::vector< std::string > &v)
Definition: hcg.cxx:330
reference::reference
reference(const std::string &n, const std::string &f)
Definition: hcg.cxx:441
outref
std::string outref
Definition: hcg.cxx:80
sim_rttUpdate.user
def user
Definition: sim_rttUpdate.py:662
DeMoScan.directory
string directory
Definition: DeMoScan.py:80
matchdir
bool matchdir(const std::string &s)
see whether this directory matches any of the directories we are explicitly being asked to match
Definition: hcg.cxx:389
node.h
ParseInputs.gDirectory
gDirectory
Definition: Final2012/ParseInputs.py:133
lumiFormat.i
int i
Definition: lumiFormat.py:92
beamspotman.n
n
Definition: beamspotman.py:731
files
std::vector< std::string > files
file names and file pointers
Definition: hcg.cxx:47
extractSporadic.h
list h
Definition: extractSporadic.py:97
simpletimer.h
split
std::vector< std::string > split(const std::string &s, const std::string &t=":")
Definition: hcg.cxx:174
contains
bool contains(const std::string &s, const std::string &regx)
does a string contain the substring
Definition: hcg.cxx:111
referenceblock
void referenceblock(const std::string &file)
Definition: hcg.cxx:1059
file
TFile * file
Definition: tile_monitor.h:29
reference::run
int run() const
Definition: hcg.cxx:491
find_tgc_unfilled_channelids.ip
ip
Definition: find_tgc_unfilled_channelids.py:3
spacer.h
depunctuate
void depunctuate(std::string &s, const std::string &regex=":")
Definition: hcg.cxx:320
count
int count(std::string s, const std::string &regx)
count how many occurances of a regx are in a string
Definition: hcg.cxx:143
menu::makemenu
void makemenu(node &n, const std::string &space="", std::string path="", std::string rawpath="", bool found=false)
Definition: hcg.cxx:567
DQHistogramMergeRegExp.argc
argc
Definition: DQHistogramMergeRegExp.py:20
fptr
std::vector< TFile * > fptr
Definition: hcg.cxx:48
DeMoUpdate.tmp
string tmp
Definition: DeMoUpdate.py:1167
node::HISTOGRAM
@ HISTOGRAM
Definition: node.h:26
calibdata.exit
exit
Definition: calibdata.py:236
beamspotman.stat
stat
Definition: beamspotman.py:266
beamspotman.dir
string dir
Definition: beamspotman.py:623
reference::reference
reference(const reference &r)
Definition: hcg.cxx:485
chomptoken
std::string chomptoken(std::string &s1, const std::string &s2)
Definition: hcg.cxx:244
node::addrate
void addrate(const std::string &s, double r)
Definition: node.h:61
simpletimer_stop
double simpletimer_stop(const struct timeval &start_time)
Definition: DataQuality/HanConfigGenerator/src/simpletimer.h:29
ReadCellNoiseFromCoolCompare.s3
s3
Definition: ReadCellNoiseFromCoolCompare.py:380
currentfile
std::string currentfile
Definition: hcg.cxx:733
node::DIRECTORY
@ DIRECTORY
Definition: node.h:26
plotBeamSpotMon.b
b
Definition: plotBeamSpotMon.py:77
removespace
void removespace(std::string &s, const std::string &s2)
Definition: hcg.cxx:297
choplast
std::string choplast(std::string &s1, const std::string &s2)
Definition: hcg.cxx:273
python.ElectronD3PDObject.matched
matched
Definition: ElectronD3PDObject.py:138
dirs
std::map< std::string, int > dirs
list of directories to be explicitly included, together with corresponding depths of subdirectories
Definition: hcg.cxx:99
python.LumiBlobConversion.pos
pos
Definition: LumiBlobConversion.py:18
cwd
std::string cwd
Definition: listroot.cxx:38
ir
int ir
counter of the current depth
Definition: fastadd.cxx:49
python.PyAthena.v
v
Definition: PyAthena.py:157
a
TList * a
Definition: liststreamerinfos.cxx:10
SCT_ConditionsAlgorithms::CoveritySafe::getenv
std::string getenv(const std::string &variableName)
get an environment variable
Definition: SCT_ConditionsUtilities.cxx:17
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
remap
std::map< std::string, std::string > remap
list of directories to be explicitly remapped
Definition: hcg.cxx:92
CaloSwCorrections.time
def time(flags, cells_name, *args, **kw)
Definition: CaloSwCorrections.py:242
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
TH1
Definition: rootspy.cxx:268
DeMoScan.first
bool first
Definition: DeMoScan.py:534
ReadCellNoiseFromCoolCompare.s2
s2
Definition: ReadCellNoiseFromCoolCompare.py:379
generate::GetEntries
double GetEntries(TH1D *h, int ilow, int ihi)
Definition: rmsFrac.cxx:20
Muon::print
std::string print(const MuPatSegment &)
Definition: MuonTrackSteering.cxx:28
dq_make_web_display.reference
reference
Definition: dq_make_web_display.py:44
savedhistos
std::vector< std::string > savedhistos
Definition: hcg.cxx:50
reference::name
std::string name() const
Definition: hcg.cxx:488
get
T * get(TKey *tobj)
get a TObject* from a TKey* (why can't a TObject be a TKey?)
Definition: hcg.cxx:127
convertTimingResiduals.offset
offset
Definition: convertTimingResiduals.py:71
mapped
std::vector< std::string > mapped
Definition: hcg.cxx:51
menu::menu
menu(node &n)
Definition: hcg.cxx:555
CxxUtils::atoi
int atoi(std::string_view str)
Helper functions to unpack numbers decoded in string into integers and doubles The strings are requir...
Definition: Control/CxxUtils/Root/StringUtils.cxx:85
allhists
bool allhists
Definition: hcg.cxx:76
usage
int usage(std::ostream &s, int, char **argv, int status=-1)
Definition: hcg.cxx:1034
merge.status
status
Definition: merge.py:17
dqt_zlumi_alleff_HIST.tl
tl
Definition: dqt_zlumi_alleff_HIST.py:73
operator<<
std::ostream & operator<<(std::ostream &s, const std::vector< T > &v)
Definition: hcg.cxx:105
choptoken
std::string choptoken(std::string &s1, const std::string &s2)
Definition: hcg.cxx:230
python.envutil.fulldir
fulldir
Definition: envutil.py:172
python.LumiCalcRecover.subdir
subdir
Definition: LumiCalcRecover.py:25
checker_macros.h
Define macros for attributes used to control the static checker.
ass::makeass
void makeass(node &n, const std::string &space="", std::string path="", std::string rawpath="", bool found=false)
Definition: hcg.cxx:639
PrepareReferenceFile.outfile
outfile
Definition: PrepareReferenceFile.py:42
file_exists
bool file_exists(const std::string &file)
Definition: hcg.cxx:65
TSU::T
unsigned long long T
Definition: L1TopoDataTypes.h:35
node
Definition: memory_hooks-stdcmalloc.h:74
match
bool match(std::string s1, std::string s2)
match the individual directories of two strings
Definition: hcg.cxx:356
matchcwd
bool matchcwd(const std::string &s)
Definition: hcg.cxx:402
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88
ass
make the histogram assessment part of the config
Definition: hcg.cxx:626