REROOT_FluxWgt Class Reference

#include <REROOT_FluxWgt.h>

List of all members.

Public Member Functions

 REROOT_FluxWgt (FLUXWGT_DEF *)
 REROOT_FluxWgt ()
 ~REROOT_FluxWgt ()
virtual void accept (REROOT_Visitor &v)
void clear ()
void printEvent (std::ostream &) const
Int_t ID () const
const Char_t * Beam () const
const Char_t * Key () const
Int_t Version () const
Float_t Weight () const
Float_t WeightErr () const

Private Member Functions

void init ()

Private Attributes

Int_t m_ID
Char_t m_Beam [33]
Int_t m_Version
Float_t m_Weight
Float_t m_WeightErr

Detailed Description

Definition at line 18 of file REROOT_FluxWgt.h.


Constructor & Destructor Documentation

REROOT_FluxWgt::REROOT_FluxWgt ( FLUXWGT_DEF nr  ) 

Definition at line 62 of file REROOT_FluxWgt.cxx.

References init().

00063 {
00064   m_ID      = nr->ID - 1;                                     // C index
00065   if (nr->Version != 2147483647) m_Version = nr->Version;
00066   else                           m_Version = 0;
00067   m_Weight  = nr->Weight;
00068   if (nr->WeightErr != 2147483647) m_WeightErr = nr->WeightErr;
00069   else                             m_WeightErr = 0;
00070 
00071 // Fill String objects for char vectors from FluxWgt struct.
00072   Int_t i;    // Keep this declaration here for scope outside for-loops.
00073   for (i=0; i<32; i++)  {
00074         if (nr->Beam[i]=='\0' || nr->Beam[i]==' ') break;
00075         m_Beam[i] = nr->Beam[i];
00076   }
00077   m_Beam[i] = '\0';
00078 
00079   init();
00080 }

REROOT_FluxWgt::REROOT_FluxWgt (  ) 

Definition at line 83 of file REROOT_FluxWgt.cxx.

00084 {
00085 }

REROOT_FluxWgt::~REROOT_FluxWgt (  ) 

Definition at line 93 of file REROOT_FluxWgt.cxx.

00094 {
00095 }


Member Function Documentation

virtual void REROOT_FluxWgt::accept ( REROOT_Visitor v  )  [inline, virtual]

Definition at line 36 of file REROOT_FluxWgt.h.

References REROOT_Visitor::visit().

00036 {v.visit(this);}

const Char_t* REROOT_FluxWgt::Beam (  )  const [inline]

Definition at line 43 of file REROOT_FluxWgt.h.

References m_Beam.

Referenced by NtpMCModule::FillNtpFluxWgt().

00043 {return m_Beam;}              // Beam[33]

void REROOT_FluxWgt::clear (  ) 

Definition at line 98 of file REROOT_FluxWgt.cxx.

00099 {
00100 }

Int_t REROOT_FluxWgt::ID (  )  const [inline]

Definition at line 42 of file REROOT_FluxWgt.h.

References m_ID.

Referenced by NtpMCModule::FillNtpFluxWgt(), and printEvent().

00042 {return m_ID;}                      // ID

void REROOT_FluxWgt::init ( void   )  [private]

Definition at line 88 of file REROOT_FluxWgt.cxx.

00089 {
00090 }

const Char_t* REROOT_FluxWgt::Key (  )  const [inline]

Definition at line 44 of file REROOT_FluxWgt.h.

References m_Beam.

Referenced by printEvent().

00044 {return m_Beam;}

void REROOT_FluxWgt::printEvent ( std::ostream &  pstream  )  const

Definition at line 103 of file REROOT_FluxWgt.cxx.

References ID(), Key(), Weight(), and WeightErr().

Referenced by RerootToTruthModule::Ana().

00104 {
00105   /*
00106   pstream << "======================= FluxWgt ======================\n";
00107   pstream << "FluxWgt.ID            = " << ID()                 << "\n";
00108   pstream << "FluxWgt.Beam()        = " << Beam()               << "\n";
00109   pstream << "FluxWgt.Weight()      = " << Weight()             << "\n";
00110   pstream << "FluxWgt.WeightErr()   = " << WeightErr()          << "\n";
00111   */
00112 
00113   int prec = pstream.precision();
00114   pstream << resetiosflags(ios::floatfield);  // reset to "%g" format
00115   pstream << " FluxWgt ID " << setw(3) << ID() 
00116           << " \"" << setw(32) << left << Key() << right << "\""
00117           << " wgt " << setw(8) << setprecision(8) << Weight()
00118           << " wgterr " << setw(8) << setprecision(8) << WeightErr()
00119           << resetiosflags(ios::floatfield|ios::adjustfield) // reset to "%g" format
00120           << endl;
00121   pstream << setprecision(prec); // restore precision we started with
00122 }

Int_t REROOT_FluxWgt::Version (  )  const [inline]

Definition at line 45 of file REROOT_FluxWgt.h.

References m_Version.

Referenced by NtpMCModule::FillNtpFluxWgt().

00045 {return m_Version;}            // Version

Float_t REROOT_FluxWgt::Weight (  )  const [inline]

Definition at line 46 of file REROOT_FluxWgt.h.

References m_Weight.

Referenced by NtpMCModule::FillNtpFluxWgt(), and printEvent().

00046 {return m_Weight;}              // Weight

Float_t REROOT_FluxWgt::WeightErr (  )  const [inline]

Definition at line 47 of file REROOT_FluxWgt.h.

References m_WeightErr.

Referenced by NtpMCModule::FillNtpFluxWgt(), and printEvent().

00047 {return m_WeightErr;}        // WeightErr


Member Data Documentation

Char_t REROOT_FluxWgt::m_Beam[33] [private]

Definition at line 22 of file REROOT_FluxWgt.h.

Referenced by Beam(), and Key().

Int_t REROOT_FluxWgt::m_ID [private]

Definition at line 21 of file REROOT_FluxWgt.h.

Referenced by ID().

Int_t REROOT_FluxWgt::m_Version [private]

Definition at line 23 of file REROOT_FluxWgt.h.

Referenced by Version().

Float_t REROOT_FluxWgt::m_Weight [private]

Definition at line 24 of file REROOT_FluxWgt.h.

Referenced by Weight().

Float_t REROOT_FluxWgt::m_WeightErr [private]

Definition at line 25 of file REROOT_FluxWgt.h.

Referenced by WeightErr().


The documentation for this class was generated from the following files:

Generated on 22 Nov 2017 for loon by  doxygen 1.6.1