Skip to content

Class nptool::Application

ClassList > nptool > Application

Sole entry point to the framework, coordinates all other classes.

  • #include <NPApplication.h>

Inherits the following classes: nptool::OptionManager, thread_pool, nptool::PluginManager, nptool::DetectorManager, nptool::CalibrationManager, nptool::Counter

Public Functions

Type Name
void AddASCIIFile (std::string name, std::string title, std::string file)
Application (int argc, char ** argv, unsigned int number_of_threads)
Application (std::string s, unsigned int number_of_threads)
void AttachASCIIFiles ()
std::string GetDetectorFile ()
void Start (bool load=true)
void Stop ()
~Application ()

Public Functions inherited from nptool::OptionManager

See nptool::OptionManager

Type Name
std::string GetAnalysisOutputPath ()
std::string GetArg (std::string flag)
int GetArgcArgv (char **& argv)
std::string GetConversionOutputPath ()
std::string GetDefaultOutputPath ()
std::string GetEnergyLossPath ()
int GetIntArg (std::string flag)
std::string GetOnlineMacroPath ()
std::string GetOutputPath ()
std::string GetSimulationOutputPath ()
std::vector< std::string > GetVectorArg (std::string flag)
bool HasFlag (std::string flag)
std::vector< std::string > ListIgnoredFlag ()
unsigned int NumberOfFlags ()
OptionManager ()
OptionManager (int argc, char ** argv)
OptionManager (std::string arg)
void PrintIgnoredFlag ()
void ReadArgument (int argc=0, char ** argv=NULL)
void ReadArgument (std::string arg)
void ReadProjectConfigFile (std::string app_name)
~OptionManager ()

Public Functions inherited from nptool::PluginManager

See nptool::PluginManager

Type Name
void * LoadPlugin (std::string name, bool allow_absent_plugin=false)
void LoadPluginCatalogue ()
void LoadPluginList (std::string file, bool allow_fail=false)
PluginManager ()
~PluginManager ()

Public Functions inherited from nptool::DetectorManager

See nptool::DetectorManager

Type Name
void AddDetector (std::string, std::shared_ptr< VDetector >)
void BuildPhysicalEvent (bool allow_MT=true)
void BuildRawEvent (const std::string & daq_name, const std::string & label, void * ptr_to_data, bool allow_MT=true)
void CheckSpectra ()
void ClearEventData (bool allow_MT=true)
void ClearEventPhysics (bool allow_MT=true)
void ClearSpectra ()
void ConstructGeometry ()
DetectorManager ()
void DisableMT ()
void EnableMT ()
void FillSpectra ()
std::map< std::string, std::shared_ptr< VDetector > > GetAllDetectors ()
std::shared_ptr< VDetector > GetDetector (std::string name)
void InitDetectorManager ()
void InitSimulation (std::string simtype)
void InitSpectra ()
void InitializeDataInputConversion (std::shared_ptr< nptool::VDataInput > input)
void InitializeDataInputPhysics (std::shared_ptr< nptool::VDataInput > input)
void InitializeDataInputRaw (std::shared_ptr< nptool::VDataInput > input)
void InitializeDataOutputPhysics (std::shared_ptr< nptool::VDataOutput > output)
void InitializeDataOutputRaw (std::shared_ptr< nptool::VDataOutput > output)
void InitializeScorers ()
void ReadConfiguration (std::string file)
void ReadSensitive ()
void WriteSpectra ()
~DetectorManager ()

Public Functions inherited from nptool::CalibrationManager

See nptool::CalibrationManager

Type Name
void AddFile (std::string Path)
bool AddParameter (std::string DetectorName, std::string ParameterName, std::string Token, std::vector< double > def=std::vector< double >())
bool AddParameter (std::string Token, std::vector< double > def=std::vector< double >())
double ApplyCalibration (const std::string & ParameterPath, const double & RawValue, double random=0) const
double ApplyCalibrationDebug (const std::string & ParameterPath, const double & RawValue, double random=0) const
double ApplyResistivePositionCalibration (const std::string & ParameterPath, const double & RawValue) const
double ApplyResistivePositionCalibrationDebug (const std::string & ParameterPath, const double & RawValue) const
double ApplySigmoid (const std::string & ParameterPath, const double & RawValue) const
bool ApplyThreshold (const std::string & ParameterPath, const double & RawValue) const
CalibrationManager ()
void ClearCalibration ()
void Dump () const
std::vector< double > GetCorrection (const std::string & ParameterPath) const
double GetPedestal (const std::string & ParameterPath) const
double GetValue (const std::string & ParameterPath, const unsigned int & order) const
void InitCalibration ()
void LoadParameterFromFile ()
~CalibrationManager ()

Public Functions inherited from nptool::Counter

See nptool::Counter

Type Name
Counter ()
std::shared_ptr< uint64_t > CreateCounter (std::string token, std::string name, std::string unit="")
std::shared_ptr< uint64_t > GetCounter (std::string token)
std::string & GetString (const std::string & token)
void IncrementCounter (const std::string & token)
void UpdateCounter (const std::string & token, const unsigned long long & val)
void UpdateProgress (double val)
~Counter ()

Public Static Functions

Type Name
std::shared_ptr< Application > GetApplication ()
std::shared_ptr< Application > InitApplication (int argc, char ** argv, unsigned int number_of_threads=std::thread::hardware_concurrency() - 1)
std::shared_ptr< Application > InitApplication (std::string s, unsigned int number_of_threads=std::thread::hardware_concurrency() - 1)

Public Functions Documentation

function AddASCIIFile

inline void nptool::Application::AddASCIIFile (
    std::string name,
    std::string title,
    std::string file
) 

function Application [1/2]

nptool::Application::Application (
    int argc,
    char ** argv,
    unsigned int number_of_threads
) 

function Application [2/2]

nptool::Application::Application (
    std::string s,
    unsigned int number_of_threads
) 

function AttachASCIIFiles

inline void nptool::Application::AttachASCIIFiles () 

function GetDetectorFile

std::string nptool::Application::GetDetectorFile () 

function Start

void nptool::Application::Start (
    bool load=true
) 

function Stop

void nptool::Application::Stop () 

function ~Application

nptool::Application::~Application () 

Public Static Functions Documentation

function GetApplication

static std::shared_ptr< Application > nptool::Application::GetApplication () 

function InitApplication [1/2]

static std::shared_ptr< Application > nptool::Application::InitApplication (
    int argc,
    char ** argv,
    unsigned int number_of_threads=std::thread::hardware_concurrency() - 1
) 

function InitApplication [2/2]

static std::shared_ptr< Application > nptool::Application::InitApplication (
    std::string s,
    unsigned int number_of_threads=std::thread::hardware_concurrency() - 1
) 


The documentation for this class was generated from the following file src/core/NPApplication.h