Skip to content

Offer o2::dataformats::TimeStamp class globally#787

Merged
sawenzel merged 2 commits intoAliceO2Group:devfrom
sawenzel:swenzel/timestamp
Jan 29, 2018
Merged

Offer o2::dataformats::TimeStamp class globally#787
sawenzel merged 2 commits intoAliceO2Group:devfrom
sawenzel:swenzel/timestamp

Conversation

@sawenzel
Copy link
Copy Markdown
Collaborator

Moving a TimeStamp class from TPC to SimulationDataFormat
to be reused by other detectors;
This class (or its subclass TimeStampWithError) can be used
in places where previously FairTimeStamp was used.

The TimeStamp class is configurable on the type.

With this move, a couple of cleanup changes where possible:

  • use new class for tof::Digit
  • use new class for tpc::Cluster
  • remove unused FairTimeStamp header includes and
    fix some resulting missing includes that came
    indirectly with FairTimeStamp

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@noferini : Can you check if ok with you?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@davidrohr : Is this ok?

@alibuild
Copy link
Copy Markdown
Collaborator

Error while checking build/o2checkcode/o2 for 7530a3703fe8ebb07c55f31d65540d1a2538bc4b:

sw/BUILD/O2-latest/log
[ 61%] Linking CXX executable ../../bin/test_DataFormatsTPC_ClusterNative
[ 61%] Built target test_SimulationDataFormat_testMCCompLabel
[ 61%] Built target DataFormatsTPC
input_line_12:273:31: error: no member named 'base_object' in namespace 'boost::serialization'
[ 61%] Linking CXX shared library ../../../lib/libEMCALBase.so
[ 61%] Generating G__TPCBaseDict.cxx, G__TPCBaseDict_rdict.pcm, ../../../lib/libTPCBase.rootmap
    ar& boost::serialization::base_object<DigitBase>(*this);
        ~~~~~~~~~~~~~~~~~~~~~~^
input_line_12:273:43: error: unexpected type name 'DigitBase': expected expression
    ar& boost::serialization::base_object<DigitBase>(*this);
                                          ^
Error: /mnt/mesos/sandbox/sandbox/sw/slc7_x86-64/ROOT/v6-12-04-2/bin/rootcint: compilation failure (/mnt/mesos/sandbox/sandbox/sw/BUILD/acc77690dd391db424c86664971f5c54a488e535/O2/Detectors/ITSMFT/common/base/G__ITSMFTBaseDict1dcd590e4a_dictUmbrella.h)

Full log here.

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't it make sense to have different precision for error and timestamp itself? Also for the sake of unit testing, why not adding a simple one which creates a TimestampWithError and retrieves its contents?

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If this is ever required we can add it later.

Copy link
Copy Markdown
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Implemented suggestions.

@alibuild
Copy link
Copy Markdown
Collaborator

Error while checking build/o2/macos for 04256ca308ad716e648abaa92502990bde9ccf75:


Full log here.

@alibuild
Copy link
Copy Markdown
Collaborator

Error while checking build/O2/o2 for 04256ca308ad716e648abaa92502990bde9ccf75:

sw/BUILD/O2-latest/log
#undef  _BACKWARD_BACKWARD_WARNING_H

In file included from input_line_10:1:
/mnt/mesos/sandbox/sandbox/O2/Detectors/EMCAL/testsimulation/PutEmcalInTop.C:24:25: error: allocation of incomplete type 'FairRunSim'
  FairRunSim* run = new FairRunSim();
                        ^~~~~~~~~~
G__BaseDict dictionary forward declarations' payload:22:7: note: forward declaration of 'FairRunSim'
class FairRunSim;
      ^
In file included from input_line_10:1:
/mnt/mesos/sandbox/sandbox/O2/Detectors/EMCAL/testsimulation/PutEmcalInTop.C:25:6: error: member access into incomplete type 'FairRunSim'
  run->SetOutputFile("foo.root"); // Output file
     ^
G__BaseDict dictionary forward declarations' payload:22:7: note: forward declaration of 'FairRunSim'
class FairRunSim;
      ^
In file included from input_line_10:1:
/mnt/mesos/sandbox/sandbox/O2/Detectors/EMCAL/testsimulation/PutEmcalInTop.C:26:6: error: member access into incomplete type 'FairRunSim'
  run->SetName("TGeant3");      // Transport engine
     ^
G__BaseDict dictionary forward declarations' payload:22:7: note: forward declaration of 'FairRunSim'
class FairRunSim;
      ^
In file included from input_line_10:1:
/mnt/mesos/sandbox/sandbox/O2/Detectors/EMCAL/testsimulation/PutEmcalInTop.C:28:6: error: member access into incomplete type 'FairRunSim'
  run->SetMaterials("media.geo"); // Materials
     ^
G__BaseDict dictionary forward declarations' payload:22:7: note: forward declaration of 'FairRunSim'
--
#undef  _BACKWARD_BACKWARD_WARNING_H

In file included from input_line_10:1:
/mnt/mesos/sandbox/sandbox/O2/Detectors/EMCAL/testsimulation/PutEmcalInTop.C:31:16: error: no type named 'Cave' in namespace 'o2::Passive'
  o2::Passive::Cave* cave = new o2::Passive::Cave("CAVE");
  ~~~~~~~~~~~~~^
/mnt/mesos/sandbox/sandbox/O2/Detectors/EMCAL/testsimulation/PutEmcalInTop.C:31:46: error: no type named 'Cave' in namespace 'o2::Passive'
  o2::Passive::Cave* cave = new o2::Passive::Cave("CAVE");
                                ~~~~~~~~~~~~~^
In file included from G__BaseDict dictionary payload:1884:
--
#undef  _BACKWARD_BACKWARD_WARNING_H

In file included from input_line_10:1:
/mnt/mesos/sandbox/sandbox/O2/Detectors/EMCAL/testsimulation/PutEmcalInTop.C:33:6: error: member access into incomplete type 'FairRunSim'
  run->AddModule(cave);
     ^
G__BaseDict dictionary forward declarations' payload:22:7: note: forward declaration of 'FairRunSim'
--
#undef  _BACKWARD_BACKWARD_WARNING_H

Full log here.

@codecov-io
Copy link
Copy Markdown

Codecov Report

Merging #787 into dev will decrease coverage by <.01%.
The diff coverage is 12.5%.

@@            Coverage Diff            @@
##              dev    #787      +/-   ##
=========================================
- Coverage   21.91%   21.9%   -0.01%     
=========================================
  Files         606    1208     +602     
  Lines       46005   92054   +46049     
=========================================
+ Hits        10081   20164   +10083     
- Misses      35924   71890   +35966
Impacted Files Coverage Δ
...reconstruction/include/TPCReconstruction/Cluster.h 0% <ø> (ø) ⬆️
Detectors/TPC/reconstruction/src/Cluster.cxx 25% <ø> (ø) ⬆️
...onstruction/include/ITSMFTReconstruction/Cluster.h 0% <ø> (ø) ⬆️
Detectors/TPC/reconstruction/src/HwClusterer.cxx 0% <ø> (ø) ⬆️
...tectors/TPC/reconstruction/src/HwClusterFinder.cxx 0% <ø> (ø) ⬆️
Detectors/TPC/base/include/TPCBase/Digit.h 66.66% <ø> (ø) ⬆️
Detectors/TOF/base/include/TOFBase/Digit.h 0% <0%> (ø) ⬆️
...s/ITSMFT/common/reconstruction/src/PixelReader.cxx 0% <0%> (ø) ⬆️
Detectors/TOF/simulation/src/Digitizer.cxx 0.29% <0%> (ø) ⬆️
Detectors/TOF/base/src/Digit.cxx 11.11% <0%> (ø) ⬆️
... and 613 more

@sawenzel sawenzel force-pushed the swenzel/timestamp branch 2 times, most recently from ac07216 to fac96b2 Compare January 29, 2018 08:55
@alibuild
Copy link
Copy Markdown
Collaborator

Error while checking build/O2/o2 for fac96b26f83601a0c757038c27295b1506f4c72b:

sw/BUILD/O2-latest/log
#undef  _BACKWARD_BACKWARD_WARNING_H

In file included from input_line_10:1:
/mnt/mesos/sandbox/sandbox/O2/Detectors/PHOS/testsimulation/PutPhosInTop.C:24:25: error: allocation of incomplete type 'FairRunSim'
  FairRunSim* run = new FairRunSim();
                        ^~~~~~~~~~
G__BaseDict dictionary forward declarations' payload:22:7: note: forward declaration of 'FairRunSim'
class FairRunSim;
      ^
In file included from input_line_10:1:
/mnt/mesos/sandbox/sandbox/O2/Detectors/PHOS/testsimulation/PutPhosInTop.C:25:6: error: member access into incomplete type 'FairRunSim'
  run->SetOutputFile("foo.root"); // Output file
     ^
G__BaseDict dictionary forward declarations' payload:22:7: note: forward declaration of 'FairRunSim'
class FairRunSim;
      ^
In file included from input_line_10:1:
/mnt/mesos/sandbox/sandbox/O2/Detectors/PHOS/testsimulation/PutPhosInTop.C:26:6: error: member access into incomplete type 'FairRunSim'
  run->SetName("TGeant3");      // Transport engine
     ^
G__BaseDict dictionary forward declarations' payload:22:7: note: forward declaration of 'FairRunSim'
class FairRunSim;
      ^
In file included from input_line_10:1:
/mnt/mesos/sandbox/sandbox/O2/Detectors/PHOS/testsimulation/PutPhosInTop.C:28:6: error: member access into incomplete type 'FairRunSim'
  run->SetMaterials("media.geo"); // Materials
     ^
G__BaseDict dictionary forward declarations' payload:22:7: note: forward declaration of 'FairRunSim'
--
#undef  _BACKWARD_BACKWARD_WARNING_H

In file included from input_line_10:1:
/mnt/mesos/sandbox/sandbox/O2/Detectors/PHOS/testsimulation/PutPhosInTop.C:31:16: error: no type named 'Cave' in namespace 'o2::Passive'
  o2::Passive::Cave* cave = new o2::Passive::Cave("CAVE");
  ~~~~~~~~~~~~~^
/mnt/mesos/sandbox/sandbox/O2/Detectors/PHOS/testsimulation/PutPhosInTop.C:31:46: error: no type named 'Cave' in namespace 'o2::Passive'
  o2::Passive::Cave* cave = new o2::Passive::Cave("CAVE");
                                ~~~~~~~~~~~~~^
In file included from G__BaseDict dictionary payload:1884:
--
#undef  _BACKWARD_BACKWARD_WARNING_H

In file included from input_line_10:1:
/mnt/mesos/sandbox/sandbox/O2/Detectors/PHOS/testsimulation/PutPhosInTop.C:33:6: error: member access into incomplete type 'FairRunSim'
  run->AddModule(cave);
     ^
G__BaseDict dictionary forward declarations' payload:22:7: note: forward declaration of 'FairRunSim'
--
#undef  _BACKWARD_BACKWARD_WARNING_H

Full log here.

@sawenzel sawenzel force-pushed the swenzel/timestamp branch 2 times, most recently from ba5ac27 to 9d3b05c Compare January 29, 2018 09:23
Moving a TimeStamp class from TPC to SimulationDataFormat
to be reused by other detectors;
This class (or its subclass TimeStampWithError) can be used
in places where previously FairTimeStamp was used.

The TimeStamp class is configurable on the type.

With this move, a couple of cleanup changes where possible:

  * use new class for tof::Digit
  * use new class for tpc::Cluster
  * remove unused FairTimeStamp header includes and
    fix some resulting missing includes that came
    indirectly with FairTimeStamp
Use o2::dataformats::TimeStamp

Cleanup of ITSMFT::Digit; Removal of unused files;
Removal of unused boost serialization
@AliceO2Group AliceO2Group deleted a comment from alibuild Jan 29, 2018
@AliceO2Group AliceO2Group deleted a comment from alibuild Jan 29, 2018
@AliceO2Group AliceO2Group deleted a comment from alibuild Jan 29, 2018
@AliceO2Group AliceO2Group deleted a comment from alibuild Jan 29, 2018
@AliceO2Group AliceO2Group deleted a comment from alibuild Jan 29, 2018
@AliceO2Group AliceO2Group deleted a comment from alibuild Jan 29, 2018
@AliceO2Group AliceO2Group deleted a comment from alibuild Jan 29, 2018
@alibuild
Copy link
Copy Markdown
Collaborator

Error while checking build/O2/o2 for 7d49b23:

sw/BUILD/O2-latest/log
#undef  _BACKWARD_BACKWARD_WARNING_H

In file included from input_line_10:1:
/mnt/mesos/sandbox/sandbox/O2/Detectors/EMCAL/testsimulation/PutEmcalInTop.C:24:25: error: allocation of incomplete type 'FairRunSim'
  FairRunSim* run = new FairRunSim();
                        ^~~~~~~~~~
G__BaseDict dictionary forward declarations' payload:22:7: note: forward declaration of 'FairRunSim'
class FairRunSim;
      ^
In file included from input_line_10:1:
/mnt/mesos/sandbox/sandbox/O2/Detectors/EMCAL/testsimulation/PutEmcalInTop.C:25:6: error: member access into incomplete type 'FairRunSim'
  run->SetOutputFile("foo.root"); // Output file
     ^
G__BaseDict dictionary forward declarations' payload:22:7: note: forward declaration of 'FairRunSim'
class FairRunSim;
      ^
In file included from input_line_10:1:
/mnt/mesos/sandbox/sandbox/O2/Detectors/EMCAL/testsimulation/PutEmcalInTop.C:26:6: error: member access into incomplete type 'FairRunSim'
  run->SetName("TGeant3");      // Transport engine
     ^
G__BaseDict dictionary forward declarations' payload:22:7: note: forward declaration of 'FairRunSim'
class FairRunSim;
      ^
In file included from input_line_10:1:
/mnt/mesos/sandbox/sandbox/O2/Detectors/EMCAL/testsimulation/PutEmcalInTop.C:28:6: error: member access into incomplete type 'FairRunSim'
  run->SetMaterials("media.geo"); // Materials
     ^
G__BaseDict dictionary forward declarations' payload:22:7: note: forward declaration of 'FairRunSim'
--
#undef  _BACKWARD_BACKWARD_WARNING_H

In file included from input_line_10:1:
/mnt/mesos/sandbox/sandbox/O2/Detectors/EMCAL/testsimulation/PutEmcalInTop.C:31:16: error: no type named 'Cave' in namespace 'o2::Passive'
  o2::Passive::Cave* cave = new o2::Passive::Cave("CAVE");
  ~~~~~~~~~~~~~^
/mnt/mesos/sandbox/sandbox/O2/Detectors/EMCAL/testsimulation/PutEmcalInTop.C:31:46: error: no type named 'Cave' in namespace 'o2::Passive'
  o2::Passive::Cave* cave = new o2::Passive::Cave("CAVE");
                                ~~~~~~~~~~~~~^
In file included from G__BaseDict dictionary payload:1884:
--
#undef  _BACKWARD_BACKWARD_WARNING_H

In file included from input_line_10:1:
/mnt/mesos/sandbox/sandbox/O2/Detectors/EMCAL/testsimulation/PutEmcalInTop.C:33:6: error: member access into incomplete type 'FairRunSim'
  run->AddModule(cave);
     ^
G__BaseDict dictionary forward declarations' payload:22:7: note: forward declaration of 'FairRunSim'
--
#undef  _BACKWARD_BACKWARD_WARNING_H

Full log here.

@sawenzel sawenzel merged commit f5a69fa into AliceO2Group:dev Jan 29, 2018
@sawenzel sawenzel deleted the swenzel/timestamp branch January 29, 2018 12:41
@shahor02
Copy link
Copy Markdown
Collaborator

@sawenzel , I run my standard simulation with this class and got plenty of messages like

Warning in <TStreamerInfo::Build>: o2::TPC::Digit: base class o2::dataformats::TimeStamp<int> has no streamer or dictionary it will not be saved

and all the output branches with TimeStamp are empty. Strangely, this does not happen of for the error part of TimeStampWithError: the error info is stored but the not the time:

root [6] o2sim->Scan("TPCClusterHW.mTimeStamp : TPCClusterHW.mTimeStampError")
***********************************************
*    Row   * Instance * TPCCluste *  TPCClust *
***********************************************
*        0 *        0 *           *           *
*        1 *        0 *           * 0.9234804 *
*        1 *        1 *           * 0.8972870 *
*        1 *        2 *           * 0.8850445 *
*        1 *        3 *           * 0.8089578 *
*        1 *        4 *           * 0.2327176 *
*        1 *        5 *           * 0.8780974 *
*        1 *        6 *           * 0.9317334 *
*        1 *        7 *           * 0.8446878 *

Given that the dictionary generation in the SimulationDataLinkDef is done in a same way for both classes, I don't understand why they behave as they do. Moreover, that in the compilation I get:

[ 66%] Generating G__SimulationDataFormatDict.cxx, G__SimulationDataFormatDict_rdict.pcm, ../../lib/libSimulationDataFormat.rootmap
Warning: Unused class rule: o2::dataformats::TimeStampWithError<int, int>
Warning: Unused class rule: o2::dataformats::TimeStampWithError<double, double>
Warning: Unused class rule: o2::dataformats::TimeStampWithError<float, float>
Warning: Unused class rule: o2::dataformats::TimeStamp<int>
Warning: Unused class rule: o2::dataformats::TimeStamp<double>
Warning: Unused class rule: o2::dataformats::TimeStamp<float>
Scanning dependencies of target SimulationDataFormat
[ 66%] Building CXX object DataFormats/simulation/CMakeFiles/SimulationDataFormat.dir/G__SimulationDataFormatDict.cxx.o

Do you observe such thing?

BTW (sorry for late ignition), if TPC uses this class also in the reconstruction, would not it be better to move it to the new
directory DataFormats/Detectors/Common, where I've already moved some stuff in #808 ?

Cheers,
Ruben

@sawenzel
Copy link
Copy Markdown
Collaborator Author

The issue should be solved via #819. Thanks for spotting.

arvindkhuntia pushed a commit to arvindkhuntia/AliceO2 that referenced this pull request Jun 6, 2022
…#787)

* Adding dielectron cut with low pt, and TPC cut

* Added lmeePID_TPChadrejTOFrecRun3 cut for precise electron selection
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Development

Successfully merging this pull request may close these issues.

5 participants