STEER/TFndHit.cxx

00001 // @(#)fROOT/STEER:$Name:  $:$Id: TFndHit.cxx,v 1.12 2007/09/05 11:09:42 Diego_Faso Exp $
00002 // Revision Author: Diego Faso <mailto:faso@to.infn.it>, 2005/06/24
00003 // Original Author: Piergiorgio Cerello <mailto:cerello@to.infn.it>, 2001
00004 
00006 //     Base class for the FINUDA HDT (Hit Data Tape) structure  //
00007 //                                                              //
00008 // - The HIT position is common for all FINUDA hits             //
00009 //                                                              //
00010 //                                                              //
00012 
00013 #include "TFndHit.h"
00014 
00015 ClassImp(TFndHit)
00016 
00017 //_________________________________
00018 TFndHit::TFndHit(const Int_t &channel):
00019   fChannel(),fPosLRS(),fPosMRS()
00020 {
00021   // The default constructor is empty (see daughters)
00022   fChannel = channel;
00023   for(Int_t i=0;i<3;i++){
00024     fPosLRS[i] = -1;
00025     fPosMRS[i] = -1;
00026   }
00027 }
00028 
00029 //_________________________________
00030 TFndHit::~TFndHit()
00031 {
00032   
00033 }
00034 
00035 //_________________________________
00036 void TFndHit::PrintPosition(Int_t mode){
00037   // mode:
00038   //      0: all  
00039   //      1: local RFS only  
00040   //      2: main RFS only
00041 
00042   TString msg = "";
00043   TString linemsg = "";
00044   
00045   
00046   if(mode ==0 || mode == 1){
00047     linemsg.Form(" ---> Local RS Pos (x;y;z): %.2f ; %.2f ; %.2f ;\n",
00048                  fPosLRS[0],fPosLRS[1],fPosLRS[2]);
00049     
00050     msg+=linemsg; 
00051   }
00052 
00053   if(mode ==0 || mode == 2){
00054     linemsg.Form(" ---> Main  RS Pos (x;y;z): %.2f ; %.2f ; %.2f ;\n",
00055                  fPosMRS[0],fPosMRS[1],fPosMRS[2]);
00056     
00057     msg+=linemsg; 
00058   }
00059 
00060   msg+=" --- --- --- --- ---\n";
00061   msg.Resize(msg.Sizeof()-2);
00062   TThread::Printf("%s",msg.Data());
00063 
00064  
00065 }

Generated on Tue Oct 16 15:40:48 2007 by  doxygen 1.5.2