<commit_before>// @(#)root/base:$Name:  $:$Id: TView.cxx,v 1.38 2006/05/23 04:47:35 brun Exp $
// Author: <NAME>, <NAME>, <NAME>, <NAME>   18/08/95

/*************************************************************************
 * Copyright (C) 1995-2000, <NAME> and <NAME>.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "TVirtualUtil3D.h"
#include "TVirtualPad.h"
#include "TView.h"
#include "TVirtualX.h"
#include "TROOT.h"
#include "TClass.h"
#include "TList.h"
#include "TFile.h"
#include "TPluginManager.h"

// Remove when TViewer3DPad fix in ExecuteRotateView() is removed
#include "TVirtualViewer3D.h"

ClassImp(TView)

//const Int_t kPerspective = BIT(14);

const Int_t kCARTESIAN   = 1;
const Int_t kPOLAR       = 2;
const Double_t kRad = 3.14159265358979323846/180.0;

//______________________________________________________________________________
//*-*-*-*-*-*-*-*-*-*-*-*-*The V I E W class*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
//*-*                      =================                              *
//*-*                                                                     *
//*-*   This package was originally written by <NAME>         *
//*-*   from IHEP/Protvino.                                               *
//*-*                                                                     *
//*-*   The original Fortran implementation was adapted to HIGZ/PAW       *
//*-*   by O<NAME> and  <NAME>.                         *
//*-*                                                                     *
//*-*   This View class is a subset of the original system                *
//*-*   It has been converted to a C++ class  by <NAME>                *
//*-*                                                                     *
//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


//____________________________________________________________________________
TView::TView()
{
//*-*-*-*-*-*-*-*-*-*-*-*-*-*View default constructor*-*-*-*-*-*-*-*-*-*-*-*-*
//*-*                        ========================

   fOutline = 0;
   fDefaultOutline = kFALSE;
   fAutoRange      = kFALSE;
   fChanged = kFALSE;
   SetBit(kMustCleanup);
   for (Int_t i=0;i<3;i++) {
      fX1[i] = fX2[i] = fY1[i] = fY2[i] = fZ1[i] = fZ2[i] = 0;
   }
}

//____________________________________________________________________________
TView::TView(const TView& tv) :
  TObject(tv),
  TAttLine(tv),
  fLatitude(tv.fLatitude),
  fLongitude(tv.fLongitude),
  fPsi(tv.fPsi),
  fDview(tv.fDview),
  fDproj(tv.fDproj),
  fUpix(tv.fUpix),
  fVpix(tv.fVpix),
  fSystem(tv.fSystem),
  fOutline(tv.fOutline),
  fDefaultOutline(tv.fDefaultOutline),
  fAutoRange(tv.fAutoRange),
  fChanged(tv.fChanged)
{
   //copy constructor
   for(Int_t i=0; i<16; i++) {
      fTN[i]=tv.fTN[i];
      fTB[i]=tv.fTB[i];
      fTnorm[i]=tv.fTnorm[i];
      fTback[i]=tv.fTback[i];
   }
   for(Int_t i=0; i<3; i++) {
      fRmax[i]=tv.fRmax[i];
      fRmin[i]=tv.fRmin[i];
      fUVcoord[4]=tv.fUVcoord[4];
      fX1[i]=tv.fX1[i];
      fX2[i]=tv.fX2[i];
      fY1[i]=tv.fY1[i];
      fY2[i]=tv.fY2[i];
      fZ1[i]=tv.fZ1[i];
      fZ2[i]=tv.fZ2[i];
   }
   for(Int_t i=0; i<4; i++) 
      fUVcoord[i]=tv.fUVcoord[i];
}

//____________________________________________________________________________
TView& TView::operator=(const TView& tv)
{
   //equal operator
   if(this!=&tv) {
      TObject::operator=(tv);
      TAttLine::operator=(tv);
      fLatitude=tv.fLatitude;
      fLongitude=tv.fLongitude;
      fPsi=tv.fPsi;
      fDview=tv.fDview;
      fDproj=tv.fDproj;
      fUpix=tv.fUpix;
      fVpix=tv.fVpix;
      fSystem=tv.fSystem;
      fOutline=tv.fOutline;
      fDefaultOutline=tv.fDefaultOutline;
      fAutoRange=tv.fAutoRange;
      fChanged=tv.fChanged;
      for(Int_t i=0; i<16; i++) {
         fTN[i]=tv.fTN[i];
         fTB[i]=tv.fTB[i];
         fTnorm[i]=tv.fTnorm[i];
         fTback[i]=tv.fTback[i];
      }
      for(Int_t i=0; i<3; i++) {
         fRmax[i]=tv.fRmax[i];
         fRmin[i]=tv.fRmin[i];
         fUVcoord[4]=tv.fUVcoord[4];
         fX1[i]=tv.fX1[i];
         fX2[i]=tv.fX2[i];
         fY1[i]=tv.fY1[i];
         fY2[i]=tv.fY2[i];
         fZ1[i]=tv.fZ1[i];
         fZ2[i]=tv.fZ2[i];
      }
      for(Int_t i=0; i<4; i++) 
         fUVcoord[i]=tv.fUVcoord[i];
   } 
   return *this;
}

//____________________________________________________________________________
TView::~TView()
{
//*-*-*-*-*-*-*-*-*-*-*-*-*-*View default destructor*-*-*-*-*-*-*-*-*-*-*-*-*
//*-*                        =======================

   if (fOutline) fOutline->Delete();
   delete fOutline;
   fOutline = 0;
}

//____________________________________________________________________________
TView::TView(Int_t system)
{
//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*View constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
//*-*                            ================<commit_msg>Remove erroneous lines in copy ctor and assignment operator.<commit_after>// @(#)root/base:$Name:  $:$Id: TView.cxx,v 1.39 2006/05/26 09:01:58 brun Exp $
// Author: <NAME>, <NAME>, <NAME>, <NAME>   18/08/95

/*************************************************************************
 * Copyright (C) 1995-2000, <NAME> and <NAME>.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

#include "TVirtualUtil3D.h"
#include "TVirtualPad.h"
#include "TView.h"
#include "TVirtualX.h"
#include "TROOT.h"
#include "TClass.h"
#include "TList.h"
#include "TFile.h"
#include "TPluginManager.h"

// Remove when TViewer3DPad fix in ExecuteRotateView() is removed
#include "TVirtualViewer3D.h"

ClassImp(TView)

//const Int_t kPerspective = BIT(14);

const Int_t kCARTESIAN   = 1;
const Int_t kPOLAR       = 2;
const Double_t kRad = 3.14159265358979323846/180.0;

//______________________________________________________________________________
//*-*-*-*-*-*-*-*-*-*-*-*-*The V I E W class*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
//*-*                      =================                              *
//*-*                                                                     *
//*-*   This package was originally written by <NAME>         *
//*-*   from IHEP/Protvino.                                               *
//*-*                                                                     *
//*-*   The original Fortran implementation was adapted to HIGZ/PAW       *
//*-*   by <NAME> and  <NAME>.                         *
//*-*                                                                     *
//*-*   This View class is a subset of the original system                *
//*-*   It has been converted to a C++ class  by <NAME>                *
//*-*                                                                     *
//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*


//____________________________________________________________________________
TView::TView()
{
//*-*-*-*-*-*-*-*-*-*-*-*-*-*View default constructor*-*-*-*-*-*-*-*-*-*-*-*-*
//*-*                        ========================

   fOutline = 0;
   fDefaultOutline = kFALSE;
   fAutoRange      = kFALSE;
   fChanged = kFALSE;
   SetBit(kMustCleanup);
   for (Int_t i=0;i<3;i++) {
      fX1[i] = fX2[i] = fY1[i] = fY2[i] = fZ1[i] = fZ2[i] = 0;
   }
}

//____________________________________________________________________________
TView::TView(const TView& tv) :
   TObject(tv),
   TAttLine(tv),
   fLatitude(tv.fLatitude),
   fLongitude(tv.fLongitude),
   fPsi(tv.fPsi),
   fDview(tv.fDview),
   fDproj(tv.fDproj),
   fUpix(tv.fUpix),
   fVpix(tv.fVpix),
   fSystem(tv.fSystem),
   fOutline(tv.fOutline),
   fDefaultOutline(tv.fDefaultOutline),
   fAutoRange(tv.fAutoRange),
   fChanged(tv.fChanged)
{
   // Copy constructor.

   for (Int_t i=0; i<16; i++) {
      fTN[i]=tv.fTN[i];
      fTB[i]=tv.fTB[i];
      fTnorm[i]=tv.fTnorm[i];
      fTback[i]=tv.fTback[i];
   }
   for(Int_t i=0; i<3; i++) {
      fRmax[i]=tv.fRmax[i];
      fRmin[i]=tv.fRmin[i];
      fX1[i]=tv.fX1[i];
      fX2[i]=tv.fX2[i];
      fY1[i]=tv.fY1[i];
      fY2[i]=tv.fY2[i];
      fZ1[i]=tv.fZ1[i];
      fZ2[i]=tv.fZ2[i];
   }
   for(Int_t i=0; i<4; i++) 
      fUVcoord[i]=tv.fUVcoord[i];
}

//____________________________________________________________________________
TView& TView::operator=(const TView& tv)
{
   // Assignment operator.

   if (this!=&tv) {
      TObject::operator=(tv);
      TAttLine::operator=(tv);
      fLatitude=tv.fLatitude;
      fLongitude=tv.fLongitude;
      fPsi=tv.fPsi;
      fDview=tv.fDview;
      fDproj=tv.fDproj;
      fUpix=tv.fUpix;
      fVpix=tv.fVpix;
      fSystem=tv.fSystem;
      fOutline=tv.fOutline;
      fDefaultOutline=tv.fDefaultOutline;
      fAutoRange=tv.fAutoRange;
      fChanged=tv.fChanged;
      for(Int_t i=0; i<16; i++) {
         fTN[i]=tv.fTN[i];
         fTB[i]=tv.fTB[i];
         fTnorm[i]=tv.fTnorm[i];
         fTback[i]=tv.fTback[i];
      }
      for(Int_t i=0; i<3; i++) {
         fRmax[i]=tv.fRmax[i];
         fRmin[i]=tv.fRmin[i];
         fX1[i]=tv.fX1[i];
         fX2[i]=tv.fX2[i];
         fY1[i]=tv.fY1[i];
         fY2[i]=tv.fY2[i];
         fZ1[i]=tv.fZ1[i];
         fZ2[i]=tv.fZ2[i];
      }
      for(Int_t i=0; i<4; i++) 
         fUVcoord[i]=tv.fUVcoord[i];
   } 
   return *this;
}

//____________________________________________________________________________
TView::~TView()
{
//*-*-*-*-*-*-*-*-*-*-*-*-*-*View default destructor*-*-*-*-*-*-*-*-*-*-*-*-*
//*-*                        =======================

   if (fOutline) fOutline->Delete();
   delete fOutline;
   fOutline = 0;
}

//____________________________________________________________________________
TView::TView(Int_t system)
{
//*-*-*-*-*-*-*-*-*-*-*-*-*-*-*-*View constructor*-*-*-*-*-*-*-*-*-*-*-*-*-*-*
//*-*                            ================
{'fraction_non_alphanumeric': 0.23205741626794257, 'fraction_numerical': 0.02181818181818182, 'mean_word_length': 1.8878143133462282, 'pattern_counts': {'":': 0, '<': 37, '<?xml version=': 0, '>': 25, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 30, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '6111434', 'n_tokens_mistral': 3786, 'n_tokens_neox': 3539, 'n_words': 530}