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

Classes for storing and manipulating the results of your analysis. More...

Classes

class  NAGASH::Count
 Use CountBase with the interface of provided by NAGASH::Result. More...
 
class  NAGASH::CountBase
 Base class for Count. This class provide a base class for Count. You can also use it if you don't need other functions from NAGASH::Result. More...
 
class  NAGASH::CutFlowCounter
 Store the cut flow with user defined cuts. More...
 
class  NAGASH::HistBase
 Virtual base class for histograms. More...
 
class  NAGASH::NGHist< HistType >
 NAGASH interface for using ROOT histograms. More...
 
class  NAGASH::PlotGroup
 Provide a base class for manipulating a group of histograms at the same time. More...
 
class  NAGASH::Result
 Provide virtual interface to manipulate all the results inside NAGASH. More...
 
class  NAGASH::ResultGroup
 Used to manipulate a group of Result objects., especially inside NAGASH::Job. More...
 

Detailed Description

Classes for storing and manipulating the results of your analysis.

Create your own Result

In NAGASH, Result is the result of your job. And you can get it by

auto myresult = ResultGroupUser()->BookResult<ResultType>(name, filename, ...);

inside any class inherite from NAGASH::Job. The first argument is necessary, and the second argument is optional if no other arguments are needed.

If you want to define your own result, you should organize your code as :

#pragma once
class UserResult : public NAGASH::Result
{
UserResult(std::shared_ptr<NAGASH::MSGTool> msg, std::shared_ptr<NAGASH::ConfigTool> config, const TString &name, const TString &filename, other arguments you want)
: Result(msg, config, name, filename)
{
// do something you want
// Then you can get this result by
// ResultGroupUser()->BookResult<UserResult>(name, filename, other arguments);
// inside class inherite from NAGASH::Job
}
// here are two functions you should override
void Combine(std::shared_ptr<Result> result) override
{
// combine with other result
auto subresult = std::dynamic_pointer_cast<std::remove_pointer<decltype(this)>::type>(result);
if (subresult != nullptr)
{
// do something you want
}
}
// this function is optional
void WriteToFile() override
{
}
}
Provide virtual interface to manipulate all the results inside NAGASH.
Definition Result.h:68
virtual void WriteToFile()
Definition Result.h:74
virtual void Combine(std::shared_ptr< Result > result)
Return the name of the output file.
Definition Result.h:73