Line Code
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39
ReprocessEcalPedestals.cc README
================================

ReprocessEcalPedestals is a module for completing incomplete sets of
pedestals from one tag and writing complete sets using
channel-by-channel IOVs to another tag

On the first iteration the "append" parameter MUST be false.  There
should be an "endfile" parameter too.  In this processing run, an
object is fetched from the first run of the EmptySource.  The
number of SMs used in this object are counted, and based on this
each cystal in each SM is checked to see if data is available.  If
data is not available, nominal values are filled in.  Then the run
is iterated and if there is a change of data from the source tag,
the cached value is written with the IOV (till time) of the run
just before the change.  The newly fetched data is written to the
cache, which already contains a complete set of pedestals so that
if any runs are missing from this set the values from the previous
object are used.  Again, every time a new object is fetched from
the source tag, the cached object is written to the target tag.
When all the runs are finished, the cached object is written to the
target tag with an infinite IOV and the cache is dumped to the
"endfile"

When further pedestal objects are available for reprocessing, this
module should be run with the EmptySource specifying to start at
one greater than the run the last reprocessing finished on.
"append" should be true, and both "startfile" and "endfile" should
be provided, with "startfile" being the "endfile" of the previous
reprocessing.  "startfile" will be loaded into the cache before any
pedestals are fetched from the source tag.  In this way, if the
very first object is missing channels the channels from the
previous IOV will be used ("endfile" from before) instead of
nominal values.  Reprocessing happens the same as before with each
change of object in the source tag resulting in the cached object
being written to the DB.

test/test_reprocess_1.cfg shows an example of a first-time reprocessing
test/test_reprocess_2.cfg shows an example of a subsequent reprocessing