void patRpl ( void ) { buffer txt; RETranslate (patBuf, rplbuf, txt); ReplaceEdit (REStart (patBuf), txt); }
double RE_N_S(double Rs, double Rmu, double Tc, double RIBD, double Eff_e, double Eff_en, int Type, double Lambda_1, double Lambda_2, double a ) { //RE_N_S=RENS+RESN; double RE_N_S = REStart( Rs, Rmu, Tc, RIBD, Eff_e) * Eff_en * TimeEff( Tc, Type, Lambda_1,Lambda_2, a ) * (Rs*Tc* exp( -Rs*Tc)); return RE_N_S; }
double RESS(double Rs, double Rmu, double Tc, double RIBD, double Eff_e, double Eff_en, int Type, double Lambda_1, double Lambda_2, double a ) { double RESS = REStart( Rs, Rmu, Tc, RIBD, Eff_e) * ( Rs*Tc* Rs * Tc /2 * exp( -Rs*Tc ) ) *(1-Eff_en * TimeEff(Tc,Type,Lambda_1,Lambda_2,a)); return RESS; }
/* Remove 1 us for the length of the realistic dayabay readout window */ double EffEN_DYB(double Rs, double Rmu, double Tc) { /// REN with RIBD=1, Eff_e=1, Eff_en=1, TimeEff is separated and applied outside. double REN = REStart( Rs, Rmu, Tc, 1, 1) * exp( -Rs*(Tc-1e-6)); return REN; }
double REN(double Rs, double Rmu, double Tc, double RIBD, double Eff_e, double Eff_en, int Type, double Lambda_1, double Lambda_2, double a ) { double REN = REStart( Rs, Rmu, Tc, RIBD, Eff_e) * Eff_en * TimeEff( Tc, Type, Lambda_1,Lambda_2, a ) *exp(-Rs*Tc) ; return REN; }
/*** fDoReplace - called by fScan as file is scanned. * * Purpose: * * Input: * * Output: * Returns ..... * * Exceptions: * * Notes: * *************************************************************************/ flagType fDoReplace ( void ) { int c; char *p = pLog (scanreal, flScan.col, TRUE); if (fRplRePrev) { int rem; flagType fAgain = TRUE; do { switch (rem = REMatch (patBuf, scanreal, p, REStack, MaxREStack, TRUE)) { case REM_NOMATCH: flScan.col = scanlen; return FALSE; case REM_STKOVR: MaxREStack += 128; REStack = (RE_OPCODE **)ZEROREALLOC ((char *)REStack, MaxREStack * sizeof(*REStack)); break; default: printerror ("Internal Error: RE error %d, line %ld", rem, flScan.lin); case REM_MATCH: fAgain = FALSE; break; } } while (fAgain); c = colPhys (scanreal, REStart (patBuf)); srchlen = RELength (patBuf, 0); if (c + srchlen - 1 > scanlen) { return FALSE; } flScan.col = c; } else { if ( (*(fSrchCasePrev ? strncmp : _strnicmp)) (srcbuf, p, srchlen)) { return FALSE; } if (flScan.col + srchlen - 1 > scanlen) { return FALSE; } } if (fQrpl) { ClearHiLite (pFileHead, TRUE); Display(); cursorfl (flScan); HighLight (flScan.col, flScan.lin, flScan.col+srchlen-1, flScan.lin); Display (); c = askuser ('n', 'a', "Replace this occurrence? (Yes/No/All/Quit): ", NULL); ClearHiLite (pFileHead, TRUE); redraw (pFileHead, flScan.lin, flScan.lin); RSETFLAG (fDisplay, RHIGH); switch (c) { case -1: case 'q': fCtrlc = TRUE; return TRUE; case 'n': return FALSE; case 'a': dispmsg(0); /* clear dialog line */ fQrpl = FALSE; break; } } if (fRplRePrev) { patRpl (); } else { simpleRpl (p); } return FALSE; }