-
Notifications
You must be signed in to change notification settings - Fork 0
/
GenerateReadouts.C
37 lines (26 loc) · 1.22 KB
/
GenerateReadouts.C
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
#include <TFile.h>
#include <TRestDetectorReadout.h>
#include <iostream>
using namespace std;
Int_t GenerateReadouts(const char* outFilename) {
cout << "Starting 'GenerateReadouts' macro" << endl;
TFile file(outFilename, "RECREATE");
cout << "Readouts will be saved to TFile: " << file.GetName() << endl;
// If TRestDetectorReadout name is not given, the first definition will be taken
cout << "Creating first TRestDetectorReadout" << endl;
TRestDetectorReadout pixelReadout("pixelReadout.rml");
pixelReadout.Write("pixel");
// We need to provide the name because it is not the first definition
cout << "Creating second TRestDetectorReadout" << endl;
TRestDetectorReadout pixelReadoutDecoding("pixelReadout.rml", "pixelDecoding");
pixelReadoutDecoding.Write("pixelDecoding");
cout << "Creating third TRestDetectorReadout" << endl;
TRestDetectorReadout strippedReadout("strippedReadout.rml");
strippedReadout.Write("stripped");
cout << "Creating fourth TRestDetectorReadout" << endl;
TRestDetectorReadout readoutMicrobulk("microbulk.rml");
readoutMicrobulk.Write("microbulk");
cout << "Closing TFile: " << file.GetName() << endl;
file.Close();
return 0;
}