1730 |
TYPE = 0; |
TYPE = 0; |
1731 |
TSYNC = 0; |
TSYNC = 0; |
1732 |
// |
// |
1733 |
Double_t minimum = 0.; |
// Double_t minimum = 0.; |
1734 |
Double_t maximum = 0.; |
// Double_t maximum = 0.; |
1735 |
Double_t minimum2 = 0.; |
//Double_t minimum2 = 0.; |
1736 |
Double_t maximum2 = 0.; |
Double_t maximum2 = 0.; |
1737 |
// |
// |
1738 |
// |
// |
1740 |
pamela::McmdRecord *mcrc = 0; |
pamela::McmdRecord *mcrc = 0; |
1741 |
TArrayC *mcmddata = 0; |
TArrayC *mcmddata = 0; |
1742 |
// |
// |
1743 |
minimum = numeric_limits<Double_t>::max(); |
// minimum = numeric_limits<Double_t>::max(); |
1744 |
maximum = numeric_limits<Double_t>::min(); |
// maximum = numeric_limits<Double_t>::min(); |
1745 |
minimum2 = numeric_limits<Double_t>::max(); |
// minimum2 = numeric_limits<Double_t>::max(); |
1746 |
maximum2 = numeric_limits<Double_t>::min(); |
maximum2 = numeric_limits<Double_t>::min(); |
1747 |
// |
// |
1748 |
T = (TTree*)file->Get("Mcmd"); |
T = (TTree*)file->Get("Mcmd"); |
2270 |
// |
// |
2271 |
// no runtrailers in the file! |
// no runtrailers in the file! |
2272 |
// |
// |
2273 |
if ( !rtev ){ |
if ( IsDebug() ) printf(" Start rtev %i rhev %i nrtev %i nrhev %i \n",rtev,rhev,nrtev,nrhev); |
2274 |
if ( !rhev ){ |
if ( !rtev || (chewbacca && !nrtev) ){ |
2275 |
|
if ( IsDebug() ) printf(" No runtrailers \n"); |
2276 |
|
if ( !rhev || (chewbacca && !nrhev) ){ |
2277 |
if ( IsDebug() ) printf(" No runheaders nor runtrailers!! \n"); |
if ( IsDebug() ) printf(" No runheaders nor runtrailers!! \n"); |
2278 |
if ( !(upperentry-chminentry) ){ |
if ( !(upperentry-chminentry) ){ |
2279 |
if ( IsDebug() ) printf(" No physics events nor runs in the file \n"); // di nuovo potrebbe esserci un runtrailer senza eventi (riempimento MM) |
if ( IsDebug() ) printf(" No physics events nor runs in the file \n"); // di nuovo potrebbe esserci un runtrailer senza eventi (riempimento MM) |
2310 |
// |
// |
2311 |
} else { |
} else { |
2312 |
// |
// |
2313 |
|
if ( IsDebug() ) printf(" We have runtrailers \n"); |
2314 |
Int_t conptt = -1; |
Int_t conptt = -1; |
2315 |
for (Int_t ptt=0; ptt<rtev; ptt++){ |
for (Int_t ptt=0; ptt<rtev; ptt++){ |
2316 |
// |
// |
3598 |
// |
// |
3599 |
EventCounter *code=0; |
EventCounter *code=0; |
3600 |
// |
// |
3601 |
UInt_t nevent = 0; |
// UInt_t nevent = 0; |
3602 |
UInt_t checkfirst = 0; |
UInt_t checkfirst = 0; |
3603 |
UInt_t checklast = 0; |
UInt_t checklast = 0; |
3604 |
UInt_t firstentry = 0; |
UInt_t firstentry = 0; |
3620 |
EventHeader *eh = 0; |
EventHeader *eh = 0; |
3621 |
PscuHeader *ph = 0; |
PscuHeader *ph = 0; |
3622 |
T->SetBranchAddress("Header", &eh); |
T->SetBranchAddress("Header", &eh); |
3623 |
nevent = T->GetEntries(); |
// nevent = T->GetEntries(); |
3624 |
// |
// |
3625 |
// |
// |
3626 |
if ( firstev == lastev+1 || lastev == firstev ) { // no events inside the run! |
if ( firstev == lastev+1 || lastev == firstev ) { // no events inside the run! |
4141 |
EventCounter *code=0; |
EventCounter *code=0; |
4142 |
UInt_t firstev = 0; |
UInt_t firstev = 0; |
4143 |
UInt_t lastev = 0; |
UInt_t lastev = 0; |
4144 |
UInt_t nevent = 0; |
// UInt_t nevent = 0; |
4145 |
UInt_t checkfirst = 0; |
UInt_t checkfirst = 0; |
4146 |
UInt_t checklast = 0; |
UInt_t checklast = 0; |
4147 |
UInt_t firstentry = 0; |
UInt_t firstentry = 0; |
4166 |
EventHeader *eh = 0; |
EventHeader *eh = 0; |
4167 |
PscuHeader *ph = 0; |
PscuHeader *ph = 0; |
4168 |
T->SetBranchAddress("Header", &eh); |
T->SetBranchAddress("Header", &eh); |
4169 |
nevent = T->GetEntries(); |
// nevent = T->GetEntries(); |
4170 |
// |
// |
4171 |
codt = eht->GetCounter(); |
codt = eht->GetCounter(); |
4172 |
codh = ehh->GetCounter(); |
codh = ehh->GetCounter(); |
5527 |
TString path = ""; |
TString path = ""; |
5528 |
TString name = ""; |
TString name = ""; |
5529 |
TString raw = ""; |
TString raw = ""; |
5530 |
UInt_t obt0 = 0; |
// UInt_t obt0 = 0; |
5531 |
UInt_t timesync = 0; |
// UInt_t timesync = 0; |
5532 |
UInt_t boot_number = 0; |
// UInt_t boot_number = 0; |
5533 |
bool FOUND = false; |
bool FOUND = false; |
5534 |
|
|
5535 |
if ( IsDebug() ) cout << "------------------------------------------------------------" <<endl; |
if ( IsDebug() ) cout << "------------------------------------------------------------" <<endl; |
5602 |
path = (TString)row2->GetField(0); |
path = (TString)row2->GetField(0); |
5603 |
name = (TString)row2->GetField(1); |
name = (TString)row2->GetField(1); |
5604 |
raw = (TString)row2->GetField(5); |
raw = (TString)row2->GetField(5); |
5605 |
obt0 = (UInt_t)atoll(row2->GetField(2)); |
// obt0 = (UInt_t)atoll(row2->GetField(2)); |
5606 |
timesync = (UInt_t)atoll(row2->GetField(3)); |
// timesync = (UInt_t)atoll(row2->GetField(3)); |
5607 |
boot_number = (UInt_t)atoll(row2->GetField(4)); |
// boot_number = (UInt_t)atoll(row2->GetField(4)); |
5608 |
|
|
5609 |
if ( IsDebug() ) cout << "- - - - - - - - - - -" <<endl; |
if ( IsDebug() ) cout << "- - - - - - - - - - -" <<endl; |
5610 |
// cout << path <<endl; |
// cout << path <<endl; |
6123 |
memset(myid,0,500*sizeof(UInt_t)); |
memset(myid,0,500*sizeof(UInt_t)); |
6124 |
// |
// |
6125 |
oss.str(""); |
oss.str(""); |
6126 |
oss << "SELECT ID,RUNTRAILER_TIME,RUNTRAILER_PKT,BOOT_NUMBER FROM GL_RUN_FRAGMENTS WHERE INSERT_TIME <= '" << clean_time->AsSQLString() << "'order BY RUNHEADER_TIME asc;"; |
oss << "SELECT ID,RUNTRAILER_TIME,RUNTRAILER_PKT,BOOT_NUMBER FROM GL_RUN_FRAGMENTS WHERE INSERT_TIME <= '" << clean_time->AsSQLString() << "' order BY RUNHEADER_TIME asc;"; |
6127 |
if ( IsDebug() ) printf(" Select from GL_RUN_FRAGMENTS runs older than %s : query is \n %s \n",clean_time->AsSQLString(),oss.str().c_str()); |
if ( IsDebug() ) printf(" Select from GL_RUN_FRAGMENTS runs older than %s : query is \n %s \n",clean_time->AsSQLString(),oss.str().c_str()); |
6128 |
nresult = conn->Query(oss.str().c_str()); |
nresult = conn->Query(oss.str().c_str()); |
6129 |
// |
// |