Back to home page

sPhenix code displayed by LXR

 
 

    


File indexing completed on 2025-08-05 08:18:22

0001 /* Copyright 2008-2010, Technische Universitaet Muenchen,
0002    Authors: Christian Hoeppner & Sebastian Neubert & Johannes Rauch
0003 
0004    This file is part of GENFIT.
0005 
0006    GENFIT is free software: you can redistribute it and/or modify
0007    it under the terms of the GNU Lesser General Public License as published
0008    by the Free Software Foundation, either version 3 of the License, or
0009    (at your option) any later version.
0010 
0011    GENFIT is distributed in the hope that it will be useful,
0012    but WITHOUT ANY WARRANTY; without even the implied warranty of
0013    MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
0014    GNU Lesser General Public License for more details.
0015 
0016    You should have received a copy of the GNU Lesser General Public License
0017    along with GENFIT.  If not, see <http://www.gnu.org/licenses/>.
0018 */
0019 
0020 #include "StateOnPlane.h"
0021 #include "AbsTrackRep.h"
0022 #include "IO.h"
0023 
0024 #include <cassert>
0025 #include <TBuffer.h>
0026 
0027 namespace genfit {
0028 
0029 
0030 void StateOnPlane::Print(Option_t*) const {
0031   printOut << "genfit::StateOnPlane ";
0032   printOut << " state vector: "; state_.Print();
0033   if (sharedPlane_ != nullptr) {
0034     printOut << " defined in plane "; sharedPlane_->Print();
0035     TVector3 pos(0,0,0), mom(0,0,0);
0036     getRep()->getPosMom(*this, pos, mom);
0037     printOut << " 3D position: "; pos.Print();
0038     printOut << " 3D momentum: "; mom.Print();
0039   }
0040 }
0041 
0042 
0043 // Modified from auto-generated Streamer to account for sharedPlane_
0044 // Ignores rep_ and sharedPlane_, the owner has to take care of them.
0045 void StateOnPlane::Streamer(TBuffer &R__b)
0046 {
0047    // Stream an object of class genfit::StateOnPlane.
0048 
0049    //This works around a msvc bug and should be harmless on other platforms
0050    typedef ::genfit::StateOnPlane thisClass;
0051    UInt_t R__s, R__c;
0052    if (R__b.IsReading()) {
0053       Version_t R__v = R__b.ReadVersion(&R__s, &R__c); if (R__v) { }
0054       state_.Streamer(R__b);
0055       auxInfo_.Streamer(R__b);
0056       sharedPlane_.reset();  // needs to be set by owner;
0057       rep_ = nullptr;  // needs to be set by owner
0058       R__b.CheckByteCount(R__s, R__c, thisClass::IsA());
0059    } else {
0060       R__c = R__b.WriteVersion(thisClass::IsA(), kTRUE);
0061       state_.Streamer(R__b);
0062       auxInfo_.Streamer(R__b);
0063       R__b.SetByteCount(R__c, kTRUE);
0064    }
0065 }
0066 
0067 
0068 } /* End of namespace genfit */