Back to home page

Project CMSSW displayed by LXR

 
 

    


File indexing completed on 2021-02-14 13:10:25

0001 #!/bin/tcsh
0002 
0003 set file = `ls $1`
0004 set OutputDir = "/cms/mon/data/dqm/lumi"
0005 set OutPrefix = "HLXDQM"
0006 set psDir = "$OutputDir/ps"
0007 
0008 set Run = $2
0009 set LS = $3
0010 set suffix = _${Run}_${LS}
0011 
0012 mkdir -p $OutputDir
0013 mkdir -p $psDir
0014 
0015 rm -f /tmp/TempScript.C
0016 
0017 if ( `echo $file` == '' ) then
0018     echo "$1 does not exist"
0019 else
0020 
0021 cat >> /tmp/TempScript.C <<EOF
0022 {    
0023     gROOT->SetStyle("Plain");
0024 
0025     TFile myfile("$1","Read");
0026 
0027     TCanvas HLXC("HLXC");
0028     HLXC->Divide(3,3);
0029 
0030     if(myfile.cd("DQMData")){
0031         if(myfile.cd("DQMData/HFPlus")){
0032 EOF
0033 
0034 foreach n (`seq 1 18`)
0035 
0036 set prefix = 'HF_Plus_Wedge"$n"_'
0037 
0038 cat >> /tmp/TempScript.C <<EOF
0039 
0040     if(myfile.cd("DQMData/HFPlus/Wedge$n")){
0041         HLXC.cd(1);
0042         `echo $prefix`ETSum->Draw();
0043         HLXC.cd(4);
0044         `echo $prefix`Set1_Above->Draw();
0045         HLXC.cd(5);
0046         `echo $prefix`Set1_Between->Draw();
0047         HLXC.cd(6);
0048         `echo $prefix`Set1_Below->Draw();
0049         HLXC.cd(7);
0050         `echo $prefix`Set1_Above->Draw();
0051         HLXC.cd(8);
0052         `echo $prefix`Set1_Between->Draw();
0053         HLXC.cd(9);
0054         `echo $prefix`Set1_Below->Draw();
0055         HLXC.Print("$psDir/HFPlusWedge$n.ps");
0056     }
0057 EOF
0058 
0059 end
0060 
0061 cat >> /tmp/TempScript.C <<EOF
0062  }
0063  if(myfile.cd("DQMData/HFMinus")){
0064 EOF
0065 
0066 foreach n (`seq 19 36`)
0067 
0068 set prefix = 'HF_Minus_Wedge"$n"_'
0069 
0070 cat >> /tmp/TempScript.C <<EOF
0071 
0072     if(myfile.cd("DQMData/HFMinus/Wedge$n")){
0073         HLXC.cd(1);
0074         `echo $prefix`ETSum->Draw();
0075         HLXC.cd(4);
0076         `echo $prefix`Set1_Above->Draw();
0077         HLXC.cd(5);
0078         `echo $prefix`Set1_Between->Draw();
0079         HLXC.cd(6);
0080         `echo $prefix`Set1_Below->Draw();
0081         HLXC.cd(7);
0082         `echo $prefix`Set1_Above->Draw();
0083         HLXC.cd(8);
0084         `echo $prefix`Set1_Between->Draw();
0085         HLXC.cd(9);
0086         `echo $prefix`Set1_Below->Draw();
0087         HLXC.Print("$psDir/HFPlusWedge$n.ps");
0088     }
0089 
0090 EOF
0091 
0092 end
0093 
0094 cat >> /tmp/TempScript.C <<EOF
0095         }
0096     } 
0097 }
0098 EOF
0099 
0100 root -b -q .x /tmp/TempScript.C
0101 
0102 #rm /tmp/TempScript.C
0103 
0104 gs -sDEVICE=pswrite -sOutputFile=$OutputDir/$OutPrefix$suffix.ps -dNOPAUSE -dBATCH $psDir/*.ps
0105 
0106 endif
0107