Static Public Member Functions | Static Protected Attributes | List of all members
caf::SRBranchRegistry Class Reference

#include "SRProxy/BasicTypesProxy.h"

Static Public Member Functions

static void AddBranch (const std::string &b)
 
static const std::set< std::string > & GetBranches ()
 
static void clear ()
 
static void Print (bool abbrev=true)
 
static void ToFile (const std::string &fname)
 

Static Protected Attributes

static std::set< std::stringfgBranches
 

Detailed Description

Definition at line 18 of file BasicTypesProxy.h.

Member Function Documentation

static void caf::SRBranchRegistry::AddBranch ( const std::string b)
inlinestatic

Definition at line 21 of file BasicTypesProxy.h.

References fgBranches.

Referenced by caf::Proxy< T >::GetValueFlatMulti(), caf::Proxy< T >::GetValueFlatSingle(), and caf::Proxy< T >::GetValueNested().

21 {fgBranches.insert(b);}
static std::set< std::string > fgBranches
const hit & b
Definition: hits.cxx:21
static void caf::SRBranchRegistry::clear ( )
inlinestatic

Definition at line 23 of file BasicTypesProxy.h.

References fgBranches, plot_validation_datamc::fname, Print(), string, and ToFile().

Referenced by ana::SpectrumLoader::Go().

23 {fgBranches.clear();}
static std::set< std::string > fgBranches
static const std::set<std::string>& caf::SRBranchRegistry::GetBranches ( )
inlinestatic

Definition at line 22 of file BasicTypesProxy.h.

References fgBranches.

22 {return fgBranches;}
static std::set< std::string > fgBranches
void caf::SRBranchRegistry::Print ( bool  abbrev = true)
static

Definition at line 33 of file BasicTypesProxy.cxx.

References b, om::cout, allTimeWatchdog::endl, fgBranches, MECModelEnuComparisons::i, std::min(), prev(), and string.

Referenced by clear().

34  {
36  for(std::string b: fgBranches){
37  if(abbrev){
38  unsigned int cutto = 0;
39  for(unsigned int i = 0; i < std::min(b.size(), prev.size()); ++i){
40  if(b[i] != prev[i]) break;
41  if(b[i] == '.') cutto = i;
42  }
43  prev = b;
44  for(unsigned int i = 0; i < cutto; ++i) b[i] = ' ';
45  }
46  std::cout << b << std::endl;
47  }
48  }
static std::set< std::string > fgBranches
void prev()
Definition: show_event.C:91
OStream cout
Definition: OStream.cxx:6
const hit & b
Definition: hits.cxx:21
T min(const caf::Proxy< T > &a, T b)
enum BeamMode string
void caf::SRBranchRegistry::ToFile ( const std::string fname)
static

Definition at line 51 of file BasicTypesProxy.cxx.

References b, allTimeWatchdog::endl, fgBranches, submit_syst::fout, and string.

Referenced by clear().

52  {
53  std::ofstream fout(fname);
54  for(const std::string& b: fgBranches) fout << b << std::endl;
55  }
static std::set< std::string > fgBranches
const hit & b
Definition: hits.cxx:21
enum BeamMode string

Member Data Documentation

std::set< std::string > caf::SRBranchRegistry::fgBranches
staticprotected

Definition at line 28 of file BasicTypesProxy.h.

Referenced by AddBranch(), clear(), GetBranches(), Print(), and ToFile().


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