void ClassicLadder_InitAllDatas( void ) { InitVars(); #ifdef OLD_TIMERS_MONOS_SUPPORT InitTimers(); InitMonostables(); #endif InitCounters(); InitTimersIEC(); InitArithmExpr(); InitRungs(); InitSections( ); #ifdef SEQUENTIAL_SUPPORT InitSequential( ); #endif InitSymbols( ); }
//______________________________________________________________________________ Int_t THaRawEvent::Fill() { // Custom Fill() method: Check first if the maximum sizes of any of // the variable arrays are exceeded. If so, recreate the arrays, // the datamap, and reinitialize everything. Otherwise, just call // the standard THaEvent::Fill(). if( !fInit ) InitCounters(); Int_t maxhit = -1, maxclu = -1, maxtrk = -1, n; for( int i = 0; i < NVDC; i++ ) { if( fNhitVar[i] && (n = static_cast<Int_t>(fNhitVar[i]->GetValue())) > maxhit ) maxhit = n; if( fNcluVar[i] && (n = static_cast<Int_t>(fNcluVar[i]->GetValue())) > maxclu ) maxclu = n; } for( int i = 0; i < 2; i++ ) { if( fNtrkVar[i] && (n = static_cast<Int_t>(fNtrkVar[i]->GetValue())) > maxtrk ) maxtrk = n; } if( maxhit > fMaxhit ) { DeleteVariableArrays( kHits ); fMaxhit = TMath::Max( 2*fMaxhit, maxhit ); SetupDatamap( kHits ); } if( maxclu > fMaxclu ) { DeleteVariableArrays( kClusters ); fMaxclu = TMath::Max( 2*fMaxclu, maxclu ); SetupDatamap( kClusters ); } if( maxtrk > fMaxtrk ) { DeleteVariableArrays( kTracks ); fMaxtrk = TMath::Max( 2*fMaxtrk, maxtrk ); SetupDatamap( kTracks ); } return THaEvent::Fill(); }