NAGASH 0.9.8
Next Generation Analysis System
Loading...
Searching...
No Matches
Classes
Tool Classes

Classes that served as tools in your analysis. More...

Classes

class  NAGASH::Chi2Fitter
 fit the parameters of a \(\chi^2\) shape function. More...
 
class  NAGASH::FigureTool
 Class for plotting variaous types of figures. More...
 
class  NAGASH::HistTool
 provide tools for manipulating ROOT histograms More...
 
class  NAGASH::Kinematics
 Provide some static functions to calculate kinematic variables. More...
 
class  NAGASH::MapTool
 Helper functions for std::map. More...
 
class  NAGASH::NGFigure
 Next Generation Figure Package, now replaced by NAGASH::FigureTool. More...
 
class  NAGASH::PCATool
 PCATool : Principal Component Analysis (PCA) More...
 
class  NAGASH::ProfileFitter
 Tool for conducting profile likelihood fit. More...
 
class  NAGASH::SystTool
 Manage systematic variations. More...
 
class  NAGASH::TemplateFitter
 Fit the contributions use template histograms to a target histogram. More...
 
class  NAGASH::TFileHelper
 Provide fast access to ROOT objects inside a TFile. More...
 
class  NAGASH::Timer
 calculate the time interval between two time stamps. More...
 
class  NAGASH::Tool
 Provide interface for all tools in NAGASH. More...
 
class  NAGASH::Toolkit
 Manipulate the Tool classes, give them correct MSGTool inside NAGASH::Job. More...
 
class  NAGASH::Uncertainty
 Provide static functions for calculating uncertainties. More...
 

Detailed Description

Classes that served as tools in your analysis.

Create your own tool

In NAGASH, tool is just literal meaning, you can get it by

std::shared_ptr<USERTOOL> mytool = ToolkitUser()->GetTool<USERTOOL>(some config parameter);

in the framework. (More specifically, in classes NAGASH::LoopEvent, NAGASH::Tool and NAGASH::Result)

If you want to create your own tool, you should organize your header file USERTOOL.h as follows :

#pragma once
#include "NAGASH.h"
class USERTOOL : public NAGASH::Tool
{
public:
// you can override the construction fucntion
// but the first argument must be msgtool
USERTOOL(std::shared_ptr<NAGASH::MSGTool> MSG, other arguments);
// other member function you want to define
void foo(); // example
};
Provide interface for all tools in NAGASH.
Definition Tool.h:72

The corresponding source file USERTOOL.cxx should goes like :

#include "USERTOOL.h"
USERTOOL(std::shared_ptr<NAGASH::MSGTool> MSG, other arguments) : Tool(MSG)
{
// do what you want
}
void USERTOOL::foo()
{
// your tool function
// this will give a output like
// ...->USERTOOL::fool INFO foo
auto titleguard = MSGUser()->StartTitleWithGuard("USERTOOL::foo");
MSGUser()->MSG(MSGLevel::INFO,"foo");
}

The base class Tool has protected member function NAGASH::Tool::MSGUser() which maintains the MSGTool during the analysis. Use NAGASH::MSGTool::StartTitleWithGuard() to let you know where the output message comes from.