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

make the sidebar many part of the config More...

Collaboration diagram for menu:

Public Member Functions

 menu (node &n)
void makemenu (node &n, const std::string &space="", std::string path="", std::string rawpath="", bool found=false)

Detailed Description

make the sidebar many part of the config

Definition at line 554 of file hcg.cxx.

Constructor & Destructor Documentation

◆ menu()

menu::menu ( node & n)
inline

Definition at line 558 of file hcg.cxx.

558 {
559
560 (*outp) << "\n\n";
561 (*outp) << "#######################\n";
562 (*outp) << "# Output\n";
563 (*outp) << "#######################\n\n\n";
564
565 makemenu( n );
566
567 }
void makemenu(node &n, const std::string &space="", std::string path="", std::string rawpath="", bool found=false)
Definition hcg.cxx:570

Member Function Documentation

◆ makemenu()

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

always try to remap the name

Definition at line 570 of file hcg.cxx.

570 {
571
572 bool print = false;
573
574 if ( n.name()==base ) found = true;
575
576 if ( n.type()==node::DIRECTORY ) print = found;
577 if ( n.name()=="top_level" ) print = true;
578
579 if ( n.size() ) {
580
582
583 // bool exclude_dir = false;
584
585 if ( exclude.find(n.name())!=exclude.end() ) {
586 print = false;
587 // exclude_dir = true;
588 return;
589 }
590
591 // if ( found && ( dirs.size() && dirs.find(n.name())==dirs.end() ) ) print = false;
592
593 std::string newspacer = space;
594
595 if ( print ) newspacer += spacer;
596
597 std::string output_name = find(n.name());
598
599
600 if ( print && n.type()==node::DIRECTORY ) {
601 if ( path=="" ) path += output_name;
602 else path += delimiter + output_name;
603 if ( rawpath=="" ) rawpath += n.name();
604 else rawpath += delimiter + n.name();
605 }
606
607 // std::cerr << "path " << path << "\tmatchdir " << matchdir( path ) << std::endl;
608
609 if ( found && ( dirs.size() && (!matchdir( path ) && !matchdir( rawpath ) ) ) ) return;
610
611 if ( print ) (*outp) << space << "output " << output_name << " {" << "\n"; // " \t\t(" << path << " size " << n.size() << ")\n";
612
613 for ( unsigned i=0 ; i<n.size() ; i++ ) {
614 if ( n[i]->type()!=node::HISTOGRAM ) makemenu( *n[i], newspacer, path, rawpath, found ) ;
615 }
616
617 if ( print ) (*outp) << space << "}\n";
618 }
619
620 }
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:392
std::string find(const std::string &s)
return a remapped string
Definition hcg.cxx:140
std::set< std::string > exclude
list of directories to be excluded
Definition hcg.cxx:100
static const std::string delimiter("/")
std::string base
Definition hcg.cxx:83
std::map< std::string, int > dirs
list of directories to be explicitly included, together with corresponding depths of subdirectories
Definition hcg.cxx:104
path
python interpreter configuration --------------------------------------—
Definition athena.py:130
const std::string spacer
Definition spacer.h:27

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