Skip to content
Snippets Groups Projects
Commit 03f5a4ef authored by moukaddam's avatar moukaddam
Browse files

Clearing Pretreated Data in function Pretreat(); fixing a leak

parent 0e69f6a7
No related branches found
No related tags found
No related merge requests found
......@@ -52,6 +52,7 @@ ClassImp(TGeTAMUPhysics)
/////////////////////////////////////////////////
void TGeTAMUPhysics::BuildPhysicalEvent(){
PreTreat();
unsigned int c_size_e = m_PreTreatedData->GetMultiplicityCoreE();
unsigned int s_size_e = m_PreTreatedData->GetMultiplicitySegmentE();
unsigned int c_size_t = m_PreTreatedData->GetMultiplicityCoreT();
......@@ -107,6 +108,9 @@ for (unsigned i = 0 ; i < m_PreTreatedData->GetMultiplicityCoreT(); i++)
/////////////////////////////////////////////////
void TGeTAMUPhysics::PreTreat(){
ClearPreTreatedData();
static CalibrationManager* cal = CalibrationManager::getInstance();
static string name;
unsigned int mysizeE = m_EventData->GetMultiplicityCoreE();
......@@ -304,6 +308,7 @@ void TGeTAMUPhysics::InitializeRootOutput() {
TTree* outputTree = RootOutput::getInstance()->GetTree();
outputTree->Branch( "GeTAMU" , "TGeTAMUPhysics" , &m_EventPhysics );
}
///////////////////////////////////////////////////////////////////////////
void TGeTAMUPhysics::Clear() {
AddBack_E.clear();
......@@ -318,11 +323,7 @@ void TGeTAMUPhysics::Clear() {
AddBack_T.clear();
GeTime.clear();
}
///////////////////////////////////////////////////////////////////////////
void TGeTAMUPhysics::ClearEventData() {
m_EventData->Clear();
m_PreTreatedData->Clear();
}
///////////////////////////////////////////////////////////////////////////
void TGeTAMUPhysics::AddParameterToCalibrationManager(){
CalibrationManager* Cal = CalibrationManager::getInstance();
......
......@@ -72,11 +72,13 @@ class TGeTAMUPhysics : public TObject, public NPL::VDetector{
void BuildSimplePhysicalEvent(){BuildPhysicalEvent();} ;
// Clear the Event Physics
void ClearEventPhysics() {Clear();}
void ClearEventData() ;
void ClearEventPhysics() {Clear();}
void ClearEventData() {m_EventData->Clear();}
public:
void PreTreat();
// clear the pre-treated object
void ClearPreTreatedData() {m_PreTreatedData->Clear();}
private: // Root Input and Output tree classes
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment