#include <JRunHistograms.hh>
 | 
|   | JRA_Histograms () | 
|   | 
|   | JRA_Histograms (const JDetector &detector) | 
|   | 
| void  | initialize_summary_histograms () | 
|   | 
| template<class T >  | 
| void  | initialize_timeslice_histograms () | 
|   | 
| void  | initialize_trigger_histograms () | 
|   | 
| template<class T >  | 
| void  | Write_histogram_table_to_file (TFile &f, string dirname, vector< vector< T * > > table) | 
|   | 
| template<class T >  | 
| void  | Write_histogram_table_to_file (TFile &f, string dirname, vector< T * > table) | 
|   | 
| template<class T , class V >  | 
| void  | Write_manager_to_file (TFile &f, string dirname, JManager< T, V > *table) | 
|   | 
| template<class T , class V >  | 
| void  | Replace_wildcard_in_name (JManager< T, V > *manager, char wc='%') | 
|   | 
| template<class T , class V >  | 
| void  | Write_manager_in_key_dir (TFile &f, JManager< T, V > *manager) | 
|   | 
| template<class T , class V >  | 
| void  | Write_manager_table_in_key_dir (TFile &f, vector< JManager< T, V > * > table) | 
|   | 
Definition at line 379 of file JRunHistograms.hh.
 
◆ JRA_Histograms() [1/2]
  
  
      
        
          | JRA_Histograms::JRA_Histograms  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
 
◆ JRA_Histograms() [2/2]
  
  
      
        
          | JRA_Histograms::JRA_Histograms  | 
          ( | 
          const JDetector & |           detector | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Definition at line 391 of file JRunHistograms.hh.
  391                                            {
  392 
  398}
TimesliceHistograms h_timeslice
 
TriggerHistograms h_trigger
 
SummaryHistograms h_summary
 
std::set< int > getStringIDs(const JDetector &detector)
Get list of strings identifiers.
 
static const JStringCounter getNumberOfStrings
Function object to count unique strings.
 
int getNumberOfModules(const JDetector &detector, const bool option=false)
Get number of modules.
 
 
 
 
◆ initialize_summary_histograms()
  
  
      
        
          | void JRA_Histograms::initialize_summary_histograms  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Definition at line 405 of file JRunHistograms.hh.
  405                                       {
  406    
  408  }
void initialize(std::set< int > &du_ids, int modules_per_string)
 
 
 
 
◆ initialize_timeslice_histograms()
template<class T > 
  
  
      
        
          | void JRA_Histograms::initialize_timeslice_histograms  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Definition at line 416 of file JRunHistograms.hh.
  416                                         {
  417    
  419    const string   prefix = "KM3NETDAQ::JDAQ" ;
  420    string        ts_name = T::Class_Name();
  421    string::size_type pos = ts_name.find(prefix);
  422 
  423    if (pos != string::npos) ts_name.replace(ts_name.find(prefix) , prefix.length() , "");
  424      
  426  }
Indexing of data type in type list.
 
void initialize(std::set< int > du_ids, int modules_per_string, int ts_type, std::string ts_name)
 
 
 
 
◆ initialize_trigger_histograms()
  
  
      
        
          | void JRA_Histograms::initialize_trigger_histograms  | 
          ( | 
           | ) | 
           | 
         
       
   | 
  
inline   | 
  
 
Definition at line 431 of file JRunHistograms.hh.
  431                                       {
  432    
  434  }
void initialize(std::set< int > &du_ids, int modules_per_string)
 
 
 
 
◆ Write_histogram_table_to_file() [1/2]
template<class T > 
  
  
      
        
          | void JRA_Histograms::Write_histogram_table_to_file  | 
          ( | 
          TFile & |           f,  | 
         
        
           | 
           | 
          string |           dirname,  | 
         
        
           | 
           | 
          vector< vector< T * > > |           table ) | 
         
       
   | 
  
inline   | 
  
 
Definition at line 444 of file JRunHistograms.hh.
  444                                                                                                 {
  445 
  446    if(f.GetDirectory(dirname.c_str()) == 0) f.mkdir (dirname.c_str());
  447 
  448    f.cd (dirname.c_str());
  449 
  450    for (int i=0 ; i < (int)table.size(); i++){
  451 
  452      for (
int j=0 ; 
j< (int)table[i].size(); 
j++){
 
  453 
  454        if (table[i][
j]) table [i][
j] -> Write();
 
  455      }
  456    }
  457  }
 
 
 
◆ Write_histogram_table_to_file() [2/2]
template<class T > 
  
  
      
        
          | void JRA_Histograms::Write_histogram_table_to_file  | 
          ( | 
          TFile & |           f,  | 
         
        
           | 
           | 
          string |           dirname,  | 
         
        
           | 
           | 
          vector< T * > |           table ) | 
         
       
   | 
  
inline   | 
  
 
Definition at line 467 of file JRunHistograms.hh.
  467                                                                                      {
  468 
  469    if(f.GetDirectory(dirname.c_str()) == 0) f.mkdir (dirname.c_str());
  470 
  471    f.cd (dirname.c_str());
  472 
  473    for (int i=0 ; i < (int)table.size(); i++){
  474 
  475      if (table[i]) table[i] -> Write();
  476    }
  477  }
 
 
 
◆ Write_manager_to_file()
template<class T , class V > 
  
  
      
        
          | void JRA_Histograms::Write_manager_to_file  | 
          ( | 
          TFile & |           f,  | 
         
        
           | 
           | 
          string |           dirname,  | 
         
        
           | 
           | 
          JManager< T, V > * |           table ) | 
         
       
   | 
  
inline   | 
  
 
Definition at line 487 of file JRunHistograms.hh.
  487                                                                                    {
  488 
  489    if(f.GetDirectory(dirname.c_str()) == 0) f.mkdir (dirname.c_str());
  490 
  491    f.cd (dirname.c_str());
  492    
  493    for (typename JManager < T , V >::const_iterator i = table -> begin() ; i != table -> end() ; ++i){
  494      
  495      i -> second -> Write();
  496    }
  497  }
 
 
 
◆ Replace_wildcard_in_name()
template<class T , class V > 
  
  
      
        
          | void JRA_Histograms::Replace_wildcard_in_name  | 
          ( | 
          JManager< T, V > * |           manager,  | 
         
        
           | 
           | 
          char |           wc = '%' ) | 
         
       
   | 
  
inline   | 
  
 
Definition at line 505 of file JRunHistograms.hh.
  505                                                                            {
  506    
  507    for (typename JManager < T , V >::const_iterator i = manager -> begin() ; i != manager -> end() ; ++i){
  508 
  509      if (i -> second -> GetTitle()){
  510 
  511        std::string     buffer = i -> second -> GetTitle();
  512        string::size_type ipos = buffer.find(wc);
  513        
  514        if (ipos!=std::string::npos){
  515          
  516          ostringstream os;
  517          
  518          os << i -> first ;
  519          
  520          buffer.replace(ipos, 1, os.str());
  521          
  522          i -> second -> SetTitle(buffer.c_str());
  523        }
  524      }
  525    }
  526  }
 
 
 
◆ Write_manager_in_key_dir()
template<class T , class V > 
  
  
      
        
          | void JRA_Histograms::Write_manager_in_key_dir  | 
          ( | 
          TFile & |           f,  | 
         
        
           | 
           | 
          JManager< T, V > * |           manager ) | 
         
       
   | 
  
inline   | 
  
 
Definition at line 534 of file JRunHistograms.hh.
  534                                                                      {
  535    
  536    for (typename JManager < T , V >::const_iterator i = manager -> begin() ; i != manager -> end() ; ++i){
  537      
  538      std::string fullpath = 
MAKE_STRING(i->second->GetName());
 
  539 
  540      int          pos = fullpath.rfind ('/');
  541      std::string name = fullpath.substr (pos + 1);
  542      std::string path = fullpath.substr (0 , pos);
  543 
  544      if (f.GetDirectory(path.c_str()) == 0) f.mkdir (path.c_str());
  545 
  546      f.cd(path.c_str());
  547 
  548      i -> second -> SetName(name.c_str());
  549      i -> second -> Write();
  550    }
  551  }
#define MAKE_STRING(A)
Make string.
 
 
 
 
◆ Write_manager_table_in_key_dir()
template<class T , class V > 
  
  
      
        
          | void JRA_Histograms::Write_manager_table_in_key_dir  | 
          ( | 
          TFile & |           f,  | 
         
        
           | 
           | 
          vector< JManager< T, V > * > |           table ) | 
         
       
   | 
  
inline   | 
  
 
Definition at line 559 of file JRunHistograms.hh.
  559                                                                                        {
  560 
  561    for (
typename vector < JManager < T , V >* >::const_iterator i = table.begin() ; i != table.end() ; ++i){
 
  562 
  563      if ((*i)){
  564      
  565        for (
typename JManager < T , V >::const_iterator 
j = (*i) -> begin() ; 
j != (*i) -> end() ; ++
j){
 
  566 
  567          std::string fullpath = 
MAKE_STRING(
j-> second -> GetName());
 
  568 
  569          int          pos = fullpath.rfind  ('/');
  570          std::string name = fullpath.substr (pos + 1);
  571          std::string path = fullpath.substr (0 , pos);
  572 
  573          if (f.GetDirectory(path.c_str()) == 0) f.mkdir (path.c_str());
  574 
  575          f.cd(path.c_str());
  576 
  577          j -> second -> SetName(name.c_str());
 
  578          j -> second -> Write();
 
  579        }
  580      }
  581    }
  582  }
 
 
 
◆ h_summary
◆ h_timeslice
◆ h_trigger
◆ du_ids
◆ modules_per_string
      
        
          | int JRA_Histograms::modules_per_string | 
        
      
 
 
The documentation for this class was generated from the following file: