void ProcessSignal() { signal.Scale(3); signal.WriteHSpiceSignalInclude("../ASDBLR/hspice.inc","isource","n1a","0"); system("hspice ../ASDBLR/ASDSigs.hsp >hspice.out"); Signals::Signal Ternary(0.5); std::vector<std::string> TernaryVar; TernaryVar.push_back("ternary"); TernaryVar.push_back(""); TernaryVar.push_back(""); Ternary.ReadSignalFromHSpicelis("hspice.out",TernaryVar); Ternary.Shift(-Ternary.GetSignalBin(0)); Signals::Discriminate disc(0.5,0.4); Signals::Rebin rebin(25); Signals::Discriminate lowdisc(0.5,0.1); Signals::Rebin lowrebin(3.125); Ternary>>disc>>rebin; Ternary>>lowdisc>>lowrebin; std::cout<<"FirstBins:"<<rebin.FirstBinBlock()<<std::endl; std::cout<<"LowFirstBins:"<<lowrebin.FirstBinBlock()<<std::endl; std::cout<<"Ternary"<<Ternary.IntegralBelow(0)<<std::endl; std::cout<<lowdist<<std::endl; lowdist->Fill(lowrebin.FirstBinBlock()); std::cout<<highdist<<std::endl; highdist->Fill(rebin.FirstBinBlock()); std::cout<<"FILL//"<<std::endl; }
unsigned int ProcessSignal(Signals::Signal& signal,std::string signalid) { signal.Graph()->Draw("AL"); canvas->Update(); canvas->Print(("debs/"+signalid+"sig.pdf").c_str()); signal.WriteHSpiceSignalInclude("../ASDBLR/hspice.inc","isource","n1a","0"); system("hspice ../ASDBLR/ASDSigs.hsp >hspice.out"); Signals::Signal Ternary(0.5); std::vector<std::string> TernaryVar; TernaryVar.push_back("ternary"); TernaryVar.push_back(""); TernaryVar.push_back(""); Ternary.ReadSignalFromHSpicelis("hspice.out",TernaryVar); Ternary.Shift(-Ternary.GetSignalBin(0)); Ternary.Graph()->Draw("AL"); canvas->Update(); canvas->Print(("debs/"+signalid+"ter.pdf").c_str()); Signals::Discriminate disc(0.5,0.4); Signals::Rebin rebin(25); Signals::Discriminate lowdisc(0.5,0.1); Signals::Rebin lowrebin(3.125); Ternary>>disc>>rebin; Ternary>>lowdisc>>lowrebin; leadingb=disc.LeadingBin()*disc.GetSignalBinTime(); trailingb=disc.TrailingBin()*disc.GetSignalBinTime(); lastbinblock=disc.LastBinBlock()*disc.GetSignalBinTime(); return disc.FirstBinBlock()*disc.GetSignalBinTime(); }
Node* GenCondExpr(void) { if (CanDo('?')) { Node* cond = GenAddExpr(); // Skip logical-OR-expr all the way to additive-expr Node* true_expr = GenCommaExpr(); Node* false_expr = GenCondExpr(); return Ternary('?', cond, true_expr, false_expr); } return GenAddExpr(); // Skip logical-OR-expr all the way to additive-expr }
void mglCanvas::DefaultPlotParam() { /* NOTE: following variables and mutex will not be changed by DefaultPlotParam() long InUse; ///< Smart pointer (number of users) mglFont *fnt; ///< Class for printing vector text int Quality; ///< Quality of plot (0x0-pure, 0x1-fast; 0x2-fine; 0x4 - low memory) int Width; ///< Width of the image int Height; ///< Height of the image int Depth; ///< Depth of the image int CurFrameId; ///< Number of automaticle created frames GifFileType *gif;*/ SetDrawReg(1,1,0); Perspective(0); memcpy(mgl_mask_val, mgl_mask_def, 16*sizeof(uint64_t)); // should be > 16*8 ax.Clear(); ay.Clear(); az.Clear(); ac.Clear(); mgl_clear_fft(); DefMaskAn=0; ResetMask(); SetTickRotate(true); SetTickSkip(true); SetWarn(mglWarnNone,""); mglGlobalMess = ""; ObjId = -1; HighId = INT_MIN; SetFunc(0,0); CutOff(0); Ternary(0); Stop=false; event_cb = NULL; event_par=NULL; SetRanges(mglPoint(-1,-1,-1,-1), mglPoint(1,1,1,1)); SetOrigin(NAN,NAN,NAN,NAN); SetBarWidth(0.7); SetMarkSize(1); SetArrowSize(1); SetAlphaDef(0.5); FontDef[0]=0; SetTranspType(0); SetMeshNum(0); // NOTE: default MeshNum=0 SetRotatedText(true); CurrPal = 0; SetLegendMarks(); SetFontSize(4); SetTuneTicks(3); SetAmbient(); SetDiffuse(); clr(MGL_DISABLE_SCALE); clr(MGL_USE_GMTIME); clr(MGL_NOSUBTICKS); SetDifLight(false); SetReduceAcc(false); SetDefScheme(MGL_DEF_SCH); SetPalette(MGL_DEF_PAL); SetPenPal("k-1"); Alpha(false); stack.clear(); Restore(); DefColor('k'); SetPlotFactor(0); InPlot(0,1,0,1,false); SetTickLen(0); SetCut(true); AdjustTicks("xyzc",true); Clf('w'); for(int i=0;i<10;i++) { AddLight(i, mglPoint(0,0,1)); Light(i,false); } Light(0,true); Light(false); SetDifLight(true); }