Hello.
I’m trying to write an event class having information in it.
Attached is the event class and two classes having hit and cluster information that will be contained in the event class.
I wrote a script for generating shared library ( test.sh )
and macro file for testing save process ( test.C )
After running two files, test.root file is generated.
Inside that, one class is stored correctly ( STHit in fHitArray ),
but the other is only partially stored ( STHitCluster in fClusterArray ).
I’m keep thinking about this for two days and still getting nothing.
Could you please give me some idea?
Thanks in advance.
Genie
test.tgz (3.79 KB)
Hi Genie,
Using exclamation marks in comments after class members prevent the streaming of those members. So simply replace:
Int_t fClusterID; //!< Cluster ID
TVector3 fPosition; //!< Cluster position
TVector3 fPosSigma; //!< Cluster position uncertainty
TMatrixD fCovMatrix; //!< Cluster covariance matrix
Double_t fCharge; //!< Cluster Charge
[/code]By:
[code] //!< Cluster ID
Int_t fClusterID;
//!< Cluster position
TVector3 fPosition;
//!< Cluster position uncertainty
TVector3 fPosSigma;
//!< Cluster covariance matrix
TMatrixD fCovMatrix;
//!< Cluster Charge
Double_t fCharge;
Or even better, just remove the exclamation marks…
Int_t fClusterID; // Cluster ID
TVector3 fPosition; // Cluster position
TVector3 fPosSigma; // Cluster position uncertainty
TMatrixD fCovMatrix; // Cluster covariance matrix
Double_t fCharge; // Cluster Charge
Cheers, Bertrand.
Thank you so much, Bertrand.
Those are for doxygen so I couldn’t imagine those are the problem!
I changed them to another type.
Thank you Again!!