Crombie Tools
Go to the documentation of this file.
1 # Command Line Tools {#commandref}
3 @brief Reference describing the tools available through the `crombie` command.
5 A number of scripts are available to the user through the `crombie` command line tool.
6 They can be accessed by entering
8  crombie <subcommand>
10 The list of available subcommands are given below.
12 <table cellpadding=20>
13  <tr>
14  <td align="left" valign="top">
15  <code>backupslides</code>
16  </td>
17  <td align="left">
18  From a [workspace](@ref workspace) `docs` directory or presentation subdirectory,
19  `crombie backupslides` searches the `figs` sub-directory for `.pdf` files.
20  If the `.pdf` file is not included in any `.tex` files in the local directory
21  (excluding `backup_slides.tex`), the `.pdf` image will be placed on a frame in
22  `backup_slides.tex` to be included in a presentation.
24  If you add `all` to the end of the command, even images in other `.tex` files will
25  be included in the backup slides.
26  </td>
27  </tr>
28  <tr>
29  <td align="left" valign="top">
30  <code>clean</code>
31  </td>
32  <td align="left">
33  Removes all files created by `crombie compile`.
34  This can also take an optional arguments to only clean certain classes.
35  </td>
36  </tr>
37  <tr>
38  <td align="left" valign="top">
39  <code>checkxs</code>
40  </td>
41  <td align="left">
42  This checks the cross section configuration files, which are passed as arguments.
43  It prints out disagreements with the centralized CrossSecDB
44  and generates a suggested new configuration file.
45  </td>
46  </tr>
47  <tr>
48  <td align="left" valign="top">
49  <code>compile</code>
50  </td>
51  <td align="left">
52  Compiles all of the objects in the package.
53  Can also take optional arguments to only compile named class (and dependencies).
54  Will only recompile the objects if cleaned or the source files have been changed.
55  </td>
56  </tr>
57  <tr>
58  <td align="left" valign="top">
59  <code>diff</code>
60  </td>
61  <td align="left">
62  Compares the flat n-tuples withing two different directories.
63  Basic functionality is to compare the number of events in histograms and trees
64  inside each identically basenamed file.
65  Individual branches can also be compared.
66  The output of `crombie diff -h` is shown for more information.
68  <pre>
69 usage: crombie diff [-h] [--numproc NUM] [--treename TREENAME]
70  [--skip-branches [BRANCHES [BRANCHES ...]]] [--verbose]
71  [--check-branch] [--loose-match]
74 Checks two directories to make sure they have the same number of files and
75 number of events in the tree and hist for each file
77 positional arguments:
78  DIRECTORY The names of the two directories to compare.
80 optional arguments:
81  -h, --help show this help message and exit
82  --numproc NUM, -n NUM
83  Number of processes that FlatSkimmer will spawn.
84  --treename TREENAME, -t TREENAME
85  The name of the trees to friend.
86  --skip-branches [BRANCHES [BRANCHES ...]], -s [BRANCHES [BRANCHES ...]]
87  Set branches to skip comparison.
88  --verbose, -v Give a verbose checker to watch progress.
89  --check-branch, -b Checks if two branches have the same entries.
90  --loose-match, -l If true, matches when the file names do not match
91  perfectly. Instead, if one file matches the beginning
92  of another perfectly, a comparison is made.
93  </pre>
94  </td>
95  </tr>
96  <tr>
97  <td align="left" valign="top">
98  <code>findtree</code>
99  </td>
100  <td align="left">
101  This checks if a `.root` file has a tree inside it, and if the tree has entries.
102  </td>
103  </tr>
104  <tr>
105  <td align="left" valign="top">
106  <code>fit</code>
107  </td>
108  <td align="left">
109  This looks inside a specified directory and does a fit
110  to adjust processes and bins based on the data card inside.
111  See the [fit page](@ref fit) for details.
112  </td>
113  </tr>
114  <tr>
115  <td align="left" valign="top">
116  <code>generatedocs</code>
117  </td>
118  <td align="left">
119  If you have doxygen installed, this command will automatically generate the
120  documentation for Crombie Tools. There are two subcommands.
121  <table cellpadding=10>
122  <tr>
123  <td align="left" valign="top">
124  <code>copy</code>
125  </td>
126  <td align="left">
127  Will copy the documentation to a server through ssh.
128  See the file itself for how to change server locations.
129  </td>
130  </tr>
131  <tr>
132  <td align="left" valign="top">
133  <code>test</code>
134  </td>
135  <td align="left">
136  Will generate the html only (default also makes a LaTeX manual).
137  </td>
138  </tr>
139  </table>
140  </td>
141  </tr>
142  <tr>
143  <td align="left" valign="top">
144  <code>localslim</code>
145  </td>
146  <td align="left">
147  This tools allows for running the [slimmer](@ref slimming) interactively in a shell.
148  Like `submitlxbatch`, this sources a local [](@ref envconfig) to set a number of environment variables.
149  `crombie terminalslim` also comes with the same subcommands as `crombie submitlxbatch`, except for `test`.
150  </td>
151  </tr>
152  <tr>
153  <td align="left" valign="top">
154  <code>maketree</code>
155  </td>
156  <td align="left">
157  This automatically generates a tree from a configuration file.
158  There is more information on these configuration files [here](@ref maketree).
159  </td>
160  </tr>
161  <tr>
162  <td align="left" valign="top">
163  <code>presentation</code>
164  </td>
165  <td align="left">
166  From inside a [workspace's](@ref workspace) `docs` directory, this command
167  creates a dated directory and copies a local `presentation.tex` into that directory.
168  The copied file is named according to username, the workspace name, and the date.
169  </td>
170  </tr>
171  <tr>
172  <td align="left" valign="top">
173  <code>removefailed</code>
174  </td>
175  <td align="left">
176  In CRAB jobs, there are often partial N-tuples output in a `failed` directory in the output location.
177  `crombie removefailed` checks the `failed` directory and deletes each file inside if there is a larger
178  file located in the successfully completed files.
179  If the `failed` directory is cleared in this way, the directory is removed.
180  </td>
181  </tr>
182  <tr>
183  <td align="left" valign="top">
184  <code>submitlxbatch</code>
185  </td>
186  <td align="left">
187  `crombie submitlxbatch` sources a local [](@ref envconfig) to set a number of variables
188  that are used to submit [slimming](@ref slimming) jobs to LXBATCH.
190  There are additional subcommands available to `crombie submitlxbatch`.
191  <table cellpadding=10>
192  <tr>
193  <td align="left" valign="top">
194  <code>fresh</code>
195  </td>
196  <td align="left">
197  Deletes the files in [$CrombieTempDir](@ref envconfig) and resubmits all possible jobs.
198  </td>
199  </tr>
200  <tr>
201  <td align="left" valign="top">
202  <code>hadd</code>
203  </td>
204  <td align="left">
205  Does not submit jobs, but goes directly to hadding what finished [slimmed](@ref slimming) files are available.
206  </td>
207  </tr>
208  <tr>
209  <td align="left" valign="top">
210  <code>resub</code>
211  </td>
212  <td align="left">
213  Resubmits using the existing `.txt` files inside [$CrombieTempDir](@ref envconfig).
214  The usual behavior is to recreate these files from the input directories every time.
215  </td>
216  </tr>
217  <tr>
218  <td align="left" valign="top">
219  <code>test</code>
220  </td>
221  <td align="left">
222  Instead of submitting jobs, the submit commands are echoed to stdout.
223  If all output files are available, the hadding step will still be attempted.
224  </td>
225  </tr>
226  </table>
227  </td>
228  </tr>
229  <tr>
230  <td align="left" valign="top">
231  <code>tags</code>
232  </td>
233  <td align="left">
234  Prints the `-I` and `-L` tags for compiling with g++ using CrombieTools.
235  `crombie tags` can then be placed directly in your Makefile.
236  </td>
237  </tr>
238  <tr>
239  <td align="left" valign="top">
240  <code>update</code>
241  </td>
242  <td align="left">
243  This updates the Crombie Tools package to match the upstream of your current branch.
244  </td>
245  </tr>
246  <tr>
247  <td align="left" valign="top">
248  <code>workspace</code>
249  </td>
250  <td align="left">
251  Copies a number of template files into the directory you call it from.
252  These files are used to configure the Skimming tools.
253  This is a [workspace](@ref workspace).
254  For additional example files, give the optional argument <code>crombie workspace test</code>.
255  </td>
256  </tr>
257 </table>