#include <JRunHistograms.hh>
|
| JRA_Histograms () |
|
| JRA_Histograms (const JDetector &detector) |
|
int | string_to_index (int string) |
|
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 392 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 404 of file JRunHistograms.hh.
404 {
405
411 }
TimesliceHistograms h_timeslice
TriggerHistograms h_trigger
SummaryHistograms h_summary
floor_range getRangeOfFloors(const JDetector &detector)
Get range of floors.
std::set< int > getStringIDs(const JDetector &detector)
Get list of strings identifiers.
◆ string_to_index()
int JRA_Histograms::string_to_index |
( |
int | string | ) |
|
|
inline |
◆ initialize_summary_histograms()
void JRA_Histograms::initialize_summary_histograms |
( |
| ) |
|
|
inline |
Definition at line 427 of file JRunHistograms.hh.
427 {
428
430 }
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 438 of file JRunHistograms.hh.
438 {
439
441 const string prefix = "KM3NETDAQ::JDAQ" ;
442 string ts_name = T::Class_Name();
443 string::size_type pos = ts_name.find(prefix);
444
445 if (pos != string::npos) ts_name.replace(ts_name.find(prefix) , prefix.length() , "");
446
448 }
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 453 of file JRunHistograms.hh.
453 {
454
456 }
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 466 of file JRunHistograms.hh.
466 {
467
468 if(f.GetDirectory(dirname.c_str()) == 0) f.mkdir (dirname.c_str());
469
470 f.cd (dirname.c_str());
471
472 for (int i=0 ; i < (int)table.size(); i++){
473
474 for (
int j=0 ;
j< (int)table[i].size();
j++){
475
476 if (table[i][
j]) table [i][
j] -> Write();
477 }
478 }
479 }
◆ 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 489 of file JRunHistograms.hh.
489 {
490
491 if(f.GetDirectory(dirname.c_str()) == 0) f.mkdir (dirname.c_str());
492
493 f.cd (dirname.c_str());
494
495 for (int i=0 ; i < (int)table.size(); i++){
496
497 if (table[i]) table[i] -> Write();
498 }
499 }
◆ 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 509 of file JRunHistograms.hh.
509 {
510
511 if(f.GetDirectory(dirname.c_str()) == 0) f.mkdir (dirname.c_str());
512
513 f.cd (dirname.c_str());
514
515 for (typename JManager < T , V >::const_iterator i = table -> begin() ; i != table -> end() ; ++i){
516
517 i -> second -> Write();
518 }
519 }
◆ 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 527 of file JRunHistograms.hh.
527 {
528
529 for (typename JManager < T , V >::const_iterator i = manager -> begin() ; i != manager -> end() ; ++i){
530
531 if (i -> second -> GetTitle()){
532
533 std::string buffer = i -> second -> GetTitle();
534 string::size_type ipos = buffer.find(wc);
535
536 if (ipos!=std::string::npos){
537
538 ostringstream os;
539
540 os << i -> first ;
541
542 buffer.replace(ipos, 1, os.str());
543
544 i -> second -> SetTitle(buffer.c_str());
545 }
546 }
547 }
548 }
◆ 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 556 of file JRunHistograms.hh.
556 {
557
558 for (typename JManager < T , V >::const_iterator i = manager -> begin() ; i != manager -> end() ; ++i){
559
560 std::string fullpath =
MAKE_STRING(i->second->GetName());
561
562 int pos = fullpath.rfind ('/');
563 std::string name = fullpath.substr (pos + 1);
564 std::string path = fullpath.substr (0 , pos);
565
566 if (f.GetDirectory(path.c_str()) == 0) f.mkdir (path.c_str());
567
568 f.cd(path.c_str());
569
570 i -> second -> SetName(name.c_str());
571 i -> second -> Write();
572 }
573 }
#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 581 of file JRunHistograms.hh.
581 {
582
583 for (
typename vector < JManager < T , V >* >::const_iterator i = table.begin() ; i != table.end() ; ++i){
584
585 if ((*i)){
586
587 for (
typename JManager < T , V >::const_iterator
j = (*i) -> begin() ;
j != (*i) -> end() ; ++
j){
588
589 std::string fullpath =
MAKE_STRING(
j-> second -> GetName());
590
591 int pos = fullpath.rfind ('/');
592 std::string name = fullpath.substr (pos + 1);
593 std::string path = fullpath.substr (0 , pos);
594
595 if (f.GetDirectory(path.c_str()) == 0) f.mkdir (path.c_str());
596
597 f.cd(path.c_str());
598
599 j -> second -> SetName(name.c_str());
600 j -> second -> Write();
601 }
602 }
603 }
604 }
◆ 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: