Locked History Actions

attachment:OnlineMonitor.cc of ANAROOT/Macros

Attachment 'OnlineMonitor.cc'

Download

#include "OnlineMonitor.hh"

#include <iostream>

#include "TFile.h"
#include "TPad.h"
#include "TCanvas.h"
#include "TDatime.h"
#include "TText.h"
#include "TClonesArray.h"

#include "src/include/segidlist.hh"

#include "TArtEventStore.hh"
#include "TArtStoreManager.hh"
#include "TArtRawEventObject.hh"
#include "TArtRawSegmentObject.hh"
#include "TArtEventInfo.hh"
#include "TArtPlastic.hh"
#include "TArtDALINaI.hh"

#include "TArtBigRIPSParameters.hh"
#include "TArtSAMURAIParameters.hh"
#include "TArtDALIParameters.hh"
#include "TArtWINDSParameters.hh"
#include "TArtMINOSParameters.hh"

#include "TArtCalibCoin.hh"
#include "TArtRawEventObject.hh"
#include "TArtRawSegmentObject.hh"
#include "TArtRawDataObject.hh"
#include "TArtCalibPlastic.hh"
#include "TArtCalibDALI.hh"
#include "TArtCalibBDC1Hit.hh"
#include "TArtCalibBDC2Hit.hh"
#include "TArtCalibFDC1Hit.hh"
#include "TArtCalibFDC2Hit.hh"
#include "TArtDCHit.hh"
#include "TArtCalibHODPla.hh"
#include "TArtHODPla.hh"
#include "TArtCalibRPDCHit.hh"
#include "TArtCalibRPTOFPla.hh"
#include "TArtRPTOFPla.hh"
#include "TArtCalibWINDSPla.hh"
#include "TArtWINDSPla.hh"
#include "TArtCalibNEBULA.hh"
#include "TArtNEBULAPla.hh"
#include "TArtCalibMINOS.hh"
#include "TArtAnalyzedMINOS.hh"
#include "TArtTrackMINOS.hh"
#include "TArtVertexMINOS.hh"

//_________________________________________________________________________________
// function to exit loop at keyboard interrupt.
bool stoploop = false;
void stop_interrupt(int) {
  printf("\n\nStop Monitoring\n\n");
  stoploop = true;
}
bool pauseloop = false;
void pause_interrupt(int) {
  if (pauseloop)  {
    std::cout<<"\r        restart                "
             <<std::flush;
    pauseloop = false;
  }else            {
    std::cout<<"\n        Ctrl+Z for restart                "
             <<std::flush;
    pauseloop = true;
  }
}
//_________________________________________________________________________________
void OnlineMonitor::Run(TString ridffilename, TString opt){
  fOpt=opt;
  fRIDFFileName = ridffilename;

  if (!fInitAnalysis) InitAnalysis();

  if (!fIsHistBooked) BookHist();
  else                ClearHist();

  EventLoop();
}
//_________________________________________________________________________________
OnlineMonitor::OnlineMonitor()
  : festore(0),
    fbripsprm(0), fdaliprm(0), fsmprm(0),
    fwindsprm(0), fminosprm(0),
    fCalibCoin(0), fCalibPla(0),  fCalibDALI(0),
    fCalibBDC1Hit(0), fCalibBDC2Hit(0),
    fCalibFDC1Hit(0), fCalibFDC2Hit(0),
    fCalibHODPla(0), fCalibRPDCHit(0),
    fCalibRPTOFPla(0), fCalibWINDSPla(0),
    fCalibNEBULA(0), fCalibMINOS(0),
    fAnalyzedMINOS(0), fTrackMINOS(0),
    fVertexMINOS(0),
    fInitAnalysis(false), fIsHistBooked(false),
    f_iplot(0)
{
  if (gPad==0) new TCanvas("c1","c1",1200,800);
  std::cout<<"OnlineMonitor::Run() for online data"<<std::endl;
  std::cout<<"OnlineMonitor::Run(\"ridf/sdaq02/phys0180.ridf\") for ridf file"<<std::endl;
}
//_________________________________________________________________________________
OnlineMonitor::~OnlineMonitor()
{
  Delete();
}
//______________________________________________________________________________
void OnlineMonitor::InitAnalysis()
{
  fbripsprm = TArtBigRIPSParameters::Instance();
  fbripsprm->LoadParameter("db/BigRIPSPlastic.xml");

  fdaliprm = TArtDALIParameters::Instance();
  fdaliprm->LoadParameter("db/DALI.xml");

  fsmprm = TArtSAMURAIParameters::Instance();
  fsmprm->LoadParameter("db/SAMURAIBDC1.xml");
  fsmprm->LoadParameter("db/SAMURAIBDC2.xml");
  fsmprm->LoadParameter("db/SAMURAIFDC1.xml");
  fsmprm->LoadParameter("db/SAMURAIFDC2.xml");

  fsmprm->LoadParameter("db/SAMURAIHOD.s018.xml");
  fsmprm->LoadParameter("db/SAMURAIRPDC.xml");
  fsmprm->LoadParameter("db/SAMURAIRPTOF.xml");
  fsmprm->LoadParameter("db/NEBULA.s018.xml");

  fwindsprm = TArtWINDSParameters::Instance();
  fwindsprm->LoadParameter("db/WINDS.s018.v1.xml");

  fminosprm = TArtMINOSParameters::Instance();
  fminosprm->LoadParameters("db/MINOS.xml");


  fCalibCoin  = new TArtCalibCoin();
  fCalibPla  = new TArtCalibPlastic();
  fCalibDALI = new TArtCalibDALI();

  fCalibBDC1Hit = new TArtCalibBDC1Hit();
  fCalibBDC2Hit = new TArtCalibBDC2Hit();
  fCalibFDC1Hit = new TArtCalibFDC1Hit();
  fCalibFDC2Hit = new TArtCalibFDC2Hit();

  fCalibHODPla = new TArtCalibHODPla();

  fCalibRPDCHit = new TArtCalibRPDCHit();
  fCalibRPTOFPla = new TArtCalibRPTOFPla();

  fCalibWINDSPla = new TArtCalibWINDSPla();
  fCalibNEBULA = new TArtCalibNEBULA();

  fCalibMINOS = new TArtCalibMINOS();
  fAnalyzedMINOS = new TArtAnalyzedMINOS(fCalibMINOS);
  fTrackMINOS = new TArtTrackMINOS();
  fVertexMINOS = new TArtVertexMINOS();

  festore = new TArtEventStore();

  fInitAnalysis = true;
}
//_________________________________________________________________________________
void OnlineMonitor::BookHist()
{
  fRootFile = new TFile("OnlineMonitor.root","recreate");

  fhcoin = new TH1I("hcoin","COIN",7,0.5,7.5);
  fhist_array.push_back(fhcoin);

  fhpla_idtl = new TH2I("hpla_idtl", "Pla id-TLraw", 16,0.5,16.5, 100, 0,4000);
  fhpla_idtr = new TH2I("hpla_idtr", "Pla id-TRraw", 16,0.5,16.5, 100, 0,4000);
  fhpla_idql = new TH2I("hpla_idql", "Pla id-QLraw", 16,0.5,16.5, 100, 0,2000);
  fhpla_idqr = new TH2I("hpla_idqr", "Pla id-QRraw", 16,0.5,16.5, 100, 0,2000);
  fhist_array.push_back(fhpla_idtl);
  fhist_array.push_back(fhpla_idtr);
  fhist_array.push_back(fhpla_idql);
  fhist_array.push_back(fhpla_idqr);

  fhbdc1_id = new TH1I("hbdc1_id", "BDC1 id",    128,0.5,128.5);
  fhbdc2_id = new TH1I("hbdc2_id", "BDC2 id",    128,0.5,128.5);
  fhist_array.push_back(fhbdc1_id);
  fhist_array.push_back(fhbdc2_id);

  fhfdc1_id = new TH1I("hfdc1_id", "FDC1 id",   448,0.5,448.5);
  fhfdc2_id = new TH1I("hfdc2_id", "FDC2 id",  1568,0.5,1568.5);
  fhist_array.push_back(fhfdc1_id);
  fhist_array.push_back(fhfdc2_id);

  fhdali_ida = new TH2I("hdali_ida", "DALI id-Araw",    70,0.5,70.5, 100, 0,4000);
  fhdali_idt = new TH2I("hdali_idt", "DALI id-Traw",    70,0.5,70.5, 100, 0,40000);
  fhist_array.push_back(fhdali_ida);
  fhist_array.push_back(fhdali_idt);

  fhhod_idtu = new TH2I("hhod_idtu", "HOD id-TUraw", 32,0.5,32.5, 100, 0,4500);
  fhhod_idtd = new TH2I("hhod_idtd", "HOD id-TDraw", 32,0.5,32.5, 100, 0,4500);
  fhhod_idqu = new TH2I("hhod_idqu", "HOD id-QUraw", 32,0.5,32.5, 100, 0,4500);
  fhhod_idqd = new TH2I("hhod_idqd", "HOD id-QDraw", 32,0.5,32.5, 100, 0,4500);
  fhist_array.push_back(fhhod_idtu);
  fhist_array.push_back(fhhod_idtd);
  fhist_array.push_back(fhhod_idqu);
  fhist_array.push_back(fhhod_idqd);

  fhrpdc_id = new TH1I("hrpdc_id", "RPDC id",    384,0.5,384.5);
  fhist_array.push_back(fhrpdc_id);

  fhrptof_idtu = new TH2I("hrptof_idtu", "RPTOF id-TUraw", 11,0.5,11.5, 100, 0,4500);
  fhrptof_idtd = new TH2I("hrptof_idtd", "RPTOF id-TDraw", 11,0.5,11.5, 100, 0,4500);
  fhrptof_idqu = new TH2I("hrptof_idqu", "RPTOF id-QUraw", 11,0.5,11.5, 100, 0,4500);
  fhrptof_idqd = new TH2I("hrptof_idqd", "RPTOF id-QDraw", 11,0.5,11.5, 100, 0,4500);
  fhist_array.push_back(fhrptof_idtu);
  fhist_array.push_back(fhrptof_idtd);
  fhist_array.push_back(fhrptof_idqu);
  fhist_array.push_back(fhrptof_idqd);

  fhwinds_idt1 = new TH2I("hwinds_idt1", "WINDS id-T1raw", 72,0.5,72.5, 100, 0,10000);
  fhwinds_idt2 = new TH2I("hwinds_idt2", "WINDS id-T2raw", 65,0.5,65.5, 100, 0,10000);
  fhwinds_idq1 = new TH2I("hwinds_idq1", "WINDS id-Q1raw", 71,0.5,71.5, 100, 0,4500);
  fhwinds_idq2 = new TH2I("hwinds_idq2", "WINDS id-Q2raw", 65,0.5,65.5, 100, 0,4500);
  fhist_array.push_back(fhwinds_idt1);
  fhist_array.push_back(fhwinds_idt2);
  fhist_array.push_back(fhwinds_idq1);
  fhist_array.push_back(fhwinds_idq2);

  fhnebula_idtu = new TH2I("hnebula_idtu", "NEBULA id-TUraw", 144,0.5,144.5, 100, 0,4500);
  fhnebula_idtd = new TH2I("hnebula_idtd", "NEBULA id-TDraw", 144,0.5,144.5, 100, 0,4500);
  fhnebula_idqu = new TH2I("hnebula_idqu", "NEBULA id-QUraw", 144,0.5,144.5, 100, 0,4500);
  fhnebula_idqd = new TH2I("hnebula_idqd", "NEBULA id-QDraw", 144,0.5,144.5, 100, 0,4500);
  fhist_array.push_back(fhnebula_idtu);
  fhist_array.push_back(fhnebula_idtd);
  fhist_array.push_back(fhnebula_idqu);
  fhist_array.push_back(fhnebula_idqd);


  fhminos_asic = new TH1I("hminos_asic","MINOS Asic hit pattern",100,0,100);
  fhist_array.push_back(fhminos_asic);
  fhvertex_xy = new TH2F("hvertex_xy","Vertex reconstruction xy",200,-5,5,200,-5,5);
  fhvertex_z = new TH1F("hvertex_z","Vertex reconstruction along beam",400,-50,350);
  fhist_array.push_back(fhvertex_xy);
  fhist_array.push_back(fhvertex_z);

  fIsHistBooked = true;
}
//_________________________________________________________________________________
void OnlineMonitor::AnalyzeOneEvent()
{
  TArtStoreManager *sman = TArtStoreManager::Instance();
  if(festore->GetNextEvent()){

    //------------------------------------------
    // coin

    const Int_t nch=7;
    TArtRawEventObject *fEvent = (TArtRawEventObject *)sman->FindDataContainer("RawEvent");
    for(Int_t i=0;i<fEvent->GetNumSeg();i++){
      TArtRawSegmentObject *seg = fEvent->GetSegment(i);
      Int_t detector = seg->GetDetector();
      if(COIN == detector){
        TArtRawDataObject *d = seg->GetData(0);
        Int_t val = d->GetVal();

        if (seg->GetFP()==F3)
          for (int id=1;id<nch+1;++id)
            if (IsChTrue(id,val)) fhcoin->Fill(id);
      }//if(COIN == detector){

    }//for(Int_t i=0;i<fEvent->GetNumSeg();i++){

    //------------------------------------------
    // plastic
    fCalibPla->ClearData();
    fCalibPla->ReconstructData();
    TClonesArray *pla_array = fCalibPla->GetPlasticArray();
    Int_t npla = pla_array->GetEntries();
    for (int ipla=0;ipla<npla;++ipla){
      TArtPlastic *pla = (TArtPlastic*)pla_array->At(ipla);
      fhpla_idtl->Fill(pla->GetID(),pla->GetTLRaw());
      fhpla_idtr->Fill(pla->GetID(),pla->GetTRRaw());
      fhpla_idql->Fill(pla->GetID(),pla->GetQLRaw());
      fhpla_idqr->Fill(pla->GetID(),pla->GetQRRaw());
    }
    //------------------------------------------
    // bdc
    fCalibBDC1Hit->ClearData();
    fCalibBDC2Hit->ClearData();
    fCalibBDC1Hit->ReconstructData();
    fCalibBDC2Hit->ReconstructData();
    TClonesArray *bdc1hits = (TClonesArray*)fCalibBDC1Hit->GetDCHitArray();
    Int_t nhits_bdc1 = bdc1hits->GetEntries();
    for(int i=0; i < nhits_bdc1; ++i){
      TArtDCHit *hit = (TArtDCHit*)bdc1hits->At(i);
      fhbdc1_id->Fill(hit->GetID());
    }
    TClonesArray *bdc2hits = (TClonesArray*)fCalibBDC2Hit->GetDCHitArray();
    Int_t nhits_bdc2 = bdc2hits->GetEntries();
    for(int i=0; i < nhits_bdc2; ++i){
      TArtDCHit *hit = (TArtDCHit*)bdc2hits->At(i);
      fhbdc2_id->Fill(hit->GetID());
    }

    //------------------------------------------
    // fdc
    fCalibFDC1Hit->ClearData();
    fCalibFDC2Hit->ClearData();
    fCalibFDC1Hit->ReconstructData();
    fCalibFDC2Hit->ReconstructData();
    TClonesArray *fdc1hits = (TClonesArray*)fCalibFDC1Hit->GetDCHitArray();
    Int_t nhits_fdc1 = fdc1hits->GetEntries();
    for(int i=0; i < nhits_fdc1; ++i){
      TArtDCHit *hit = (TArtDCHit*)fdc1hits->At(i);
      fhfdc1_id->Fill(hit->GetID());
    }
    TClonesArray *fdc2hits = (TClonesArray*)fCalibFDC2Hit->GetDCHitArray();
    Int_t nhits_fdc2 = fdc2hits->GetEntries();
    for(int i=0; i < nhits_fdc2; ++i){
      TArtDCHit *hit = (TArtDCHit*)fdc2hits->At(i);
      fhfdc2_id->Fill(hit->GetID());
    }
    //------------------------------------------
    // hod
    fCalibHODPla->ClearData();
    fCalibHODPla->ReconstructData();
    TClonesArray *hod_array = fCalibHODPla->GetHODPlaArray();
    Int_t nhod = hod_array->GetEntries();
    for (int ipla=0;ipla<nhod;++ipla){
      TArtHODPla *pla = (TArtHODPla*)hod_array->At(ipla);
      fhhod_idtu->Fill(pla->GetID(), pla->GetTURaw());
      fhhod_idtd->Fill(pla->GetID(), pla->GetTDRaw());
      fhhod_idqu->Fill(pla->GetID(), pla->GetQURaw());
      fhhod_idqd->Fill(pla->GetID(), pla->GetQDRaw());
    }
    //------------------------------------------
    // rpdc
    fCalibRPDCHit->ClearData();
    fCalibRPDCHit->ReconstructData();
    TClonesArray *rpdchits = (TClonesArray*)fCalibRPDCHit->GetDCHitArray();
    Int_t nhits_rpdc = rpdchits->GetEntries();
    for(int i=0; i < nhits_rpdc; ++i){
      TArtDCHit *hit = (TArtDCHit*)rpdchits->At(i);
      fhrpdc_id->Fill(hit->GetID());
    }
    //------------------------------------------
    // rptof
    fCalibRPTOFPla->ClearData();
    fCalibRPTOFPla->ReconstructData();
    TClonesArray *rptof_array = fCalibRPTOFPla->GetRPTOFPlaArray();
    Int_t nrptof = rptof_array->GetEntries();
    for (int ipla=0;ipla<nrptof;++ipla){
      TArtRPTOFPla *pla = (TArtRPTOFPla*)rptof_array->At(ipla);
      fhrptof_idtu->Fill(pla->GetID(), pla->GetTULV775Raw());
      fhrptof_idtd->Fill(pla->GetID(), pla->GetTDRV775Raw());
      fhrptof_idqu->Fill(pla->GetID(), pla->GetQULRaw());
      fhrptof_idqd->Fill(pla->GetID(), pla->GetQDRRaw());
    }
    //------------------------------------------
    // winds
    fCalibWINDSPla->ClearData();
    fCalibWINDSPla->ReconstructData();
    TClonesArray *winds_array = fCalibWINDSPla->GetWINDSPlaArray();
    Int_t nwinds = winds_array->GetEntries();
    for (int ipla=0;ipla<nwinds;++ipla){
      TArtWINDSPla *pla = (TArtWINDSPla*)winds_array->At(ipla);
      fhwinds_idt1->Fill(pla->GetID(), pla->GetT1Raw());
      fhwinds_idt2->Fill(pla->GetID(), pla->GetT2Raw());
      fhwinds_idq1->Fill(pla->GetID(), pla->GetQ1Raw());
      fhwinds_idq2->Fill(pla->GetID(), pla->GetQ2Raw());
    }

    //------------------------------------------
    // dali
    fCalibDALI->ClearData();
    fCalibDALI->ReconstructData();
    TClonesArray *dali_array = fCalibDALI->GetNaIArray();
    Int_t ndali = dali_array->GetEntries();
    for (int idali=0;idali<ndali;++idali){
      TArtDALINaI *nai = (TArtDALINaI*)dali_array->At(idali);
      fhdali_ida->Fill(nai->GetID(), nai->GetRawADC());
      fhdali_idt->Fill(nai->GetID(), nai->GetRawTDC());
    }

    //------------------------------------------
    // nebula
    fCalibNEBULA->ClearData();
    fCalibNEBULA->ReconstructData();
    TClonesArray *nebula_array = fCalibNEBULA->GetNEBULAPlaArray();
    Int_t nnebula = nebula_array->GetEntries();
    for (int ipla=0;ipla<nnebula;++ipla){
      TArtNEBULAPla *pla = (TArtNEBULAPla*)nebula_array->At(ipla);
      fhnebula_idtu->Fill(pla->GetID(), pla->GetTURaw());
      fhnebula_idtd->Fill(pla->GetID(), pla->GetTDRaw());
      fhnebula_idqu->Fill(pla->GetID(), pla->GetQURaw());
      fhnebula_idqd->Fill(pla->GetID(), pla->GetQDRaw());
    }
    //------------------------------------------
    // minos
    fCalibMINOS->ClearData();
    fAnalyzedMINOS->ClearData();
    fTrackMINOS->ClearData();
    fVertexMINOS->ClearData();
    fCalibMINOS->ReconstructData();

    Int_t nminos = fCalibMINOS->GetNumCalibMINOS();
    for (int iminos=0;iminos<nminos;++iminos){
      TArtCalibMINOSData *minos = fCalibMINOS->GetCalibMINOS(iminos);
      fhminos_asic->Fill(minos->GetFec()*4+minos->GetAsic());
    }
    //fAnalyzedMINOS->SetConfig(0.04071, 20, 1200, 30); // RUN psp140043.ridf
    fAnalyzedMINOS->SetConfig(0.04071, 20, 1200); // RUN psp140043.ridf
    fAnalyzedMINOS->ReconstructData();
    if (fAnalyzedMINOS->GetNumAnalyzedMINOS()>10){
      fTrackMINOS->ReconstructData();
//      fVertexMINOS->SetBetaConfig(150., 0.6, 0.2, -13.); //Set target length, beta at beginning of target, beta loss in target & Offset between target & TPC
      fVertexMINOS->ReconstructData(); // If SetBetaConfig() has been applied, will ReconstructVertex() && ReconstructBeta()

      fhvertex_xy->Fill(fVertexMINOS->GetXv(), fVertexMINOS->GetYv());
      fhvertex_z->Fill(fVertexMINOS->GetZv());
    }

    festore->ClearData();

  }//if(festore->GetNextEvent()){
}
//______________________________________________________________________________
void OnlineMonitor::EventLoop()
{
  signal(SIGINT, stop_interrupt);
  signal(SIGTSTP, pause_interrupt);
//  signal(SIGTERM, pause_interrupt);

//  if (fRIDFFileName=="")  festore->Open(0);
  if (fRIDFFileName=="")  festore->Open(6); // by babianpull
  else                    festore->Open(fRIDFFileName.Data());

  TDatime datime_old;
  int neve = 0;
  int neve_monitor = 0;
  Double_t neve_rate = 0;
  Double_t interval_time = 5;
  while(1){

    if (stoploop) {
      stoploop = false;
      break;
    }
    AnalyzeOneEvent();
    ++neve;
    ++neve_monitor;

    TDatime datime;
    if (!pauseloop){
      if (neve==100 ||
          datime.GetTime() - datime_old.GetTime() > interval_time){

        neve_rate = (Double_t)neve/(datime.GetTime() - datime_old.GetTime());

        Draw();
        std::cout<<"\r    "
                 <<neve_monitor
                 <<" evts are accumulated (Ctrl+C for stop, Ctrl+Z for pause) "
                 <<std::flush;
        fRootFile->Write();

        datime_old = datime;

        if (neve_monitor>5000){
          if (fOpt=="nclr"){}
          else             {
            ClearHist();
            neve_monitor = 0;
          }

        }
      }
    }

  }
}
//______________________________________________________________________________
void OnlineMonitor::Draw()
{
  Int_t nx=4,ny=3;
  Int_t nxy = nx*ny;

  Int_t npad=1;
  TCanvas *c1 = gPad->GetCanvas();
  c1->Clear();
  TDatime datime;
  TString title("OnlineMonitor (");
  title+=datime.AsString();
  title+=")";
  c1->SetTitle(title.Data());
  c1->Divide(nx,ny);

  Int_t nhist = fhist_array.size();
  for(Int_t ihist=0;ihist<nxy;++ihist){
    c1->cd(npad);

    TH1* hist = fhist_array[f_iplot];
    if (hist->GetNbinsY()>0) hist->Draw("colz");
    else                     hist->Draw();

    npad++;
    if (npad>nxy) npad=1;
    f_iplot++;
    if (f_iplot==nhist) {
      f_iplot=0;
      break;
    }

  }

  gPad->Update();

}
//_________________________________________________________________________________
void OnlineMonitor::ClearHist()
{
  Int_t nhist = fhist_array.size();
  for(Int_t ihist=0;ihist<nhist;++ihist){
    TH1* hist = fhist_array[ihist];
    hist->Reset("M");
  }
}
//______________________________________________________________________________
void OnlineMonitor::Delete()
{
  delete festore; festore = 0;
  delete fbripsprm;  fbripsprm = 0;
  delete fdaliprm;  fdaliprm = 0;
  delete fsmprm;  fsmprm = 0;
  delete fwindsprm;  fwindsprm = 0;
  delete fminosprm;  fminosprm = 0;
  delete fCalibCoin; fCalibCoin = 0;
  delete fCalibPla;  fCalibPla = 0;
  delete fCalibDALI; fCalibDALI = 0;
  delete fCalibBDC1Hit; fCalibBDC1Hit = 0;
  delete fCalibBDC2Hit; fCalibBDC2Hit = 0;
  delete fCalibFDC1Hit; fCalibFDC1Hit = 0;
  delete fCalibFDC2Hit; fCalibFDC2Hit = 0;
  delete fCalibHODPla; fCalibHODPla = 0;
  delete fCalibRPDCHit; fCalibRPDCHit = 0;
  delete fCalibRPTOFPla; fCalibRPTOFPla = 0;
  delete fCalibWINDSPla; fCalibWINDSPla = 0;
  delete fCalibNEBULA; fCalibNEBULA = 0;
  delete fCalibMINOS; fCalibMINOS = 0;
  delete fAnalyzedMINOS; fAnalyzedMINOS = 0;
  delete fTrackMINOS; fTrackMINOS = 0;
  delete fVertexMINOS; fVertexMINOS = 0;

  fInitAnalysis  = false;
}
//______________________________________________________________________________
bool OnlineMonitor::IsChTrue(Int_t id, Int_t val) {
  return ((1 << (id - 1)) & val) ? true : false;
}
//______________________________________________________________________________

Attached Files

To refer to attachments on a page, use attachment:filename, as shown below in the list of files. Do NOT use the URL of the [get] link, since this is subject to change and can break easily.
  • [get | view] (2012-11-02 05:21:15, 1.6 KB) [[attachment:BPCHist.C]]
  • [get | view] (2013-02-27 09:18:59, 0.8 KB) [[attachment:CoinHist.C]]
  • [get | view] (2012-11-02 05:10:49, 2.6 KB) [[attachment:FDC2Hist.C]]
  • [get | view] (2012-11-02 04:31:49, 2.1 KB) [[attachment:HODHist.C]]
  • [get | view] (2012-11-02 04:31:32, 1.6 KB) [[attachment:ICBHist.C]]
  • [get | view] (2014-12-31 11:41:13, 19.5 KB) [[attachment:OnlineMonitor.cc]]
  • [get | view] (2014-12-31 11:41:02, 2.6 KB) [[attachment:OnlineMonitor.hh]]
  • [get | view] (2012-11-02 05:25:41, 1.7 KB) [[attachment:PlaHist.C]]
  • [get | view] (2012-02-15 09:14:24, 3.2 KB) [[attachment:ch2ns.C]]
  • [get | view] (2012-02-15 10:05:13, 3.0 KB) [[attachment:getlandaupeak.C]]
  • [get | view] (2012-02-15 09:14:53, 2.7 KB) [[attachment:getped.C]]
  • [get | view] (2012-02-13 09:49:04, 2.6 KB) [[attachment:makevsta.C]]
  • [get | view] (2012-02-19 14:44:04, 0.5 KB) [[attachment:slew.C]]

You are not allowed to attach a file to this page.