/[PAMELA software]/DarthVader/ToFLevel2/src/ToFCore.cpp
ViewVC logotype

Diff of /DarthVader/ToFLevel2/src/ToFCore.cpp

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

revision 1.13 by pam-fi, Tue Jan 16 10:12:31 2007 UTC revision 1.14 by mocchiut, Mon Jan 22 10:45:24 2007 UTC
# Line 103  int ToFCore(UInt_t run, TFile *file, TSQ Line 103  int ToFCore(UInt_t run, TFile *file, TSQ
103    TTree *tracker = 0;    TTree *tracker = 0;
104    TTree *toft = 0;    TTree *toft = 0;
105    UInt_t nevents = 0;    UInt_t nevents = 0;
   Long64_t maxsize = 10000000000LL;    
   TTree::SetMaxTreeSize(maxsize);  
   //  
106    //    //
107    // variables needed to reprocess data    // variables needed to reprocess data
108    //    //
# Line 288  int ToFCore(UInt_t run, TFile *file, TSQ Line 285  int ToFCore(UInt_t run, TFile *file, TSQ
285      //      //
286      // tree exists, we are reprocessing data. Are we reprocessing a single run or all the file?      // tree exists, we are reprocessing data. Are we reprocessing a single run or all the file?
287      //      //
     toftclone->SetAutoSave(900000000000000LL);  
288      reproc = true;      reproc = true;
289      //      //
290      // update versioning information      // update versioning information
# Line 333  int ToFCore(UInt_t run, TFile *file, TSQ Line 329  int ToFCore(UInt_t run, TFile *file, TSQ
329    //    //
330    file->cd();    file->cd();
331    toft = new TTree("ToF-new","PAMELA Level2 ToF data");    toft = new TTree("ToF-new","PAMELA Level2 ToF data");
   toft->SetAutoSave(900000000000000LL);  
   tof->Set();//ELENA **TEMPORANEO?**  
332    toft->Branch("ToFLevel2","ToFLevel2",&tof);    toft->Branch("ToFLevel2","ToFLevel2",&tof);
333    //    //
334    if ( reproc && !reprocall ){    if ( reproc && !reprocall ){
# Line 343  int ToFCore(UInt_t run, TFile *file, TSQ Line 337  int ToFCore(UInt_t run, TFile *file, TSQ
337      //      //
338      tempfile = new TFile(tempname.str().c_str(),"READ");      tempfile = new TFile(tempname.str().c_str(),"READ");
339      toftclone = (TTree*)tempfile->Get("ToF-old");      toftclone = (TTree*)tempfile->Get("ToF-old");
     toftclone->SetAutoSave(900000000000000LL);  
340      toftclone->SetBranchAddress("ToFLevel2",&tofclone);      toftclone->SetBranchAddress("ToFLevel2",&tofclone);
341      //            //      
342      if ( nobefrun > 0 ){      if ( nobefrun > 0 ){
# Line 540  int ToFCore(UInt_t run, TFile *file, TSQ Line 533  int ToFCore(UInt_t run, TFile *file, TSQ
533        tof->Clear();        tof->Clear();
534        Int_t pmt_id = 0;        Int_t pmt_id = 0;
535        ToFPMT *t_pmt = new ToFPMT();        ToFPMT *t_pmt = new ToFPMT();
       if(!(tof->PMT))tof->PMT = new TClonesArray("ToFPMT",12); //ELENA  
536        TClonesArray &tpmt = *tof->PMT;        TClonesArray &tpmt = *tof->PMT;
537        ToFTrkVar *t_tof = new ToFTrkVar();        ToFTrkVar *t_tof = new ToFTrkVar();
       if(!(tof->ToFTrk))tof->ToFTrk = new TClonesArray("ToFTrkVar",2); //ELENA  
538        TClonesArray &t = *tof->ToFTrk;        TClonesArray &t = *tof->ToFTrk;
539        //        //
540        // paranoid check        // paranoid check
# Line 618  int ToFCore(UInt_t run, TFile *file, TSQ Line 609  int ToFCore(UInt_t run, TFile *file, TSQ
609            if ( tofoutput_.tofmask[hh][kk] != 0 ){            if ( tofoutput_.tofmask[hh][kk] != 0 ){
610              pmt_id = tof->GetPMTid(kk,hh);              pmt_id = tof->GetPMTid(kk,hh);
611              t_tof->pmttdc.AddAt(pmt_id,t_tof->npmttdc);              t_tof->pmttdc.AddAt(pmt_id,t_tof->npmttdc);
612                t_tof->tdcflag.AddAt(tofoutput_.tdcflagtof[hh][kk],t_tof->npmttdc); // gf: Jan 09/07
613              t_tof->npmttdc++;              t_tof->npmttdc++;
614            };            };
615          };          };
# Line 633  int ToFCore(UInt_t run, TFile *file, TSQ Line 625  int ToFCore(UInt_t run, TFile *file, TSQ
625              t_tof->dedx.AddAt(tofoutput_.adctof_c[hh][kk],t_tof->npmtadc);              t_tof->dedx.AddAt(tofoutput_.adctof_c[hh][kk],t_tof->npmtadc);
626              pmt_id = tof->GetPMTid(kk,hh);              pmt_id = tof->GetPMTid(kk,hh);
627              t_tof->pmtadc.AddAt(pmt_id,t_tof->npmtadc);              t_tof->pmtadc.AddAt(pmt_id,t_tof->npmtadc);
628                t_tof->adcflag.AddAt(tofoutput_.adcflagtof[hh][kk],t_tof->npmtadc); // gf: Jan 09/07
629              t_tof->npmtadc++;              t_tof->npmtadc++;
630            };            };
631          };          };
# Line 695  int ToFCore(UInt_t run, TFile *file, TSQ Line 688  int ToFCore(UInt_t run, TFile *file, TSQ
688                if ( tofoutput_.tofmask[hh][kk] != 0 ){                if ( tofoutput_.tofmask[hh][kk] != 0 ){
689                  pmt_id = tof->GetPMTid(kk,hh);                  pmt_id = tof->GetPMTid(kk,hh);
690                  t_tof->pmttdc.AddAt(pmt_id,t_tof->npmttdc);                  t_tof->pmttdc.AddAt(pmt_id,t_tof->npmttdc);
691                    t_tof->tdcflag.AddAt(tofoutput_.tdcflag[hh][kk],t_tof->npmttdc); // gf: Jan 09/07
692                  t_tof->npmttdc++;                  t_tof->npmttdc++;
693                };                };
694              };              };
# Line 710  int ToFCore(UInt_t run, TFile *file, TSQ Line 704  int ToFCore(UInt_t run, TFile *file, TSQ
704                  t_tof->dedx.AddAt(tofoutput_.adc_c[hh][kk],t_tof->npmtadc);                  t_tof->dedx.AddAt(tofoutput_.adc_c[hh][kk],t_tof->npmtadc);
705                  pmt_id = tof->GetPMTid(kk,hh);                  pmt_id = tof->GetPMTid(kk,hh);
706                  t_tof->pmtadc.AddAt(pmt_id,t_tof->npmtadc);                  t_tof->pmtadc.AddAt(pmt_id,t_tof->npmtadc);
707                    t_tof->adcflag.AddAt(tofoutput_.adcflag[hh][kk],t_tof->npmtadc); // gf: Jan 09/07
708                  t_tof->npmtadc++;                  t_tof->npmtadc++;
709                };                };
710              };              };

Legend:
Removed from v.1.13  
changed lines
  Added in v.1.14

  ViewVC Help
Powered by ViewVC 1.1.23