CombineIntoLibrary.sh
Go to the documentation of this file.
1 #!/bin/bash
2 
3 BatchID=$1
4 echo "Assembling library for $BatchID"
5 
6 #Produce the list of files to combine
7 ls root/Files$BatchID/ > temp${BatchID}_FileList.txt
8 
9 #Make a string to feed to roor
10 echo ".L AssembleSingleFile.C" >> rootstring.txt
11 echo "AssembleSingleFile(\"temp${BatchID}_FileList.txt\", \"root/Files$BatchID/\",\"photlibrary/lib$BatchID.root\")" >> rootstring.txt
12 
13 #Make root execute this command
14 cat rootstring.txt | root -l
15 
16 #clean up temporaryfiles
17 rm temp${BatchID}_FileList.txt
18 rm rootstring.txt