Jpp  15.0.3
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)
 
void Write_to_file (TFile &f)
 

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 773 of file JRunHistograms.hh.

Constructor & Destructor Documentation

JRA_Histograms::JRA_Histograms ( )
inline

Definition at line 783 of file JRunHistograms.hh.

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

Definition at line 785 of file JRunHistograms.hh.

785  {
786 
787  du_ids = getStringIDs(detector);
792  }
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 799 of file JRunHistograms.hh.

799  {
800 
802 
803  }
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 811 of file JRunHistograms.hh.

811  {
812 
814  const string prefix = "KM3NETDAQ::JDAQ" ;
815  string ts_name = T::Class_Name();
816  string::size_type pos = ts_name.find(prefix);
817 
818  if (pos != string::npos) ts_name.replace(ts_name.find(prefix) , prefix.length() , "");
819 
820  h_timeslice.initialize(du_ids , modules_per_string , index , ts_name);
821  }
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 826 of file JRunHistograms.hh.

826  {
827 
829  }
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 839 of file JRunHistograms.hh.

839  {
840 
841  if(f.GetDirectory(dirname.c_str()) == 0) f.mkdir (dirname.c_str());
842 
843  f.cd (dirname.c_str());
844 
845  for (int i=0 ; i < (int)table.size(); i++){
846 
847  for (int j=0 ; j< (int)table[i].size(); j++){
848 
849  if (table[i][j]) table [i][j] -> Write();
850  }
851  }
852  }
o $QUALITY_ROOT d $DEBUG!JPlot1D f
Definition: JDataQuality.sh:66
int j
Definition: JPolint.hh:666
template<class T >
void JRA_Histograms::Write_histogram_table_to_file ( TFile &  f,
string  dirname,
vector< T * >  table 
)
inline

Definition at line 862 of file JRunHistograms.hh.

862  {
863 
864  if(f.GetDirectory(dirname.c_str()) == 0) f.mkdir (dirname.c_str());
865 
866  f.cd (dirname.c_str());
867 
868  for (int i=0 ; i < (int)table.size(); i++){
869 
870  if (table[i]) table[i] -> Write();
871  }
872  }
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 882 of file JRunHistograms.hh.

882  {
883 
884  if(f.GetDirectory(dirname.c_str()) == 0) f.mkdir (dirname.c_str());
885 
886  f.cd (dirname.c_str());
887 
888  for (typename JManager < T , V >::const_iterator i = table -> begin() ; i != table -> end() ; ++i){
889 
890  i -> second -> Write();
891  }
892  }
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 900 of file JRunHistograms.hh.

900  {
901 
902  for (typename JManager < T , V >::const_iterator i = manager -> begin() ; i != manager -> end() ; ++i){
903 
904  if (i -> second -> GetTitle()){
905 
906  std::string buffer = i -> second -> GetTitle();
907  string::size_type ipos = buffer.find(wc);
908 
909  if (ipos!=std::string::npos){
910 
911  ostringstream os;
912 
913  os << i -> first ;
914 
915  buffer.replace(ipos, 1, os.str());
916 
917  i -> second -> SetTitle(buffer.c_str());
918  }
919  }
920  }
921  }
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 929 of file JRunHistograms.hh.

929  {
930 
931  for (typename JManager < T , V >::const_iterator i = manager -> begin() ; i != manager -> end() ; ++i){
932 
933  std::string fullpath = MAKE_STRING(i->second->GetName());
934 
935  int pos = fullpath.rfind ('/');
936  std::string name = fullpath.substr (pos + 1);
937  std::string path = fullpath.substr (0 , pos);
938 
939  if (f.GetDirectory(path.c_str()) == 0) f.mkdir (path.c_str());
940 
941  f.cd(path.c_str());
942 
943  i -> second -> SetName(name.c_str());
944  i -> second -> Write();
945  }
946  }
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 954 of file JRunHistograms.hh.

954  {
955 
956  for (typename vector < JManager < T , V >* >::const_iterator i = table.begin() ; i != table.end() ; ++i){
957 
958  if ((*i)){
959 
960  for (typename JManager < T , V >::const_iterator j = (*i) -> begin() ; j != (*i) -> end() ; ++j){
961 
962  std::string fullpath = MAKE_STRING(j-> second -> GetName());
963 
964  int pos = fullpath.rfind ('/');
965  std::string name = fullpath.substr (pos + 1);
966  std::string path = fullpath.substr (0 , pos);
967 
968  if (f.GetDirectory(path.c_str()) == 0) f.mkdir (path.c_str());
969 
970  f.cd(path.c_str());
971 
972  j -> second -> SetName(name.c_str());
973  j -> second -> Write();
974  }
975  }
976  }
977  }
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:666
void JRA_Histograms::Write_to_file ( TFile &  f)
inline

Definition at line 983 of file JRunHistograms.hh.

983  {
984 
985  f.mkdir("Detector");
986  f .cd("Detector");
987 
994 
996 
997  for (typename vector < JManager < string , TH2D >* >::const_iterator i = h_timeslice.m_pmt_tot_distributions.begin() ; i != h_timeslice.m_pmt_tot_distributions.end() ; ++i){
998 
999  if ((*i)){
1000 
1001  for (typename JManager < string , TH2D >::const_iterator j = (*i) -> begin() ; j != (*i) -> end() ; ++j){
1002 
1003  for(int k=1 ; k < j -> second -> GetNbinsX() ; ++k){
1004 
1005  for(int t=1 ; t < j -> second -> GetNbinsY() ; ++t){
1006 
1007  double width = j -> second -> GetYaxis() -> GetBinWidth(t);
1008 
1009  j -> second -> SetBinContent(k,t,j -> second -> GetBinContent(k,t) / width);
1010  j -> second -> SetBinError(k,t,j -> second -> GetBinError(k,t) / width);
1011  }
1012  }
1013  }
1014  }
1015  }
1016 
1020 
1023 
1025 
1028 
1029  f.mkdir ( MAKE_STRING ("JDAQEvent").c_str());
1030  f.cd ("JDAQEvent");
1031 
1047  }
TH1D * h_pmt_distribution_snapshot_hits
TH2D * h_Snapshot_hits_per_module
then fatal No hydrophone data file $HYDROPHONE_TXT fi sort gr k
TH1D * h_pmt_distribution_triggered_hits
vector< JManager< string, TH2D > * > m_pmt_tot_distributions
JManager< string, TH1D > * m_mean_summary_rate_distribution
vector< TH2D * > h_dom_mean_rates
TH2D * h_Triggered_hits_per_module
o $QUALITY_ROOT d $DEBUG!JPlot1D f
Definition: JDataQuality.sh:66
JManager< string, TH2D > * m_mean_summary_rate
TH1D * h_dom_rate_distribution
#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
TimesliceHistograms h_timeslice
TH1D * h_tot_distribution_snapshot_hits
TriggerHistograms h_trigger
void Write_manager_table_in_key_dir(TFile &f, vector< JManager< T, V > * > table)
TH1D * h_pmt_rate_distribution
void Write_histogram_table_to_file(TFile &f, string dirname, vector< vector< T * > > table)
vector< JManager< string, TH1D > * > m_mean_ToT_distribution
SummaryHistograms h_summary
JManager< string, TH2D > * m_summary_rate_distribution
void Write_manager_in_key_dir(TFile &f, JManager< T, V > *manager)
vector< JManager< string, TH2D > * > m_mean_ToT
vector< JManager< string, TH2D > * > m_pmt_rate_distributions
TH1D * h_tot_distribution_triggered_hits
TH1D * h_Triggered_hits_3dmuon
void normalizeBW1D(TH1D *h)
int j
Definition: JPolint.hh:666
TH2D * h_Triggered_hits_3dmuon_per_module
JManager< string, TH2D > * m_Snapshot_hits_per_pmt
TH1D * h_Triggered_over_Snapshot_hits

Member Data Documentation

SummaryHistograms JRA_Histograms::h_summary

Definition at line 777 of file JRunHistograms.hh.

TimesliceHistograms JRA_Histograms::h_timeslice

Definition at line 778 of file JRunHistograms.hh.

TriggerHistograms JRA_Histograms::h_trigger

Definition at line 779 of file JRunHistograms.hh.

std::set<int> JRA_Histograms::du_ids

Definition at line 780 of file JRunHistograms.hh.

int JRA_Histograms::modules_per_string

Definition at line 781 of file JRunHistograms.hh.


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