EIC Software
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups Pages
AbsFitterInfo.cc
Go to the documentation of this file. Or view the newest version in sPHENIX GitHub for file AbsFitterInfo.cc
1 /* Copyright 2008-2010, Technische Universitaet Muenchen,
2  Authors: Christian Hoeppner & Sebastian Neubert & Johannes Rauch
3 
4  This file is part of GENFIT.
5 
6  GENFIT is free software: you can redistribute it and/or modify
7  it under the terms of the GNU Lesser General Public License as published
8  by the Free Software Foundation, either version 3 of the License, or
9  (at your option) any later version.
10 
11  GENFIT is distributed in the hope that it will be useful,
12  but WITHOUT ANY WARRANTY; without even the implied warranty of
13  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  GNU Lesser General Public License for more details.
15 
16  You should have received a copy of the GNU Lesser General Public License
17  along with GENFIT. If not, see <http://www.gnu.org/licenses/>.
18 */
19 
20 #include "AbsFitterInfo.h"
21 
22 #include <TClass.h>
23 #include <TBuffer.h>
24 
25 namespace genfit {
26 
28  trackPoint_(nullptr),
29  rep_(nullptr)
30 {
31  ;
32 }
33 
34 AbsFitterInfo::AbsFitterInfo(const TrackPoint* trackPoint, const AbsTrackRep* rep) :
35  trackPoint_(trackPoint),
36  rep_(rep)
37 {
38  ;
39 }
40 
41 void AbsFitterInfo::Streamer(TBuffer &R__b)
42 {
43  // Stream an object of class genfit::AbsFitterInfo.
44  //This works around a msvc bug and should be harmless on other platforms
45  typedef ::genfit::AbsFitterInfo thisClass;
46  UInt_t R__s, R__c;
47  if (R__b.IsReading()) {
48  Version_t R__v = R__b.ReadVersion(&R__s, &R__c); if (R__v) { }
49  //TObject::Streamer(R__b);
50  // See the long comment in AbsFinitePlane::Streamer. This
51  // creates a duplicate of the DetPlane.
52  TClass* cl = TClass::Load(R__b);
53  DetPlane *p = (DetPlane*)(cl->New());
54  cl->Streamer(p, R__b);
55  sharedPlane_.reset(p);
56  R__b.CheckByteCount(R__s, R__c, thisClass::IsA());
57  } else {
58  R__c = R__b.WriteVersion(thisClass::IsA(), kTRUE);
59  //TObject::Streamer(R__b);
60  // See the long comment in AbsFinitePlane::Streamer. This
61  // stores a duplicate of the DetPlane, allowing for typesafe
62  // reading.
63  sharedPlane_->IsA()->Store(R__b);
64  sharedPlane_->Streamer(R__b);
65  R__b.SetByteCount(R__c, kTRUE);
66  }
67 }
68 
69 } /* End of namespace genfit */