ATLAS Offline Software
Public Member Functions | List of all members
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 552 of file hcg.cxx.

Constructor & Destructor Documentation

◆ menu()

menu::menu ( node n)
inline

Definition at line 556 of file hcg.cxx.

556  {
557 
558  (*outp) << "\n\n";
559  (*outp) << "#######################\n";
560  (*outp) << "# Output\n";
561  (*outp) << "#######################\n\n\n";
562 
563  makemenu( n );
564 
565  }

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 568 of file hcg.cxx.

568  {
569 
570  bool print = false;
571 
572  if ( n.name()==base ) found = true;
573 
574  if ( n.type()==node::DIRECTORY ) print = found;
575  if ( n.name()=="top_level" ) print = true;
576 
577  if ( n.size() ) {
578 
580 
581  // bool exclude_dir = false;
582 
583  if ( exclude.find(n.name())!=exclude.end() ) {
584  print = false;
585  // exclude_dir = true;
586  return;
587  }
588 
589  // if ( found && ( dirs.size() && dirs.find(n.name())==dirs.end() ) ) print = false;
590 
591  std::string newspacer = space;
592 
593  if ( print ) newspacer += spacer;
594 
595  std::string output_name = find(n.name());
596 
597 
598  if ( print && n.type()==node::DIRECTORY ) {
599  if ( path=="" ) path += output_name;
600  else path += "/" + output_name;
601  if ( rawpath=="" ) rawpath += n.name();
602  else rawpath += "/" + n.name();
603  }
604 
605  // std::cerr << "path " << path << "\tmatchdir " << matchdir( path ) << std::endl;
606 
607  if ( found && ( dirs.size() && (!matchdir( path ) && !matchdir( rawpath ) ) ) ) return;
608 
609  if ( print ) (*outp) << space << "output " << output_name << " {" << "\n"; // " \t\t(" << path << " size " << n.size() << ")\n";
610 
611  for ( unsigned i=0 ; i<n.size() ; i++ ) {
612  if ( n[i]->type()!=node::HISTOGRAM ) makemenu( *n[i], newspacer, path, rawpath, found ) ;
613  }
614 
615  if ( print ) (*outp) << space << "}\n";
616  }
617 
618  }

The documentation for this class was generated from the following file:
base
std::string base
Definition: hcg.cxx:81
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:128
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:138
exclude
std::set< std::string > exclude
list of directories to be excluded
Definition: hcg.cxx:98
python.CaloAddPedShiftConfig.type
type
Definition: CaloAddPedShiftConfig.py:42
spacer
const std::string spacer
Definition: spacer.h:27
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:390
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:727
menu::makemenu
void makemenu(node &n, const std::string &space="", std::string path="", std::string rawpath="", bool found=false)
Definition: hcg.cxx:568
node::HISTOGRAM
@ HISTOGRAM
Definition: node.h:28
print
void print(char *figname, TCanvas *c1)
Definition: TRTCalib_StrawStatusPlots.cxx:26
node::DIRECTORY
@ DIRECTORY
Definition: node.h:28
checkTriggerxAOD.found
found
Definition: checkTriggerxAOD.py:328
dirs
std::map< std::string, int > dirs
list of directories to be explicitly included, together with corresponding depths of subdirectories
Definition: hcg.cxx:102