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

Diff of /quicklook/dataToXML/ArrDumpToXML.cpp

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

revision 1.1 by kusanagi, Tue Apr 25 09:00:20 2006 UTC revision 1.2 by kusanagi, Wed Jun 14 07:25:24 2006 UTC
# Line 20  Line 20 
20  #include <arrDump/ArrDumpEvent.h>  #include <arrDump/ArrDumpEvent.h>
21  #include <PscuHeader.h>  #include <PscuHeader.h>
22  #include <EventHeader.h>  #include <EventHeader.h>
23    #include <yodaUtility.h>
24  #include <fstream>  #include <fstream>
25    
26  #include <TFile.h>  #include <TFile.h>
# Line 64  void ArrDumpToXML(TString base, TString Line 65  void ArrDumpToXML(TString base, TString
65    
66      TTree *tr = (TTree*)rootFile->Get("ArrDump");      TTree *tr = (TTree*)rootFile->Get("ArrDump");
67      Long64_t nevents    = tr->GetEntries();      Long64_t nevents    = tr->GetEntries();
68        UInt_t k_data    = 0;
69      tr->SetBranchAddress("ArrDump", &ade);      tr->SetBranchAddress("ArrDump", &ade);
70      tr->SetBranchAddress("Header", &eh);      tr->SetBranchAddress("Header", &eh);
71      outputFile << "<?xml version='1.0' encoding='ISO-8859-1'?>\n";      outputFile << "<?xml version='1.0' encoding='ISO-8859-1'?>\n";
# Line 85  void ArrDumpToXML(TString base, TString Line 87  void ArrDumpToXML(TString base, TString
87          outputFile << "\t\t\t<ARR_ID>"         << (short)adr->Arr_ID       << "</ARR_ID>\n";          outputFile << "\t\t\t<ARR_ID>"         << (short)adr->Arr_ID       << "</ARR_ID>\n";
88          TArrayI *Data = (TArrayI*)adr->Data;          TArrayI *Data = (TArrayI*)adr->Data;
89            for (int k  = 0; k < adr->Arr_len; k++){            for (int k  = 0; k < adr->Arr_len; k++){
90              outputFile << "\t\t\t<ARR_VALUE>"      << (unsigned int)Data->At(k)    << "</ARR_VALUE>\n";              k_data = (UInt_t)Data->At(k);
91                Utility::endian_swap(k_data);
92                outputFile << "\t\t\t<ARR_VALUE>"      << k_data  << "</ARR_VALUE>\n";
93            }            }
94          outputFile << "\t\t</ARRDUMP_RECORD>\n";          outputFile << "\t\t</ARRDUMP_RECORD>\n";
95        }        }

Legend:
Removed from v.1.1  
changed lines
  Added in v.1.2

  ViewVC Help
Powered by ViewVC 1.1.23