Skip to content
Snippets Groups Projects
Commit 6bb0ce2c authored by Hugo Jacob's avatar Hugo Jacob
Browse files

Updating Exogam Physics Classes

parent 43c8dc43
No related branches found
No related tags found
1 merge request!27Draft: [Epic] Preparation of the environement for the new GaseousDetectorScorers...
Pipeline #340296 passed
......@@ -32,7 +32,7 @@ class TExogamCalData : public TObject {
public:
TExogamCalData();
virtual ~TExogamCalData();
~TExogamCalData();
void Clear();
void Clear(const Option_t*){};
......
......@@ -31,7 +31,7 @@ class TExogamData : public TObject {
public:
TExogamData();
virtual ~TExogamData();
~TExogamData();
void Clear();
void Clear(const Option_t*){};
......
......@@ -40,8 +40,13 @@ using namespace EXOGAM_LOCAL;
///////////////////////////////////////////////////////////////////////////
ClassImp(TExogamPhysics)
///////////////////////////////////////////////////////////////////////////
TExogamPhysics::TExogamPhysics() {
m_Spectra = NULL;
TExogamPhysics::TExogamPhysics()
: m_PreTreatedData(new TExogamCalData),
m_EventData(new TExogamData),
TSEvent(new TimeStamp),
m_EventPhysics(this)
{
// m_Spectra = NULL;
m_EXO_E_RAW_Threshold = 0;
m_EXO_E_Threshold = 0;
m_EXO_EHG_RAW_Threshold = 0;
......@@ -50,12 +55,14 @@ ClassImp(TExogamPhysics)
m_ExoTDC_LowThreshold = 0;
m_EXO_OuterUp_RAW_Threshold = 1e5;
m_PreTreatedData = new TExogamCalData;
m_EventData = new TExogamData;
TSEvent = new TimeStamp;
m_EventPhysics = this;
DataIsCal = false;
}
TExogamPhysics::~TExogamPhysics() {
delete m_PreTreatedData;
delete m_EventData;
// delete TSEvent;
}
///////////////////////////////////////////////////////////////////////////
void TExogamPhysics::BuildSimplePhysicalEvent() { BuildPhysicalEvent(); }
......
......@@ -57,9 +57,46 @@ class TExogamSpectra;
class TExogamPhysics : public TObject, public NPL::VDetector, public TExogamPhysicsReader{
public:
TExogamPhysics() ;
~TExogamPhysics() {};
~TExogamPhysics();
TExogamPhysics& operator=(const TExogamPhysics& other) {
if (this == &other)
return *this;
//FIXME For a very weird reason, when using a treereader to read TExogamPhysics
// deleting TSevent causes a memory leak crash
// I couldnt find why, when I'm commenting it it works ok, but it makes no sense
delete m_PreTreatedData;
delete m_EventData;
// delete TSEvent;
E = other.E;
EHG = other.EHG;
Outer1 = other.Outer1;
Outer2 = other.Outer2;
Outer3 = other.Outer3;
Outer4 = other.Outer4;
Flange = other.Flange;
Crystal = other.Crystal;
TDC = other.TDC;
TS = other.TS;
E_AB = other.E_AB;
Size_AB = other.Size_AB;
Flange_AB = other.Flange_AB;
Crystal_AB = other.Crystal_AB;
TDC_AB = other.TDC_AB;
TS_AB = other.TS_AB;
Outer_AB = other.Outer_AB;
Theta = other.Theta;
Phi = other.Phi;
m_PreTreatedData = new TExogamCalData(*other.m_PreTreatedData);
m_EventData = new TExogamData(*other.m_EventData);
m_EventPhysics = this;
return *this;
}
public:
void Clear() ;
void Clear(const Option_t*) {};
......
......@@ -38,6 +38,7 @@ using namespace NPL;
#include "TLorentzVector.h"
#include "TRandom.h"
#include "TVector3.h"
#include <iostream>
using namespace std;
......@@ -47,7 +48,7 @@ namespace NPL {
public:
TimeStamp();
~TimeStamp(){};
~TimeStamp(){cout << "test dest TS" << endl;};
public: // Various Method
void ReadConfigurationFile();
......@@ -76,7 +77,7 @@ namespace NPL {
int fVerboseLevel;
ClassDef(TimeStamp, 0)
ClassDef(TimeStamp, 1)
};
} // namespace NPL
#endif
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment