1 |
// |
// |
2 |
// Check the calorimter calibrations - Emiliano Mocchiutti |
// Check the calorimter calibrations - Emiliano Mocchiutti |
3 |
// |
// |
4 |
// FCaloCHKCALIB.c version 1.01 (2006-03-02) |
// FCaloCHKCALIB.c version 1.03 (2006-03-20) |
5 |
// |
// |
6 |
// The only input needed is the path to the directory created by YODA for the data file you want to analyze. |
// The only input needed is the path to the directory created by YODA for the data file you want to analyze. |
7 |
// |
// |
8 |
// Changelog: |
// Changelog: |
9 |
// |
// |
10 |
|
// 1.02 - 1.03 (2006-03-20): Changed name of shared libraries (for example from FCaloQLOOK_cxx.so to libFCaloQLOOK.so). |
11 |
|
// |
12 |
|
// 1.01 - 1.02 (2006-03-13): Include files from YODA without "event" directory. |
13 |
|
// |
14 |
// 1.00 - 1.01 (2006-03-02): Works on YODA v6 output (single file), does not require anymore calocommon package. |
// 1.00 - 1.01 (2006-03-02): Works on YODA v6 output (single file), does not require anymore calocommon package. |
15 |
// |
// |
16 |
// 0.00 - 1.00 (2006-03-02): Clone of CaloCHKCALIB.c |
// 0.00 - 1.00 (2006-03-02): Clone of CaloCHKCALIB.c |
31 |
#include <TPad.h> |
#include <TPad.h> |
32 |
#include <TPaveLabel.h> |
#include <TPaveLabel.h> |
33 |
#include <TStyle.h> |
#include <TStyle.h> |
34 |
|
#include <TSystem.h> |
35 |
// |
// |
36 |
#include <event/CalibCalPedEvent.h> |
#include <CalibCalPedEvent.h> |
37 |
// |
// |
38 |
using namespace std; |
using namespace std; |
39 |
// |
// |
111 |
ifstream myfile; |
ifstream myfile; |
112 |
myfile.open(filename.Data()); |
myfile.open(filename.Data()); |
113 |
if ( !myfile ){ |
if ( !myfile ){ |
114 |
printf(" No such file, exiting...\n"); |
printf(" %s :no such file, exiting...\n\n",filename.Data()); |
115 |
return; |
return; |
116 |
}; |
}; |
117 |
myfile.close(); |
myfile.close(); |
118 |
// |
// |
119 |
TFile *File = new TFile(filename.Data()); |
TFile *File = new TFile(filename.Data()); |
120 |
// |
// |
121 |
TTree *tr = (TTree*)File->Get("CalibCalPed"); |
TTree *tr = (TTree*)File->Get("CalibCalPed"); |
122 |
|
if ( !tr ) { |
123 |
|
printf(" CalibCalPed : no such tree in %s \n",filename.Data()); |
124 |
|
printf(" Exiting, are you sure this is a LEVEL0 not corrupted file? \n\n"); |
125 |
|
return; |
126 |
|
}; |
127 |
pamela::CalibCalPedEvent *ce = 0; |
pamela::CalibCalPedEvent *ce = 0; |
128 |
// |
// |
129 |
UInt_t found; |
UInt_t found; |