ROOT logo
#if !defined(__CINT__) || defined(__MAKECINT__)
#include <TFile.h>
#include <TFileMerger.h>
#include <TAlienFile.h>
//#include <TExec.h>
#include <TSystem.h>
#include <TGrid.h>
#include <TGridResult.h>
#include <Riostream.h>
#include <TObjArray.h>
#include <TClass.h>
#include <TH1F.h>
#include <TStyle.h>
#include <TCanvas.h>
#include <TLegend.h>
#include <TMath.h>
#include <TROOT.h>
#endif
void TrendQASDD( Char_t filelist[150]="LHC10b.txt", Char_t filename[20]="FileQAtrend",Char_t pass[7]="pass1",Int_t year=2010, Char_t period[7]="LHC10b", Bool_t kDOSuperimpose=kFALSE,Bool_t kUseOriginalFile=kFALSE , Char_t especiename[50]="LowMultiplicity")
{
  gROOT->SetStyle("Plain");
  Int_t  m;
  vector<Int_t> n;
  //Char_t FileName[200];//="/home/msicilia/Desktop/createlists";
  char FileName[150];
  Char_t FileName1[150];
  sprintf(FileName1,"%s",filelist);
  FILE * pFile;
  pFile = fopen (FileName1,"r");
  while (fscanf (pFile,"%d\n",&m)==1){
    
    if(kUseOriginalFile)sprintf(FileName,"run%d/%s/File.QA.%d.%s.%s.Run.%d.root",m,pass,year,period,pass,m);
    else sprintf(FileName, "run%d/%s/%s.root", m,pass,filename);
    if(gSystem->Exec(Form("ls %s >/dev/null 2>&1", FileName))==0){
      TFile mergedfile(FileName);
      if(kUseOriginalFile){
      if(mergedfile.GetKey("ITS")==0x0){
	printf("Run %d, In this run ITS QA has not been executed.-- Exit file\n",m);
	continue;
      }
      else {n.push_back(m);} //this is to grow the vector
      }else {n.push_back(m);}
    }
    else{printf("Run %d,: no file %s present -- Continue\n",m, FileName);continue;}
  }
  fclose (pFile);
  
  Char_t filepath[200];

  char name[100];
  char title[100];

  TH1F *histocharge;
  TH1F *histochargerp;

  sprintf(name,"histoRAWeventtrend");
  sprintf(title,"Events used for the QA analysis - RAW");
  TH1F *histoRAWeventtrend=new TH1F(name,title,n.size(),0.,(float)n.size());
  histoRAWeventtrend->GetXaxis()->SetTitle("# Run");
  histoRAWeventtrend->GetXaxis()->SetTicks("-");
  histoRAWeventtrend->GetXaxis()->SetLabelSize(0.02);
  histoRAWeventtrend->GetXaxis()->SetTitleSize(0.02);
  histoRAWeventtrend->GetXaxis()->SetTitleOffset(-2.);
  histoRAWeventtrend->GetXaxis()->SetTickLength(0.01);
  histoRAWeventtrend->GetYaxis()->SetTitle("Events");
  histoRAWeventtrend->GetYaxis()->SetLabelSize(0.02);
  histoRAWeventtrend->GetYaxis()->SetTitleSize(0.02);
  histoRAWeventtrend->GetYaxis()->SetTitleOffset(1.5);
  histoRAWeventtrend->SetMarkerStyle(20);
  histoRAWeventtrend->SetMarkerColor(1);

  sprintf(name,"histoRPeventtrend");
  sprintf(title,"Events used for the QA analysis - RP");
  TH1F *histoRPeventtrend=new TH1F(name,title,n.size(),0.,(float)n.size());
  histoRPeventtrend->GetXaxis()->SetTitle("# Run");
  histoRPeventtrend->GetXaxis()->SetTicks("-");
  histoRPeventtrend->GetXaxis()->SetLabelSize(0.02);
  histoRPeventtrend->GetXaxis()->SetTitleSize(0.02);
  histoRPeventtrend->GetXaxis()->SetTitleOffset(-2.);
  histoRPeventtrend->GetXaxis()->SetTickLength(0.01);
  histoRPeventtrend->GetYaxis()->SetTitle("Events");
  histoRPeventtrend->GetYaxis()->SetLabelSize(0.02);
  histoRPeventtrend->GetYaxis()->SetTitleSize(0.02);
  histoRPeventtrend->GetYaxis()->SetTitleOffset(1.5);
  histoRPeventtrend->SetMarkerStyle(24);
  histoRPeventtrend->SetMarkerColor(4);


  TH1F *histoRAWnormevents[3];
  TH1F *histoRPnormevents[3];
  
  TH1F *histoRAWfilledmodules[3];
  TH1F *histoRPfilledmodules[3];

  TH1F *histoRAWfilleddr[3];
  TH1F *histoRPfilleddr[3];

  TH1F *histoRAWactivemodules[3];
  TH1F *histoRPactivemodules[3];

  TH1F *histoRAWactivedr[3];
  TH1F *histoRPactivedr[3];

  TH1F *histoRAWoverthmodules[3];
  TH1F *histoRPoverthmodules[3];

  TH1F *histoRAWoverthdr[3];
  TH1F *histoRPoverthdr[3];

  TH1F *histochargetrend[2];
  TH1F *historadiustrend[2];
  

  //index on the histograms

  Int_t event=1;
  Int_t normevtRAW[3]={2,3,4};
  Int_t normevtRP[3]={2,3,4};

  Int_t filledmodRAW[3]={6,20,34};
  Int_t filledmodRP[3] ={6,20,36};

  Int_t filleddrRAW[3]={8,22,36};
  Int_t filleddrRP[3] ={8,22,38};

  Int_t activemodRAW[3]={5,19,33};
  Int_t activemodRP[3] ={5,19,35};

  Int_t activedrRAW[3]={7,21,35};
  Int_t activedrRP[3] ={7,21,37};

  Int_t overthmodRAW[3]={17,31,45};
  Int_t overthmodRP[3] ={17,33,49};

  Int_t overthdrRAW[3]={18,32,46};
  Int_t overthdrRP[3] ={18,34,50};

  Int_t chargeindex[2]={31,47};
  Int_t radiusindex[2]={32,48};

  const TString histoname[3]={"Total","Layer 3","Layer 4"};
  const TString histolegend[3]={"All","Layer 3","Layer 4"};
  const TString histolegend2[2]={"Filled","Active"};
  const TString histolegend3[2]={"Raw","RecPoints"};

  const TString drawoptionevents[3]={"P","PSAME","PSAME"};
  const TString drawoptionfill[3]={"P","P","PSAME"};
  const TString drawoptionactive[3]={"PSAME","PSAME","PSAME"};

  TLegend *legend =new TLegend(0.83,0.8,0.97,0.2);
  TLegend *legend2=new TLegend(0.83,0.8,0.97,0.2);
  TLegend *legendevents=new TLegend(0.83,01.,0.97,0.9);
  TLegend *legendchecks =new TLegend(0.83,1.,0.97,0.9);
  TLegend *legendchecks2 =new TLegend(0.83,1.,0.97,0.9);
  TLegend *legendchecks3 =new TLegend(0.83,1.,0.97,0.9);
  TLegend *legendchecks4 =new TLegend(0.83,1.,0.97,0.9);

  Char_t runnmbr[20];
  Float_t fmax[2];
  for(Int_t i=0;i<2;i++)fmax[i]=0;
  Float_t fmaxold=0;
  Float_t fmaxmargin[2];
  for(Int_t i=0;i<2;i++)fmaxmargin[i]=0;

  Float_t fmaxtime=0;
  Float_t fmaxoldtime=0;
  Float_t fmaxmargintime[2];
  for(Int_t i=0;i<2;i++)fmaxmargintime[i]=0;

  Int_t j=0;
  Int_t hh=0;

  for(Int_t ii=0;ii<3;ii++)

    {
      sprintf(name,"histoRAWnormevent%d", ii);
      sprintf(title,"Trend of the Norm Events  %s RAW",histoname[ii].Data());
      histoRAWnormevents[ii]=new TH1F(name,title,n.size(),0.,(float)n.size());
      histoRAWnormevents[ii]->SetStats(0);
      histoRAWnormevents[ii]->SetMinimum(0.);
      histoRAWnormevents[ii]->GetXaxis()->SetTitle("# Run");
      histoRAWnormevents[ii]->GetXaxis()->SetTicks("-");
      histoRAWnormevents[ii]->GetXaxis()->SetLabelSize(0.02);
      histoRAWnormevents[ii]->GetXaxis()->SetTitleSize(0.02);
      histoRAWnormevents[ii]->GetXaxis()->SetTitleOffset(-2.);
      histoRAWnormevents[ii]->GetXaxis()->SetTickLength(0.01);
      histoRAWnormevents[ii]->GetYaxis()->SetTitle("entries/(goodch*totevents)");
      histoRAWnormevents[ii]->GetYaxis()->SetLabelSize(0.02);
      histoRAWnormevents[ii]->GetYaxis()->SetTitleSize(0.02);
      histoRAWnormevents[ii]->GetYaxis()->SetTitleOffset(1.5);
      histoRAWnormevents[ii]->SetMarkerStyle(20+ii);
      histoRAWnormevents[ii]->SetMarkerColor(1+ii);

      sprintf(name,"histoRPnormevent%d", ii);
      sprintf(title,"Trend of the Norm Events  %s RP", histoname[ii].Data());
      histoRPnormevents[ii]=new TH1F(name,title,n.size(),0.,(float)n.size());
      histoRPnormevents[ii]->SetStats(0);
      histoRPnormevents[ii]->SetMinimum(0.);
      histoRPnormevents[ii]->GetXaxis()->SetTitle("# Run");
      histoRPnormevents[ii]->GetXaxis()->SetTicks("-");
      histoRPnormevents[ii]->GetXaxis()->SetLabelSize(0.02);
      histoRPnormevents[ii]->GetXaxis()->SetTickLength(0.01);
      histoRPnormevents[ii]->GetXaxis()->SetTitleSize(0.02);
      histoRPnormevents[ii]->GetXaxis()->SetTitleOffset(-2.);
      histoRPnormevents[ii]->GetYaxis()->SetTitle("entries/(goodch*totevents)");
      histoRPnormevents[ii]->GetYaxis()->SetLabelSize(0.02);
      histoRPnormevents[ii]->GetYaxis()->SetTitleSize(0.02);
      histoRPnormevents[ii]->GetYaxis()->SetTitleOffset(1.5);
      histoRPnormevents[ii]->SetMarkerStyle(20+ii);
      histoRPnormevents[ii]->SetMarkerColor(1+ii);


      sprintf(name,"histoRAWfilledmodules%d", ii);
      sprintf(title,"Trend of the filled modules %s RAW", histoname[ii].Data());
      histoRAWfilledmodules[ii]=new TH1F(name,title,n.size(),0.,(float)n.size());
      histoRAWfilledmodules[ii]->SetStats(0);
      histoRAWfilledmodules[ii]->SetMaximum(272.);
      histoRAWfilledmodules[ii]->SetMinimum(-1.);
      histoRAWfilledmodules[ii]->GetXaxis()->SetTitle("# Run");
      histoRAWfilledmodules[ii]->GetXaxis()->SetTicks("-");
      histoRAWfilledmodules[ii]->GetXaxis()->SetLabelSize(0.02);
      histoRAWfilledmodules[ii]->GetXaxis()->SetTickLength(0.01);
      histoRAWfilledmodules[ii]->GetXaxis()->SetTitleSize(0.02);
      histoRAWfilledmodules[ii]->GetXaxis()->SetTitleOffset(-2.);
      histoRAWfilledmodules[ii]->GetYaxis()->SetTitle("modules");
      histoRAWfilledmodules[ii]->GetYaxis()->SetLabelSize(0.02);
      histoRAWfilledmodules[ii]->GetYaxis()->SetTitleSize(0.02);
      histoRAWfilledmodules[ii]->GetYaxis()->SetTitleOffset(1.5);
      histoRAWfilledmodules[ii]->SetMarkerStyle(20+ii);
      histoRAWfilledmodules[ii]->SetMarkerColor(1+ii);

      sprintf(name,"histoRPfilledmodules%d", ii);
      sprintf(title,"Trend of the filled modules %s RP",  histoname[ii].Data());
      histoRPfilledmodules[ii]=new TH1F(name,title,n.size(),0.,(float)n.size());
      histoRPfilledmodules[ii]->GetXaxis()->SetTitle("# Run");
      histoRPfilledmodules[ii]->SetStats(0);
      histoRPfilledmodules[ii]->SetMaximum(272.);
      histoRPfilledmodules[ii]->SetMinimum(-1.);
      histoRPfilledmodules[ii]->GetXaxis()->SetTicks("-");
      histoRPfilledmodules[ii]->GetYaxis()->SetTitle("modules");
      histoRPfilledmodules[ii]->GetXaxis()->SetLabelSize(0.02);
      histoRPfilledmodules[ii]->GetXaxis()->SetTickLength(0.01);
      histoRPfilledmodules[ii]->GetXaxis()->SetTitleSize(0.02);
      histoRPfilledmodules[ii]->GetXaxis()->SetTitleOffset(-2.);
      histoRPfilledmodules[ii]->GetYaxis()->SetLabelSize(0.02);
      histoRPfilledmodules[ii]->GetYaxis()->SetTitleSize(0.02);
      histoRPfilledmodules[ii]->GetYaxis()->SetTitleOffset(1.5);
      histoRPfilledmodules[ii]->SetMarkerStyle(20+ii);
      histoRPfilledmodules[ii]->SetMarkerColor(1+ii);

      sprintf(name,"histoRAWfilleddr%d", ii);
      sprintf(title,"Trend of the filled drift regions %s RAW",  histoname[ii].Data());
      histoRAWfilleddr[ii]=new TH1F(name,title,n.size(),0.,(float)n.size());
      histoRAWfilleddr[ii]->GetXaxis()->SetTitle("# Run");
      histoRAWfilleddr[ii]->SetStats(0);
      histoRAWfilleddr[ii]->SetMaximum(272.);
      histoRAWfilleddr[ii]->SetMinimum(-1.);
      histoRAWfilleddr[ii]->GetXaxis()->SetTicks("-");
      histoRAWfilleddr[ii]->GetXaxis()->SetLabelSize(0.02);
      histoRAWfilleddr[ii]->GetXaxis()->SetTickLength(0.01);
      histoRAWfilleddr[ii]->GetXaxis()->SetTitleSize(0.02);
      histoRAWfilleddr[ii]->GetXaxis()->SetTitleOffset(-2.);
      histoRAWfilleddr[ii]->GetYaxis()->SetTitle("Drift Regions");
      histoRAWfilleddr[ii]->GetYaxis()->SetLabelSize(0.02);
      histoRAWfilleddr[ii]->GetYaxis()->SetTitleSize(0.02);
      histoRAWfilleddr[ii]->GetYaxis()->SetTitleOffset(1.5);
      histoRAWfilleddr[ii]->SetMarkerStyle(20+ii);
      histoRAWfilleddr[ii]->SetMarkerColor(1+ii);

      sprintf(name,"histoRPfilleddr%d", ii);
      sprintf(title,"Trend of the filled drift regions %s RP", histoname[ii].Data());
      histoRPfilleddr[ii]=new TH1F(name,title,n.size(),0.,(float)n.size());
      histoRPfilleddr[ii]->SetStats(0);
      histoRPfilleddr[ii]->SetMaximum(272.);
      histoRPfilleddr[ii]->SetMinimum(-1.);
      histoRPfilleddr[ii]->GetXaxis()->SetTitle("# Run");
      histoRPfilleddr[ii]->GetXaxis()->SetTicks("-");
      histoRPfilleddr[ii]->GetXaxis()->SetLabelSize(0.02);
      histoRPfilleddr[ii]->GetXaxis()->SetTickLength(0.01);
      histoRPfilleddr[ii]->GetXaxis()->SetTitleSize(0.02);
      histoRPfilleddr[ii]->GetXaxis()->SetTitleOffset(-2.);
      histoRPfilleddr[ii]->GetYaxis()->SetTitle("Drift Regions");
      histoRPfilleddr[ii]->GetYaxis()->SetLabelSize(0.02);
      histoRPfilleddr[ii]->GetYaxis()->SetTitleSize(0.02);
      histoRPfilleddr[ii]->GetYaxis()->SetTitleOffset(1.5);
      histoRPfilleddr[ii]->SetMarkerStyle(20+ii);
      histoRPfilleddr[ii]->SetMarkerColor(1+ii);


      sprintf(name,"histoRAWactivemodules%d", ii);
      sprintf(title,"Trend of the active module %s RAW",  histoname[ii].Data());
      histoRAWactivemodules[ii]=new TH1F(name,title,n.size(),0.,(float)n.size());
      histoRAWactivemodules[ii]->SetStats(0);
      histoRAWactivemodules[ii]->GetXaxis()->SetTitle("# Run");
      histoRAWactivemodules[ii]->GetXaxis()->SetTicks("-");
      histoRAWactivemodules[ii]->GetXaxis()->SetLabelSize(0.02);
      histoRAWactivemodules[ii]->GetXaxis()->SetTickLength(0.01);
      histoRAWactivemodules[ii]->GetXaxis()->SetTitleSize(0.02);
      histoRAWactivemodules[ii]->GetXaxis()->SetTitleOffset(-2.);
      histoRAWactivemodules[ii]->GetYaxis()->SetTitle("modules");
      histoRAWactivemodules[ii]->GetYaxis()->SetLabelSize(0.02);
      histoRAWactivemodules[ii]->GetYaxis()->SetTitleSize(0.02);
      histoRAWactivemodules[ii]->GetYaxis()->SetTitleOffset(1.5);
      histoRAWactivemodules[ii]->SetMarkerStyle(24+ii);
      histoRAWactivemodules[ii]->SetMarkerColor(4);



      sprintf(name,"histoRPactivemodules%d", ii);
      sprintf(title,"Trend of the active modules %s RP",  histoname[ii].Data());
      histoRPactivemodules[ii]=new TH1F(name,title,n.size(),0.,(float)n.size());
      histoRPactivemodules[ii]->SetStats(0);
      histoRPactivemodules[ii]->GetXaxis()->SetTitle("# Run");
      histoRPactivemodules[ii]->GetXaxis()->SetTicks("-");
      histoRPactivemodules[ii]->GetXaxis()->SetLabelSize(0.02);
      histoRPactivemodules[ii]->GetXaxis()->SetTickLength(0.01);
      histoRPactivemodules[ii]->GetXaxis()->SetTitleSize(0.02);
      histoRPactivemodules[ii]->GetXaxis()->SetTitleOffset(-2.);
      histoRPactivemodules[ii]->GetYaxis()->SetTitle("modules");
      histoRPactivemodules[ii]->GetYaxis()->SetLabelSize(0.02);
      histoRPactivemodules[ii]->GetYaxis()->SetTitleSize(0.02);
      histoRPactivemodules[ii]->GetYaxis()->SetTitleOffset(1.5);
      histoRPactivemodules[ii]->SetMarkerStyle(24+ii);
      histoRPactivemodules[ii]->SetMarkerColor(4);


      sprintf(name,"histoRAWactivedr%d", ii);
      sprintf(title,"Trend of the active drift region %s RAW", histoname[ii].Data());
      histoRAWactivedr[ii]=new TH1F(name,title,n.size(),0.,(float)n.size());
      histoRAWactivedr[ii]->SetStats(0);
      histoRAWactivedr[ii]->GetXaxis()->SetTitle("# Run");
      histoRAWactivedr[ii]->GetXaxis()->SetTicks("-");
      histoRAWactivedr[ii]->GetXaxis()->SetLabelSize(0.02);
      histoRAWactivedr[ii]->GetXaxis()->SetTickLength(0.01);
      histoRAWactivedr[ii]->GetXaxis()->SetTitleSize(0.02);
      histoRAWactivedr[ii]->GetXaxis()->SetTitleOffset(-2.);
      histoRAWactivedr[ii]->GetYaxis()->SetTitle("Drift Regions");
      histoRAWactivedr[ii]->GetYaxis()->SetLabelSize(0.02);
      histoRAWactivedr[ii]->GetYaxis()->SetTitleSize(0.02);
      histoRAWactivedr[ii]->GetYaxis()->SetTitleOffset(1.5);
      histoRAWactivedr[ii]->SetMarkerStyle(24+ii);
      histoRAWactivedr[ii]->SetMarkerColor(4);

      sprintf(name,"histoRPactivedr%d", ii);
      sprintf(title,"Trend of the active drift region %s RP",  histoname[ii].Data());
      histoRPactivedr[ii]=new TH1F(name,title,n.size(),0.,(float)n.size());
      histoRPactivedr[ii]->SetStats(0);
      histoRPactivedr[ii]->GetXaxis()->SetTitle("# Run");
      histoRPactivedr[ii]->GetXaxis()->SetTicks("-");
      histoRPactivedr[ii]->GetXaxis()->SetLabelSize(0.02);
      histoRPactivedr[ii]->GetXaxis()->SetTickLength(0.01);
      histoRPactivedr[ii]->GetXaxis()->SetTitleSize(0.02);
      histoRPactivedr[ii]->GetXaxis()->SetTitleOffset(-2.);
      histoRPactivedr[ii]->GetYaxis()->SetTitle("Drift Regions");
      histoRPactivedr[ii]->GetYaxis()->SetLabelSize(0.02);
      histoRPactivedr[ii]->GetYaxis()->SetTitleSize(0.02);
      histoRPactivedr[ii]->GetYaxis()->SetTitleOffset(1.5);
      histoRPactivedr[ii]->SetMarkerStyle(24+ii);
      histoRPactivedr[ii]->SetMarkerColor(4);

      sprintf(name,"histoRAWoverthmodules%d", ii);
      sprintf(title,"Trend of the over th modules %s RAW", histoname[ii].Data());
      histoRAWoverthmodules[ii]=new TH1F(name,title,n.size(),0.,(float)n.size());
      histoRAWoverthmodules[ii]->SetStats(0);
      histoRAWoverthmodules[ii]->GetXaxis()->SetTitle("# Run");
      histoRAWoverthmodules[ii]->GetXaxis()->SetTicks("-");
      histoRAWoverthmodules[ii]->GetXaxis()->SetLabelSize(0.02);
      histoRAWoverthmodules[ii]->GetXaxis()->SetTickLength(0.01);
      histoRAWoverthmodules[ii]->GetXaxis()->SetTitleSize(0.02);
      histoRAWoverthmodules[ii]->GetXaxis()->SetTitleOffset(-2.);
      histoRAWoverthmodules[ii]->GetYaxis()->SetTitle("modules");
      histoRAWoverthmodules[ii]->GetYaxis()->SetLabelSize(0.02);
      histoRAWoverthmodules[ii]->GetYaxis()->SetTitleSize(0.02);
      histoRAWoverthmodules[ii]->GetYaxis()->SetTitleOffset(1.5);
      histoRAWoverthmodules[ii]->SetMarkerStyle(20+ii);
      histoRAWoverthmodules[ii]->SetMarkerColor(1+ii);

      sprintf(name,"histoRPoverthmodules%d", ii);
      sprintf(title,"Trend of the over th modules %s RP",  histoname[ii].Data());
      histoRPoverthmodules[ii]=new TH1F(name,title,n.size(),0.,(float)n.size());
      histoRPoverthmodules[ii]->SetStats(0);
      histoRPoverthmodules[ii]->GetXaxis()->SetTitle("# Run");
      histoRPoverthmodules[ii]->GetXaxis()->SetTicks("-");
      histoRPoverthmodules[ii]->GetXaxis()->SetLabelSize(0.02);
      histoRPoverthmodules[ii]->GetXaxis()->SetTickLength(0.01);
      histoRPoverthmodules[ii]->GetXaxis()->SetTitleOffset(-2.);
      histoRPoverthmodules[ii]->GetYaxis()->SetTitle("modules");
      histoRPoverthmodules[ii]->GetYaxis()->SetLabelSize(0.02);
      histoRPoverthmodules[ii]->GetYaxis()->SetTitleSize(0.02);
      histoRPoverthmodules[ii]->GetYaxis()->SetTitleOffset(1.5);
      histoRPoverthmodules[ii]->SetMarkerStyle(20+ii);
      histoRPoverthmodules[ii]->SetMarkerColor(1+ii);


      sprintf(name,"histoRAWoverthdr%d", ii);
      sprintf(title,"Trend of the over th drift regions %s RAW",  histoname[ii].Data());
      histoRAWoverthdr[ii]=new TH1F(name,title,n.size(),0.,(float)n.size());
      histoRAWoverthdr[ii]->SetStats(0);
      histoRAWoverthdr[ii]->GetXaxis()->SetTitle("# Run");
      histoRAWoverthdr[ii]->GetXaxis()->SetTicks("-");
      histoRAWoverthdr[ii]->GetXaxis()->SetLabelSize(0.02);
      histoRAWoverthdr[ii]->GetXaxis()->SetTickLength(0.01);
      histoRAWoverthdr[ii]->GetXaxis()->SetTitleSize(0.02);
      histoRAWoverthdr[ii]->GetXaxis()->SetTitleOffset(-2.);
      histoRAWoverthdr[ii]->GetYaxis()->SetTitle("Drift Regions");
      histoRAWoverthdr[ii]->GetYaxis()->SetLabelSize(0.02);
      histoRAWoverthdr[ii]->GetYaxis()->SetTitleSize(0.02);
      histoRAWoverthdr[ii]->GetYaxis()->SetTitleOffset(1.5);
      histoRAWoverthdr[ii]->SetMarkerStyle(20+ii);
      histoRAWoverthdr[ii]->SetMarkerColor(1+ii);


      sprintf(name,"histoRPoverthdr%d", ii);
      sprintf(title,"Trend of the over th drift regions %s RP",  histoname[ii].Data());
      histoRPoverthdr[ii]=new TH1F(name,title,n.size(),0.,(float)n.size());
      histoRPoverthdr[ii]->SetStats(0);
      histoRPoverthdr[ii]->GetXaxis()->SetTitle("# Run");
      histoRPoverthdr[ii]->GetXaxis()->SetTicks("-");
      histoRPoverthdr[ii]->GetXaxis()->SetLabelSize(0.02);
      histoRPoverthdr[ii]->GetXaxis()->SetTickLength(0.01);
      histoRPoverthdr[ii]->GetXaxis()->SetTitleSize(0.02);
      histoRPoverthdr[ii]->GetXaxis()->SetTitleOffset(-2.);
      histoRPoverthdr[ii]->GetYaxis()->SetTitle("Drift Regions");
      histoRPoverthdr[ii]->GetYaxis()->SetLabelSize(0.02);
      histoRPoverthdr[ii]->GetYaxis()->SetTitleSize(0.02);
      histoRPoverthdr[ii]->GetYaxis()->SetTitleOffset(1.5);
      histoRPoverthdr[ii]->SetMarkerStyle(20+ii);
      histoRPoverthdr[ii]->SetMarkerColor(1+ii);

    }

  for(Int_t layer=3;layer<5;layer++)
    {
      sprintf(name,"histochargetrend_%d", layer);
      sprintf(title,"Trend of the Charge of the Layer %d", layer);
      histochargetrend[layer-3]=new TH1F(name,title,n.size(),0.,(float)n.size());
      histochargetrend[layer-3]->SetStats(0);
      histochargetrend[layer-3]->GetXaxis()->SetTicks("-");
      histochargetrend[layer-3]->GetXaxis()->SetLabelSize(0.02);
      histochargetrend[layer-3]->GetXaxis()->SetTickLength(0.01);
      histochargetrend[layer-3]->GetYaxis()->SetTitleSize(0.02);
      histochargetrend[layer-3]->GetXaxis()->SetTitleOffset(-2.);
      histochargetrend[layer-3]->GetXaxis()->SetLabelSize(0.02);
      histochargetrend[layer-3]->GetYaxis()->SetTitleSize(0.02);
      histochargetrend[layer-3]->GetYaxis()->SetTitleOffset(1.5);
      histochargetrend[layer-3]->GetXaxis()->SetTitle("# Run");
      histochargetrend[layer-3]->GetYaxis()->SetTitle("keV");
      histochargetrend[layer-3]->SetMinimum(0.);
      histochargetrend[layer-3]->SetMaximum(250.);
      histochargetrend[layer-3]->SetMarkerStyle(20);
      histochargetrend[layer-3]->SetMarkerSize(1);
      histochargetrend[layer-3]->SetMarkerColor(kGreen+4);
      histochargetrend[layer-3]->SetFillColor(42);


      sprintf(name,"historadiustrend_%d", layer);
      sprintf(title,"Trend of the radius of the Layer %d", layer);
      historadiustrend[layer-3]=new TH1F(name,title,n.size(),0.,(float)n.size());
      historadiustrend[layer-3]->SetStats(0);
      historadiustrend[layer-3]->GetXaxis()->SetTicks("-");
      historadiustrend[layer-3]->GetXaxis()->SetLabelSize(0.02);
      historadiustrend[layer-3]->GetXaxis()->SetTickLength(0.01);
      historadiustrend[layer-3]->GetXaxis()->SetTitleSize(0.02);
      historadiustrend[layer-3]->GetXaxis()->SetTitleOffset(-2.);
      historadiustrend[layer-3]->GetYaxis()->SetLabelSize(0.02);
      historadiustrend[layer-3]->GetYaxis()->SetTitleSize(0.02);
      historadiustrend[layer-3]->GetYaxis()->SetTitleOffset(1.5);
      historadiustrend[layer-3]->GetXaxis()->SetTitle("# Run");
      historadiustrend[layer-3]->GetYaxis()->SetTitle("r [cm]");
      historadiustrend[layer-3]->SetMinimum(0.);
      historadiustrend[layer-3]->SetMaximum(26.);
      historadiustrend[layer-3]->SetMarkerStyle(20);
      historadiustrend[layer-3]->SetMarkerSize(1);
      historadiustrend[layer-3]->SetMarkerColor(kGreen+4);
      historadiustrend[layer-3]->SetFillColor(42);
    }
  

  gStyle->SetOptStat(0);
  	
  TCanvas *canvas[12];
  
  for(Int_t i=0;i<12;i++)
    {
      sprintf(name,"canvas%i",i);
      //printf("--> %s \n",name);
      
      canvas[i]=new TCanvas(name,name);

    }
  
  char buffer [10];
  for (Int_t irun=0; irun<(Int_t)(n.size());irun++)
    {
	if(kUseOriginalFile) sprintf(FileName, "run%d/%s/File.QA.%d.%s.%s.Run.%d.root", n[irun],pass,year,period,pass,n[irun]);
	else sprintf(FileName, "run%d/%s/%s.root", n[irun],pass,filename);	   
	
	TFile mergedfile(FileName);
	if(kUseOriginalFile){
	  if(mergedfile.GetKey("ITS")==0x0){
	    printf("run %d In this run ITS QA has not been executed.--- Exit file\n",n[irun]);
	    continue;
	  }
	}
	sprintf(buffer, "%d", n[irun]);
	if(kUseOriginalFile)sprintf(filepath,"ITS/Raws/%s/Expert/%s_SDDRawDataCheck",especiename,especiename);
	else sprintf(filepath,"%s_SDDRawDataCheck",especiename);	
	sprintf(runnmbr,"run%d",n[irun]);
	//printf("%s  %s\n",filepath,runnmbr);	
	histocharge=(TH1F*)(mergedfile.Get(filepath));
	if(histocharge)
	  {
	    histoRAWeventtrend->Fill(buffer,(histocharge->GetBinContent(event)));
	  }
	
	if(kUseOriginalFile)sprintf(filepath,"ITS/RecPoints/%s/Expert/%s_SDDRecPointDataCheck",especiename,especiename);
	else sprintf(filepath,"%s_SDDRecPointCheck",especiename);	
	sprintf(runnmbr,"run%d",n[irun]);
	//printf("%s  %s\n",filepath,runnmbr);	
	histochargerp=(TH1F*)(mergedfile.Get(filepath));	
	if(histochargerp)
	  {
	    histoRPeventtrend->Fill(buffer,histochargerp->GetBinContent(event));
	  }
	for(Int_t iindex=0;iindex<3;iindex++)
	  {
	    if(histocharge)
	      {
		histoRAWnormevents[iindex]->Fill(buffer,histocharge->GetBinContent(normevtRAW[iindex]));  
		histoRAWfilledmodules[iindex]->Fill(buffer,histocharge->GetBinContent(filledmodRAW[iindex]));	    
		histoRAWfilleddr[iindex]->Fill(buffer,histocharge->GetBinContent(filleddrRAW[iindex]));
		histoRAWactivemodules[iindex]->Fill(buffer,histocharge->GetBinContent(activemodRAW[iindex]));	    
		histoRAWactivedr[iindex]->Fill(buffer,histocharge->GetBinContent(activedrRAW[iindex]));	    
		histoRAWoverthmodules[iindex]->Fill(buffer,histocharge->GetBinContent(overthmodRAW[iindex]));	  
		histoRAWoverthdr[iindex]->Fill(buffer,histocharge->GetBinContent(overthdrRAW[iindex]));
	      }
	    
	    if(histochargerp)
	      {
		histoRPnormevents[iindex]->Fill(buffer,histochargerp->GetBinContent(normevtRP[iindex]));
		histoRPfilledmodules[iindex]->Fill(buffer,histochargerp->GetBinContent(filledmodRP[iindex]));
		histoRPfilleddr[iindex]->Fill(buffer,histochargerp->GetBinContent(filleddrRP[iindex]));
		histoRPactivemodules[iindex]->Fill(buffer,histochargerp->GetBinContent(activemodRP[iindex]));
		histoRPactivedr[iindex]->Fill(buffer,histochargerp->GetBinContent(activedrRP[iindex]));
		histoRPoverthmodules[iindex]->Fill(buffer,histochargerp->GetBinContent(overthmodRP[iindex]));
		histoRPoverthdr[iindex]->Fill(buffer,histochargerp->GetBinContent(overthdrRP[iindex]));
		if(iindex<2){
		  histochargetrend[iindex]->Fill(buffer,histochargerp->GetBinContent(chargeindex[iindex]));
		  histochargetrend[iindex]->SetBinError(irun+1,histochargerp->GetBinError(chargeindex[iindex]));
		  historadiustrend[iindex]->Fill(buffer,histochargerp->GetBinContent(radiusindex[iindex]));
		  historadiustrend[iindex]->SetBinError(irun+1,histochargerp->GetBinError(radiusindex[iindex]));
		}

	      }
	  }
	histocharge=NULL;
	histochargerp=NULL;
    }//end loop on run
  
  canvas[3]->cd();
  //  histoRAWeventtrend->GetXaxis()->LabelsOption("v");
  histoRAWeventtrend->Draw("E0");
  //  histoRPeventtrend->GetXaxis()->LabelsOption("v");
  histoRPeventtrend->Draw("E0SAME");
  legendevents->AddEntry(histoRAWeventtrend,histolegend3[0].Data(),"P");
  legendevents->AddEntry(histoRPeventtrend,histolegend3[1].Data(),"P");
  legendevents->Draw();
  canvas[3]->Update();
  
  canvas[4]->Divide(2,1);  
  canvas[4]->cd(1);
  Char_t legendtext[50];
  for(Int_t i=0;i<3;i++)
    {
      //      histoRAWnormevents[i]->GetXaxis()->LabelsOption("v");
      histoRAWnormevents[i]->Draw(drawoptionevents[i].Data());
      //      sprintf(legendtext,"%s %s",histolegend);
      legendchecks->AddEntry(histoRAWnormevents[i],histolegend[i].Data(),"P");
    }
  legendchecks->Draw();
  canvas[4]->cd(2);

  for(Int_t i=0;i<3;i++)
    {
      histoRPnormevents[i]->Draw(drawoptionevents[i].Data());
      //legendchecks->AddEntry(histoRPnormevent,histolegend[i].Data(),"P");

    }
  legendchecks->Draw("same");
  canvas[4]->Update();
  
  canvas[5]->Divide(2,1);  
  canvas[5]->cd(1);
  for(Int_t i=1;i<3;i++)
    {
      //histoRAWfilledmodules[i]->GetXaxis()->LabelsOption("v");
      histoRAWfilledmodules[i]->Draw(drawoptionfill[i].Data());
      sprintf(legendtext,"%s %s",histolegend[i].Data(),histolegend2[0].Data());
      legendchecks2->AddEntry(histoRAWfilledmodules[i],legendtext,"P");
      //histoRAWactivemodules[i]->GetXaxis()->LabelsOption("v");
      histoRAWactivemodules[i]->Draw(drawoptionactive[i].Data());
      sprintf(legendtext,"%s %s",histolegend[i].Data(),histolegend2[1].Data());
      legendchecks2->AddEntry(histoRAWactivemodules[i],legendtext,"P");
    }
  legendchecks2->Draw("same");
  canvas[5]->cd(2);
  for(Int_t i=1;i<3;i++)
    {
      //histoRPfilledmodules[i]->GetXaxis()->LabelsOption("v");
      histoRPfilledmodules[i]->Draw(drawoptionfill[i].Data());
      //histoRPactivemodules[i]->GetXaxis()->LabelsOption("v");
      histoRPactivemodules[i]->Draw(drawoptionactive[i].Data());
    }
  legendchecks2->Draw("same");
  canvas[5]->Update();

  canvas[6]->Divide(2,1);  
  canvas[6]->cd(1);
  for(Int_t i=1;i<3;i++)
    {
      //histoRAWfilleddr[i]->GetXaxis()->LabelsOption("v");
      histoRAWfilleddr[i]->Draw(drawoptionfill[i].Data());
      //histoRAWactivedr[i]->GetXaxis()->LabelsOption("v");
      histoRAWactivedr[i]->Draw(drawoptionactive[i].Data());
    }
  legendchecks2->Draw("same");
  canvas[6]->cd(2);
  for(Int_t i=1;i<3;i++)
    {
      //histoRPfilleddr[i]->GetXaxis()->LabelsOption("v");
      histoRPfilleddr[i]->Draw(drawoptionfill[i].Data());
      //histoRPactivedr[i]->GetXaxis()->LabelsOption("v");
      histoRPactivedr[i]->Draw(drawoptionactive[i].Data());
    }
  legendchecks2->Draw("same");
  canvas[6]->Update();



  ///////////////////////////////////////////////


  
  canvas[10]->Divide(2,1);  
  canvas[10]->cd(1);
  
  //histoRAWfilledmodules[i]->GetXaxis()->LabelsOption("v");
  histoRAWfilledmodules[0]->Draw(drawoptionfill[0].Data());
  sprintf(legendtext,"%s %s",histolegend[0].Data(),histolegend2[0].Data());
  legendchecks3->AddEntry(histoRAWfilledmodules[0],legendtext,"P");
  //histoRAWactivemodules[i]->GetXaxis()->LabelsOption("v");
  histoRAWactivemodules[0]->Draw(drawoptionactive[0].Data());
  sprintf(legendtext,"%s %s",histolegend[0].Data(),histolegend2[1].Data());
  legendchecks3->AddEntry(histoRAWactivemodules[0],legendtext,"P");
  legendchecks3->Draw("same");
  canvas[10]->cd(2);
  
  //histoRPfilledmodules[i]->GetXaxis()->LabelsOption("v");
  histoRPfilledmodules[0]->Draw(drawoptionfill[0].Data());
  //histoRPactivemodules[i]->GetXaxis()->LabelsOption("v");
  histoRPactivemodules[0]->Draw(drawoptionactive[0].Data());
  legendchecks3->Draw("same");
  canvas[10]->Update();
  
  canvas[11]->Divide(2,1);  
  canvas[11]->cd(1);
  
  //histoRAWfilleddr[i]->GetXaxis()->LabelsOption("v");
  histoRAWfilleddr[0]->Draw(drawoptionfill[0].Data());
  //histoRAWactivedr[i]->GetXaxis()->LabelsOption("v");
  histoRAWactivedr[0]->Draw(drawoptionactive[0].Data());
  legendchecks3->Draw("same");
  canvas[11]->cd(2);
  
  //histoRPfilleddr[i]->GetXaxis()->LabelsOption("v");
  histoRPfilleddr[0]->Draw(drawoptionfill[0].Data());
  //histoRPactivedr[i]->GetXaxis()->LabelsOption("v");
  histoRPactivedr[0]->Draw(drawoptionactive[0].Data());
  legendchecks3->Draw("same");
  canvas[11]->Update();


  ///////////////////////////////////////////////

  canvas[8]->Divide(2,1);  
  canvas[8]->cd(1);
  for(Int_t i=0;i<3;i++)
    {
      //histoRAWoverthmodules[i]->GetXaxis()->LabelsOption("v");
      histoRAWoverthmodules[i]->Draw(drawoptionfill[i].Data());
      //histoRAWoverthmodules[i]->Draw(drawoptionactive[i].Data());
    }
  canvas[8]->cd(2);
  for(Int_t i=0;i<3;i++)
    {
      //histoRPoverthmodules[i]->GetXaxis()->LabelsOption("v");
      histoRPoverthmodules[i]->Draw(drawoptionfill[i].Data());
      //histoRPoverthmodules[i]->Draw(drawoptionactive[i].Data());
    }
  canvas[8]->Update();

  canvas[9]->Divide(2,1);  
  canvas[9]->cd(1);
  for(Int_t i=0;i<3;i++)
    {
      histoRAWoverthdr[i]->GetXaxis()->LabelsOption("v");
      histoRAWoverthdr[i]->Draw(drawoptionfill[i].Data());
      //histoRAWoverthdr[i]->Draw(drawoptionactive[i].Data());
    }
  canvas[9]->cd(2);
  for(Int_t i=0;i<3;i++)
    {
      //histoRPoverthdr[i]->GetXaxis()->LabelsOption("v");
      histoRPoverthdr[i]->Draw(drawoptionfill[i].Data());
      //histoRPoverthdr[i]->Draw(drawoptionactive[i].Data());
    }
  canvas[9]->Update();
  
  //Int_t kk=0;


  printf("Total runs: %d \n",(int)(n.size()));
  canvas[0]->Divide(2,1);

  for(Int_t layer=3;layer<5;layer++){
    canvas[0]->SetFillColor(46);
    canvas[0]->cd(layer-2)->SetFillColor(46);
    //histochargetrend[layer-3]->GetXaxis()->LabelsOption("v");
    histochargetrend[layer-3]->SetMarkerStyle(20);
    histochargetrend[layer-3]->SetMarkerSize(1);
    histochargetrend[layer-3]->SetMarkerColor(kGreen+4);
    histochargetrend[layer-3]->SetFillColor(42);
    canvas[0]->cd(layer-2)->SetFrameFillColor(kAzure-9);
    //    histochargetrend[layer-3]->GetXaxis()->LabelsOption("v");
    histochargetrend[layer-3]->SetBarWidth(0.9);
    histochargetrend[layer-3]->SetBarOffset(0.05);
    histochargetrend[layer-3]->DrawCopy("P");
    canvas[0]->Update();
 
    canvas[7]->cd();
    canvas[7]->SetFillColor(46);
    //canvas[7]->SetFillColor(46);
    //historadiustrend[layer-3]->GetXaxis()->LabelsOption("v");
    historadiustrend[layer-3]->SetMarkerStyle(20);
    historadiustrend[layer-3]->SetMarkerSize(1);
    historadiustrend[layer-3]->SetMarkerColor(8+layer-3);
    legendchecks4->AddEntry(historadiustrend[layer-3],histolegend[layer-2].Data(),"P");
    //historadiustrend[layer-3]->SetFillColor(42);
    canvas[7]->SetFrameFillColor(kAzure-9);
    historadiustrend[layer-3]->SetBarWidth(0.9);
    historadiustrend[layer-3]->SetBarOffset(0.05);
    historadiustrend[layer-3]->DrawCopy(drawoptionevents[layer-3].Data());
    canvas[7]->Update();
  }
  legendchecks4->Draw("same");
  canvas[7]->Update();
  canvas[1]->Divide(2,1);
  canvas[2]->Divide(2,1);
  //canvas[7]->Divide(2,1);
  
  if(kDOSuperimpose==kTRUE)
    {
      Int_t jj=0;
      for (Int_t irun=0; irun<(Int_t)(n.size());irun++)
	{
	  for(Int_t ilayer=3;ilayer<5;ilayer++)
	    {
	    if(kUseOriginalFile)sprintf(FileName,"run%d/%s/File.QA.%d.%s.%s.Run.%d.root",n[irun],pass,year,period,pass,n[irun]);
	    else sprintf(FileName, "run%d/%s/%s.root", n[irun],pass,filename);
	    
	    TFile mergedfile(FileName);
	    
	    if(kUseOriginalFile){
	      if(mergedfile.GetKey("ITS")==0x0){
		printf("Run %d, In this run ITS QA has not been executed.-- Exit file\n",n[irun]);
		continue;
	      }
	    }
	    if(kUseOriginalFile)sprintf(filepath,"ITS/RecPoints/%s/%s_SDDLay%dTotCh",especiename,especiename,ilayer);
	    else sprintf(filepath,"%s_SDDLay%dTotCh",especiename,ilayer);
	    histocharge=(TH1F*)(mergedfile.Get(filepath));	 
	    
	    if(histocharge)
	      {
		sprintf(buffer, "%d", n[irun]);
		
		fmax[ilayer-3]=histocharge->GetMaximum();
		if (jj==0)	{ fmaxold=fmax[ilayer-3];}
		if (jj!=0) { if(fmaxold<fmax[ilayer-3]) { fmaxold=fmax[ilayer-3];} }
		//j++;
	      }//end if histocharge
	    
	    histocharge=NULL;
	    
	    //drift time
	    
	    if(kUseOriginalFile)sprintf(filepath,"ITS/RecPoints/%s/%s_SDDdrifttime_Layer%d",especiename,especiename,ilayer);
	    else sprintf(filepath,"%s_SDDdrifttime_Layer%d",especiename,ilayer);
	    histocharge=(TH1F*)(mergedfile.Get(filepath));	 
	    
	    if(histocharge)
	      {
		sprintf(buffer, "%d", n[irun]);	
		fmaxtime=histocharge->GetMaximum();
		if (jj==0)	{ fmaxoldtime=fmaxtime;}
		if (jj!=0) { if(fmaxoldtime<fmaxtime) { fmaxoldtime=fmaxtime;} }
		//j++;
	      }//end if histocharge
	    jj++;
	    histocharge=NULL;
	    
	  }//end for run
	}//end layer

    fmaxmargin[0]=fmaxold;
    fmaxmargintime[0]=1.023*fmaxoldtime;
  

    fmaxmargin[1]=fmaxmargin[0];
    fmaxmargintime[1]=fmaxmargintime[0];


  for(Int_t layer=3;layer<5;layer++){
  
    printf("Max Y Range is %4.1f time %4.1f\n",fmaxmargin[layer-3],fmaxmargintime[layer-3]);  
    j=0;
    hh=0;
    Int_t color=0;
    for (Int_t irun=0; irun< (Int_t)(n.size());irun++)
      {
	
	if(kUseOriginalFile) sprintf(FileName, "run%d/%s/File.QA.%d.%s.%s.Run.%d.root", n[irun],pass,year,period,pass,n[irun]);
	else sprintf(FileName, "run%d/%s/%s.root", n[irun],pass,filename);	   
	
	TFile mergedfile(FileName);
	if(kUseOriginalFile){
	  if(mergedfile.GetKey("ITS")==0x0){
	    printf("run %d In this run ITS QA has not been executed.--- Exit file\n",n[irun]);
	    continue;
	  }
	}	
	if(kUseOriginalFile)sprintf(filepath,"ITS/RecPoints/%s/%s_SDDLay%dTotCh",especiename,especiename,layer);
	else sprintf(filepath,"%s_SDDLay%dTotCh",especiename,layer);	
	sprintf(runnmbr,"run%d",n[irun]);
	printf("%s  %s",filepath,runnmbr);	
	histocharge=(TH1F*)(mergedfile.Get(filepath));	
	if(histocharge)
	  {	    
	    color=2+j;
	    if (color>=12 && color<=27) { color=j+28; }
	    histocharge->SetLineColor(color);
	    if (j==0)
	      {	
		canvas[1]->cd(layer-2);

		canvas[1]->cd(layer-2)->SetFrameFillColor(kGray+3);
		histocharge->SetMaximum(fmaxmargin[layer-3]);
		histocharge->GetYaxis()->SetTitle("");
		histocharge->DrawNormalized();
		canvas[1]->cd(layer-2)->Update();
		histocharge->GetYaxis()->SetRangeUser(0.,fmaxmargin[layer-3]);
		canvas[1]->cd(layer-2)->Update();
	      }	   
	    if (j!=0)
	      {
		//printf("new j %d\n",j);
		canvas[1]->cd(layer-2);
		histocharge->DrawNormalized("same");
		canvas[1]->cd(layer-2)->Update();
	      }	    
	    if(layer==3)legend->AddEntry(histocharge,runnmbr,"l");
	    canvas[1]->cd(layer-2);
	    legend->Draw("same");	    
	    canvas[1]->Update();
	    j++;
	    printf("...Found\n");
	    
	  }//end if histocharge
	else{printf("...Not Found....\n");}
	histocharge=NULL;
	
	    //======================================================== Drift Time	
	if(kUseOriginalFile)sprintf(filepath,"ITS/RecPoints/%s/%s_SDDdrifttime_Layer%d",especiename,especiename,layer);
	else sprintf(filepath,"%s_SDDdrifttime_Layer%d",especiename,layer);	
	sprintf(runnmbr,"run %d",n[irun]);
	printf("%s  %s",filepath,runnmbr);	
	histocharge=(TH1F*)(mergedfile.Get(filepath));	
	if(histocharge)
	  {	    
	    printf("...Found\n");
	    histocharge->SetLineColor(color);
	    if (hh==0)
	      {	
		canvas[2]->cd(layer-2);
		canvas[2]->cd(layer-2)->SetFrameFillColor(kGray+3);
		histocharge->SetMaximum(fmaxmargintime[layer-3]);
		histocharge->GetYaxis()->SetTitle("");
		histocharge->DrawNormalized();
	      }	   
	    if (hh!=0)
	      {
		canvas[2]->cd(layer-2);
		histocharge->DrawNormalized("same");
	      }	    
	    if(layer==3)legend2->AddEntry(histocharge,runnmbr,"l");
	    canvas[2]->cd(layer-2);
	    legend2->Draw("same");	    
	    canvas[2]->Update();
	    hh++;
	  }//end if histocharge
	else{printf("...Not Found....\n");}
	histocharge=NULL;
      }//enf for 
      }//end for layer
    }
  
  TFile trendfile(Form("SDDQAtrend%s%s.root",period,pass),"recreate");  
  trendfile.cd();
  for(Int_t ican=0;ican<10;ican++)canvas[ican]->Write();
  trendfile.Close();
  Char_t psfile[50];
  sprintf(psfile,"SDDtrend%s%s.ps",period,pass);
  canvas[0]->Print(Form("%s[",psfile));
  for(Int_t ifile=0;ifile<12;ifile++){canvas[ifile]->Print(psfile);}

  canvas[11]->Print(Form("%s]",psfile));
  
  
  delete histocharge;
  delete histochargerp;



}//end macro
 TrendQASDD.C:1
 TrendQASDD.C:2
 TrendQASDD.C:3
 TrendQASDD.C:4
 TrendQASDD.C:5
 TrendQASDD.C:6
 TrendQASDD.C:7
 TrendQASDD.C:8
 TrendQASDD.C:9
 TrendQASDD.C:10
 TrendQASDD.C:11
 TrendQASDD.C:12
 TrendQASDD.C:13
 TrendQASDD.C:14
 TrendQASDD.C:15
 TrendQASDD.C:16
 TrendQASDD.C:17
 TrendQASDD.C:18
 TrendQASDD.C:19
 TrendQASDD.C:20
 TrendQASDD.C:21
 TrendQASDD.C:22
 TrendQASDD.C:23
 TrendQASDD.C:24
 TrendQASDD.C:25
 TrendQASDD.C:26
 TrendQASDD.C:27
 TrendQASDD.C:28
 TrendQASDD.C:29
 TrendQASDD.C:30
 TrendQASDD.C:31
 TrendQASDD.C:32
 TrendQASDD.C:33
 TrendQASDD.C:34
 TrendQASDD.C:35
 TrendQASDD.C:36
 TrendQASDD.C:37
 TrendQASDD.C:38
 TrendQASDD.C:39
 TrendQASDD.C:40
 TrendQASDD.C:41
 TrendQASDD.C:42
 TrendQASDD.C:43
 TrendQASDD.C:44
 TrendQASDD.C:45
 TrendQASDD.C:46
 TrendQASDD.C:47
 TrendQASDD.C:48
 TrendQASDD.C:49
 TrendQASDD.C:50
 TrendQASDD.C:51
 TrendQASDD.C:52
 TrendQASDD.C:53
 TrendQASDD.C:54
 TrendQASDD.C:55
 TrendQASDD.C:56
 TrendQASDD.C:57
 TrendQASDD.C:58
 TrendQASDD.C:59
 TrendQASDD.C:60
 TrendQASDD.C:61
 TrendQASDD.C:62
 TrendQASDD.C:63
 TrendQASDD.C:64
 TrendQASDD.C:65
 TrendQASDD.C:66
 TrendQASDD.C:67
 TrendQASDD.C:68
 TrendQASDD.C:69
 TrendQASDD.C:70
 TrendQASDD.C:71
 TrendQASDD.C:72
 TrendQASDD.C:73
 TrendQASDD.C:74
 TrendQASDD.C:75
 TrendQASDD.C:76
 TrendQASDD.C:77
 TrendQASDD.C:78
 TrendQASDD.C:79
 TrendQASDD.C:80
 TrendQASDD.C:81
 TrendQASDD.C:82
 TrendQASDD.C:83
 TrendQASDD.C:84
 TrendQASDD.C:85
 TrendQASDD.C:86
 TrendQASDD.C:87
 TrendQASDD.C:88
 TrendQASDD.C:89
 TrendQASDD.C:90
 TrendQASDD.C:91
 TrendQASDD.C:92
 TrendQASDD.C:93
 TrendQASDD.C:94
 TrendQASDD.C:95
 TrendQASDD.C:96
 TrendQASDD.C:97
 TrendQASDD.C:98
 TrendQASDD.C:99
 TrendQASDD.C:100
 TrendQASDD.C:101
 TrendQASDD.C:102
 TrendQASDD.C:103
 TrendQASDD.C:104
 TrendQASDD.C:105
 TrendQASDD.C:106
 TrendQASDD.C:107
 TrendQASDD.C:108
 TrendQASDD.C:109
 TrendQASDD.C:110
 TrendQASDD.C:111
 TrendQASDD.C:112
 TrendQASDD.C:113
 TrendQASDD.C:114
 TrendQASDD.C:115
 TrendQASDD.C:116
 TrendQASDD.C:117
 TrendQASDD.C:118
 TrendQASDD.C:119
 TrendQASDD.C:120
 TrendQASDD.C:121
 TrendQASDD.C:122
 TrendQASDD.C:123
 TrendQASDD.C:124
 TrendQASDD.C:125
 TrendQASDD.C:126
 TrendQASDD.C:127
 TrendQASDD.C:128
 TrendQASDD.C:129
 TrendQASDD.C:130
 TrendQASDD.C:131
 TrendQASDD.C:132
 TrendQASDD.C:133
 TrendQASDD.C:134
 TrendQASDD.C:135
 TrendQASDD.C:136
 TrendQASDD.C:137
 TrendQASDD.C:138
 TrendQASDD.C:139
 TrendQASDD.C:140
 TrendQASDD.C:141
 TrendQASDD.C:142
 TrendQASDD.C:143
 TrendQASDD.C:144
 TrendQASDD.C:145
 TrendQASDD.C:146
 TrendQASDD.C:147
 TrendQASDD.C:148
 TrendQASDD.C:149
 TrendQASDD.C:150
 TrendQASDD.C:151
 TrendQASDD.C:152
 TrendQASDD.C:153
 TrendQASDD.C:154
 TrendQASDD.C:155
 TrendQASDD.C:156
 TrendQASDD.C:157
 TrendQASDD.C:158
 TrendQASDD.C:159
 TrendQASDD.C:160
 TrendQASDD.C:161
 TrendQASDD.C:162
 TrendQASDD.C:163
 TrendQASDD.C:164
 TrendQASDD.C:165
 TrendQASDD.C:166
 TrendQASDD.C:167
 TrendQASDD.C:168
 TrendQASDD.C:169
 TrendQASDD.C:170
 TrendQASDD.C:171
 TrendQASDD.C:172
 TrendQASDD.C:173
 TrendQASDD.C:174
 TrendQASDD.C:175
 TrendQASDD.C:176
 TrendQASDD.C:177
 TrendQASDD.C:178
 TrendQASDD.C:179
 TrendQASDD.C:180
 TrendQASDD.C:181
 TrendQASDD.C:182
 TrendQASDD.C:183
 TrendQASDD.C:184
 TrendQASDD.C:185
 TrendQASDD.C:186
 TrendQASDD.C:187
 TrendQASDD.C:188
 TrendQASDD.C:189
 TrendQASDD.C:190
 TrendQASDD.C:191
 TrendQASDD.C:192
 TrendQASDD.C:193
 TrendQASDD.C:194
 TrendQASDD.C:195
 TrendQASDD.C:196
 TrendQASDD.C:197
 TrendQASDD.C:198
 TrendQASDD.C:199
 TrendQASDD.C:200
 TrendQASDD.C:201
 TrendQASDD.C:202
 TrendQASDD.C:203
 TrendQASDD.C:204
 TrendQASDD.C:205
 TrendQASDD.C:206
 TrendQASDD.C:207
 TrendQASDD.C:208
 TrendQASDD.C:209
 TrendQASDD.C:210
 TrendQASDD.C:211
 TrendQASDD.C:212
 TrendQASDD.C:213
 TrendQASDD.C:214
 TrendQASDD.C:215
 TrendQASDD.C:216
 TrendQASDD.C:217
 TrendQASDD.C:218
 TrendQASDD.C:219
 TrendQASDD.C:220
 TrendQASDD.C:221
 TrendQASDD.C:222
 TrendQASDD.C:223
 TrendQASDD.C:224
 TrendQASDD.C:225
 TrendQASDD.C:226
 TrendQASDD.C:227
 TrendQASDD.C:228
 TrendQASDD.C:229
 TrendQASDD.C:230
 TrendQASDD.C:231
 TrendQASDD.C:232
 TrendQASDD.C:233
 TrendQASDD.C:234
 TrendQASDD.C:235
 TrendQASDD.C:236
 TrendQASDD.C:237
 TrendQASDD.C:238
 TrendQASDD.C:239
 TrendQASDD.C:240
 TrendQASDD.C:241
 TrendQASDD.C:242
 TrendQASDD.C:243
 TrendQASDD.C:244
 TrendQASDD.C:245
 TrendQASDD.C:246
 TrendQASDD.C:247
 TrendQASDD.C:248
 TrendQASDD.C:249
 TrendQASDD.C:250
 TrendQASDD.C:251
 TrendQASDD.C:252
 TrendQASDD.C:253
 TrendQASDD.C:254
 TrendQASDD.C:255
 TrendQASDD.C:256
 TrendQASDD.C:257
 TrendQASDD.C:258
 TrendQASDD.C:259
 TrendQASDD.C:260
 TrendQASDD.C:261
 TrendQASDD.C:262
 TrendQASDD.C:263
 TrendQASDD.C:264
 TrendQASDD.C:265
 TrendQASDD.C:266
 TrendQASDD.C:267
 TrendQASDD.C:268
 TrendQASDD.C:269
 TrendQASDD.C:270
 TrendQASDD.C:271
 TrendQASDD.C:272
 TrendQASDD.C:273
 TrendQASDD.C:274
 TrendQASDD.C:275
 TrendQASDD.C:276
 TrendQASDD.C:277
 TrendQASDD.C:278
 TrendQASDD.C:279
 TrendQASDD.C:280
 TrendQASDD.C:281
 TrendQASDD.C:282
 TrendQASDD.C:283
 TrendQASDD.C:284
 TrendQASDD.C:285
 TrendQASDD.C:286
 TrendQASDD.C:287
 TrendQASDD.C:288
 TrendQASDD.C:289
 TrendQASDD.C:290
 TrendQASDD.C:291
 TrendQASDD.C:292
 TrendQASDD.C:293
 TrendQASDD.C:294
 TrendQASDD.C:295
 TrendQASDD.C:296
 TrendQASDD.C:297
 TrendQASDD.C:298
 TrendQASDD.C:299
 TrendQASDD.C:300
 TrendQASDD.C:301
 TrendQASDD.C:302
 TrendQASDD.C:303
 TrendQASDD.C:304
 TrendQASDD.C:305
 TrendQASDD.C:306
 TrendQASDD.C:307
 TrendQASDD.C:308
 TrendQASDD.C:309
 TrendQASDD.C:310
 TrendQASDD.C:311
 TrendQASDD.C:312
 TrendQASDD.C:313
 TrendQASDD.C:314
 TrendQASDD.C:315
 TrendQASDD.C:316
 TrendQASDD.C:317
 TrendQASDD.C:318
 TrendQASDD.C:319
 TrendQASDD.C:320
 TrendQASDD.C:321
 TrendQASDD.C:322
 TrendQASDD.C:323
 TrendQASDD.C:324
 TrendQASDD.C:325
 TrendQASDD.C:326
 TrendQASDD.C:327
 TrendQASDD.C:328
 TrendQASDD.C:329
 TrendQASDD.C:330
 TrendQASDD.C:331
 TrendQASDD.C:332
 TrendQASDD.C:333
 TrendQASDD.C:334
 TrendQASDD.C:335
 TrendQASDD.C:336
 TrendQASDD.C:337
 TrendQASDD.C:338
 TrendQASDD.C:339
 TrendQASDD.C:340
 TrendQASDD.C:341
 TrendQASDD.C:342
 TrendQASDD.C:343
 TrendQASDD.C:344
 TrendQASDD.C:345
 TrendQASDD.C:346
 TrendQASDD.C:347
 TrendQASDD.C:348
 TrendQASDD.C:349
 TrendQASDD.C:350
 TrendQASDD.C:351
 TrendQASDD.C:352
 TrendQASDD.C:353
 TrendQASDD.C:354
 TrendQASDD.C:355
 TrendQASDD.C:356
 TrendQASDD.C:357
 TrendQASDD.C:358
 TrendQASDD.C:359
 TrendQASDD.C:360
 TrendQASDD.C:361
 TrendQASDD.C:362
 TrendQASDD.C:363
 TrendQASDD.C:364
 TrendQASDD.C:365
 TrendQASDD.C:366
 TrendQASDD.C:367
 TrendQASDD.C:368
 TrendQASDD.C:369
 TrendQASDD.C:370
 TrendQASDD.C:371
 TrendQASDD.C:372
 TrendQASDD.C:373
 TrendQASDD.C:374
 TrendQASDD.C:375
 TrendQASDD.C:376
 TrendQASDD.C:377
 TrendQASDD.C:378
 TrendQASDD.C:379
 TrendQASDD.C:380
 TrendQASDD.C:381
 TrendQASDD.C:382
 TrendQASDD.C:383
 TrendQASDD.C:384
 TrendQASDD.C:385
 TrendQASDD.C:386
 TrendQASDD.C:387
 TrendQASDD.C:388
 TrendQASDD.C:389
 TrendQASDD.C:390
 TrendQASDD.C:391
 TrendQASDD.C:392
 TrendQASDD.C:393
 TrendQASDD.C:394
 TrendQASDD.C:395
 TrendQASDD.C:396
 TrendQASDD.C:397
 TrendQASDD.C:398
 TrendQASDD.C:399
 TrendQASDD.C:400
 TrendQASDD.C:401
 TrendQASDD.C:402
 TrendQASDD.C:403
 TrendQASDD.C:404
 TrendQASDD.C:405
 TrendQASDD.C:406
 TrendQASDD.C:407
 TrendQASDD.C:408
 TrendQASDD.C:409
 TrendQASDD.C:410
 TrendQASDD.C:411
 TrendQASDD.C:412
 TrendQASDD.C:413
 TrendQASDD.C:414
 TrendQASDD.C:415
 TrendQASDD.C:416
 TrendQASDD.C:417
 TrendQASDD.C:418
 TrendQASDD.C:419
 TrendQASDD.C:420
 TrendQASDD.C:421
 TrendQASDD.C:422
 TrendQASDD.C:423
 TrendQASDD.C:424
 TrendQASDD.C:425
 TrendQASDD.C:426
 TrendQASDD.C:427
 TrendQASDD.C:428
 TrendQASDD.C:429
 TrendQASDD.C:430
 TrendQASDD.C:431
 TrendQASDD.C:432
 TrendQASDD.C:433
 TrendQASDD.C:434
 TrendQASDD.C:435
 TrendQASDD.C:436
 TrendQASDD.C:437
 TrendQASDD.C:438
 TrendQASDD.C:439
 TrendQASDD.C:440
 TrendQASDD.C:441
 TrendQASDD.C:442
 TrendQASDD.C:443
 TrendQASDD.C:444
 TrendQASDD.C:445
 TrendQASDD.C:446
 TrendQASDD.C:447
 TrendQASDD.C:448
 TrendQASDD.C:449
 TrendQASDD.C:450
 TrendQASDD.C:451
 TrendQASDD.C:452
 TrendQASDD.C:453
 TrendQASDD.C:454
 TrendQASDD.C:455
 TrendQASDD.C:456
 TrendQASDD.C:457
 TrendQASDD.C:458
 TrendQASDD.C:459
 TrendQASDD.C:460
 TrendQASDD.C:461
 TrendQASDD.C:462
 TrendQASDD.C:463
 TrendQASDD.C:464
 TrendQASDD.C:465
 TrendQASDD.C:466
 TrendQASDD.C:467
 TrendQASDD.C:468
 TrendQASDD.C:469
 TrendQASDD.C:470
 TrendQASDD.C:471
 TrendQASDD.C:472
 TrendQASDD.C:473
 TrendQASDD.C:474
 TrendQASDD.C:475
 TrendQASDD.C:476
 TrendQASDD.C:477
 TrendQASDD.C:478
 TrendQASDD.C:479
 TrendQASDD.C:480
 TrendQASDD.C:481
 TrendQASDD.C:482
 TrendQASDD.C:483
 TrendQASDD.C:484
 TrendQASDD.C:485
 TrendQASDD.C:486
 TrendQASDD.C:487
 TrendQASDD.C:488
 TrendQASDD.C:489
 TrendQASDD.C:490
 TrendQASDD.C:491
 TrendQASDD.C:492
 TrendQASDD.C:493
 TrendQASDD.C:494
 TrendQASDD.C:495
 TrendQASDD.C:496
 TrendQASDD.C:497
 TrendQASDD.C:498
 TrendQASDD.C:499
 TrendQASDD.C:500
 TrendQASDD.C:501
 TrendQASDD.C:502
 TrendQASDD.C:503
 TrendQASDD.C:504
 TrendQASDD.C:505
 TrendQASDD.C:506
 TrendQASDD.C:507
 TrendQASDD.C:508
 TrendQASDD.C:509
 TrendQASDD.C:510
 TrendQASDD.C:511
 TrendQASDD.C:512
 TrendQASDD.C:513
 TrendQASDD.C:514
 TrendQASDD.C:515
 TrendQASDD.C:516
 TrendQASDD.C:517
 TrendQASDD.C:518
 TrendQASDD.C:519
 TrendQASDD.C:520
 TrendQASDD.C:521
 TrendQASDD.C:522
 TrendQASDD.C:523
 TrendQASDD.C:524
 TrendQASDD.C:525
 TrendQASDD.C:526
 TrendQASDD.C:527
 TrendQASDD.C:528
 TrendQASDD.C:529
 TrendQASDD.C:530
 TrendQASDD.C:531
 TrendQASDD.C:532
 TrendQASDD.C:533
 TrendQASDD.C:534
 TrendQASDD.C:535
 TrendQASDD.C:536
 TrendQASDD.C:537
 TrendQASDD.C:538
 TrendQASDD.C:539
 TrendQASDD.C:540
 TrendQASDD.C:541
 TrendQASDD.C:542
 TrendQASDD.C:543
 TrendQASDD.C:544
 TrendQASDD.C:545
 TrendQASDD.C:546
 TrendQASDD.C:547
 TrendQASDD.C:548
 TrendQASDD.C:549
 TrendQASDD.C:550
 TrendQASDD.C:551
 TrendQASDD.C:552
 TrendQASDD.C:553
 TrendQASDD.C:554
 TrendQASDD.C:555
 TrendQASDD.C:556
 TrendQASDD.C:557
 TrendQASDD.C:558
 TrendQASDD.C:559
 TrendQASDD.C:560
 TrendQASDD.C:561
 TrendQASDD.C:562
 TrendQASDD.C:563
 TrendQASDD.C:564
 TrendQASDD.C:565
 TrendQASDD.C:566
 TrendQASDD.C:567
 TrendQASDD.C:568
 TrendQASDD.C:569
 TrendQASDD.C:570
 TrendQASDD.C:571
 TrendQASDD.C:572
 TrendQASDD.C:573
 TrendQASDD.C:574
 TrendQASDD.C:575
 TrendQASDD.C:576
 TrendQASDD.C:577
 TrendQASDD.C:578
 TrendQASDD.C:579
 TrendQASDD.C:580
 TrendQASDD.C:581
 TrendQASDD.C:582
 TrendQASDD.C:583
 TrendQASDD.C:584
 TrendQASDD.C:585
 TrendQASDD.C:586
 TrendQASDD.C:587
 TrendQASDD.C:588
 TrendQASDD.C:589
 TrendQASDD.C:590
 TrendQASDD.C:591
 TrendQASDD.C:592
 TrendQASDD.C:593
 TrendQASDD.C:594
 TrendQASDD.C:595
 TrendQASDD.C:596
 TrendQASDD.C:597
 TrendQASDD.C:598
 TrendQASDD.C:599
 TrendQASDD.C:600
 TrendQASDD.C:601
 TrendQASDD.C:602
 TrendQASDD.C:603
 TrendQASDD.C:604
 TrendQASDD.C:605
 TrendQASDD.C:606
 TrendQASDD.C:607
 TrendQASDD.C:608
 TrendQASDD.C:609
 TrendQASDD.C:610
 TrendQASDD.C:611
 TrendQASDD.C:612
 TrendQASDD.C:613
 TrendQASDD.C:614
 TrendQASDD.C:615
 TrendQASDD.C:616
 TrendQASDD.C:617
 TrendQASDD.C:618
 TrendQASDD.C:619
 TrendQASDD.C:620
 TrendQASDD.C:621
 TrendQASDD.C:622
 TrendQASDD.C:623
 TrendQASDD.C:624
 TrendQASDD.C:625
 TrendQASDD.C:626
 TrendQASDD.C:627
 TrendQASDD.C:628
 TrendQASDD.C:629
 TrendQASDD.C:630
 TrendQASDD.C:631
 TrendQASDD.C:632
 TrendQASDD.C:633
 TrendQASDD.C:634
 TrendQASDD.C:635
 TrendQASDD.C:636
 TrendQASDD.C:637
 TrendQASDD.C:638
 TrendQASDD.C:639
 TrendQASDD.C:640
 TrendQASDD.C:641
 TrendQASDD.C:642
 TrendQASDD.C:643
 TrendQASDD.C:644
 TrendQASDD.C:645
 TrendQASDD.C:646
 TrendQASDD.C:647
 TrendQASDD.C:648
 TrendQASDD.C:649
 TrendQASDD.C:650
 TrendQASDD.C:651
 TrendQASDD.C:652
 TrendQASDD.C:653
 TrendQASDD.C:654
 TrendQASDD.C:655
 TrendQASDD.C:656
 TrendQASDD.C:657
 TrendQASDD.C:658
 TrendQASDD.C:659
 TrendQASDD.C:660
 TrendQASDD.C:661
 TrendQASDD.C:662
 TrendQASDD.C:663
 TrendQASDD.C:664
 TrendQASDD.C:665
 TrendQASDD.C:666
 TrendQASDD.C:667
 TrendQASDD.C:668
 TrendQASDD.C:669
 TrendQASDD.C:670
 TrendQASDD.C:671
 TrendQASDD.C:672
 TrendQASDD.C:673
 TrendQASDD.C:674
 TrendQASDD.C:675
 TrendQASDD.C:676
 TrendQASDD.C:677
 TrendQASDD.C:678
 TrendQASDD.C:679
 TrendQASDD.C:680
 TrendQASDD.C:681
 TrendQASDD.C:682
 TrendQASDD.C:683
 TrendQASDD.C:684
 TrendQASDD.C:685
 TrendQASDD.C:686
 TrendQASDD.C:687
 TrendQASDD.C:688
 TrendQASDD.C:689
 TrendQASDD.C:690
 TrendQASDD.C:691
 TrendQASDD.C:692
 TrendQASDD.C:693
 TrendQASDD.C:694
 TrendQASDD.C:695
 TrendQASDD.C:696
 TrendQASDD.C:697
 TrendQASDD.C:698
 TrendQASDD.C:699
 TrendQASDD.C:700
 TrendQASDD.C:701
 TrendQASDD.C:702
 TrendQASDD.C:703
 TrendQASDD.C:704
 TrendQASDD.C:705
 TrendQASDD.C:706
 TrendQASDD.C:707
 TrendQASDD.C:708
 TrendQASDD.C:709
 TrendQASDD.C:710
 TrendQASDD.C:711
 TrendQASDD.C:712
 TrendQASDD.C:713
 TrendQASDD.C:714
 TrendQASDD.C:715
 TrendQASDD.C:716
 TrendQASDD.C:717
 TrendQASDD.C:718
 TrendQASDD.C:719
 TrendQASDD.C:720
 TrendQASDD.C:721
 TrendQASDD.C:722
 TrendQASDD.C:723
 TrendQASDD.C:724
 TrendQASDD.C:725
 TrendQASDD.C:726
 TrendQASDD.C:727
 TrendQASDD.C:728
 TrendQASDD.C:729
 TrendQASDD.C:730
 TrendQASDD.C:731
 TrendQASDD.C:732
 TrendQASDD.C:733
 TrendQASDD.C:734
 TrendQASDD.C:735
 TrendQASDD.C:736
 TrendQASDD.C:737
 TrendQASDD.C:738
 TrendQASDD.C:739
 TrendQASDD.C:740
 TrendQASDD.C:741
 TrendQASDD.C:742
 TrendQASDD.C:743
 TrendQASDD.C:744
 TrendQASDD.C:745
 TrendQASDD.C:746
 TrendQASDD.C:747
 TrendQASDD.C:748
 TrendQASDD.C:749
 TrendQASDD.C:750
 TrendQASDD.C:751
 TrendQASDD.C:752
 TrendQASDD.C:753
 TrendQASDD.C:754
 TrendQASDD.C:755
 TrendQASDD.C:756
 TrendQASDD.C:757
 TrendQASDD.C:758
 TrendQASDD.C:759
 TrendQASDD.C:760
 TrendQASDD.C:761
 TrendQASDD.C:762
 TrendQASDD.C:763
 TrendQASDD.C:764
 TrendQASDD.C:765
 TrendQASDD.C:766
 TrendQASDD.C:767
 TrendQASDD.C:768
 TrendQASDD.C:769
 TrendQASDD.C:770
 TrendQASDD.C:771
 TrendQASDD.C:772
 TrendQASDD.C:773
 TrendQASDD.C:774
 TrendQASDD.C:775
 TrendQASDD.C:776
 TrendQASDD.C:777
 TrendQASDD.C:778
 TrendQASDD.C:779
 TrendQASDD.C:780
 TrendQASDD.C:781
 TrendQASDD.C:782
 TrendQASDD.C:783
 TrendQASDD.C:784
 TrendQASDD.C:785
 TrendQASDD.C:786
 TrendQASDD.C:787
 TrendQASDD.C:788
 TrendQASDD.C:789
 TrendQASDD.C:790
 TrendQASDD.C:791
 TrendQASDD.C:792
 TrendQASDD.C:793
 TrendQASDD.C:794
 TrendQASDD.C:795
 TrendQASDD.C:796
 TrendQASDD.C:797
 TrendQASDD.C:798
 TrendQASDD.C:799
 TrendQASDD.C:800
 TrendQASDD.C:801
 TrendQASDD.C:802
 TrendQASDD.C:803
 TrendQASDD.C:804
 TrendQASDD.C:805
 TrendQASDD.C:806
 TrendQASDD.C:807
 TrendQASDD.C:808
 TrendQASDD.C:809
 TrendQASDD.C:810
 TrendQASDD.C:811
 TrendQASDD.C:812
 TrendQASDD.C:813
 TrendQASDD.C:814
 TrendQASDD.C:815
 TrendQASDD.C:816
 TrendQASDD.C:817
 TrendQASDD.C:818
 TrendQASDD.C:819
 TrendQASDD.C:820
 TrendQASDD.C:821
 TrendQASDD.C:822
 TrendQASDD.C:823
 TrendQASDD.C:824
 TrendQASDD.C:825
 TrendQASDD.C:826
 TrendQASDD.C:827
 TrendQASDD.C:828
 TrendQASDD.C:829
 TrendQASDD.C:830
 TrendQASDD.C:831
 TrendQASDD.C:832
 TrendQASDD.C:833
 TrendQASDD.C:834
 TrendQASDD.C:835
 TrendQASDD.C:836
 TrendQASDD.C:837
 TrendQASDD.C:838
 TrendQASDD.C:839
 TrendQASDD.C:840
 TrendQASDD.C:841
 TrendQASDD.C:842
 TrendQASDD.C:843
 TrendQASDD.C:844
 TrendQASDD.C:845
 TrendQASDD.C:846
 TrendQASDD.C:847
 TrendQASDD.C:848
 TrendQASDD.C:849
 TrendQASDD.C:850
 TrendQASDD.C:851
 TrendQASDD.C:852
 TrendQASDD.C:853
 TrendQASDD.C:854
 TrendQASDD.C:855
 TrendQASDD.C:856
 TrendQASDD.C:857
 TrendQASDD.C:858
 TrendQASDD.C:859
 TrendQASDD.C:860
 TrendQASDD.C:861
 TrendQASDD.C:862
 TrendQASDD.C:863
 TrendQASDD.C:864
 TrendQASDD.C:865
 TrendQASDD.C:866
 TrendQASDD.C:867
 TrendQASDD.C:868
 TrendQASDD.C:869
 TrendQASDD.C:870
 TrendQASDD.C:871
 TrendQASDD.C:872
 TrendQASDD.C:873
 TrendQASDD.C:874
 TrendQASDD.C:875
 TrendQASDD.C:876
 TrendQASDD.C:877
 TrendQASDD.C:878
 TrendQASDD.C:879
 TrendQASDD.C:880
 TrendQASDD.C:881
 TrendQASDD.C:882
 TrendQASDD.C:883
 TrendQASDD.C:884
 TrendQASDD.C:885
 TrendQASDD.C:886
 TrendQASDD.C:887
 TrendQASDD.C:888
 TrendQASDD.C:889
 TrendQASDD.C:890
 TrendQASDD.C:891
 TrendQASDD.C:892
 TrendQASDD.C:893
 TrendQASDD.C:894
 TrendQASDD.C:895
 TrendQASDD.C:896
 TrendQASDD.C:897
 TrendQASDD.C:898
 TrendQASDD.C:899
 TrendQASDD.C:900
 TrendQASDD.C:901
 TrendQASDD.C:902
 TrendQASDD.C:903
 TrendQASDD.C:904
 TrendQASDD.C:905
 TrendQASDD.C:906
 TrendQASDD.C:907
 TrendQASDD.C:908
 TrendQASDD.C:909
 TrendQASDD.C:910
 TrendQASDD.C:911
 TrendQASDD.C:912
 TrendQASDD.C:913
 TrendQASDD.C:914
 TrendQASDD.C:915
 TrendQASDD.C:916
 TrendQASDD.C:917
 TrendQASDD.C:918
 TrendQASDD.C:919
 TrendQASDD.C:920
 TrendQASDD.C:921
 TrendQASDD.C:922
 TrendQASDD.C:923
 TrendQASDD.C:924
 TrendQASDD.C:925
 TrendQASDD.C:926
 TrendQASDD.C:927
 TrendQASDD.C:928
 TrendQASDD.C:929
 TrendQASDD.C:930
 TrendQASDD.C:931
 TrendQASDD.C:932
 TrendQASDD.C:933
 TrendQASDD.C:934
 TrendQASDD.C:935