Changeset 4185 for trunk/MagicSoft/Mars


Ignore:
Timestamp:
05/25/04 19:28:46 (21 years ago)
Author:
stamerra
Message:
*** empty log message ***
Location:
trunk/MagicSoft/Mars/mtemp/mpisa
Files:
16 added
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/MagicSoft/Mars/mtemp/mpisa/Changelog_pisa

    r4157 r4185  
    1818
    1919                                                 -*-*- END OF LINE -*-*-
     20 2004/05/24: Antonio Stamerra
     21
     22   * mpisa/classes/MTriggerLiveTime.[h.cc]
     23     - added new class container for the Live-Deadtime from report files (.rep)
     24       
     25   * mpisa/classes/mtrigger
     26     - added new directory for the MTrigger* classes. These
     27        classes have been moved there.
     28     - Various modifications have been made on these classes.
     29        The MReportTrigger now fills these containers.
     30
    2031 2004/05/24: Antonio Stamerra
    2132
  • trunk/MagicSoft/Mars/mtemp/mpisa/classes/MReportTrigger.cc

    r4157 r4185  
    3434#include "MReportTrigger.h"
    3535
     36#include "MParList.h"
     37
    3638#include "MLogManip.h"
    3739#include "MTriggerIPR.h"
     40#include "MTriggerCell.h"
     41#include "MTriggerBit.h"
     42#include "MTriggerPrescFact.h"
     43#include "MTriggerLiveTime.h"
    3844
    3945ClassImp(MReportTrigger);
     
    4551// Default construtor. Initialize identifier to "TRIGGER-REPORT"
    4652//
    47 MReportTrigger::MReportTrigger() : MReport("TRIGGER-REPORT"), fPrescalerRates(19)
     53MReportTrigger::MReportTrigger() : MReport("TRIGGER-REPORT")
    4854{
    4955    fName  = "MReportTrigger";
     
    7682  if (!fPrescFactor)
    7783    return kFALSE;
     84
     85  fLiveTime = (MTriggerLiveTime*)plist.FindCreateObj("MTriggerLiveTime");
     86  if (!fLiveTime)
     87    return kFALSE;
    7888 
    7989  return MReport::SetupReading(plist);
     
    8393//
    8494// Interprete the Cell rates part of the report
    85 //
    86 Int_t MReportTrigger::InterpreteCell(TString &str)
    87 {
     95//  Read 32 floats separated with a blank
     96//
     97Bool_t MReportTrigger::InterpreteCell(TString &str)
     98{
     99  Int_t len, n, i=0;
     100  Int_t gsNCells=32;
     101
     102  const char *pos = str.Data();
     103  const char *end = str.Data() + gsNCells;
     104
     105  while (pos < end)
     106    {
     107      n = sscanf(pos, " %f %n", &fCell->fCellRate[i++], &len);
     108      if (n!=1)
     109        {
     110          *fLog << warn << "WARNING - Cell Scaler Value #" << i << " missing." << endl;
     111          return kCONTINUE;
     112        }
     113      pos += len;
     114    }
    88115
    89116  return kTRUE;
     
    94121// Interprete the Bit rates part of the report
    95122//
    96 Int_t MReportTrigger::InterpreteBit(TString &str)
     123Bool_t MReportTrigger::InterpreteBit(TString &str)
    97124{
    98125
     
    104131// Interprete the IPR part of the report
    105132//
    106 Int_t MReportTrigger::InterpreteIPR(TString &str)
     133Bool_t MReportTrigger::InterpreteIPR(TString &str)
    107134{
    108135
     
    114141// Interprete the Prescaling factors part of the report
    115142//
    116 Int_t MReportTrigger::InterpretePrescFact(TString &str)
     143Bool_t MReportTrigger::InterpretePrescFact(TString &str)
    117144{
    118145
     
    215242
    216243                           */
    217     str.Remove(0, pos-str.Data());
     244
     245    Int_t len=1;
     246    str.Remove(0,len);
    218247    str.Strip(TString::kBoth);
    219248
  • trunk/MagicSoft/Mars/mtemp/mpisa/classes/MReportTrigger.h

    r4157 r4185  
    1313class MTriggerCell;
    1414class MTriggerBit;
     15class MTriggerPrescFact;
     16class MTriggerLiveTime;
    1517
    1618class MReportTrigger : public MReport
     
    2729  MTriggerCell *fCell;      // container of the L1 cell trigger rates
    2830  MTriggerPrescFact *fPrescFactor;   //container of the L2 prescaling factors
     31  MTriggerLiveTime *fLiveTime; //container of the scaler live-deadtime
    2932 
    3033  Bool_t SetupReading(MParList &plist);
    31   Bool_t CheckVersion(TString &str) const;
    3234
    3335  Bool_t InterpreteIPR(TString &str);
Note: See TracChangeset for help on using the changeset viewer.