/[PAMELA software]/quicklook/dataToXML/OrbitalRate.cpp
ViewVC logotype

Diff of /quicklook/dataToXML/OrbitalRate.cpp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.3 by kusanagi, Tue May 23 13:48:05 2006 UTC revision 1.4 by kusanagi, Wed May 31 07:11:04 2006 UTC
# Line 165  void Rate(TString base, TString outDirec Line 165  void Rate(TString base, TString outDirec
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) +
# Line 184  void Rate(TString base, TString outDirec Line 184  void Rate(TString base, TString outDirec
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);

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.23