/** * FTrkQLook_EXPERT * * autor: D.Fedele * version 3.0 * Parameters: * file - the data file to analyze * fromevent - first event to analyze * toevent - last event to analyze * outdir - total path of output file * outfile - extension of output file (pdf,ps,gif,jpg) * * */ // #include // #include #include #include #include #include #include // #include #include #include #include #include #include #include #include #include // #define MAXSTORAGE 50000 void stringcopy(TString& s1, const TString& s2, Int_t from=0, Int_t to=0){ if ( to == 0 ){ Int_t t2length = s2.Length(); s1 = ""; to = t2length; }; for (Int_t i = from; i0) base+="/"; TString out; if(outdir.Length()==0){ out = base; }else{ out = outdir; } // // inizialise the variables and open the file pamela::TsbTEvent *event = 0; pamela::TsbTRecord *record = 0; pamela::tracker::TrackerEvent *te=0; pamela::EventHeader *eh=0,*aleh=0,*eH=0,*eT=0; pamela::PscuHeader *ph=0,*pH=0; pamela::TrkAlarmEvent *al=0; pamela::RunHeaderEvent *reh=0; pamela::EventCounter *cod=0; pamela::PacketType *pctp=0; TFile *datafile = new TFile(file); if ( !datafile ){ printf("No data file, exiting...\n"); return; } TTree *tree = (TTree*)datafile->Get("TsbT"); tree->SetBranchAddress("TsbT",&event); tree->SetBranchAddress("Header",&eT); TTree *altr = (TTree*)datafile->Get("TrkAlarm"); altr->SetBranchAddress("TrkAlarm",&al); altr->SetBranchAddress("Header",&aleh); TTree *tr = (TTree*)datafile->Get("Physics"); tr->SetBranchAddress("Tracker",&te); tr->SetBranchAddress("Header",&eh); TTree *otr = (TTree*)datafile->Get("RunHeader"); otr->SetBranchAddress("Header",&eH); otr->SetBranchAddress("RunHeader",&reh); Long64_t nevent = tr->GetEntries(); Long64_t neventH = otr->GetEntries(); Long64_t tnevent = tree->GetEntries(); Long64_t alnevent = altr->GetEntries(); Int_t minevent=0; Int_t maxevent=0; printf("Number of total events: %lld\n",nevent); printf("Number of header events: %lld\n",neventH); printf("Number of TsbT events: %lld\n",tnevent); printf("Number of TrkAlarm packet events: %lld\n",alnevent); if (nevent<=0){ datafile->Close(); return; } if ( fromevent > toevent && toevent>0 ){ printf("It must be fromevent < toevent \n"); return; } if ( fromevent > nevent || fromevent < 0 ) { printf("You can choose fromevent between 0 (all) and %lld \n",nevent); return; } if ( toevent > nevent || toevent < 0 ) { printf("You can choose toevent between 0 (all) and %lld \n",nevent); return; } if ( fromevent == 0 ) { minevent = 0; maxevent = nevent; } else { minevent = fromevent; if ( toevent > 0 ){ maxevent = toevent+1; } else if (toevent > nevent) { maxevent = nevent; } else { maxevent = toevent+1; } nevent=maxevent-minevent ; } // // information about the RunHeader ULong64_t HOBT[neventH]; Int_t trk_cal_us[neventH]; for (Int_t vi=0; viGetEntry(ev); pH = eH->GetPscuHeader(); HOBT[ev]= pH->GetOrbitalTime(); trk_cal_us[ev]=reh->TRK_CALIB_USED; } // // other variables definitions stringstream oss1,oss2,oss3,oss4,fromfile,isfile,tit; Int_t ALARM=0; Int_t WARNING[12]; // // information about the entries for the temperatures Int_t tmpSize=0,siztmp=0,maxsize=0; for (Int_t ev=0; evGetEntry(ev); tmpSize = event->Records->GetEntries(); maxsize+=tmpSize; } const Int_t tsize=maxsize; Int_t tempt[tsize][5],xt[tsize], tempt_tmp[tsize]; Int_t countnboot=1; // // information about the temperatures for (Int_t ev=0; evGetEntry(ev); tmpSize = event->Records->GetEntries(); for (Int_t j = 0; j < tmpSize; j++){ record = (pamela::TsbTRecord*)event->Records->At(j); xt[siztmp]=record->RECORD_OBT; if((xt[siztmp]0) countnboot+=1; for (Int_t z = 0; z < 5; z++){ tempt[siztmp][z] = record->TEMPERATURES[z+1]; } siztmp++; } } countnboot+=2*(Int_t)nevent/MAXSTORAGE; // printf("\ncountnboot=%d\n",countnboot); // // open the output text files for the alarms TString fname1 = out+ffile; TString fname = out+ffile; int slen=fname.Length(); int last=fname.Last('_'); if(last<(slen-1))fname.Append('_'); fname.Append("FTrk-DSP-report.txt"); ofstream alarm(fname,ios::out); alarm << "TRACKER DSP REPORT - Downlink " << ffile<< endl; fname1.Append("_FTrkAlarm-pkt-report.txt"); ofstream alarm1(fname1,ios::out); alarm1 << "TrkAlarm pkt REPORT - Downlink " << ffile<< endl; // // write the file for the TrkAlarm packet if(alnevent==0) alarm1 < NO ALARM!!! <-------"<< endl; else{ Long64_t obt=0; for (Int_t ev=0; evGetEntry(ev); ph = aleh->GetPscuHeader(); if(ph->GetOrbitalTime()0) alarm1<GetOrbitalTime(); alarm1 << "================================================="<< endl; alarm1 << "PSCU-Pkt N. "<< ph->GetCounter() ; alarm1 << " - OBT "<< ph->GetOrbitalTime() << " ms"<ALARM[1]<ALARM[2]<CmdDuringTrig<FinalCheck<FlashData<FlashShutdown<FlashUpset<InterCheck<UnknownCmd<CmdIDMA<DSPSoft<TrigIDMA<DSPBusy<DSPMask<FlashOn<TrigMask<Aswr<BID[0]<BID[1]<BID[2]<BID[3]<BID[4]<BID[5]<BID[6]<CmdNum<PNum<< dec <SetLabelSize(0.05,"x"); gStyle->SetLabelSize(0.06,"y"); gStyle->SetStatFontSize(0.075); gStyle->SetOptStat(1110); gStyle->SetFillColor(10); gStyle->SetStatColor(10); gStyle->SetTitleFillColor(10); gStyle->SetTitleFontSize(0.1); gStyle->SetTitleOffset(0.8,"y"); gStyle->SetTitleOffset(0.9,"x"); gStyle->SetTitleSize(0.06,"y"); gStyle->SetTitleSize(0.055,"x"); // // Define output canvas, histos and graphs TCanvas *CompTimeCanv[countnboot],*EventNumCanv[countnboot],*TempCanv[countnboot]; TCanvas *IlluminaCanv,*LandauCanv1,*LandauCanv2,*LandauCanv3; TH1F *landau1[12],*landau2[12],*landau3[12],*illuminazione[12]; TGraph *comprtime[12][countnboot],*temp[5][countnboot],*eventnumb[countnboot]; TPad *pad1[12],*pad2[12],*pad3[12],*pad4[12],*pad5[12],*pad6[5]; for(Int_t n = 0; n<12; n++) { /* -----------> HISTOGRAMS */ tit<<"DSP "<SetFillColor(10); TempCanv[ii]->Range(0,0,100,100); t->SetTextFont(32); t->SetTextColor(1); t->SetTextAlign(12); t->SetTextSize(0.02); t->DrawLatex(2.,98.7,fromfile.str().c_str()); t1->SetTextFont(32); t1->SetTextColor(1); t1->SetTextAlign(12); t1->SetTextSize(0.02); t1->DrawLatex(78.,98.7,isfile.str().c_str()); isfile.str(""); Float_t tposy = 0.95; // up y-coord - top pads Float_t thpad = 0; // pad height Float_t tposx1=0; // left x-coord - pad column Float_t tposx0=0; // x-coord - column division Float_t twrel = 0; // relative x size of first sub-column Float_t tmarg = 0.004; // margin among pads thpad = (tposy-tmarg*5)/3; twrel = (1-tmarg*4)/2; for(Int_t i=0; i<5; i++){ if ( (i+1)%2==1 ) { if(i>1) tposy = tposy-(tmarg*2+thpad); tposx1 = tmarg; tposx0 = tposx1 + twrel; } else { tposx1 = tposx0 + 2*tmarg; tposx0 = tposx1 + twrel; } /* -----------> pad for histograms */ pad6[i] = new TPad("pad6"," ",tposx1,tposy-thpad,tposx0,tposy,18,0,0); Int_t v=0,xt_tmp[tsize]; for (Int_t ev=countTEMP; evcountTEMP){ if(i==4) countTEMP=ev; break; } else{ if(tempt[ev][i]!=65535){ tempt_tmp[v]=(Int_t)(((3.3*tempt[ev][i]/4096)-0.586)/0.0231); if(tempt_tmp[v]>0) xt_tmp[v++]=xt[ev]; } } } TempCanv[ii]->cd(); tit<<"T"<SetFillColor(10); pad6[i]->Draw(); pad6[i]->cd(); temp[i][ii]= new TGraph(v,xt_tmp,tempt_tmp); temp[i][ii]->SetTitle(tit.str().c_str()); temp[i][ii]->GetXaxis()->SetLabelSize(0.04); temp[i][ii]->GetXaxis()->SetTitleSize(0.04); temp[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); temp[i][ii]->GetXaxis()->CenterTitle(); temp[i][ii]->GetXaxis()->SetTitleOffset(0.85); temp[i][ii]->GetYaxis()->SetTitleOffset(1.2); temp[i][ii]->GetYaxis()->SetLabelOffset(0.001); temp[i][ii]->GetYaxis()->SetLabelSize(0.04); temp[i][ii]->GetYaxis()->SetTitleSize(0.04); temp[i][ii]->GetYaxis()->SetTitle("Temperatures ( ^{o}C)"); temp[i][ii]->GetYaxis()->CenterTitle(); temp[i][ii]->SetMarkerStyle(21); temp[i][ii]->SetMarkerSize(0.2); temp[i][ii]->Draw("ap"); tit.str(""); TempCanv[ii]->Update(); } if(countTEMP==tsize-1){ cntpgtemp=ii+1; break; } } // // Fill compressiontime and eventnumber graphs and DSP warnings for(Int_t ii=0; iiSetFillColor(10); CompTimeCanv[ii]->Range(0,0,100,100); t->SetTextFont(32); t->SetTextColor(1); t->SetTextAlign(12); t->SetTextSize(0.02); t->DrawLatex(2.,98.7,fromfile.str().c_str()); t1->SetTextFont(32); t1->SetTextColor(1); t1->SetTextAlign(12); t1->SetTextSize(0.02); t1->DrawLatex(62.,98.7,isfile.str().c_str()); isfile.str(""); //**************************************************************************************** //DSP EVENT NUMBER Output Pages //**************************************************************************************** isfile<<"WARNINGS on DSP EVENT NUMBER pag"<SetFillColor(10); EventNumCanv[ii]->Range(0,0,100,100); t->SetTextFont(32); t->SetTextColor(1); t->SetTextAlign(12); t->SetTextSize(0.02); t->DrawLatex(2.,98.7,fromfile.str().c_str()); t1->SetTextFont(32); t1->SetTextColor(1); t1->SetTextAlign(12); t1->SetTextSize(0.02); t1->DrawLatex(65.,98.7,isfile.str().c_str()); isfile.str(""); Float_t posy = 0.95; // up y-coord - top pads Float_t hpad = 0; // pad height Float_t posx1=0; // left x-coord - pad column Float_t posx0=0; // x-coord - column division Float_t wrel = 0; // relative x size of first sub-column Float_t marg = 0.004; // margin among pads hpad = (posy-marg*11)/6; wrel = (1-marg*4)/2; for(Int_t n = 0; n<12; n++) { if ( (n+1)%2==1 ) { if(n>1) posy = posy-(marg*2+hpad); posx1 = marg; posx0 = posx1 + wrel; } else { posx1 = posx0 + 2*marg; posx0 = posx1 + wrel; } /* -----------> pad for histograms */ pad1[n] = new TPad("pad1"," ",posx1,posy-hpad,posx0,posy,18,0,0); pad2[n] = new TPad("pad2"," ",posx1,posy-hpad,posx0,posy,18,0,0); pad3[n] = new TPad("pad3"," ",posx1,posy-hpad,posx0,posy,18,0,0); pad4[n] = new TPad("pad4"," ",posx1,posy-hpad,posx0,posy,18,0,0); pad5[n] = new TPad("pad5"," ",posx1,posy-hpad,posx0,posy,18,0,0); } // // Obtain information about the tracker data // and fill graphs and histos Int_t warning_dspnumber=0,al=0; Float_t x[MAXSTORAGE]; Float_t yc[MAXSTORAGE][12]; Float_t eventint[MAXSTORAGE]; for (Int_t ev=minev; evGetEntry(ev); ph = eh->GetPscuHeader(); cod = eh->GetCounter(); if(ev==maxevent-1) maxev=maxevent-1; if((ph->GetOrbitalTime()GetOrbitalTime(); ALARM=0; Int_t dsp=0; for(Int_t i=0; i<12; i++){ dsp=te->DSPnumber[i]-1; yc[(ev-minev)][dsp]= 0.051*te->compressiontime[i]; // // Fill Cluster Signal and Lighting of the view histos for(Int_t j=0;j<3;j++){ if(te->signcluster[i][j]!=0){ if((te->addrcluster[i][j]>6 && te->addrcluster[i][j]<505) ||(te->addrcluster[i][j]>518 && te->addrcluster[i][j]<1018)){ illuminazione[dsp]->Fill((Float_t)((j*1024.)+te->addrcluster[i][j])); } } } if(trk_cal_us[cod->Get(pctp->RunHeader)]!=104){ if(!(dsp%2)){ if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)(1024.-te->signcluster[i][0])); if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)(1024.-te->signcluster[i][1])); if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)(1024.-te->signcluster[i][2])); } else{ if(te->signcluster[i][0]!=0) landau1[dsp]->Fill((Float_t)te->signcluster[i][0]); if(te->signcluster[i][1]!=0) landau2[dsp]->Fill((Float_t)te->signcluster[i][1]); if(te->signcluster[i][2]!=0) landau3[dsp]->Fill((Float_t)te->signcluster[i][2]); } } WARNING[i]=0; if(te->fc[i]!=0 || te->fl1[i]!=0 || te->fl2[i]!=0 || te->fl3[i]!=0 || te->fl4[i]!=0 || te->fl5[i]!=0 || te->fl6[i]!=0){ ALARM = 1; //general alarm al=1; WARNING[i] = 1; // DSP warning }; if(te->alarm[i]!=0){ // hardware alarm ALARM = 1; al=1; }; //************************************************************************************** // warning for internal number //************************************************************************************** if(i<=10){ if(te->eventn[i]!=te->eventn[i+1]){ warning_dspnumber++; warning<< "==> WARNING!! Check entry "<< ev<<" (DSP "<eventn[i+1]<eventn[0]; } } if(ev<=maxevent-1){ if((ev-minev)>=1 && eventint[(ev-minev)]!=eventint[(ev-minev)-1]+1 && eventint[(ev-minev)]!=1){ warning_dspnumber++; warning<< "==> WARNING!! Check entry "<< ev<GetCounter() ; alarm << " - OBT "<< ph->GetOrbitalTime() << " ms"<DSPnumber[i]; alarm.width(6); alarm << te->eventn[i]; alarm.width(6); alarm << te->DATAlength[i]; alarm.width(4); alarm << te->crc[i]; alarm.width(4); alarm << te->fc[i]; alarm.width(4); alarm << te->fl1[i]; alarm.width(4); alarm << te->fl2[i]; alarm.width(4); alarm << te->fl3[i]; alarm.width(4); alarm << te->fl4[i]; alarm.width(4); alarm << te->fl5[i]; alarm.width(4); alarm << te->fl6[i]; if(te->alarm[i]!=0)alarm<<" >> ALARM "; if(WARNING[i]!=0)alarm<<" (DSP warning) "; alarm << endl; } } } } if(al==0) alarm << endl<< "Page "< NO ALARM!!! <-------"<cd(); pad3[i]->SetFillColor(10); pad3[i]->SetFrameFillColor(10); pad3[i]->Draw(); pad3[i]->cd(); comprtime[i][ii]= new TGraph(maxev-minev,x,yyc); oss1<<"DSP "<SetTitle(oss1.str().c_str()); comprtime[i][ii]->GetXaxis()->SetTitle("OBT (ms)"); comprtime[i][ii]->GetXaxis()->CenterTitle(); comprtime[i][ii]->GetYaxis()->SetTitle("compressiontime (ms)"); comprtime[i][ii]->GetYaxis()->CenterTitle(); comprtime[i][ii]->GetYaxis()->SetRangeUser(0,2); comprtime[i][ii]->Draw("ap"); oss1.str(""); CompTimeCanv[ii]->Update(); } EventNumCanv[ii]->cd(); pt0=new TPad("pt0"," ",0.704,0.004,0.996,0.98); pt1 = new TPaveText(0.004,0.004,0.986,0.996); pt = new TPad("pt"," ",0.004,0.004,0.7,0.98,18,0,0); pt1->SetFillColor(10); pt1->ReadFile(out + "warning.txt"); pt1->SetTextAlign(22); pt1->SetTextSize(0.035); pt0->SetFillColor(10); pt0->SetFrameFillColor(10); pt0->Draw(); pt0->cd(); pt1->Draw(); EventNumCanv[ii]->cd(); pt->SetFillColor(10); pt->SetFrameFillColor(10); pt->Draw(); pt->cd(); eventnumb[ii]=new TGraph(maxev-minev,x,eventint); eventnumb[ii]->SetTitle(""); eventnumb[ii]->GetXaxis()->SetLabelSize(0.03); eventnumb[ii]->GetXaxis()->SetTitleSize(0.04); eventnumb[ii]->GetXaxis()->SetTitle("OBT (ms)"); eventnumb[ii]->GetXaxis()->CenterTitle(); eventnumb[ii]->GetXaxis()->SetTickLength(0.01); eventnumb[ii]->GetXaxis()->SetTitleOffset(1.2); eventnumb[ii]->GetYaxis()->SetLabelSize(0.03); eventnumb[ii]->GetYaxis()->SetTitleSize(0.04); eventnumb[ii]->GetYaxis()->SetTitle("DSP event-number"); eventnumb[ii]->GetYaxis()->CenterTitle(); eventnumb[ii]->GetYaxis()->SetTitleOffset(1.5); eventnumb[ii]->SetMarkerStyle(21); eventnumb[ii]->SetMarkerColor(kBlue); eventnumb[ii]->SetMarkerSize(0.3); eventnumb[ii]->Draw("ap"); EventNumCanv[ii]->Update(); warning.close(); minev=maxev; if(maxev==maxevent-1) { cntpgdat=ii+1; break; } } alarm.close(); //**************************************************************************************** //Cluster Signal ladder1 Output Pages //**************************************************************************************** fromfile.str(""); fromfile<<"FTrkQLook_EXPERT File: "<SetFillColor(10); LandauCanv1->Range(0,0,100,100); t->SetTextFont(32); t->SetTextColor(1); t->SetTextAlign(12); t->SetTextSize(0.02); t->DrawLatex(2.,98.7,fromfile.str().c_str()); t1->SetTextFont(32); t1->SetTextColor(1); t1->SetTextAlign(12); t1->SetTextSize(0.02); t1->DrawLatex(70.,98.7,isfile.str().c_str()); isfile.str(""); //**************************************************************************************** //Cluster Signal ladder2 Output Pages //**************************************************************************************** isfile<<"Cluster Signal ladder2"; LandauCanv2=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); LandauCanv2->SetFillColor(10); LandauCanv2->Range(0,0,100,100); t->SetTextFont(32); t->SetTextColor(1); t->SetTextAlign(12); t->SetTextSize(0.02); t->DrawLatex(2.,98.7,fromfile.str().c_str()); t1->SetTextFont(32); t1->SetTextColor(1); t1->SetTextAlign(12); t1->SetTextSize(0.02); t1->DrawLatex(70.,98.7,isfile.str().c_str()); isfile.str(""); //**************************************************************************************** //Cluster Signal ladder3 Output Pages //**************************************************************************************** isfile<<"Cluster Signal ladder3"; LandauCanv3=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); LandauCanv3->SetFillColor(10); LandauCanv3->Range(0,0,100,100); t->SetTextFont(32); t->SetTextColor(1); t->SetTextAlign(12); t->SetTextSize(0.02); t->DrawLatex(2.,98.7,fromfile.str().c_str()); t1->SetTextFont(32); t1->SetTextColor(1); t1->SetTextAlign(12); t1->SetTextSize(0.02); t1->DrawLatex(70.,98.7,isfile.str().c_str()); isfile.str(""); //**************************************************************************************** //Lighting of the views Output Pages //**************************************************************************************** isfile<<"lighting of the views"; IlluminaCanv=new TCanvas(isfile.str().c_str(),isfile.str().c_str(),900,1200); IlluminaCanv->SetFillColor(10); IlluminaCanv->Range(0,0,100,100); t->SetTextFont(32); t->SetTextColor(1); t->SetTextAlign(12); t->SetTextSize(0.02); t->DrawLatex(2.,98.7,fromfile.str().c_str()); t1->SetTextFont(32); t1->SetTextColor(1); t1->SetTextAlign(12); t1->SetTextSize(0.02); t1->DrawLatex(70.,98.7,isfile.str().c_str()); isfile.str(""); // // Draw the histos for (Int_t i=0; i<12 ; i++){ TBox b; b.SetFillColor(6); b.SetFillStyle(3945); Float_t maxhist=0; LandauCanv1->cd(); pad1[i]->SetFillColor(10); pad1[i]->SetFrameFillColor(10); pad1[i]->Draw(); pad1[i]->cd(); landau1[i]->GetXaxis()->SetTitle("max signal"); landau1[i]->GetXaxis()->CenterTitle(); landau1[i]->Draw(""); LandauCanv1->Update(); LandauCanv2->cd(); pad4[i]->SetFillColor(10); pad4[i]->SetFrameFillColor(10); pad4[i]->Draw(); pad4[i]->cd(); landau2[i]->GetXaxis()->SetTitle("max signal"); landau2[i]->GetXaxis()->CenterTitle(); landau2[i]->Draw(""); LandauCanv2->Update(); LandauCanv3->cd(); pad5[i]->SetFillColor(10); pad5[i]->SetFrameFillColor(10); pad5[i]->Draw(); pad5[i]->cd(); landau3[i]->GetXaxis()->SetTitle("max signal"); landau3[i]->GetXaxis()->CenterTitle(); landau3[i]->Draw(""); LandauCanv3->Update(); IlluminaCanv->cd(); pad2[i]->SetFillColor(10); pad2[i]->SetFrameFillColor(10); pad2[i]->SetLogy(); pad2[i]->Draw(); pad2[i]->cd(); illuminazione[i]->GetXaxis()->SetTitle("strip with max signal"); illuminazione[i]->GetXaxis()->CenterTitle(); illuminazione[i]->Draw(""); if(i==1){ maxhist= illuminazione[i]->GetMaximum(); b.DrawBox(2816.,0.,3060.,maxhist); } else if(i==6){ maxhist= illuminazione[i]->GetMaximum(); b.DrawBox(2560.,0.,2816.,maxhist); b.DrawBox(512.,0.,768.,maxhist); b.DrawBox(1024.,0.,1792.,maxhist); } else if(i==11){ maxhist= illuminazione[i]->GetMaximum(); b.DrawBox(768.,0.,1024.,maxhist); } IlluminaCanv->Update(); } printf("... end of packets. \n"); //************************************************************************* // Save output Files //************************************************************************* stringstream out1,out2,out3,command; Int_t totpg=0; if(cntpgtemp>cntpgdat) totpg=cntpgtemp; else if(cntpgtemp<=cntpgdat) totpg=cntpgdat; for(Int_t fl=0;flPrint(out+out1.str().c_str(),"Portrait"); EventNumCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); TempCanv[fl]->Print(out+out2.str().c_str(),"Portrait"); LandauCanv1->Print(out+out2.str().c_str(),"Portrait"); LandauCanv2->Print(out+out2.str().c_str(),"Portrait"); LandauCanv3->Print(out+out2.str().c_str(),"Portrait"); IlluminaCanv->Print(out+out3.str().c_str(),"Portrait"); } else if(totpg>1){ if(fl==0) CompTimeCanv[fl]->Print(out+out1.str().c_str(),"Portrait"); if(fl>0 && flPrint(out+out2.str().c_str(),"Portrait"); if(flPrint(out+out2.str().c_str(),"Portrait"); if(flPrint(out+out2.str().c_str(),"Portrait"); if(fl==totpg-1){ LandauCanv1->Print(out+out2.str().c_str(),"Portrait"); LandauCanv2->Print(out+out2.str().c_str(),"Portrait"); LandauCanv3->Print(out+out2.str().c_str(),"Portrait"); IlluminaCanv->Print(out+out3.str().c_str(),"Portrait"); } } } else{ out1.str(""); out1<Print(out+out1.str().c_str()); out1.str(""); out1<Print(out+out1.str().c_str()); out1.str(""); out1<Print(out+out1.str().c_str()); if(fl==totpg-1){ out1.str(""); out1<Print(out+out1.str().c_str()); out1.str(""); out1<Print(out+out1.str().c_str()); out1.str(""); out1<Print(out+out1.str().c_str()); out1.str(""); out1<Print(out+out1.str().c_str()); } } } // // Convert ps to pdf if required if(!strcmp(outfile.Data(),"pdf")){ stringstream com; com<<"ps2pdf13 "< ps file converted in pdf format!\n"); com.str(""); com<<"rm -f "< ps file removed!\n\n"); com.str(""); } command.str(""); command<<"rm -f "<Reset(); return; }