//*-- Author : Dmitry Vasiliev (vassili@lns.infn.it) /* * Copyright P.Finocchiaro and D.Vasiliev (INFN-LNS, Catania) HADES collaboration */ //------------------------------------------------------------------------- // // File name: hconsistency.cc // Subject: Online objects consistency check. // Author: D.Vasiliev (INFN-LNS, Catania) "vassili@lns.infn.it" // Date: March 2000 // //------------------------------------------------------------------------- // // Description: // // This file contains the source code for the member functions of // the class HConsistency. // This class contains functions to perform consistency check for any online // object of the HTOP. That means for example that if there is a histogram // bound to a condition the condition must exist otherwise that histogram // will be declared inconsistent and during event loop no action will be // applied to it. // //------------------------------------------------------------------------- using namespace std; #include "hconsistency.h" #include "herror.h" #include "honlinecontrol.h" #include "hlocalcont.h" #include "hglobalcont.h" #include "hhistocont.h" #include "hconsistencywarn.h" #include #include //_HADES_CLASS_DESCRIPTION /////////////////////////////////////////////////////////////////////////// // This class contains functions to perform consistency check for any online // object of the HTOP. That means for example that if there is a histogram // bound to a condition the condition must exist otherwise that histogram // will be declared inconsistent and during event loop no action will be // applied to it. ///////////////////////////////////////////////////////////////////////// ClassImp(HConsistency) //--------------------------------------------------------------------- //****** HConsistency::HConsistency() // // Constructor of the class HConsistency. // //--------------------------------------------------------------------- HConsistency::HConsistency() : TObject() { // // Constructor of the class HConsistency. // fLCIdx.Set(500); fGCIdx.Set(500); fHiIdx.Set(500); clear(); } //--------------------------------------------------------------------- //****** void HConsistency::clear() // // This function clears arrays of indexes of inconsistent objects. // //--------------------------------------------------------------------- void HConsistency::clear() { // // This function clears arrays of indexes of inconsistent objects. // Int_t i; for(i=0; igetLocal()->checkConsistency(); gOnline->getGlobal()->checkConsistency(); gOnline->getHisto()->checkConsistency(); for(Int_t i=0; igetLocal()->removeAt(i); } } for(i=0; igetGlobal()->removeAt(i); } } for(i=0; igetHisto()->removeAt(i); } } } //--------------------------------------------------------------------- //****** void HConsistency::warnPanel() // // This function calls a warning panel to inform the user about the presence // of inconsistent objects in the program. // //--------------------------------------------------------------------- void HConsistency::warnPanel() { // // This function calls a warning panel to inform the user about the presence // of inconsistent objects in the program. // Int_t retval; new HConsistencyWarn(gClient->GetRoot(),1,1,&retval); if(retval == 1) delInc(); } //--------------------------------------------------------------------- //****** void HConsistency::action() // // This function is called from the main control class HOnlineControl to // perform consistency check of all existing HTOP objects. // //--------------------------------------------------------------------- void HConsistency::action() { // // This function is called from the main control class HOnlineControl to // perform consistency check of all existing HTOP objects. // checkConsistency(); if(kConsistent) return; warnPanel(); checkConsistency(); }