165 |
nevents = tr->GetEntries(); |
nevents = tr->GetEntries(); |
166 |
|
|
167 |
bool timeFound = FALSE; |
bool timeFound = FALSE; |
168 |
while ((i < nevents) | !timeFound){ |
while (i < nevents) { |
169 |
tr->GetEntry(i); |
tr->GetEntry(i); |
170 |
recEntries = mcmdev->Records->GetEntries(); |
recEntries = mcmdev->Records->GetEntries(); |
171 |
while ((j < recEntries) | !timeFound){ |
while (j < recEntries){ |
172 |
mcmdrc = (pamela::McmdRecord*)mcmdev->Records->At(j); |
mcmdrc = (pamela::McmdRecord*)mcmdev->Records->At(j); |
173 |
if (mcmdrc->ID1 == 0xE0){ |
if (not (mcmdrc == NULL) && mcmdrc->ID1 == 0xE0){ |
174 |
mcmddata = mcmdrc->McmdData; |
mcmddata = mcmdrc->McmdData; |
175 |
timesync = (((ULong64_t)mcmddata->At(0)<<24)&0xFF000000) + |
timesync = (((ULong64_t)mcmddata->At(0)<<24)&0xFF000000) + |
176 |
(((ULong64_t)mcmddata->At(1)<<16)&0x00FF0000) + |
(((ULong64_t)mcmddata->At(1)<<16)&0x00FF0000) + |
184 |
i++; |
i++; |
185 |
} |
} |
186 |
|
|
187 |
|
if (!timeFound) { |
188 |
|
printf("No timesync info have been found in the file %s", base.Data()); |
189 |
|
exit(0); |
190 |
|
} |
191 |
tr = (TTree*)rootFile->Get("Physics"); |
tr = (TTree*)rootFile->Get("Physics"); |
192 |
TBranch *headBr = tr->GetBranch("Header"); |
TBranch *headBr = tr->GetBranch("Header"); |
193 |
tr->SetBranchAddress("Header", &eh); |
tr->SetBranchAddress("Header", &eh); |