New writer class for the skin detector

This commit is contained in:
Paolo Andreetto
2023-02-17 14:35:31 +01:00
parent fce2a39393
commit 043a44150c
5 changed files with 87 additions and 3 deletions

View File

@@ -0,0 +1,30 @@
#ifndef SkinDetectorWriter_h
#define SkinDetectorWriter_h
#include <string>
#include "TFile.h"
#include "TTree.h"
#include "TClonesArray.h"
using std::string;
class SkinDetectorWriter
{
public:
SkinDetectorWriter(string filename);
virtual ~SkinDetectorWriter();
void add(int detID, float p_x, float p_y, float p_z, float m_x, float m_y, float m_z);
void write();
void close();
private:
TFile* t_file;
TTree* t_tree;
TClonesArray* t_buffer;
};
#endif //SkinDetectorWriter_h