#include "Riostream.h"
#include "TRandom.h"
#include <sstream>
+
+#include "AliSysInfo.h"
using namespace std;
AliTPCcalibAlign* AliTPCcalibAlign::fgInstance = 0;
}
+//______________________________________________________________________________
+void AliTPCcalibAlign::Streamer(TBuffer &R__b)
+{
+ // Stream an object of class AliTPCcalibAlign.
+ Bool_t isDebug=AliLog::GetDebugLevel("","AliTPCcalibAlign")>0;
+ if (isDebug) AliSysInfo::SetVerbose(kTRUE);
+
+ if (R__b.IsReading()) {
+ // R__b.ReadClassBuffer(AliTPCcalibAlign::Class(),this);
+ UInt_t R__s, R__c;
+ Version_t R__v = R__b.ReadVersion(&R__s, &R__c);
+
+ AliTPCcalibBase::Streamer(R__b); // Stream the base class
+
+ // Read the "big data members" from the same Root directory
+ if (gDirectory){
+ for (Int_t i=0; i<2; ++i){
+ TString hisName=TString::Format("AliTPCcalibAlign.%s.fClusterDelta_%d",GetName(),i);
+ if (gDirectory->Get(hisName.Data())){
+ fClusterDelta[i] = dynamic_cast<THn*>(gDirectory->Get((hisName).Data()));
+ }
+ }
+
+ for (Int_t i=0; i<4; ++i){
+ TString hisName=TString::Format("AliTPCcalibAlign.%s.fTrackletDelta_%d",GetName(),i);
+ if (gDirectory->Get(hisName.Data())){
+ fTrackletDelta[i] = dynamic_cast<THnSparse*>(gDirectory->Get((hisName).Data()));
+ }
+ }
+ }
+
+ // If the "big data members"were not in the file, try to read them from the object
+ // This is suppose to restore the backward compatibility
+ for (Int_t i=0; i<2; ++i) {
+ if (!fClusterDelta[i]) R__b >> fClusterDelta[i];
+ }
+
+ for (Int_t i=0; i<4; ++i) {
+ if (!fTrackletDelta[i]) R__b >> fTrackletDelta[i];
+ }
+
+ // Read all the other data members. This is error prone,
+ // please make sure this part is updated if you change the data members
+ fDphiHistArray.Streamer(R__b);
+ fDthetaHistArray.Streamer(R__b);
+ fDyHistArray.Streamer(R__b);
+ fDzHistArray.Streamer(R__b);
+
+ fDyPhiHistArray.Streamer(R__b);
+ fDzThetaHistArray.Streamer(R__b);
+
+ fDphiZHistArray.Streamer(R__b);
+ fDthetaZHistArray.Streamer(R__b);
+ fDyZHistArray.Streamer(R__b);
+ fDzZHistArray.Streamer(R__b);
+
+ fFitterArray12.Streamer(R__b);
+ fFitterArray9.Streamer(R__b);
+ fFitterArray6.Streamer(R__b);
+
+ fMatrixArray12.Streamer(R__b);
+ fMatrixArray9.Streamer(R__b);
+ fMatrixArray6.Streamer(R__b);
+
+ fCombinedMatrixArray6.Streamer(R__b);
+
+ R__b.ReadFastArray(fPoints,72*72);
+
+ R__b >> fNoField;
+ R__b >> fXIO;
+ R__b >> fXmiddle;
+ R__b >> fXquadrant;
+
+ fArraySectorIntParam.Streamer(R__b);
+ fArraySectorIntCovar.Streamer(R__b);
+
+ R__b >> fSectorParamA;
+ R__b >> fSectorCovarA;
+ R__b >> fSectorParamC;
+ R__b >> fSectorCovarC;
+
+ R__b >> fUseInnerOuter;
+ R__b >> fgkMergeEntriesCut; // Should we write the static member?
+ } else {
+ // R__b.WriteClassBuffer(AliTPCcalibAlign::Class(),this);
+ if (isDebug) AliSysInfo::AddStamp("aliengStreamer::Start");
+
+ R__b.WriteVersion(AliTPCcalibAlign::IsA());
+ AliTPCcalibBase::Streamer(R__b); // Stream the base class
+
+ // Write the "big data members directly in the file in parallel with the object itself
+ for (Int_t i=0; i<2; ++i){
+ if (fClusterDelta[i]) fClusterDelta[i]->Write(TString::Format("AliTPCcalibAlign.%s.fClusterDelta_%d",GetName(),i).Data());
+ }
+
+ if (isDebug) AliSysInfo::AddStamp("alignStreamer::fClusterDelta");
+
+ for (Int_t i=0; i<4; ++i){
+ if (fTrackletDelta[i]) fTrackletDelta[i]->Write(TString::Format("AliTPCcalibAlign.%s.fTrackletDelta_%d",GetName(),i).Data());
+ }
+
+ if (isDebug) AliSysInfo::AddStamp("alignStreamer::fTrackletDelta");
+
+ // Write all the other data members. This is error prone,
+ // please make sure this part is updated if you change the data members
+ fDphiHistArray.Streamer(R__b);
+ fDthetaHistArray.Streamer(R__b);
+ fDyHistArray.Streamer(R__b);
+ fDzHistArray.Streamer(R__b);
+
+ fDyPhiHistArray.Streamer(R__b);
+ fDzThetaHistArray.Streamer(R__b);
+
+ fDphiZHistArray.Streamer(R__b);
+ fDthetaZHistArray.Streamer(R__b);
+ fDyZHistArray.Streamer(R__b);
+ fDzZHistArray.Streamer(R__b);
+
+ fFitterArray12.Streamer(R__b);
+ fFitterArray9.Streamer(R__b);
+ fFitterArray6.Streamer(R__b);
+
+ fMatrixArray12.Streamer(R__b);
+ fMatrixArray9.Streamer(R__b);
+ fMatrixArray6.Streamer(R__b);
+
+ fCombinedMatrixArray6.Streamer(R__b);
+
+ R__b.WriteFastArray(fPoints,72*72);
+
+ R__b << fNoField;
+ R__b << fXIO;
+ R__b << fXmiddle;
+ R__b << fXquadrant;
+
+ fArraySectorIntParam.Streamer(R__b);
+ fArraySectorIntCovar.Streamer(R__b);
+
+ R__b << fSectorParamA;
+ R__b << fSectorCovarA;
+ R__b << fSectorParamC;
+ R__b << fSectorCovarC;
+
+ R__b << fUseInnerOuter;
+ R__b << fgkMergeEntriesCut; // Should we write the static member?
+ if (isDebug) AliSysInfo::AddStamp("alignStreamer::DefaultStreamer");
+ }
+}