Jpp  15.0.1-rc.1-highQE
the software that should make you happy
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
Classes | Namespaces | Functions
JRootToolkit.hh File Reference
#include <string>
#include <istream>
#include <ostream>
#include <limits>
#include <cctype>
#include <vector>
#include "TString.h"
#include "TObjString.h"
#include "TRegexp.h"
#include "TPRegexp.h"
#include "TFormula.h"
#include "TFile.h"
#include "TStreamerInfo.h"
#include "TList.h"
#include "TIterator.h"
#include "TF1.h"
#include "TH1.h"
#include "TH2.h"
#include "TGraph.h"
#include "TGraphErrors.h"
#include "TGraph2D.h"
#include "TGraph2DErrors.h"
#include "TMultiGraph.h"
#include "TNtuple.h"
#include "JLang/JType.hh"
#include "JLang/JLangToolkit.hh"
#include "Jeep/JPrint.hh"
#include "JROOT/JRootFile.hh"
#include "JROOT/JRootDictionary.hh"
#include "JROOT/JRootPrinter.hh"

Go to the source code of this file.

Classes

struct  JROOT::JFitParameter_t
 Auxiliary data structure for a parameter index and its value. More...
 

Namespaces

 JROOT
 Auxiliary classes and methods for ROOT I/O.
 
 JPP
 This name space includes all other name spaces (except KM3NETDAQ, KM3NET and ANTARES).
 

Functions

template<class T >
const char * JROOT::getName ()
 Get ROOT name of given data type. More...
 
template<class T >
const char * JROOT::getName (const JType< T > &type)
 Get ROOT name of given data type. More...
 
bool JROOT::resetObject (TH1 *object, const bool reset=false)
 Detach TH1 object and optionally reset contents. More...
 
bool JROOT::resetObject (TGraph *object, const bool reset=false)
 Detach TGraph object and optionally reset contents. More...
 
bool JROOT::resetObject (TGraphErrors *object, const bool reset=false)
 Detach TGraphErrors object and optionally reset contents. More...
 
bool JROOT::resetObject (TGraph2D *object, const bool reset=false)
 Detach TGraph2D object and optionally reset contents. More...
 
bool JROOT::resetObject (TGraph2DErrors *object, const bool reset=false)
 Detach TGraph2DErrors object and optionally reset contents. More...
 
bool JROOT::resetObject (TMultiGraph *object, const bool reset=false)
 Detach TMultiGraph object and optionally reset contents. More...
 
bool JROOT::resetObject (TTree *object, const bool reset=false)
 Detach TTree object and optionally reset contents. More...
 
void JROOT::AddPoint (TGraph *g1, const Double_t x, const Double_t y)
 Add point to TGraph. More...
 
void JROOT::AddPoint (TGraph2D *g1, const Double_t x, const Double_t y, const Double_t z)
 Add point to TGraph2D. More...
 
void JROOT::AddPoint (TGraphErrors *g1, const Double_t x, const Double_t y, const Double_t ex, const Double_t ey)
 Add point to TGraphErrors. More...
 
void JROOT::AddPoint (TGraph2DErrors *g1, const Double_t x, const Double_t y, const Double_t z, const Double_t ex, const Double_t ey, const Double_t ez)
 Add point to TGraph2DErrors. More...
 
TFile & JROOT::operator<< (TFile &file, const TObject &object)
 Write object to ROOT file. More...
 
const TStreamerInfo * JROOT::getStreamerInfo (TFile *file, const char *name)
 Get ROOT streamer information of class with given name. More...
 
const TStreamerInfo * JROOT::getStreamerInfo (const char *file_name, const char *name)
 Get ROOT streamer information of class with given name. More...
 
int JROOT::getStreamerVersion (TFile *file, const char *name)
 Get ROOT streamer version of class with given name. More...
 
int JROOT::getStreamerVersion (const char *file_name, const char *name)
 Get ROOT streamer version of class with given name. More...
 
TString JROOT::parse (const TPRegexp &regexp, const TString &string, const int index=1)
 Match a regular expression with given string and return the specified matched parts. More...
 
bool JROOT::setParameter (TF1 &f1, const JFitParameter_t &parameter)
 Set fit parameter. More...
 
bool JROOT::fixParameter (TF1 &f1, const JFitParameter_t &parameter)
 Fix fit parameter. More...
 
bool JROOT::releaseParameter (TF1 &f1, const Int_t index)
 Release fit parameter. More...
 
bool JROOT::setParLimits (TF1 &f1, const Int_t index, Double_t xmin, Double_t xmax)
 Set fit parameter limits. More...
 
bool JROOT::isParameterFixed (const TF1 &f1, const Int_t index)
 Check if fit parameter is fixed. More...
 
template<class T >
Double_t JROOT::getResult (const TString &text, const T &object, const JRootDictionary_t &dictionary=JRootDictionary::getInstance())
 Get result of given textual formula. More...
 
TGraph * JROOT::histogramToGraph (const TH1 &h1)
 Helper method to convert a 1D histogram to a graph. More...
 
TH1 * JROOT::projectHistogram (const TH2 &h2, const Double_t xmin, const Double_t xmax, const char projection)
 Helper method for ROOT histogram projections. More...
 
std::istream & operator>> (std::istream &in, TRegexp &object)
 Read regular expression from input stream. More...
 
std::ostream & operator<< (std::ostream &out, const TRegexp &object)
 Write regular expression to output stream. More...
 

Function Documentation

std::istream& operator>> ( std::istream &  in,
TRegexp &  object 
)
inline

Read regular expression from input stream.

Parameters
ininput stream
objectregular expression
Returns
output stream

Definition at line 739 of file JRootToolkit.hh.

740 {
741  std::string buffer;
742 
743  if (in >> buffer) {
744  object = TRegexp(buffer.c_str());
745  }
746 
747  return in;
748 }
then fatal Wrong number of arguments fi set_variable DETECTOR $argv[1] set_variable INPUT_FILE $argv[2] eval JPrintDetector a $DETECTOR O IDENTIFIER eval JPrintDetector a $DETECTOR O SUMMARY source JAcoustics sh $DETECTOR_ID CHECK_EXIT_CODE typeset A TRIPODS get_tripods $WORKDIR tripod txt TRIPODS for EMITTER in
Definition: JCanberra.sh:41
std::ostream& operator<< ( std::ostream &  out,
const TRegexp &  object 
)
inline

Write regular expression to output stream.

Parameters
outoutput stream
objectregular expression
Returns
output stream

Definition at line 758 of file JRootToolkit.hh.

759 {
760  return out;
761 }