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

onlinemonitor/trbmonitor/TTrbParam.cxx (r4864/r4410)

Go to the documentation of this file.
00001 #include "TTrbParam.h"
00002 
00003 #include "TGo4Version.h"
00004 #include "TGo4Log.h"
00005 
00006 TTrbParam::TTrbParam(const char* name) :
00007         TGo4Parameter(name)
00008 {
00009    processTrailing = kFALSE;
00010 
00011         fillRaw = kTRUE;
00012         printEvent = kFALSE;
00013         printErrors = kFALSE;
00014 
00016         numTrbs = 16;
00017         for (UInt_t trbid=0; trbid<TRB_TDC3_NUMBOARDS; trbid++)
00018           activeTrb[trbid] = 0;
00019 
00020         activeTrb[0]  = 1;
00021         activeTrb[14] = 1;
00022         activeTrb[15] = 1;
00023 
00024         refChannel = 0;
00025 
00026         calibrationStoreMode = 0;
00027         generalCalibration = kTRUE;
00028         continuousCalibration = kFALSE;
00029         calibrationPeriod = TRB_TDC3_CALIBFREQ;
00030         calibrationEntries = TRB_TDC3_CALIBENTRIES;
00031 }
00032 
00033 Bool_t TTrbParam::UpdateFrom(TGo4Parameter *pp)
00034 {
00035         TTrbParam* from = dynamic_cast<TTrbParam*> (pp);
00036         if (from == 0) {
00037                 TGo4Log::Error("Wrong parameter object: %s", pp->ClassName());
00038                 return kFALSE;
00039         }
00040 
00041         if (TGo4Parameter::UpdateFrom (pp) == kFALSE) {
00042                 TGo4Log::Error("TTrbParam - TGo4Parameter::UpdateFrom returned FALSE!!!");
00043                 return kFALSE;
00044         }
00045 
00047 /*
00048         fillRaw = from->fillRaw;
00049         printEvent = from->printEvent;
00050         calibrationStoreMode = from->calibrationStoreMode;
00051         generalCalibration = from->generalCalibration;
00052         continuousCalibration = from->continuousCalibration;
00053         calibrationPeriod = from->calibrationPeriod;
00054         calibrationEntries = from->calibrationEntries;
00055 */
00056 
00057         for (UInt_t trbid=0; trbid<TRB_TDC3_NUMBOARDS; trbid++)
00058         {
00059                 if (trbid >= numTrbs) activeTrb[trbid] = 0;
00060         }
00061         
00062         return SetConfigTrbs();
00063 }
00064 
00065 Bool_t TTrbParam::SetConfigTrbs()
00066 {
00067         for (UInt_t trbid=0; trbid<TRB_TDC3_NUMBOARDS; trbid++) {
00068                 TTrbEvent::ConfigTRBS[trbid] = activeTrb[trbid];
00069                 TGo4Log::Info("TTrbParam::SetConfigTrbs sets trbid %u to mask: %x", trbid, activeTrb[trbid]);
00070         }
00071         return kTRUE;
00072 }

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