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

Constructor & Destructor Documentation

◆ menu()

menu::menu ( node n)
inline

Definition at line 555 of file hcg.cxx.

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

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

567  {
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  }

The documentation for this class was generated from the following file:
base
std::string base
Definition: hcg.cxx:78
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:135
exclude
std::set< std::string > exclude
list of directories to be excluded
Definition: hcg.cxx:95
spacer
const std::string spacer
Definition: spacer.h:24
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
lumiFormat.i
int i
Definition: lumiFormat.py:85
beamspotman.n
n
Definition: beamspotman.py:731
menu::makemenu
void makemenu(node &n, const std::string &space="", std::string path="", std::string rawpath="", bool found=false)
Definition: hcg.cxx:567
node::HISTOGRAM
@ HISTOGRAM
Definition: node.h:25
node::DIRECTORY
@ DIRECTORY
Definition: node.h:25
dirs
std::map< std::string, int > dirs
list of directories to be explicitly included, together with corresponding depths of subdirectories
Definition: hcg.cxx:99
CondAlgsOpts.found
int found
Definition: CondAlgsOpts.py:101
python.CaloScaleNoiseConfig.type
type
Definition: CaloScaleNoiseConfig.py:78
dbg::print
void print(std::FILE *stream, std::format_string< Args... > fmt, Args &&... args)
Definition: SGImplSvc.cxx:70