add info in event builder

This commit is contained in:
splitPoleDAQ 2024-02-19 11:53:29 -05:00
parent 9c7dc1309a
commit 4ab5e35f66
3 changed files with 15 additions and 1 deletions

View File

@ -7,6 +7,7 @@
#include "TGraph.h"
#include "TFile.h"
#include "TTree.h"
#include "TMacro.h"
#include "CustomStruct.h"
@ -19,7 +20,7 @@ int main(int argc, char **argv) {
printf("=========================================\n");
printf("=== *.fsu Events Builder ===\n");
printf("=========================================\n");
if (argc <= 3) {
if (argc <= 6) {
printf("Incorrect number of arguments:\n");
printf("%s [timeWindow] [withTrace] [verbose] [tempFolder] [inFile1] [inFile2] .... \n", argv[0]);
printf(" timeWindow : in ns \n");
@ -416,6 +417,11 @@ int main(int argc, char **argv) {
printf(" total data duration = %.2f sec = %.2f min\n", tDuration_sec, tDuration_sec/60.);
printf("=======> saved to %s \n", outFileName.Data());
TMacro info;
info.AddLine(Form("tStart= %20llu ns",tStart));
info.AddLine(Form(" tEnd= %20llu ns",tEnd));
info.Write("info");
outRootFile->Close();
for( int i = 0; i < nGroup; i++){

View File

@ -7,6 +7,7 @@
#include "TGraph.h"
#include "TFile.h"
#include "TTree.h"
#include "TMacro.h"
#define MAX_MULTI 1000
@ -304,6 +305,11 @@ int main(int argc, char **argv) {
printf(" total data duration = %.2f sec = %.2f min\n", tDuration_sec, tDuration_sec/60.);
printf("=======> saved to %s \n", outFileName.Data());
TMacro info;
info.AddLine(Form("tStart= %20llu ns",tStart));
info.AddLine(Form(" tEnd= %20llu ns",tEnd));
info.Write("info");
outRootFile->Close();
for( int i = 0 ; i < nFile; i++) delete reader[i];

2
Hit.h
View File

@ -1,6 +1,8 @@
#ifndef Hit_H
#define Hit_H
#include <vector>
class Hit{
public:
unsigned short sn;