--- quicklook/dataToXML/OrbitalRate.cpp 2006/05/23 13:48:05 1.3 +++ quicklook/dataToXML/OrbitalRate.cpp 2006/05/31 07:11:04 1.4 @@ -165,12 +165,12 @@ nevents = tr->GetEntries(); bool timeFound = FALSE; - while ((i < nevents) | !timeFound){ + while (i < nevents) { tr->GetEntry(i); recEntries = mcmdev->Records->GetEntries(); - while ((j < recEntries) | !timeFound){ + while (j < recEntries){ mcmdrc = (pamela::McmdRecord*)mcmdev->Records->At(j); - if (mcmdrc->ID1 == 0xE0){ + if (not (mcmdrc == NULL) && mcmdrc->ID1 == 0xE0){ mcmddata = mcmdrc->McmdData; timesync = (((ULong64_t)mcmddata->At(0)<<24)&0xFF000000) + (((ULong64_t)mcmddata->At(1)<<16)&0x00FF0000) + @@ -184,6 +184,10 @@ i++; } + if (!timeFound) { + printf("No timesync info have been found in the file %s", base.Data()); + exit(0); + } tr = (TTree*)rootFile->Get("Physics"); TBranch *headBr = tr->GetBranch("Header"); tr->SetBranchAddress("Header", &eh);