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
Char_t GetSDCCFirmwareVersion () const
Char_t GetDIFFirmwareVersion () 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
Char_t sdccFirmwareVersion
Char_t difFirmwareVersion
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 54 of file MTRun.cpp.

00055  {
00056          (*this) = aRun; // appelle operator=
00057  }

MTRun::~MTRun (  )  [virtual]

Definition at line 59 of file MTRun.cpp.

00060 {
00061   delete detector;
00062 }


Member Function Documentation

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

Definition at line 71 of file MTRun.cpp.

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

time_t MTRun::GetReconstructionDate ( TString &  dateToComplete  )  const

Definition at line 64 of file MTRun.cpp.

Referenced by Info().

00065 {
00066    dateToComplete = asctime(localtime(&reconstructionDate));
00067    return reconstructionDate;
00068 }

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

Definition at line 85 of file MTRun.hh.

00085 { rawDataFilename = value;};

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

Definition at line 86 of file MTRun.hh.

00086 { return rawDataFilename; };

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

Definition at line 87 of file MTRun.hh.

00087 { return name; };

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

Definition at line 88 of file MTRun.hh.

Referenced by main(), and selectAndCopyEvent().

00088 { return id; } ;

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

Definition at line 89 of file MTRun.hh.

Referenced by main().

00089 { id = value ; } ;

bool MTRun::GetProcessed ( void   )  [inline]

Definition at line 91 of file MTRun.hh.

00091 { return processed; } ;

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

Definition at line 92 of file MTRun.hh.

Referenced by main().

00092 { processed = value; } ;

TString MTRun::GetDate (  )  [inline]

Definition at line 94 of file MTRun.hh.

00094 {return date;};

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

Definition at line 95 of file MTRun.hh.

00095 { date = aDate; };

TString MTRun::GetSvnVersion (  )  const [inline]

Definition at line 97 of file MTRun.hh.

Referenced by main().

00097 { return svnrev; }; 

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

Definition at line 99 of file MTRun.hh.

00099 { return calibrationRun; };

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

Definition at line 100 of file MTRun.hh.

00100 { calibrationRun = aValue; }

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

Definition at line 102 of file MTRun.hh.

00102 { return difSynchro; };

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

Definition at line 103 of file MTRun.hh.

00103 { difSynchro = aValue; }

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

Definition at line 105 of file MTRun.hh.

00105 { detector = value; } ;

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

Definition at line 106 of file MTRun.hh.

Referenced by GetOneChip(), and main().

00106 { return detector ; } ;

Char_t MTRun::GetRawDataFormat (  )  const [inline]

Definition at line 108 of file MTRun.hh.

00108 { return rawDataFormat ; };

Char_t MTRun::GetDaqSoftVersion (  )  const [inline]

Definition at line 109 of file MTRun.hh.

00109 { return daqSoftVersion ; };

Char_t MTRun::GetCCCFirmwareVersion (  )  const [inline]

Definition at line 110 of file MTRun.hh.

00110 { return cccFirmwareVersion ; };

Char_t MTRun::GetSDCCFirmwareVersion (  )  const [inline]

Definition at line 111 of file MTRun.hh.

00111 { return sdccFirmwareVersion ; };

Char_t MTRun::GetDIFFirmwareVersion (  )  const [inline]

Definition at line 112 of file MTRun.hh.

00112 { return difFirmwareVersion ; };

const MTChip & MTRun::GetOneChip ( void   )  const

Definition at line 113 of file MTRun.cpp.

Referenced by main().

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

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

Definition at line 143 of file MTRun.hh.

00143 { return injectedCharge; } ;

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

Definition at line 144 of file MTRun.hh.

00144 { return widthCtest;   } ;

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

Definition at line 145 of file MTRun.hh.

00145 { return periodCtest;  } ;

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

Definition at line 146 of file MTRun.hh.

00146 { return delayCtest;   } ;

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

Definition at line 147 of file MTRun.hh.

00147 { return delayTrigger;  } ;

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

Definition at line 151 of file MTRun.hh.

00151 {  injectedCharge = aValue; } ;

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

Definition at line 152 of file MTRun.hh.

00152 {  widthCtest = aValue;   } ;

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

Definition at line 153 of file MTRun.hh.

00153 {  periodCtest = aValue;  } ;

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

Definition at line 154 of file MTRun.hh.

00154 {  delayCtest = aValue;   } ;

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

Definition at line 155 of file MTRun.hh.

00155 {  delayTrigger = aValue;   } ;

void MTRun::Info ( void   )  const

Definition at line 130 of file MTRun.cpp.

Referenced by main().

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


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=().

Char_t MTRun::sdccFirmwareVersion [private]

Definition at line 54 of file MTRun.hh.

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

Char_t MTRun::difFirmwareVersion [private]

Definition at line 55 of file MTRun.hh.

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

UShort_t MTRun::delayTrigger [private]

Definition at line 70 of file MTRun.hh.

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

Float_t MTRun::injectedCharge [private]

Definition at line 73 of file MTRun.hh.

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

UShort_t MTRun::widthCtest [private]

Definition at line 74 of file MTRun.hh.

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

UShort_t MTRun::periodCtest [private]

Definition at line 75 of file MTRun.hh.

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

UShort_t MTRun::delayCtest [private]

Definition at line 76 of file MTRun.hh.

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

MTDetector* MTRun::detector [private]

Definition at line 78 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 Jan 7 13:18:58 2013 for MicromegasFramework by  doxygen 1.4.7