ATLAS Offline Software
Loading...
Searching...
No Matches
ass Class Reference

make the histogram assessment part of the config More...

Collaboration diagram for ass:

Public Member Functions

 ass (node &n, bool ah=true)
void makeass (node &n, const std::string &space="", std::string path="", std::string rawpath="", bool found=false)

Private Attributes

bool m_allhists

Detailed Description

make the histogram assessment part of the config

Definition at line 627 of file hcg.cxx.

Constructor & Destructor Documentation

◆ ass()

ass::ass ( node & n,
bool ah = true )
inline

Definition at line 631 of file hcg.cxx.

631 : m_allhists(ah) {
632 (*outp) << "\n\n";
633 (*outp) << "#######################\n";
634 (*outp) << "# Histogram Assessments\n";
635 (*outp) << "#######################\n\n";
636 makeass( n );
637 }
bool m_allhists
Definition hcg.cxx:723
void makeass(node &n, const std::string &space="", std::string path="", std::string rawpath="", bool found=false)
Definition hcg.cxx:640

Member Function Documentation

◆ makeass()

void ass::makeass ( node & n,
const std::string & space = "",
std::string path = "",
std::string rawpath = "",
bool found = false )
inline

if ( n.name()=="top_level" ) print = true;

always try to remap the name

extra user specified tags

extra user specified tags

\t\t##" << n.name() << "
";

Definition at line 640 of file hcg.cxx.

640 {
641
642 static std::string savedir = "";
643
644 bool print = false;
645
646 if ( n.name()==base ) found = true;
647
648 if ( n.type()==node::DIRECTORY ) print = found;
650
651 if ( n.size() ) {
652
654
655 std::string newspacer = space;
656
657 if ( exclude.find(n.name())!=exclude.end() ) {
658 print = false;
659 return;
660 }
661
662 // if ( found && dirs.size() && dirs.find(n.name())==dirs.end() ) print = false;
663
664 if ( print ) newspacer += spacer;
665
666 std::string output_name = find(n.name());
667
668 if ( print && n.type()==node::DIRECTORY ) {
669 if ( path=="" ) path += output_name;
670 else path += "/" + output_name;
671 if ( rawpath=="" ) rawpath += n.name();
672 else rawpath += "/" + n.name();
673 }
674
675 if ( found && ( dirs.size() && !matchdir( path ) && !matchdir( rawpath ) ) ) return;
676
677 if ( print ) (*outp) << space << "dir " << n.name() << " {" << "\n"; // " \t\t(" << path << ")\n";
678
679 bool first_hists = true;
680
681 for ( unsigned i=0 ; i<n.size() ; i++ ) {
682 if ( n[i]->type()!=node::HISTOGRAM ) makeass( *n[i], newspacer, path, rawpath, found ) ;
683 else if ( n[i]->type()==node::HISTOGRAM ) {
684 if ( !m_allhists ) {
685 if ( first_hists ) {
686 (*outp) << space << "\t" << "hist .* {\n";
687 (*outp) << space << "\t\t" << "regex \t= 1\n";
688 (*outp) << space << "\t\t" << "algorithm \t= " << algorithm << "\n";
689 (*outp) << space << "\t\t" << "description \t= " << description << "\n";
690 (*outp) << space << "\t\t" << "output \t= " << path << "\n";
691 (*outp) << space << "\t\t" << "display \t= StatBox\n";
693 for ( unsigned it=0 ; it<tags.size() ; it++ ) (*outp) << space << "\t\t" << replace(tags[it],"=","\t=") << "\n";
694 (*outp) << space << "\t" << "}\n";
695 }
696 first_hists = false;
697 }
698 else {
699 (*outp) << space << "\t" << "hist " << n[i]->name() << " {\n";
700 (*outp) << space << "\t\t" << "algorithm \t= " << algorithm << "\n";
701 (*outp) << space << "\t\t" << "description \t= " << description << "\n";
702 (*outp) << space << "\t\t" << "output \t= " << path << "\n";
703 (*outp) << space << "\t\t" << "display \t= StatBox\n";
705 for ( unsigned it=0 ; it<tags.size() ; it++ ) (*outp) << space << "\t\t" << replace(tags[it],"=","\t=") << "\n";
706 (*outp) << space << "\t" << "}\n";
707
708 // TH1* ase = (TH1*)(n[i]->object());
709 // if ( ase ) std::cerr << space << "\t\t" << "entries = " << ase->GetEntries() << "\n";
710 // if ( ase ) std::cerr << space << "\t\t" << "entries = \"" << ase->GetTitle() << "\"\n";
711
712 }
713 }
714 }
715
716 if ( print ) (*outp) << space << "}\n";
717 }
718
719 }
void print(char *figname, TCanvas *c1)
@ DIRECTORY
Definition node.h:28
@ HISTOGRAM
Definition node.h:28
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:390
std::string description
glabal timer - how long have I taken so far?
Definition hcg.cxx:91
std::vector< std::string > tags
Definition hcg.cxx:105
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition hcg.cxx:310
std::ostream * outp
send output to here ...
Definition hcg.cxx:76
std::string find(const std::string &s)
return a remapped string
Definition hcg.cxx:138
std::set< std::string > exclude
list of directories to be excluded
Definition hcg.cxx:98
std::string base
Definition hcg.cxx:81
std::string algorithm
Definition hcg.cxx:85
std::map< std::string, int > dirs
list of directories to be explicitly included, together with corresponding depths of subdirectories
Definition hcg.cxx:102
path
python interpreter configuration --------------------------------------—
Definition athena.py:128
const std::string spacer
Definition spacer.h:27

Member Data Documentation

◆ m_allhists

bool ass::m_allhists
private

Definition at line 723 of file hcg.cxx.


The documentation for this class was generated from the following file: