/[PAMELA software]/quicklook/anticounter/src/AcQLOOK.cpp
ViewVC logotype

Diff of /quicklook/anticounter/src/AcQLOOK.cpp

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

revision 1.4 by pam-se, Tue Jul 11 12:01:17 2006 UTC revision 1.6 by mocchiut, Fri Jan 17 15:10:26 2014 UTC
# Line 2  Line 2 
2  #include <PscuHeader.h>  #include <PscuHeader.h>
3  #include <EventHeader.h>  #include <EventHeader.h>
4    
5    #include <TFile.h>
6  #include <fstream>  #include <fstream>
7  #include <vector>  #include <vector>
8    #include <iostream>
9  #include <TCanvas.h>  #include <TCanvas.h>
10  #include <TLatex.h>  #include <TLatex.h>
11  #include <TLegend.h>  #include <TLegend.h>
# Line 15  Line 16 
16  #include <TGraph.h>  #include <TGraph.h>
17  #include <TH1.h>  #include <TH1.h>
18  #include <time.h>  #include <time.h>
19    #include <sys/stat.h>
20  #include <utils/yodaUtility.h>  #include <cstdlib>
21    //#include <utils/yodaUtility.h>
22    
23  #define DEBUG 0  #define DEBUG 0
24  #define VERSION 1.5  #define VERSION 1.5
# Line 39  int AcQLOOKbasic(TString base,int fromev Line 41  int AcQLOOKbasic(TString base,int fromev
41    
42    pamela::anticounter::AnticounterEvent *ace      = 0;    pamela::anticounter::AnticounterEvent *ace      = 0;
43    pamela::EventHeader                   *eh       = 0;    pamela::EventHeader                   *eh       = 0;
44    pamela::PscuHeader                    *ph       = 0;    //  pamela::PscuHeader                    *ph       = 0;
45    TFile                                 *rootFile = new TFile(base);    TFile                                 *rootFile = new TFile(base);
46    if (rootFile->IsZombie())    if (rootFile->IsZombie())
47      exit(-1);      exit(-1);
# Line 167  int AcQLOOKbasic(TString base,int fromev Line 169  int AcQLOOKbasic(TString base,int fromev
169     for (Int_t i = minevent; i < maxevent; i++){     for (Int_t i = minevent; i < maxevent; i++){
170            
171       tr->GetEntry(i);       tr->GetEntry(i);
172       ph = eh->GetPscuHeader();       //     ph = eh->GetPscuHeader();
173    
174      for(Int_t card=0;card<2;card++)      for(Int_t card=0;card<2;card++)
175        {        {
# Line 201  int AcQLOOKbasic(TString base,int fromev Line 203  int AcQLOOKbasic(TString base,int fromev
203    
204    /***************************************** PLOTTING *****************************************/    /***************************************** PLOTTING *****************************************/
205        
206    char *namn = "KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK";    const char *namn = "KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK";
207    int mposition = 80;    int mposition = 80;
208    int eposition = 80;    int eposition = 80;
209    char *figsave1 = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF";    const char *figsave1 = "FFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFFF";
210    char *mystring = "DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD";    const char *mystring = "DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD";
211        
212    TBox *b1,*b2,*b3,*b4,*b5;    TBox *b1,*b2,*b3,*b4,*b5;
213    gStyle->SetOptDate(0);    gStyle->SetOptDate(0);
# Line 422  int AcQLOOKpro(TString base,int fromeven Line 424  int AcQLOOKpro(TString base,int fromeven
424    
425    // MISC VARIABLES    // MISC VARIABLES
426    
427    Double_t obt;    //  UInt_t obt;
428    Int_t hitsCARD,hitsCAT,hitsCAS;    Int_t hitsCARD,hitsCAT,hitsCAS;
429    Int_t interval_cnt = 0;    Int_t interval_cnt = 0;
430    Int_t paramEvent = 0;    Int_t paramEvent = 0;
431    Int_t paramEvents;    Int_t paramEvents;
432    Int_t minevent,maxevent;    Int_t minevent,maxevent;
433    char *figsave = "                                                         ";    const char *figsave = "                                                         ";
434    UShort_t ACheader[2];    UShort_t ACheader[2];
435    ACheader[0]=0xAC11;    ACheader[0]=0xAC11;
436    ACheader[1]=0xAC22;    ACheader[1]=0xAC22;
# Line 609  int AcQLOOKpro(TString base,int fromeven Line 611  int AcQLOOKpro(TString base,int fromeven
611            
612      tr->GetEntry(i);      tr->GetEntry(i);
613      ph = eh->GetPscuHeader();      ph = eh->GetPscuHeader();
614      obt = ph->GetOrbitalTime();          //    obt = ph->GetOrbitalTime();    
615        
616      hitsCARD=hitsCAT=hitsCAS=0;      hitsCARD=hitsCAT=hitsCAS=0;
617            
# Line 981  int AcQLOOKpro(TString base,int fromeven Line 983  int AcQLOOKpro(TString base,int fromeven
983    t->SetTextColor(1);    t->SetTextColor(1);
984    t->SetTextAlign(12);    t->SetTextAlign(12);
985    t->SetTextSize(0.035);    t->SetTextSize(0.035);
986    char *namn = "                                         ";    const char *namn = "                                         ";
987        
988    namn="Singles Rate";    namn="Singles Rate";
989    t->DrawLatex(40.,95,namn);    t->DrawLatex(40.,95,namn);
# Line 1101  int AcQLOOKpro(TString base,int fromeven Line 1103  int AcQLOOKpro(TString base,int fromeven
1103    //char *namn6 = "KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK";    //char *namn6 = "KKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKKK";
1104    int mposition = 80;    int mposition = 80;
1105    int eposition = 80;    int eposition = 80;
1106    char *mystring = "DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD";    const char *mystring = "DDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDDD";
1107    TString *merr;    TString *merr;
1108    TBox *b1,*b2;    TBox *b1,*b2;
1109    
# Line 1269  int main(int argc, char* argv[]){ Line 1271  int main(int argc, char* argv[]){
1271          if (isdigit(*argv[i]) && (atoi(argv[i]) > 0)) {          if (isdigit(*argv[i]) && (atoi(argv[i]) > 0)) {
1272              to = atoi(argv[i]);              to = atoi(argv[i]);
1273          } else {          } else {
1274              cerr << "-to needs a integer value. \n";              //err << "-to needs a integer value. \n";
1275              cout << "Try '--help' for more information. \n";              cout << "Try '--help' for more information. \n";
1276              exit(1);              exit(1);
1277          }          }
# Line 1284  int main(int argc, char* argv[]){ Line 1286  int main(int argc, char* argv[]){
1286          if (isdigit(*argv[i]) && (atoi(argv[i]) > 0)) {          if (isdigit(*argv[i]) && (atoi(argv[i]) > 0)) {
1287              from = atoi(argv[i]);              from = atoi(argv[i]);
1288          } else {          } else {
1289              cerr << "-from needs a integer value. \n";              //cerr << "-from needs a integer value. \n";
1290              cout << "Try '--help' for more information. \n";              cout << "Try '--help' for more information. \n";
1291              exit(1);              exit(1);
1292          }          }

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

  ViewVC Help
Powered by ViewVC 1.1.23