Project

General

Profile

Art2 Changes » History » Version 14

Gavin Davies, 08/23/2018 06:57 PM

1 7 Erica Smith
{{>toc}}
2 1 Gavin Davies
3 3 Gavin Davies
In February 2018 we made the long-awaited move to art2 and ROOT6
4 1 Gavin Davies
Specifically upgrading from art v1_17_01 --> art v2_09_06
5 1 Gavin Davies
This also brought along upgrade of nutools v1_21_11 --> v2_18_01
6 1 Gavin Davies
7 1 Gavin Davies
We now pull novaddt/novadaq packages into novasoft instead of using ups products that contain these
8 1 Gavin Davies
9 1 Gavin Davies
Tensorflow is now available in the offline for deep learning development efforts.
10 1 Gavin Davies
11 7 Erica Smith
h1. FHICL changes
12 1 Gavin Davies
13 6 Erica Smith
An extensive list of fhicl deprecations is listed on the "art redmine page":https://cdcvs.fnal.gov/redmine/projects/art/wiki under "Deprecations".
14 1 Gavin Davies
Specific fhicl changes of note in novasoft are the following:
15 1 Gavin Davies
16 1 Gavin Davies
<pre>
17 1 Gavin Davies
services.user.myService: {...}           --> services.myService: {...}
18 1 Gavin Davies
services.Timing: {...}                   --> services.TimeTracker: {...}
19 1 Gavin Davies
services.SimpleMemoryCheck: {...}        --> services.MemoryTracker: {...}
20 1 Gavin Davies
services.MemoryTracker.ignoreTotal: ".." --> No longer used
21 1 Gavin Davies
SelectEvents.SelectEvents: [...]         --> SelectEvents: [...]
22 1 Gavin Davies
debugModules: "*"  --> debugModules: ["*"] 
23 1 Gavin Davies
24 1 Gavin Davies
Make a note for cases that use
25 1 Gavin Davies
services.scheduler.fileMode              --> Contact artists for details
26 1 Gavin Davies
</pre>
27 1 Gavin Davies
28 8 Gavin Davies
h1. art header includes
29 8 Gavin Davies
30 8 Gavin Davies
The code in art2 had a bit of a restructuring. The locations of product-reading libraries and headers have migrated to canvas.
31 8 Gavin Davies
Full details of the Migration from "ROOT5 to ROOT6":https://cdcvs.fnal.gov/redmine/projects/art/wiki/Migrating_from_ROOT5_to_ROOT6
32 8 Gavin Davies
33 11 Gavin Davies
34 8 Gavin Davies
h2. Common to novasoft
35 8 Gavin Davies
36 8 Gavin Davies
Here are a few changes you're most likely to see/need:
37 8 Gavin Davies
<pre>
38 10 Gavin Davies
art/Framework/Core/FindOneP.h          --> canvas/Persistency/Common/FindOneP.h (FindMany/FindManyP...)
39 10 Gavin Davies
art/Utilities/InputTag.h               --> canvas/Utilities/InputTag.h
40 10 Gavin Davies
art/Persistency/Common/Assns.h         --> canvas/Persistency/Common/Assns.h
41 10 Gavin Davies
art/Persistency/Provenance/ProductID.h --> canvas/Persistency/Provenance/ProductID.h
42 10 Gavin Davies
art/Persistency/Common/Ptr.h           --> canvas/Persistency/Common/Ptr.h (PtrVector.h)
43 11 Gavin Davies
</pre>
44 11 Gavin Davies
45 13 Gavin Davies
Less common, in the move from art v2_09 --> v2_11:
46 12 Gavin Davies
<pre>
47 12 Gavin Davies
art/Utilities/FirstAbsoluteOrLookupWithDotPolicy.h --> cetlib/filepath_maker.h
48 12 Gavin Davies
</pre>
49 12 Gavin Davies
plus
50 12 Gavin Davies
<pre>
51 12 Gavin Davies
art::FirstAbsoluteOrLookupWithDotPolicy policy("FHICL_FILE_PATH"); --> cet::filepath_first_absolute_or_lookup_with_dot policy("FHICL_FILE_PATH");
52 12 Gavin Davies
</pre>
53 12 Gavin Davies
54 14 Gavin Davies
and for cetlib:
55 14 Gavin Davies
<pre>
56 14 Gavin Davies
cetlib/coded_exception.h      --> cetlib_except/coded_exception.h
57 14 Gavin Davies
cetlib/exception.h            --> cetlib_except/exception.h
58 14 Gavin Davies
cetlib/exception_collector.h  --> cetlib_except/exception_collector.h
59 14 Gavin Davies
</pre>
60 14 Gavin Davies
61 11 Gavin Davies
h2. nutools header includes
62 11 Gavin Davies
63 11 Gavin Davies
SimulationBase has moved to a new path in nusimdata
64 11 Gavin Davies
<pre> 
65 11 Gavin Davies
#include "SimulationBase/MCTruth.h" --> #include "nusimdata/SimulationBase/MCTruth.h"
66 8 Gavin Davies
</pre>
67 9 Gavin Davies
68 7 Erica Smith
h1. CAFAna macros
69 2 Gavin Davies
70 7 Erica Smith
h2. New Features
71 7 Erica Smith
72 5 Gavin Davies
h3. Compilation
73 5 Gavin Davies
74 5 Gavin Davies
Don't be alarmed by the increase in the number of files produced when compiling CAFAna macros.
75 2 Gavin Davies
You should see three as opposed to the previous 2 that look like this:
76 2 Gavin Davies
<pre>
77 2 Gavin Davies
Compiling test.C produces:
78 2 Gavin Davies
79 2 Gavin Davies
test_C.d
80 2 Gavin Davies
test_C.so
81 2 Gavin Davies
test_C_ACLiC_dict_rdict.pcm
82 1 Gavin Davies
</pre>
83 5 Gavin Davies
84 5 Gavin Davies
h3. Compilation errors
85 4 Gavin Davies
86 4 Gavin Davies
One gets more useful error messaging when running a macro with missing arguments.
87 4 Gavin Davies
Example:
88 4 Gavin Davies
<pre>
89 4 Gavin Davies
Info in <TUnixSystem::ACLiC>: creating shared library /nova/app/users/gsdavies/dev/./DataMCNDLoad_nus17_C.so
90 4 Gavin Davies
input_line_84:2:2: error: no matching function for call to 'DataMCNDLoad_nus17'
91 4 Gavin Davies
 DataMCNDLoad_nus17()
92 4 Gavin Davies
 ^~~~~~~~~~~~~~~~~~
93 4 Gavin Davies
././DataMCNDLoad_nus17.C:53:6: note: candidate function not viable: requires single argument 'outfile', but no
94 4 Gavin Davies
      arguments were provided
95 1 Gavin Davies
void DataMCNDLoad_nus17(std::string outfile)
96 1 Gavin Davies
</pre>
97 1 Gavin Davies
98 7 Erica Smith
99 7 Erica Smith
h2. Harmless Warnings 
100 7 Erica Smith
101 7 Erica Smith
This section documents new warnings that may pop up, but should not affect the successful completion of your macro.
102 7 Erica Smith
103 7 Erica Smith
h3. TTreeFormula support only 2 level of variables size collections
104 7 Erica Smith
105 7 Erica Smith
If you are seeing warnings similar to:
106 7 Erica Smith
107 7 Erica Smith
<pre>
108 7 Erica Smith
Warning in <TTreeFormula::DefinedVariable>: TTreeFormula support only 2 level of variables size collections.  Assuming '@' notation for the collection bpf.
109 7 Erica Smith
Warning in <TTreeFormula::DefinedVariable>: Missing class for rec.vtx.elastic[0].fuzzyk.png[0].@bpf.at(1).pdg!
110 7 Erica Smith
</pre>
111 7 Erica Smith
112 7 Erica Smith
This is due to accessing more than 2 vectors in your variable (in this example: vertices, prongs, tracks).
113 7 Erica Smith
114 7 Erica Smith
h2. Potential changes
115 7 Erica Smith
116 7 Erica Smith
This section documents changes you may need to make to your macro as a result of switching to root6.
117 7 Erica Smith
118 6 Erica Smith
h3. Fitting errors
119 6 Erica Smith
120 6 Erica Smith
If you are fitting a histogram and getting the error message 
121 6 Erica Smith
122 6 Erica Smith
<pre>Warning in <Fit>: Fit data is empty</pre> 
123 6 Erica Smith
124 6 Erica Smith
but your histogram is not empty, check to see if your bin errors are equal to 0 with <pre>h->Print("all");</pre>
125 6 Erica Smith
126 6 Erica Smith
which will output something like this:
127 6 Erica Smith
128 6 Erica Smith
<pre>
129 6 Erica Smith
TH1.Print Name  = cafanauniq86, Entries= 1, Total sum= 102.998
130 6 Erica Smith
 fSumw[0]=0, x=-1.10917, error=0
131 6 Erica Smith
</pre>
132 6 Erica Smith
133 6 Erica Smith
If they are 0, setting <pre>h->Sumw2(kFALSE);</pre> should solve the problem.