art Suite Release Notes 1.01.00.¶
Previous version's release notes.
This is the first version of the art suite to require C++2011 features. It is compiled with, and requires, GCC 4.7.1. Externals and extras packages have been built and will be distributed via the usual method. Notes:
- Feature #2714: Add a c'tor for
const char *.
FileDumperOutputto print full and/or friendly product class names.
Ptrcan no longer be created in an invalid state, and the effect of using a
Ptrin a boolean context is to ascertain whether the product is resolvable or not (previously an exception would be thrown if not).
- Feature #1027:
simple_pluginto extend underscore checking to include path within project.
- GCC 4.7.1 is more strict about use of
std::make_pairand implied conversions; it is compliant with the standard, whereas before it was lax and allowed unwarranted conversions. Some code may need to be updated.
- New service interfaces have been provided to allow the REX group to start writing SAM services. The system has not yet been upgraded to use these services, however.
- Use of
std::auto_ptrhas been removed in all art software since it has been deprecated with C++2011. The C++2011 standard smart pointer
std::unique_ptris used throughout instead, which makes use of C++2011 move syntax via r-value references to achieve move semantics (with
std:auto_ptr, move semantics are achieved with copy syntax, which often led to confusion and wrong code). Since in prior versions of art
std::auto_ptrwas the method by which data products were put into the event (or subrun, or run), this means that user code will need to be changed. While these release notes do not attempt to be a C++2011 primer, these details may be useful (although for the impatient, the last point is the one you want):
- A move operation is defined as one in which an object is destructively copied i.e. the new object is identical to the original as it was prior to the copy, but the original is now no longer guaranteed to be as it was.
- If a variable of arbitrary type is passed to a function taking an r-value reference, that passed variable is guaranteed following the call, to be:
- usable on the left-hand-side of an assignment.
- NO OTHER GUARANTEES are made about the object post-move: you should certainly not continue to use the object assuming its contents are the same as before it was passed. In the particular case of
std::unique_ptr, an additional guarantee is made that its contents will be
- If a variable is passed as an r-value reference and there is (e.g.) no move constructor, the object will be copied instead.
- A move constructor may be provided (or defaulted by the compiler):
Note the lack of
- Similarly, a move assignment may be provided (or defaulted by the compiler):
MyClass & operator =(MyClass &&);
&&in the above signature is how an r-value reference is denoted.
- An unnamed temporary is automatically an r-value reference and therefore eligible for passing to functions requiring one.
- A named variable must be explicitly converted to an r-value reference by use of
std::move()at the time the variable is passed to a function requiring an r-value reference, e.g.:
This has no runtime cost.
- To migrate code creating a product to put into the event to use
std::unique_ptr, use the following prescription:
std::unique_ptr<MyProduct> prod(...) do_stuff(*prod); e.put(std::move(prod));
prodwill be empty after the call to
Event::put(). Note that if the argument to
Event::put()is a tepmorary (e.g. the result of a function call) then
std::move()is not necessary.
- A script will be provided to migrate code using the old prescription (
std::move()for named arguments to
- Bug #2735: Parental information incomplete due to bug in
- Bug #2737: Failure to access the parameter set of the creator module of a data product.
- The infrastructure to utilize the file delivery and catalog interfaces is incomplete; the interfaces have been released to allow work on the SAM services to implement these interfaces.
- Executables were not linked against the full list of ROOT libraries, just those actually required by art code.
- This version was unreleased due to the need to update the qualifiers of certain variants of the suite for NOvA, LArSoft, etc.