MTRun Class Reference

#include <MTRun.hh>

Inheritance diagram for MTRun:

Inheritance graph
[legend]
Collaboration diagram for MTRun:

Collaboration graph
[legend]
List of all members.

Public Member Functions

 MTRun ()
 MTRun (const Run &aRun)
virtual ~MTRun ()
MTRunoperator= (const Run &aRun)
time_t GetReconstructionDate (TString &dateToComplete) const
void SetRawDataFilename (TString value)
TString GetRawDataFilename (void) const
TString GetRunName (void) const
UInt_t GetRunId (void) const
void SetRunId (UInt_t value)
bool GetProcessed (void)
void SetProcessed (bool value)
TString GetDate ()
void SetDate (TString aDate)
TString GetSvnVersion () const
bool IsCalibrationRun (void) const
void SetCalibrationRun (bool aValue)
bool IsDifSynchro (void) const
void SetDifSynchro (bool aValue)
void SetDectector (MTDetector *value)
MTDetectorGetDetector (void) const
Char_t GetRawDataFormat () const
Char_t GetDaqSoftVersion () const
Char_t GetCCCFirmwareVersion () const
const MTChipGetOneChip (void) const
Float_t GetInjectedCharge (void) const
UShort_t GetWidthCtest (void) const
UShort_t GetPeriodCtest (void) const
UShort_t GetDelayCtest (void) const
UShort_t GetDelayTrigger (void) const
void SetInjectedCharge (Float_t aValue)
void SetWidthCtest (UInt_t aValue)
void SetPeriodCtest (UInt_t aValue)
void SetDelayCtest (UInt_t aValue)
void SetDelayTrigger (UInt_t aValue)
void Info (void) const

Private Attributes

UInt_t id
TString name
TString date
bool processed
bool calibrationRun
bool difSynchro
time_t reconstructionDate
TString rawDataFilename
TString svnrev
Char_t rawDataFormat
Char_t daqSoftVersion
Char_t cccFirmwareVersion
UShort_t delayTrigger
Float_t injectedCharge
UShort_t widthCtest
UShort_t periodCtest
UShort_t delayCtest
MTDetectordetector

Detailed Description

Definition at line 27 of file MTRun.hh.


Constructor & Destructor Documentation

MTRun::MTRun (  ) 

MTRun::MTRun ( const Run aRun  ) 

Definition at line 52 of file MTRun.cpp.

00053  {
00054          (*this) = aRun; // appelle operator=
00055  }

MTRun::~MTRun (  )  [virtual]

Definition at line 57 of file MTRun.cpp.

00058 {
00059   delete detector;
00060 }


Member Function Documentation

MTRun & MTRun::operator= ( const Run aRun  ) 

Definition at line 69 of file MTRun.cpp.

00070 {
00071         try
00072   {
00073                 id                              = aRun.getId();
00074                 name                            = aRun.getName();
00075                 date                            = aRun.getDate() ;
00076     processed           = false;
00077                 calibrationRun                  = aRun.isCalibrationRun();
00078                 difSynchro                              = aRun.isDifSynchro();
00079 
00080                 reconstructionDate      = aRun.getReconstructionDate();
00081                 rawDataFilename         = aRun.getRawDataFilename();
00082                 svnrev                  = aRun.getSvnrev();
00083 
00084                 const Detector& det = aRun.getDetector();
00085                 detector                                                = new MTDetector(det);
00086 
00087                 rawDataFormat = aRun.getDataFormat();
00088                 daqSoftVersion = aRun.getDaqSoftware();
00089                 cccFirmwareVersion = aRun.getCccFirmware();
00090 
00091                 // calibration only    // Infos from calibration raw data file
00092                 injectedCharge = aRun.getSendedCharge();
00093                 widthCtest   = aRun.getWidthCtest();  // 10 bit store in 16 bits
00094                 periodCtest  = aRun.getPeriodCtest(); // 10 bit store in 16 bits
00095                 delayCtest   = aRun.getDelayCtest();  // 10 bit store in 16 bits
00096                 delayTrigger = aRun.getDelayTrigger();  // 10 bit store in 16 bits
00097                 FILE_LOG(logDEBUG1) << "injectedCharge[" <<  injectedCharge << "]"  << endl;
00098                 FILE_LOG(logDEBUG1) << "aRun.getSendedCharge()[" << aRun.getSendedCharge()  << "]"  << endl;
00099         } //try block
00100         catch (MicroException e)
00101         {
00102                 throw MicroException(e.getMessage());
00103         }
00104 // Save all objects in this file
00105 return *this;
00106 }

time_t MTRun::GetReconstructionDate ( TString &  dateToComplete  )  const

Definition at line 62 of file MTRun.cpp.

Referenced by Info().

00063 {
00064    dateToComplete = asctime(localtime(&reconstructionDate));
00065    return reconstructionDate;
00066 }

void MTRun::SetRawDataFilename ( TString  value  )  [inline]

Definition at line 83 of file MTRun.hh.

00083 { rawDataFilename = value;};

TString MTRun::GetRawDataFilename ( void   )  const [inline]

Definition at line 84 of file MTRun.hh.

00084 { return rawDataFilename; };

TString MTRun::GetRunName ( void   )  const [inline]

Definition at line 85 of file MTRun.hh.

00085 { return name; };

UInt_t MTRun::GetRunId ( void   )  const [inline]

Definition at line 86 of file MTRun.hh.

Referenced by main(), and selectAndCopyEvent().

00086 { return id; } ;

void MTRun::SetRunId ( UInt_t  value  )  [inline]

Definition at line 87 of file MTRun.hh.

Referenced by main().

00087 { id = value ; } ;

bool MTRun::GetProcessed ( void   )  [inline]

Definition at line 89 of file MTRun.hh.

Referenced by main().

00089 { return processed; } ;

void MTRun::SetProcessed ( bool  value  )  [inline]

Definition at line 90 of file MTRun.hh.

Referenced by main().

00090 { processed = value; } ;

TString MTRun::GetDate (  )  [inline]

Definition at line 92 of file MTRun.hh.

00092 {return date;};

void MTRun::SetDate ( TString  aDate  )  [inline]

Definition at line 93 of file MTRun.hh.

00093 { date = aDate; };

TString MTRun::GetSvnVersion (  )  const [inline]

Definition at line 95 of file MTRun.hh.

Referenced by main().

00095 { return svnrev; }; 

bool MTRun::IsCalibrationRun ( void   )  const [inline]

Definition at line 97 of file MTRun.hh.

00097 { return calibrationRun; };

void MTRun::SetCalibrationRun ( bool  aValue  )  [inline]

Definition at line 98 of file MTRun.hh.

00098 { calibrationRun = aValue; }

bool MTRun::IsDifSynchro ( void   )  const [inline]

Definition at line 100 of file MTRun.hh.

00100 { return difSynchro; };

void MTRun::SetDifSynchro ( bool  aValue  )  [inline]

Definition at line 101 of file MTRun.hh.

00101 { difSynchro = aValue; }

void MTRun::SetDectector ( MTDetector value  )  [inline]

Definition at line 103 of file MTRun.hh.

00103 { detector = value; } ;

MTDetector* MTRun::GetDetector ( void   )  const [inline]

Definition at line 104 of file MTRun.hh.

Referenced by GetOneChip(), and main().

00104 { return detector ; } ;

Char_t MTRun::GetRawDataFormat (  )  const [inline]

Definition at line 106 of file MTRun.hh.

00106 { return rawDataFormat ; };

Char_t MTRun::GetDaqSoftVersion (  )  const [inline]

Definition at line 107 of file MTRun.hh.

00107 { return daqSoftVersion ; };

Char_t MTRun::GetCCCFirmwareVersion (  )  const [inline]

Definition at line 108 of file MTRun.hh.

00108 { return cccFirmwareVersion ; };

const MTChip & MTRun::GetOneChip ( void   )  const

Definition at line 109 of file MTRun.cpp.

Referenced by main().

00110 {
00111                 MTDetector* det = this->GetDetector();
00112                 if ( det != NULL)
00113                 {
00114                         // Get first detector's chamber 
00115                         const MTChamber& chamber        = *((*det->GetChambers().begin()).second);
00116                         // Get first chamber's board 
00117                         const MTBoard& board            = *((*chamber.GetBoards().begin()).second);
00118                         // Get first board's chip 
00119                         const MTChip&  chip             = *((*board.GetChips().begin()).second);
00120                         return chip;
00121                 }
00122                 throw MicroException("No Chip for this run");
00123 }

Float_t MTRun::GetInjectedCharge ( void   )  const [inline]

Definition at line 139 of file MTRun.hh.

00139 { return injectedCharge; } ;

UShort_t MTRun::GetWidthCtest ( void   )  const [inline]

Definition at line 140 of file MTRun.hh.

00140 { return widthCtest;   } ;

UShort_t MTRun::GetPeriodCtest ( void   )  const [inline]

Definition at line 141 of file MTRun.hh.

00141 { return periodCtest;  } ;

UShort_t MTRun::GetDelayCtest ( void   )  const [inline]

Definition at line 142 of file MTRun.hh.

00142 { return delayCtest;   } ;

UShort_t MTRun::GetDelayTrigger ( void   )  const [inline]

Definition at line 143 of file MTRun.hh.

00143 { return delayTrigger;  } ;

void MTRun::SetInjectedCharge ( Float_t  aValue  )  [inline]

Definition at line 147 of file MTRun.hh.

00147 {  injectedCharge = aValue; } ;

void MTRun::SetWidthCtest ( UInt_t  aValue  )  [inline]

Definition at line 148 of file MTRun.hh.

00148 {  widthCtest = aValue;   } ;

void MTRun::SetPeriodCtest ( UInt_t  aValue  )  [inline]

Definition at line 149 of file MTRun.hh.

00149 {  periodCtest = aValue;  } ;

void MTRun::SetDelayCtest ( UInt_t  aValue  )  [inline]

Definition at line 150 of file MTRun.hh.

00150 {  delayCtest = aValue;   } ;

void MTRun::SetDelayTrigger ( UInt_t  aValue  )  [inline]

Definition at line 151 of file MTRun.hh.

00151 {  delayTrigger = aValue;   } ;

void MTRun::Info ( void   )  const

Definition at line 126 of file MTRun.cpp.

Referenced by main().

00127 {
00128 
00129   TString recDate;
00130   GetReconstructionDate(recDate);
00131 
00132   TString calib = "production";
00133   if ( calibrationRun)
00134   {
00135       calib = "calibration";
00136   }
00137 
00138   cout << "**** Run informations ****"    << endl << endl ;
00139   cout << "    Id: " << id << "    " << endl ;
00140   cout << "    Name: " << name << "    " << endl ;
00141   cout << "    Date: " << date << "    " << endl ;
00142   cout << "    Type: It is a "<< calib << " run    "       << endl;
00143   cout << "    svn version for used source code:" << svnrev  << endl;
00144 
00145 
00146   cout << endl << "    2/ Acquisition informations       "    <<  endl ;
00147         cout << "       Raw data file name:   "<<rawDataFilename <<  "       "<< endl;
00148         cout << "       data format:          0x" << hex << (unsigned int) rawDataFormat <<  "       "<< endl;
00149         cout << "       daq software version: 0x" << hex  << (unsigned int) daqSoftVersion <<  "       "<< endl;
00150         cout << "       ccc firmware version: 0x"  << hex << (unsigned int) cccFirmwareVersion <<  "       "<< endl;
00151 
00152 
00153   cout << endl << "    3/ Reconstruction informations       "    << endl ;
00154   cout << "       Date:   " << recDate <<"       " <<   endl;
00155   cout << endl << endl;
00156 
00157   if ( calibrationRun )
00158   {
00159     cout << endl << "    4/ Calibration informations       "    <<  endl ;
00160     cout << "       injectedCharge:       "  << dec << injectedCharge  << " fC       " <<  endl;
00161 /* Following omly exist for Dirac callibration
00162     cout << "       widthCtest:           0x"  << hex << widthCtest    << "       " <<  endl;  // 10 bit store in 16 bits
00163     cout << "       periodCtest:          0x"  << hex << periodCtest   << "       " <<  endl; // 10 bit store in 16 bits
00164     cout << "       delayCtest:           0x"  << hex <<        delayCtest    << "       " <<  endl;  // 10 bit store in 16 bits
00165     cout << "       delayTrigger:         0x"  << hex << delayTrigger    << "       " <<  dec <<endl;  // 10 bit store in 16 bits
00166 */
00167   }
00168 
00169 }


Member Data Documentation

UInt_t MTRun::id [private]

Definition at line 37 of file MTRun.hh.

Referenced by GetRunId().

TString MTRun::name [private]

Definition at line 38 of file MTRun.hh.

Referenced by GetRunName(), Info(), and operator=().

TString MTRun::date [private]

Definition at line 39 of file MTRun.hh.

Referenced by GetDate(), Info(), operator=(), and SetDate().

bool MTRun::processed [private]

Definition at line 40 of file MTRun.hh.

Referenced by GetProcessed(), operator=(), and SetProcessed().

bool MTRun::calibrationRun [private]

Definition at line 42 of file MTRun.hh.

Referenced by Info(), IsCalibrationRun(), operator=(), and SetCalibrationRun().

bool MTRun::difSynchro [private]

Definition at line 43 of file MTRun.hh.

Referenced by IsDifSynchro(), operator=(), and SetDifSynchro().

time_t MTRun::reconstructionDate [private]

Definition at line 46 of file MTRun.hh.

Referenced by GetReconstructionDate(), and operator=().

TString MTRun::rawDataFilename [private]

Definition at line 47 of file MTRun.hh.

Referenced by GetRawDataFilename(), Info(), operator=(), and SetRawDataFilename().

TString MTRun::svnrev [private]

Definition at line 48 of file MTRun.hh.

Referenced by GetSvnVersion(), Info(), and operator=().

Char_t MTRun::rawDataFormat [private]

Definition at line 49 of file MTRun.hh.

Referenced by GetRawDataFormat(), Info(), and operator=().

Char_t MTRun::daqSoftVersion [private]

Definition at line 52 of file MTRun.hh.

Referenced by GetDaqSoftVersion(), Info(), and operator=().

Char_t MTRun::cccFirmwareVersion [private]

Definition at line 53 of file MTRun.hh.

Referenced by GetCCCFirmwareVersion(), Info(), and operator=().

UShort_t MTRun::delayTrigger [private]

Definition at line 68 of file MTRun.hh.

Referenced by GetDelayTrigger(), operator=(), and SetDelayTrigger().

Float_t MTRun::injectedCharge [private]

Definition at line 71 of file MTRun.hh.

Referenced by GetInjectedCharge(), Info(), operator=(), and SetInjectedCharge().

UShort_t MTRun::widthCtest [private]

Definition at line 72 of file MTRun.hh.

Referenced by GetWidthCtest(), operator=(), and SetWidthCtest().

UShort_t MTRun::periodCtest [private]

Definition at line 73 of file MTRun.hh.

Referenced by GetPeriodCtest(), operator=(), and SetPeriodCtest().

UShort_t MTRun::delayCtest [private]

Definition at line 74 of file MTRun.hh.

Referenced by GetDelayCtest(), operator=(), and SetDelayCtest().

MTDetector* MTRun::detector [private]

Definition at line 76 of file MTRun.hh.

Referenced by GetDetector(), operator=(), SetDectector(), and ~MTRun().


The documentation for this class was generated from the following files:
Generated on Mon Jun 11 16:58:58 2012 for MicromegasFramework by  doxygen 1.4.7