Jpp  17.0.0-rc.1
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Public Member Functions | Public Attributes | List of all members
JRA_Histograms Class Reference

#include <JRunHistograms.hh>

Public Member Functions

 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)
 

Public Attributes

SummaryHistograms h_summary
 
TimesliceHistograms h_timeslice
 
TriggerHistograms h_trigger
 
std::set< int > du_ids
 
int modules_per_string
 

Detailed Description

Definition at line 383 of file JRunHistograms.hh.

Constructor & Destructor Documentation

JRA_Histograms::JRA_Histograms ( )
inline

Definition at line 393 of file JRunHistograms.hh.

393 {}
JRA_Histograms::JRA_Histograms ( const JDetector detector)
inline

Definition at line 395 of file JRunHistograms.hh.

395  {
396 
397  du_ids = getStringIDs(detector);
402  }
std::set< int > du_ids
std::set< int > getStringIDs(const JDetector &detector)
Get list of strings identifiers.
TimesliceHistograms h_timeslice
TriggerHistograms h_trigger
static const JStringCounter getNumberOfStrings
Function object to count unique strings.
SummaryHistograms h_summary
int getNumberOfModules(const JDetector &detector)
Get number of modules.

Member Function Documentation

void JRA_Histograms::initialize_summary_histograms ( )
inline

Definition at line 409 of file JRunHistograms.hh.

409  {
410 
412 
413  }
std::set< int > du_ids
void initialize(std::set< int > &du_ids, int modules_per_string)
SummaryHistograms h_summary
template<class T >
void JRA_Histograms::initialize_timeslice_histograms ( )
inline

Definition at line 421 of file JRunHistograms.hh.

421  {
422 
424  const string prefix = "KM3NETDAQ::JDAQ" ;
425  string ts_name = T::Class_Name();
426  string::size_type pos = ts_name.find(prefix);
427 
428  if (pos != string::npos) ts_name.replace(ts_name.find(prefix) , prefix.length() , "");
429 
430  h_timeslice.initialize(du_ids , modules_per_string , index , ts_name);
431  }
std::set< int > du_ids
TimesliceHistograms h_timeslice
void initialize(std::set< int > du_ids, int modules_per_string, int ts_type, std::string ts_name)
Indexing of data type in type list.
Definition: JTypeList.hh:310
void JRA_Histograms::initialize_trigger_histograms ( )
inline

Definition at line 436 of file JRunHistograms.hh.

436  {
437 
439  }
std::set< int > du_ids
void initialize(std::set< int > &du_ids, int modules_per_string)
TriggerHistograms h_trigger
template<class T >
void JRA_Histograms::Write_histogram_table_to_file ( TFile &  f,
string  dirname,
vector< vector< T * > >  table 
)
inline

Definition at line 449 of file JRunHistograms.hh.

449  {
450 
451  if(f.GetDirectory(dirname.c_str()) == 0) f.mkdir (dirname.c_str());
452 
453  f.cd (dirname.c_str());
454 
455  for (int i=0 ; i < (int)table.size(); i++){
456 
457  for (int j=0 ; j< (int)table[i].size(); j++){
458 
459  if (table[i][j]) table [i][j] -> Write();
460  }
461  }
462  }
o $QUALITY_ROOT d $DEBUG!JPlot1D f
Definition: JDataQuality.sh:66
int j
Definition: JPolint.hh:682
template<class T >
void JRA_Histograms::Write_histogram_table_to_file ( TFile &  f,
string  dirname,
vector< T * >  table 
)
inline

Definition at line 472 of file JRunHistograms.hh.

472  {
473 
474  if(f.GetDirectory(dirname.c_str()) == 0) f.mkdir (dirname.c_str());
475 
476  f.cd (dirname.c_str());
477 
478  for (int i=0 ; i < (int)table.size(); i++){
479 
480  if (table[i]) table[i] -> Write();
481  }
482  }
o $QUALITY_ROOT d $DEBUG!JPlot1D f
Definition: JDataQuality.sh:66
template<class T , class V >
void JRA_Histograms::Write_manager_to_file ( TFile &  f,
string  dirname,
JManager< T, V > *  table 
)
inline

Definition at line 492 of file JRunHistograms.hh.

492  {
493 
494  if(f.GetDirectory(dirname.c_str()) == 0) f.mkdir (dirname.c_str());
495 
496  f.cd (dirname.c_str());
497 
498  for (typename JManager < T , V >::const_iterator i = table -> begin() ; i != table -> end() ; ++i){
499 
500  i -> second -> Write();
501  }
502  }
o $QUALITY_ROOT d $DEBUG!JPlot1D f
Definition: JDataQuality.sh:66
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
Definition: JManager.hh:43
template<class T , class V >
void JRA_Histograms::Replace_wildcard_in_name ( JManager< T, V > *  manager,
char  wc = '%' 
)
inline

Definition at line 510 of file JRunHistograms.hh.

510  {
511 
512  for (typename JManager < T , V >::const_iterator i = manager -> begin() ; i != manager -> end() ; ++i){
513 
514  if (i -> second -> GetTitle()){
515 
516  std::string buffer = i -> second -> GetTitle();
517  string::size_type ipos = buffer.find(wc);
518 
519  if (ipos!=std::string::npos){
520 
521  ostringstream os;
522 
523  os << i -> first ;
524 
525  buffer.replace(ipos, 1, os.str());
526 
527  i -> second -> SetTitle(buffer.c_str());
528  }
529  }
530  }
531  }
then echo The file $DIR KM3NeT_00000001_00000000 root already please rename or remove it first
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
Definition: JManager.hh:43
template<class T , class V >
void JRA_Histograms::Write_manager_in_key_dir ( TFile &  f,
JManager< T, V > *  manager 
)
inline

Definition at line 539 of file JRunHistograms.hh.

539  {
540 
541  for (typename JManager < T , V >::const_iterator i = manager -> begin() ; i != manager -> end() ; ++i){
542 
543  std::string fullpath = MAKE_STRING(i->second->GetName());
544 
545  int pos = fullpath.rfind ('/');
546  std::string name = fullpath.substr (pos + 1);
547  std::string path = fullpath.substr (0 , pos);
548 
549  if (f.GetDirectory(path.c_str()) == 0) f.mkdir (path.c_str());
550 
551  f.cd(path.c_str());
552 
553  i -> second -> SetName(name.c_str());
554  i -> second -> Write();
555  }
556  }
then echo Enter input within $TIMEOUT_S seconds echo n User name
Definition: JCookie.sh:42
o $QUALITY_ROOT d $DEBUG!JPlot1D f
Definition: JDataQuality.sh:66
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:142
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
Definition: JManager.hh:43
$WORKDIR driver txt done cat $WORKDIR driver txt<< EOFprocess ${DATAFILTER}$FILTER_HOST csh-c '(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&(JDataFilter-H\$SERVER\$-M\$LOGGER\$-d $DEBUG-u ${DATAFILTER}-P $PORT</dev/null > &/dev/null &))';process ${DATAWRITER}$WRITER_HOST csh-c '(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&(JDataWriter-H\$SERVER\$-M\$LOGGER\$-d $DEBUG-u ${DATAWRITER}</dev/null > &/dev/null &))';print enterevent ev_init{RC_CMD}event ev_reset{RC_CMD}event ev_init{RC_CMD}event ev_configure{RC_DFLTR%<$WORKDIR/ev_configure_datafilter.txt > RC_DOM<$WORKDIR/ev_configure_domsimulator.txt > RC_DWRT path
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 564 of file JRunHistograms.hh.

564  {
565 
566  for (typename vector < JManager < T , V >* >::const_iterator i = table.begin() ; i != table.end() ; ++i){
567 
568  if ((*i)){
569 
570  for (typename JManager < T , V >::const_iterator j = (*i) -> begin() ; j != (*i) -> end() ; ++j){
571 
572  std::string fullpath = MAKE_STRING(j-> second -> GetName());
573 
574  int pos = fullpath.rfind ('/');
575  std::string name = fullpath.substr (pos + 1);
576  std::string path = fullpath.substr (0 , pos);
577 
578  if (f.GetDirectory(path.c_str()) == 0) f.mkdir (path.c_str());
579 
580  f.cd(path.c_str());
581 
582  j -> second -> SetName(name.c_str());
583  j -> second -> Write();
584  }
585  }
586  }
587  }
then echo Enter input within $TIMEOUT_S seconds echo n User name
Definition: JCookie.sh:42
o $QUALITY_ROOT d $DEBUG!JPlot1D f
Definition: JDataQuality.sh:66
#define MAKE_STRING(A)
Make string.
Definition: JPrint.hh:142
Auxiliary class to manage set of compatible ROOT objects (e.g. histograms) using unique keys...
Definition: JManager.hh:43
$WORKDIR driver txt done cat $WORKDIR driver txt<< EOFprocess ${DATAFILTER}$FILTER_HOST csh-c '(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&(JDataFilter-H\$SERVER\$-M\$LOGGER\$-d $DEBUG-u ${DATAFILTER}-P $PORT</dev/null > &/dev/null &))';process ${DATAWRITER}$WRITER_HOST csh-c '(setenv ROOTSYS $ROOTSYS &&source $JPP_DIR/setenv.csh $JPP_DIR &&(JDataWriter-H\$SERVER\$-M\$LOGGER\$-d $DEBUG-u ${DATAWRITER}</dev/null > &/dev/null &))';print enterevent ev_init{RC_CMD}event ev_reset{RC_CMD}event ev_init{RC_CMD}event ev_configure{RC_DFLTR%<$WORKDIR/ev_configure_datafilter.txt > RC_DOM<$WORKDIR/ev_configure_domsimulator.txt > RC_DWRT path
int j
Definition: JPolint.hh:682

Member Data Documentation

SummaryHistograms JRA_Histograms::h_summary

Definition at line 387 of file JRunHistograms.hh.

TimesliceHistograms JRA_Histograms::h_timeslice

Definition at line 388 of file JRunHistograms.hh.

TriggerHistograms JRA_Histograms::h_trigger

Definition at line 389 of file JRunHistograms.hh.

std::set<int> JRA_Histograms::du_ids

Definition at line 390 of file JRunHistograms.hh.

int JRA_Histograms::modules_per_string

Definition at line 391 of file JRunHistograms.hh.


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