• Main Page
  • Related Pages
  • Namespaces
  • Data Structures
  • Files
  • File List
  • Globals

onlinemonitor/trbmonitor/TTrbHit.cxx (r4864/r3398)

Go to the documentation of this file.
00001 #include "TTrbHit.h"
00002 
00003 #include <stdio.h>
00004 
00005 
00007 TTrbRawHit::TTrbRawHit(UShort_t TDC, UShort_t Channel, UChar_t EdgeType,
00008       UInt_t EdgeEpoch, UShort_t EdgeCoarseTime, UShort_t EdgeFineTime) :
00009          iTDC (TDC), iChannel (Channel), fEdgeType (EdgeType)
00010    {
00011       switch (EdgeType)
00012       {
00013       case 0:  
00014          this->fTrailingEpoch = EdgeEpoch;
00015          this->fTrailingCoarseTime = EdgeCoarseTime;
00016          this->fTrailingFineTime = EdgeFineTime;
00017          break;
00018       case 1:  
00019          this->fLeadingEpoch = EdgeEpoch;
00020          this->fLeadingCoarseTime = EdgeCoarseTime;
00021          this->fLeadingFineTime = EdgeFineTime;
00022          break;
00023       case 2:
00024          printf("TTrbRawHit: For initializing both edges' times call another constructor.\n");
00025          break;
00026       default:
00027          printf("TTrbRawHit: Incorrect EdgeType: 0-Leading, 1-Trailing, 2-Both\n");
00028          break;
00029       }
00030 
00031       fLeadingFineTimeCalibCorr = 0.;
00032       fTrailingFineTimeCalibCorr = 0.;
00033    }
00034 
00036 TTrbRawHit::TTrbRawHit (UShort_t TDC, UShort_t Channel, UChar_t EdgeType,
00037       UInt_t LeadingEpoch, UShort_t LeadingCoarseTime, UShort_t LeadingFineTime,
00038       UInt_t TrailingEpoch, UShort_t TrailingCoarseTime, UShort_t TrailingFineTime) :
00039          iTDC (TDC), iChannel (Channel), fEdgeType (EdgeType)
00040    {
00042       switch (EdgeType)
00043       {
00044       case 2:
00045          this->fLeadingEpoch = LeadingEpoch;
00046          this->fLeadingCoarseTime = LeadingCoarseTime;
00047          this->fLeadingFineTime = LeadingFineTime;
00048          this->fTrailingEpoch = TrailingEpoch;
00049          this->fTrailingCoarseTime = TrailingCoarseTime;
00050          this->fTrailingFineTime = TrailingFineTime;
00051          break;
00052       case 0:
00053       case 1:
00054          printf("TTrbRawHit: For initializing only one edge's time call another constructor.\n");
00055          break;
00056       default:
00057          printf("TTrbRawHit: Incorrect EdgeType: 0-Leading, 1-Trailing, 2-Both\n");
00058          break;
00059       }
00060 
00061       fLeadingFineTimeCalibCorr = 0.;
00062       fTrailingFineTimeCalibCorr = 0.;
00063    }
00064 

Generated on Tue Dec 10 2013 04:52:23 for ROCsoft by  doxygen 1.7.1