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

Constructor & Destructor Documentation

◆ ass()

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

Definition at line 630 of file hcg.cxx.

630  : m_allhists(ah) {
631  (*outp) << "\n\n";
632  (*outp) << "#######################\n";
633  (*outp) << "# Histogram Assessments\n";
634  (*outp) << "#######################\n\n";
635  makeass( n );
636  }

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

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

Member Data Documentation

◆ m_allhists

bool ass::m_allhists
private

Definition at line 722 of file hcg.cxx.


The documentation for this class was generated from the following file:
outp
std::ostream * outp
send output to here ...
Definition: hcg.cxx:73
base
std::string base
Definition: hcg.cxx:78
replace
std::string replace(std::string s, const std::string &s2, const std::string &s3)
Definition: hcg.cxx:307
algorithm
std::string algorithm
Definition: hcg.cxx:82
athena.path
path
python interpreter configuration --------------------------------------—
Definition: athena.py:126
find
std::string find(const std::string &s)
return a remapped string
Definition: hcg.cxx:135
skel.it
it
Definition: skel.GENtoEVGEN.py:423
exclude
std::set< std::string > exclude
list of directories to be excluded
Definition: hcg.cxx:95
ass::m_allhists
bool m_allhists
Definition: hcg.cxx:722
spacer
const std::string spacer
Definition: spacer.h:24
tags
std::vector< std::string > tags
Definition: hcg.cxx:102
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:92
beamspotman.n
n
Definition: beamspotman.py:731
node::HISTOGRAM
@ HISTOGRAM
Definition: node.h:26
node::DIRECTORY
@ DIRECTORY
Definition: node.h:26
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
Muon::print
std::string print(const MuPatSegment &)
Definition: MuonTrackSteering.cxx:28
ass::makeass
void makeass(node &n, const std::string &space="", std::string path="", std::string rawpath="", bool found=false)
Definition: hcg.cxx:639
description
std::string description
glabal timer - how long have I taken so far?
Definition: hcg.cxx:88