2021-07-13 16:36:41 -04:00
|
|
|
/*
|
2021-12-13 12:28:56 -05:00
|
|
|
EVBApp.h
|
2021-07-13 16:36:41 -04:00
|
|
|
Class which represents the API of the event building environment. Wraps together the core concepts
|
|
|
|
of the event builder, from conversion to plotting. Even intended to be able to archive data.
|
|
|
|
Currently under development.
|
|
|
|
|
|
|
|
Written by G.W. McCann Oct. 2020
|
|
|
|
*/
|
2021-12-13 12:28:56 -05:00
|
|
|
#ifndef EVBAPP_H
|
|
|
|
#define EVBAPP_H
|
2021-07-13 16:36:41 -04:00
|
|
|
|
|
|
|
#include "RunCollector.h"
|
|
|
|
#include <TGProgressBar.h>
|
|
|
|
|
2021-12-15 12:08:12 -05:00
|
|
|
namespace EventBuilder {
|
|
|
|
|
|
|
|
class EVBApp {
|
|
|
|
public:
|
|
|
|
EVBApp();
|
|
|
|
~EVBApp();
|
|
|
|
|
|
|
|
bool ReadConfigFile(const std::string& filename);
|
|
|
|
void WriteConfigFile(const std::string& filename);
|
|
|
|
|
|
|
|
void PlotHistograms();
|
|
|
|
void MergeROOTFiles();
|
|
|
|
void Convert2SortedRoot();
|
|
|
|
void Convert2FastSortedRoot();
|
|
|
|
void Convert2RawRoot();
|
|
|
|
void Convert2SlowAnalyzedRoot();
|
|
|
|
void Convert2FastAnalyzedRoot();
|
|
|
|
|
2021-12-15 17:35:31 -05:00
|
|
|
void SetRunRange(int rmin, int rmax);
|
|
|
|
void SetWorkDirectory(const std::string& fullpath);
|
|
|
|
void SetChannelMap(const std::string& name);
|
|
|
|
void SetBoardShiftFile(const std::string& name);
|
|
|
|
void SetSlowCoincidenceWindow(double window);
|
|
|
|
void SetFastWindowIonChamber(double window);
|
|
|
|
void SetFastWindowSABRE(double window);
|
|
|
|
void SetCutList(const std::string& name);
|
|
|
|
void SetScalerFile(const std::string& fullpath);
|
2021-12-15 12:08:12 -05:00
|
|
|
bool SetKinematicParameters(int zt, int at, int zp, int ap, int ze, int ae, double b, double theta, double bke);
|
|
|
|
|
2021-12-15 17:35:31 -05:00
|
|
|
inline int GetRunMin() const { return m_rmin; }
|
|
|
|
inline int GetRunMax() const { return m_rmax; }
|
|
|
|
inline std::string GetWorkDirectory() const { return m_workspace; }
|
|
|
|
inline int GetTargetZ() const { return m_ZT; }
|
|
|
|
inline int GetTargetA() const { return m_AT; }
|
|
|
|
inline int GetProjectileZ() const { return m_ZP; }
|
|
|
|
inline int GetProjectileA() const { return m_AP; }
|
|
|
|
inline int GetEjectileZ() const { return m_ZE; }
|
|
|
|
inline int GetEjectileA() const { return m_AE; }
|
|
|
|
inline int GetResidualZ() const { return m_ZR; }
|
|
|
|
inline int GetResidualA() const { return m_AR; }
|
|
|
|
inline double GetBField() const { return m_B; }
|
|
|
|
inline double GetBeamKE() const { return m_BKE; }
|
|
|
|
inline double GetTheta() const { return m_Theta; }
|
2021-12-15 12:08:12 -05:00
|
|
|
inline double GetSlowCoincidenceWindow() const { return m_SlowWindow; }
|
|
|
|
inline double GetFastWindowIonChamber() const { return m_FastWindowIonCh; }
|
|
|
|
inline double GetFastWindowSABRE() const { return m_FastWindowSABRE; }
|
|
|
|
inline std::string GetChannelMap() const { return m_mapfile; }
|
|
|
|
inline std::string GetBoardShiftFile() const { return m_shiftfile; }
|
|
|
|
inline std::string GetCutList() const { return m_cutList; }
|
|
|
|
inline std::string GetScalerFile() const { return m_scalerfile; }
|
|
|
|
|
|
|
|
inline void AttachProgressBar(TGProgressBar* pb) { m_pb = pb; }
|
|
|
|
|
|
|
|
enum Operation
|
|
|
|
{
|
|
|
|
Convert,
|
|
|
|
ConvertSlow,
|
|
|
|
ConvertSlowA,
|
|
|
|
ConvertFast,
|
|
|
|
ConvertFastA,
|
|
|
|
Merge,
|
|
|
|
Plot
|
|
|
|
};
|
|
|
|
|
|
|
|
private:
|
|
|
|
|
|
|
|
int m_rmin, m_rmax;
|
|
|
|
int m_ZT, m_AT, m_ZP, m_AP, m_ZE, m_AE, m_ZR, m_AR;
|
|
|
|
double m_B, m_Theta, m_BKE;
|
|
|
|
|
|
|
|
std::string m_workspace;
|
|
|
|
std::string m_mapfile, m_shiftfile;
|
|
|
|
std::string m_cutList;
|
|
|
|
std::string m_scalerfile;
|
|
|
|
|
|
|
|
double m_SlowWindow;
|
|
|
|
double m_FastWindowIonCh;
|
|
|
|
double m_FastWindowSABRE;
|
|
|
|
|
|
|
|
RunCollector grabber;
|
|
|
|
|
|
|
|
TGProgressBar* m_pb;
|
|
|
|
|
2021-07-13 16:36:41 -04:00
|
|
|
};
|
|
|
|
|
2021-12-15 12:08:12 -05:00
|
|
|
}
|
2021-07-13 16:36:41 -04:00
|
|
|
#endif
|