-- RamanKhurana - 18-Nov-2010

To list root files in a directory :

ls -1 /cmshome/khurana/TES/NewTags-25-June/CMSSW_4_2_5/src/TauAnalysis/TauIdEfficiency/test/commissioning/Ecal-upScale/patTuple_ecalupscale | gawk 'BEGIN {ORS = " " } {print "inputFiles=rfio:/cmshome/khurana/TES/NewTags-25-June/CMSSW_4_2_5/src/TauAnalysis/TauIdEfficiency/test/commissioning/Ecal-upScale/patTuple_ecalupscale/"$1 }'

ls -1 /lustre/cms/store/user/khurana/HZZAnalysis/PatTuples/ZZtoAnything_TuneZ2_7TeV-pythia6-tauola/ | gawk '{print"\"rfio:/lustre/cms/store/user/khurana/HZZAnalysis/PatTuples/ZZtoAnything_TuneZ2_7TeV-pythia6-tauola/"$1"\"," }'

To list Merged root files in a directory :

ls -1 | grep Merged.* | gawk '{print "FleName[] = \"'$PWD'/''"$1 "\"; "}'

Instructions for copying Merged rootfiles from castor to tmp

path=/castor/cern.ch/user/k/khurana/HIGGS/Fall10/EfficiencyStudy/
rm -rf tmpCopyMergedFiles0
rm -rf tmpCopyMergedFiles1
rm -rf tmpCopyMergedFiles2

cat>>tmpCopyMergedFiles0<<EOF
for
which
in
EOF

rfdir ${path} | gawk '{print $9}' >>tmpCopyMergedFiles0

cat>>tmpCopyMergedFiles0<<EOF
;
do
EOF

cat tmpCopyMergedFiles0 | gawk 'BEGIN {ORS=" ";}{print $1}' >> tmpCopyMergedFiles1
rm -rf tmpCopyMergedFiles0

cat>>tmpCopyMergedFiles1<<EOF

path1=${path}/\${which}/
rfdir \${path1}  | gawk '{print"rfcp  '\${path1}'"\$9"  /tmp/khurana/input/"  }' | grep "Merged" >>tmpCopyMergedFiles2
done
exit
EOF

chmod 777 tmpCopyMergedFiles1

./tmpCopyMergedFiles1
chmod 777 tmpCopyMergedFiles2

./tmpCopyMergedFiles2
rm -rf tmpCopyMergedFiles1
rm -rf tmpCopyMergedFiles2

exit

Scripts With Explanation are at bottom of this page.

RunPostanalyzer.zip -- This zip has three files 1. ListDirectory, 2. ListFiles , 3. GetCompiledPostAnalyzer.

ListDirectory list all directory in the lustre dir and make use of ListFile script and make same kind of Dir in PostAnalyzer directory in lustre.

ListFiles will list all file in each file and then compile the PostAnalyzer for each file and Run it using the GetCompiledPostAnalyzer and saves root file in PostAnalyzer directory in Lustre.

* copy: Script to copy files from castor and then merge them into a single file and then copy merged file to castor path

  • Plot_H150.C: Script to plot H150 var and background var in same histogram

Topic attachments
I Attachment History Action Size Date Who Comment
C source code filec Plot_H150.C r1 manage 6.4 K 2010-11-19 - 19:52 RamanKhurana Script to plot H150 var and background var in same histogram
Compressed Zip archivezip RunPostAnalyzer.zip r1 manage 1.8 K 2011-04-21 - 18:23 RamanKhurana Three files which compile postanalyzer, Run over Analyzer O/P file in lustre, Save O/P of PostAnalyzer in Lustre.
Unknown file formatext copy r2 r1 manage 1.0 K 2010-11-18 - 04:14 RamanKhurana Script to copy files from castor and then merge them into a single file and then copy merged file to castor path
Unknown file formatext copy_castor_mergedfile r1 manage 3.1 K 2011-01-27 - 12:04 RamanKhurana copy those files from castor to tmp which have name "Merged* " in a specific subdir
C source code filec myCutsMacroAll.C r1 manage 29.8 K 2011-03-27 - 20:57 RamanKhurana This is the main post Analyzer script
Unknown file formatext script_stagefilesfromdir r1 manage 0.8 K 2011-02-23 - 07:54 BhawnaGomber  
Edit | Attach | Watch | Print version | History: r13 < r12 < r11 < r10 < r9 | Backlinks | Raw View | WYSIWYG | More topic actions
Topic revision: r13 - 2011-07-28 - RamanKhurana
 
    • Cern Search Icon Cern Search
    • TWiki Search Icon TWiki Search
    • Google Search Icon Google Search

    Main All webs login

This site is powered by the TWiki collaboration platform Powered by PerlCopyright &© 2008-2024 by the contributing authors. All material on this collaboration platform is the property of the contributing authors.
or Ideas, requests, problems regarding TWiki? use Discourse or Send feedback