framework icon indicating copy to clipboard operation
framework copied to clipboard

Updating TRestRun metadata members

Open jgalan opened this issue 3 years ago • 3 comments

jgalan Ok: 46

A MAJOR update adding a NEW metadata member (fRunDuration) inside TRestRun and REMOVING an unused data member (fRunClassName),

I reviewed also the documentation of the data members

@rest-for-physics/core_dev

Additional remarks:

The reason behind adding a dedicated metadata member fRunDuration is because I expect this data member will store the effective time of a given number of runs. The idea is to implement a TRestDataSet and exporting the data to a standard TTree or RDataFrame together with a TRestRun object (and other combined metadata objects). Therefore, the new TRestRun object should accumulate the total effective time (because there might be gaps).

This is related to issue #13

jgalan avatar May 03 '22 20:05 jgalan

Hi, in order to build a validation pipeline, we could have a repository where we upload small files that can be opened with future versions of the code.

If I do not update the class version, then we get the following output

Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 5 of class 'TRestRun' is missing from 
the on-file layout version 5:
   TString fRunDescription; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 5 of class 'TRestRun' is missing from 
the on-file layout version 5:
   TString fExperimentName; //

I was thinking about capturing that output and check wether it contains the Warning keyword. Then the pipeline should fail.

However, I am experiencing problems when capturing the output. If I do:

restRoot -q Run00001_NLDBD_Test.root >> output.log

It simply does not work, it just captures a partial output, I guess because of redirections of std output.

Any ideas? @nkx @lobis @juanangp @rest-for-physics/core_dev

jgalan avatar May 05 '22 06:05 jgalan

Any ideas/shortcut on how to capture the output I mentioned above?

jgalan avatar May 31 '22 06:05 jgalan

Any ideas/shortcut on how to capture the output I mentioned above?

I think the issue is that you are not redirecting the error stream, to do it you can use 2>&1. So, you can try:

restRoot -q Run00001_NLDBD_Test.root 2>&1 | tee output.log

Alternatively:

restRoot -q Run00001_NLDBD_Test.root >> output.log 2>&1

Personally I prefer to use tee because it also prints the output.

juanangp avatar May 31 '22 07:05 juanangp