/[PAMELA software]/PamelaDigitizer/Pamelagp2Digits.cxx
ViewVC logotype

Diff of /PamelaDigitizer/Pamelagp2Digits.cxx

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

revision 1.10 by pamelats, Fri Jun 6 15:16:08 2008 UTC revision 1.11 by pamelats, Wed Oct 15 14:03:22 2008 UTC
# Line 63  Line 63 
63  //  //
64  /////////////////////////////////////////////////////////////////////////  /////////////////////////////////////////////////////////////////////////
65    
 #include <stdlib.h>  
 #include <string.h>  
 #include <ctype.h>  
 #include "Riostream.h"  
 #include "TFile.h"  
 #include "TDirectory.h"  
 #include "TTree.h"  
 #include "TLeafI.h"  
 #include "TH1.h"  
 #include "TH2.h"  
 #include "TProfile.h"  
 #include "TGraph.h"  
 #include "TMath.h"  
66  #include "Digitizer.h"  #include "Digitizer.h"
67    
68  using namespace std;  using namespace std;
# Line 532  void convert_directory(const char *dir, Line 519  void convert_directory(const char *dir,
519    }    }
520    h1->SetEntries(nentries);    h1->SetEntries(nentries);
521    h1->Write();    h1->Write();
522    delete h1;    //  delete h1;
523      h1->Delete();
524  }  }
525  //____________________________________________________________________________  //____________________________________________________________________________
526    void convert_cwn(Int_t id,char* file_raw)    void convert_cwn(Int_t id,char* file_raw)
# Line 845  void convert_directory(const char *dir, Line 833  void convert_directory(const char *dir,
833    
834    ifstream np("vectpar.dat",ios::in);    ifstream np("vectpar.dat",ios::in);
835    if(!np)printf("ATTENTION: Using default vector legths!\n");    if(!np)printf("ATTENTION: Using default vector legths!\n");
836    while(!np.eof()){    else{
837      np>>q>>tmp;      while(!np.eof()){
838      if(np.eof())break;        np>>q>>tmp;
839      if(tmp<=0){        if(np.eof())break;
840        cout<<"ATTENTION: Length of one vector is negative or equal 0!"<<endl<<q<<"="<<tmp<<endl;        if(tmp<=0){
841        break;          cout<<"ATTENTION: Length of one vector is negative or equal 0!"<<endl<<q<<"="<<tmp<<endl;
842      }          break;
843      t=0;        }
844      while(tmp){        t=0;
845        q1=ndl[t];        while(tmp){
846        if(q[0]==q1[0] && q[1]==q1[1] && q[2]==q1[2] && q[3]==q1[3]){          q1=ndl[t];
847          par[t]=tmp;          if(q[0]==q1[0] && q[1]==q1[1] && q[2]==q1[2] && q[3]==q1[3]){
848          tmp=0;            par[t]=tmp;
849          cout<<q<<" "<<par[t]<<"["<<t<<"]"<<endl;            tmp=0;
850              cout<<q<<" "<<par[t]<<"["<<t<<"]"<<endl;
851            }
852            t++;
853        }        }
       t++;  
854      }      }
855        nspe=par[0];
856        ntof=par[1];
857        ncat=par[2];
858        ncas=par[3];
859        ncar=par[4];
860        ncal=par[5];
861        nnd=par[6];
862        nstr=par[7];
863    }    }
   nspe=par[0];  
   ntof=par[1];  
   ncat=par[2];  
   ncas=par[3];  
   ncar=par[4];  
   ncal=par[5];  
   nnd=par[6];  
   nstr=par[7];  
   
864    Digitizer* dig = new Digitizer(tree,file_raw,nspe,ntof,ncat,ncas,ncar,ncal,nnd,nstr);    Digitizer* dig = new Digitizer(tree,file_raw,nspe,ntof,ncat,ncas,ncar,ncal,nnd,nstr);
865    dig->Loop();    dig->Loop();
866    dig->Close();    dig->Close();
867    
868    cout << "Finished" << endl << flush;    cout << "Finished" << endl;
869    
870  }  }
871    

Legend:
Removed from v.1.10  
changed lines
  Added in v.1.11

  ViewVC Help
Powered by ViewVC 1.1.23