Fresh installation of root 5 does not read Delphes output files classes

Dear all,

I am having problems in reading files output from Delphes in root 5, something that does not happen in my laptop with ubuntu 18.04. when I try to open a file i get the following output:

root [0]
Attaching file tag_1_events_delphes_card_ATLAS.root as _file0…
Warning in TClass::TClass: no dictionary for class LHEFEvent is available
Warning in TClass::TClass: no dictionary for class Event is available
Warning in TClass::TClass: no dictionary for class GenParticle is available
Warning in TClass::TClass: no dictionary for class SortableObject is available
Warning in TClass::TClass: no dictionary for class Track is available
Warning in TClass::TClass: no dictionary for class Tower is available
Warning in TClass::TClass: no dictionary for class Jet is available
Warning in TClass::TClass: no dictionary for class MissingET is available
Warning in TClass::TClass: no dictionary for class Electron is available
Warning in TClass::TClass: no dictionary for class Photon is available
Warning in TClass::TClass: no dictionary for class Muon is available
Warning in TClass::TClass: no dictionary for class ScalarHT is available
root [1]

It is supposed that I have a fresh installation of root5 in a cluster CentOS Linux 7, and I can read Classes in other files except those coming from Delphes. The installation of root was quite typical from a source file:
./configure
make
That at the end said everything was installed successfully. I even installed Delphes with the same Root and still get this error.


ROOT Version: 5.34/38 12 March 2018
Platform: Cluster CentOS Linux 7
Compiler: gcc 4.8.5


You need to build the corresponding library (which is NOT a part of ROOT).

Then, create a simple “rootlogon.C” file (in your current working directory):

{ // rootlogon.C
  gInterpreter->AddIncludePath("/where/are/your/Delphes/includes");
  gSystem->AddDynamicPath("/where/are/your/Delphes/libs");
  gSystem->Load("libDelphes");
}

I’m sorry but what do you mean by the corresponding library?

I am getting this after running the .C file and calling the file inside the interface:

Warning in <TStreamerInfo::BuildCheck>:
   The StreamerInfo of class Track read from file /lstore/titan/atlas/emogollon/MG5_aMC_v3_1_1/bin/mediator_production_14tev_no_decay/dm_simp_mass0gev_spin_1_minus_dileptonic/Events/run_01_decayed_1/tag_1_events_delphes_card_ATLAS.root
   has the same version (=3) as the active class but a different checksum.
   You should update the version to ClassDef(Track,4).
   Do not try to write objects with the current class definition,
   the files will not be readable.
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float C; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float Mass; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float EtaOuter; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float PhiOuter; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float T; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float X; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float Y; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float Z; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float TOuter; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float XOuter; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float YOuter; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float ZOuter; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float Xd; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float Yd; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float Zd; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float L; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float D0; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float DZ; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float Nclusters; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float dNdx; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float ErrorP; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float ErrorPT; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float ErrorPhi; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float ErrorCtgTheta; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float ErrorT; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float ErrorD0; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float ErrorDZ; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float ErrorC; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float ErrorD0Phi; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float ErrorD0C; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float ErrorD0DZ; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float ErrorD0CtgTheta; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float ErrorPhiC; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float ErrorPhiDZ; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float ErrorPhiCtgTheta; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float ErrorCDZ; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float ErrorCCtgTheta; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   float ErrorDZCtgTheta; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   TRef Particle; //
Warning in <TStreamerInfo::CompareContent>: The following data member of
the in-memory layout version 3 of class 'Track' is missing from
the on-file layout version 3:
   int VertexIndex; //

Thanks in advance

You need to talk to the “class 'Track'” maintainers (and the one who produced your ROOT file).

I am not sure what you mean by talking with class Track maintainers.

In any terms, It is not clear to me how the same version of root in my laptop can load properly this file but using this installation it is not possible.

It seems something is wrong with TStreamerInfo::BuildCheck but I have no idea how to fix it.
Any guesses?

Different Delphes versions?

I have the same version in both installations, that’s why I don’t understand why this is happening, the only thing very different is that the broken code is working in a cluster. I also do not understand why a different computer can access these files without any warnings.

Another trial … on both machines, load the Delphes library and then compare the outputs of: .class Track

Can it be that on your machines, you have some special file(s) that will automatically be executed by “root”:

Well, I checked both classes in Delphes where the Track is defined and they both agree. DelphesClasses.h

I even updated the class to 4 as the warning suggests but after that, I cannot read the events (which makes sense but I don’t understand why root give me the wrong advice to access the data in the class).

On the other hand, I don’t have the macro rootlogon.C in any of both installations, how I can get the list of the automatically executed files in root?

Best Regards.

There is another detail I forgot to mention: we have created a Virtual machine with the same details of installation (centos7, root 5.34/38, delphes 3.4.1) as in the cluster, which is where I am trying to read this information, and I get the same errors despite the virtual machine has everything new.

Is there any known bug in root 5 with centos installations that don’t allow to access Delphes classes inside the root tuples?

The list of files automatically executed by ROOT is in the link in my previous post.

Try to run (note: you will get all “no dictionary” warnings, of course):
root -b -n your_file.root
Then execute:
gFile->MakeProject("AllClasses", "*", "recreate++")
and inspect the generated source code for classes (see their data members).

Try to attach your root file for inspection.

Try to talk to the people who maintain the software on your cluster (they should be able to tell you how to build and setup the required software).

Ok, I run the gFile->MakeProject(“AllClasses”, “*”, “recreate++”) for both cases:

Working computer:
gFile->MakeProject(“AllClasses_mypc”, “*”, “recreate++”)

Cluster:
gFile->MakeProject(“AllClasses”, “*”, “recreate++”)

This is what I got after doing a diff between the two folders AllClasses_mypc and AllClasses:


---
[emogollon@pauli04 ~]$ diff -r AllClasses_mypc AllClasses
diff -r AllClasses_mypc/AllClassesProjectDict.cxx AllClasses/AllClassesProjectDict.cxx
3c3
< // File generated by rootcint at Wed Feb  8 10:58:37 2023
---
> // File generated by rootcint at Wed Feb  8 10:59:34 2023
Binary files AllClasses_mypc/AllClassesProjectSource.o and AllClasses/AllClassesProjectSource.o differ
Binary files AllClasses_mypc/AllClasses.so and AllClasses/AllClasses.so differ
diff -r AllClasses_mypc/Electron.h AllClasses/Electron.h
3c3
< //     (Wed Feb  8 10:57:03 2023 by ROOT version 5.34/38)
---
> //     (Wed Feb  8 10:59:34 2023 by ROOT version 5.34/38)
diff -r AllClasses_mypc/Event.h AllClasses/Event.h
3c3
< //     (Wed Feb  8 10:57:02 2023 by ROOT version 5.34/38)
---
> //     (Wed Feb  8 10:59:33 2023 by ROOT version 5.34/38)
diff -r AllClasses_mypc/GenParticle.h AllClasses/GenParticle.h
3c3
< //     (Wed Feb  8 10:57:02 2023 by ROOT version 5.34/38)
---
> //     (Wed Feb  8 10:59:34 2023 by ROOT version 5.34/38)
diff -r AllClasses_mypc/Jet.h AllClasses/Jet.h
3c3
< //     (Wed Feb  8 10:57:03 2023 by ROOT version 5.34/38)
---
> //     (Wed Feb  8 10:59:34 2023 by ROOT version 5.34/38)
diff -r AllClasses_mypc/LHEFEvent.h AllClasses/LHEFEvent.h
3c3
< //     (Wed Feb  8 10:57:02 2023 by ROOT version 5.34/38)
---
> //     (Wed Feb  8 10:59:33 2023 by ROOT version 5.34/38)
diff -r AllClasses_mypc/MAKEP AllClasses/MAKEP
1,2c1,2
< rootcint -f AllClassesProjectDict.cxx -c -I$ROOTSYS/include  -I"/home/esteban/root/include"  AllClassesProjectHeaders.h AllClassesLinkDef.h 
< cd . ; g++ -c -O2 -pipe -m64 -W -Woverloaded-virtual -fPIC -pthread -I$ROOTSYS/include  -I"/home/esteban/root/include"  -IAllClasses AllClassesProjectSource.cxx  ; g++ AllClassesProjectSource.o -shared -Wl,-soname,AllClasses.so -m64 -O2  -Wl,--no-undefined -Wl,--as-needed /home/esteban/root/lib/libCint.so /home/esteban/root/lib/libCore.so /home/esteban/root/lib/libRint.so /home/esteban/root/lib/libMathCore.so /home/esteban/root/lib/libThread.so /home/esteban/root/lib/libRIO.so /home/esteban/root/lib/libCint.so /home/esteban/root/lib/libMatrix.so /home/esteban/root/lib/libPhysics.so /home/esteban/root/lib/libNet.so /home/esteban/root/lib/libTree.so -o AllClasses.so
---
> rootcint -f AllClassesProjectDict.cxx -c -I$ROOTSYS/include  -I"/home/t3atlas/emogollon/root/include"  AllClassesProjectHeaders.h AllClassesLinkDef.h 
> cd . ; g++ -c -O2 -pipe -m64 -W -Woverloaded-virtual -fPIC -pthread -I$ROOTSYS/include  -I"/home/t3atlas/emogollon/root/include"  -IAllClasses AllClassesProjectSource.cxx  ; g++ AllClassesProjectSource.o -shared -Wl,-soname,AllClasses.so -m64 -O2  -Wl,--no-undefined -Wl,--as-needed /lib64/libpthread.so /lib64/libm.so /lib64/libpcre.so /lib64/liblzma.so /lib64/libz.so /lib64/libdl.so /lib64/libc.so /cvmfs/sw.el7/gcc/7.5/b01/lib64/libgcc_s.so /cvmfs/sw.el7/gcc/7.5/b01/lib64/libstdc++.so /home/t3atlas/emogollon/root/lib/libCint.so /home/t3atlas/emogollon/root/lib/libCore.so /home/t3atlas/emogollon/root/lib/libRint.so /home/t3atlas/emogollon/root/lib/libMathCore.so /home/t3atlas/emogollon/root/lib/libThread.so /home/t3atlas/emogollon/root/lib/libRIO.so /home/t3atlas/emogollon/root/lib/libCint.so /home/t3atlas/emogollon/root/lib/libMatrix.so /home/t3atlas/emogollon/root/lib/libPhysics.so /home/t3atlas/emogollon/root/lib/libNet.so /home/t3atlas/emogollon/root/lib/libTree.so -o AllClasses.so
diff -r AllClasses_mypc/MissingET.h AllClasses/MissingET.h
3c3
< //     (Wed Feb  8 10:57:03 2023 by ROOT version 5.34/38)
---
> //     (Wed Feb  8 10:59:34 2023 by ROOT version 5.34/38)
diff -r AllClasses_mypc/Muon.h AllClasses/Muon.h
3c3
< //     (Wed Feb  8 10:57:03 2023 by ROOT version 5.34/38)
---
> //     (Wed Feb  8 10:59:34 2023 by ROOT version 5.34/38)
diff -r AllClasses_mypc/Photon.h AllClasses/Photon.h
3c3
< //     (Wed Feb  8 10:57:03 2023 by ROOT version 5.34/38)
---
> //     (Wed Feb  8 10:59:34 2023 by ROOT version 5.34/38)
diff -r AllClasses_mypc/ScalarHT.h AllClasses/ScalarHT.h
3c3
< //     (Wed Feb  8 10:57:03 2023 by ROOT version 5.34/38)
---
> //     (Wed Feb  8 10:59:34 2023 by ROOT version 5.34/38)
diff -r AllClasses_mypc/SortableObject.h AllClasses/SortableObject.h
3c3
< //     (Wed Feb  8 10:57:02 2023 by ROOT version 5.34/38)
---
> //     (Wed Feb  8 10:59:34 2023 by ROOT version 5.34/38)
diff -r AllClasses_mypc/Tower.h AllClasses/Tower.h
3c3
< //     (Wed Feb  8 10:57:03 2023 by ROOT version 5.34/38)
---
> //     (Wed Feb  8 10:59:34 2023 by ROOT version 5.34/38)
diff -r AllClasses_mypc/Track.h AllClasses/Track.h
3c3
< //     (Wed Feb  8 10:57:02 2023 by ROOT version 5.34/38)
---
> //     (Wed Feb  8 10:59:34 2023 by ROOT version 5.34/38)

Essentially rootcint is the only relevant difference and the way it is linked with the other libraries, is this right?

Thanks in advance

Have a look at the generated “Track.h” file. Does it have “float C”, “float Mass”, "float EtaOuter and so on?

Yes:

//   This class has been generated by TFile::MakeProject
//     (Wed Feb  8 10:59:34 2023 by ROOT version 5.34/38)
//	from the StreamerInfo in file Esteban_old/madanalysis5/bin/ttH_dilep_REC5/Input/tag_1_events_delphes_card_ATLAS.root
//////////////////////////////////////////////////////////


#ifndef Track_h
#define Track_h
class Track;

#include "SortableObject.h"
#include "TRef.h"

class Track : public SortableObject {

public:
// Nested classes declaration.

public:
// Data Members.
   int         PID;         //HEP ID number
   int         Charge;      //track charge
   float       P;           //track momentum
   float       PT;          //track transverse momentum
   float       Eta;         //track pseudorapidity
   float       Phi;         //track azimuthal angle
   float       CtgTheta;    //track cotangent of theta
   float       C;           //track curvature inverse
   float       Mass;        //particle mass
   float       EtaOuter;    //track pseudorapidity at the tracker edge
   float       PhiOuter;    //track azimuthal angle at the tracker edge
   float       T;           //track vertex position (t component)
   float       X;           //track vertex position (x component)
   float       Y;           //track vertex position (y component)
   float       Z;           //track vertex position (z component)
   float       TOuter;      //track position (t component) at the tracker edge
   float       XOuter;      //track position (x component) at the tracker edge
   float       YOuter;      //track position (y component) at the tracker edge
   float       ZOuter;      //track position (z component) at the tracker edge
   float       Xd;          //X coordinate of point of closest approach to vertex
   float       Yd;          //Y coordinate of point of closest approach to vertex
   float       Zd;          //Z coordinate of point of closest approach to vertex
   float       L;           //track path length
   float       D0;          //track transverse impact parameter
   float       DZ;          //track longitudinal impact parameter
   float       Nclusters;    //Number of ionization clusters
   float       dNdx;         //Number of ionization clusters
   float       ErrorP;       //track momentum error
   float       ErrorPT;      //track transverse momentum error
   float       ErrorPhi;     //track azimuthal angle error
   float       CtgTheta;    //track cotangent of theta
   float       C;           //track curvature inverse
   float       Mass;        //particle mass
   float       EtaOuter;    //track pseudorapidity at the tracker edge
   float       PhiOuter;    //track azimuthal angle at the tracker edge
   float       T;           //track vertex position (t component)
   float       X;           //track vertex position (x component)
   float       Y;           //track vertex position (y component)
   float       Z;           //track vertex position (z component)
   float       TOuter;      //track position (t component) at the tracker edge
   float       XOuter;      //track position (x component) at the tracker edge
   float       YOuter;      //track position (y component) at the tracker edge
   float       ZOuter;      //track position (z component) at the tracker edge
   float       Xd;          //X coordinate of point of closest approach to vertex
   float       Yd;          //Y coordinate of point of closest approach to vertex
   float       Zd;          //Z coordinate of point of closest approach to vertex
   float       L;           //track path length
   float       D0;          //track transverse impact parameter
   float       DZ;          //track longitudinal impact parameter
   float       Nclusters;    //Number of ionization clusters
   float       dNdx;         //Number of ionization clusters
   float       ErrorP;       //track momentum error
   float       ErrorPT;      //track transverse momentum error
   float       ErrorPhi;     //track azimuthal angle error
   float       ErrorCtgTheta;    //track cotangent of theta error
   float       ErrorT;           //time measurement error
   float       ErrorD0;          //track transverse impact parameter error
   float       ErrorDZ;          //track longitudinal impact parameter error
   float       ErrorC;           //track curvature error
   float       ErrorD0Phi;	 //
   float       ErrorD0C;         //
   float       ErrorD0DZ;        //
   float       ErrorD0CtgTheta;    //
   float       ErrorPhiC;          //
   float       ErrorPhiDZ;         //
   float       ErrorPhiCtgTheta;    //
   float       ErrorCDZ;            //
   float       ErrorCCtgTheta;      //
   float       ErrorDZCtgTheta;     //
   TRef        Particle;            //reference to generated particle
   int         VertexIndex;         //reference to vertex

   Track();
   Track(const Track & );
   virtual ~Track();

   ClassDef(Track,4); // Generated by MakeProject.
};
#endif

Well, it seems you need to talk to the Delphes maintainers.

It looks like the “pure” ROOT properly sees the classes (why it has “ClassDef(Track,4);” instead of “3”?), but as soon as you load the Delphes library, it breaks:

This topic was automatically closed 14 days after the last reply. New replies are no longer allowed.