-
Notifications
You must be signed in to change notification settings - Fork 0
Picture Books
Note that there is now a new program to use for generating picture books [here](Picture Books New)
This is an updated version of the documentation in elog:79.
There are two types of picture books that we can compile:
- Dataset Picture Books
- These are the type attached to this elog and contain the trend plots of most of our histograms
- Run Picture Books
- These are for a specific run and prints the majority of the plots we have
In the directory analyzer/picture_books/low_level_data_quality/ there are two bash scripts that generate the above picture books.
-
CreateDatasetPictureBook.sh
-
Usage: ./CreateDatasetPictureBook.sh [data_dir] [first_run] [n_runs]
where data_dir is the location of your data directory, first_run is the first run number you want to start from and n_runs is the number of runs
NB It is safe for your run range to include runs that we don't have. The scripts will ignore any ROOT files that don't exist and won't plot anything at that coordinate in the trend plot. -
CreateRunPictureBook.sh
-
Usage: ./CreateRunPictureBook.sh [data_dir] [run_number]
where data_dir is the location of your data directory and run_number is the run number
NB It is worth noting that these scripts don't work on Merlin because pdflatex is not installed there (if anyone knows a solution to this then please tell me) but it will generate all the images you need which you can copy to yourself locally and then compile the PDF file yourself.
Added 2nd June 2014: the CreateDatasetPictureBook.sh script has been modified so that, if you run this script locally, it will ssh to your account on Merlin (change MERLIN_USER in the script), create the figures and then copy them over with the generated .tex and run pdflatex locally.
Added 2nd June 2014: there is also a script CreateAllPictureBooks.sh which creates all the picture books for our datasets
As you may have noticed there are a lot of other scripts in this directory which are run by the above bash scripts and so I will explain what they do in case someone else has the unfortunate task of having to edit them.
The scripts can basically be grouped into two:
-
Generators
-
Generate[ModuleName]Plots.C
- These are the scripts that take the histograms out of the hist files and play with them until they are plotted how we like (e.g. with COLZ or log-z) and exports a PNG image of the plot into data_quality_figs/
-
Everything Else
-
GenerateAllPlots.C
- Runs all the above generators
- Also contains the ZoomAxis function to zoom in on the x-axis of a 1D histogram
-
LoadPicBookMacros.C
- Loads and compiles all the macros
- Runs the macro RunPicBookMacros.C
-
RunPicBookMacros.C
- Dynamically generated in the bash scripts
- Runs either GenerateAllPlots (for run picture books) or GenerateTrendPlots (for dataset picture books)
-
latexWrapper.C
- Is run by the bash script after generating all the PNGs
- Creates the .tex file and specifies all the sections and which plots are for which sections (determined alphabetically basically)
-
I hope all that makes sense but if you ever find yourself working with this code and have any questions don't hesitate to contact me.