Medtech/include/MedtechAnalysis.hh

48 lines
971 B
C++

//
// MedtechAnalysis.hh
// medtech
//
// Created by Baranyai David on 2018. 04. 03..
//
#ifndef MedtechAnalysis_hh
#define MedtechAnalysis_hh
#include <stdio.h>
#include <iostream>
#include "G4Threading.hh"
#include "G4AutoLock.hh"
#include "TTree.h"
#include "TFile.h"
#include "Parameters.hh"
class MedtechAnalysis
{
private:
/* Here will be the instance stored. */
static MedtechAnalysis* instance;
/* Private constructor to prevent instancing. */
TTree *tree;
TTree *electrontree;
TFile *file;
G4Mutex MedtechAnalysisMutex;
/* Static access method. */
MedtechAnalysis();
double x, y, z, e;
public:
~MedtechAnalysis();
MedtechAnalysis(const MedtechAnalysis&) = delete;
MedtechAnalysis& operator=(const MedtechAnalysis&) = delete;
void Fill(int, double, double, double, double);
void Close();
static MedtechAnalysis* getInstance();
};
#endif /* MedtechAnalysis_hh */