BmnRoot 26.10.0-18-g4e3414f9
Software framework of the BM@N experiment
Loading...
Searching...
No Matches
BmnDataConvertToRoot.C
Go to the documentation of this file.
1#include "../../bmndata/BmnEnums.h"
2
3void BmnDataConvertToRoot(char* file = "/ceph/bmn/run/seans_55/4720-5186_BMN_Krypton/mpd_run_trigCode_4926.data")
4{
5 gROOT->LoadMacro("$VMCWORKDIR/macro/run/bmnloadlibs.C");
6 bmnloadlibs(); // load BmnRoot libraries
7
8 UInt_t period = 7, nEvents = 0;
9 BmnSetup stp = kBMNSETUP; // use kSRCSETUP for Short-Range Correlation program and kBMNSETUP otherwise
10 BmnRawDataDecoder* decoder = new BmnRawDataDecoder(file, nEvents, period);
11 decoder->SetBmnSetup(stp);
12 TString PeriodSetupExt = Form("%d%s.txt", period, ((stp == kBMNSETUP) ? "" : "_SRC"));
13 decoder->SetTrigMapping(TString("Trig_map_Run") + PeriodSetupExt);
14 decoder->SetTrigINLFile("TRIG_INL_076D-16A8.txt"); // INL only for TDC data
15 decoder->SetECALMapping("ECAL_map_period_7.txt");
16 decoder->SetECALCalibration("");
17 decoder->InitMaps();
18
19 decoder->ConvertRawToRoot();
20 cout << "RUN#" << decoder->GetRunId() << " contains " << decoder->GetNevents() << " events" << endl;
21 delete decoder;
22}
unsigned int UInt_t
#define gROOT
char * Form(const char *fmt,...)
BmnSetup
Define experimental setup.
Definition BmnEnums.h:165
@ kBMNSETUP
Definition BmnEnums.h:166
void SetBmnSetup(BmnSetup v)
UInt_t GetNevents() const
UInt_t GetRunId() const
void BmnDataConvertToRoot(char *file="/ceph/bmn/run/seans_55/4720-5186_BMN_Krypton/mpd_run_trigCode_4926.data")