当前位置: 首页>>代码示例>>C++>>正文


C++ TDatime::AsString方法代码示例

本文整理汇总了C++中TDatime::AsString方法的典型用法代码示例。如果您正苦于以下问题:C++ TDatime::AsString方法的具体用法?C++ TDatime::AsString怎么用?C++ TDatime::AsString使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在TDatime的用法示例。


在下文中一共展示了TDatime::AsString方法的12个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: sprintf

Pulse::Pulse(const double bx, const double ratio): _bx(bx), _ratio(ratio) {

  TDatime now;
  char fname[300];
  sprintf(fname,"%s_peak",now.AsString());
  _peakfunc = new TF1(fname,this,&Pulse::peakpulse,-200e-9,500e-9,2);
  sprintf(fname,"%s_deco",now.AsString());
  _decofunc = new TF1(fname,this,&Pulse::decopulse,-200e-9,500e-9,2);

  _peakfunc->SetParameter(0,bx*ratio);
  _decofunc->SetParameter(0,bx*ratio);

  _peakfunc->SetNpx(50000);
  _decofunc->SetNpx(50000);
}
开发者ID:venturia,项目名称:SignalSimulation,代码行数:15,代码来源:Pulse.C

示例2: annotation

void annotation(Float_t a=10, Float_t d=5, Float_t x=0, Float_t y=0, Float_t z=0)
{
   TEveManager::Create();

   // add a box in scene
   TEveBox* b = new TEveBox("Box", "Test Title");
   b->SetMainColor(kCyan);
   b->SetMainTransparency(0);
   b->SetVertex(0, x - a, y - a, z - a);
   b->SetVertex(1, x - a, y + a, z - a);
   b->SetVertex(2, x + a, y + a, z - a);
   b->SetVertex(3, x + a, y - a, z - a);
   b->SetVertex(4, x - a, y - a, z + a);
   b->SetVertex(5, x - a, y + a, z + a);
   b->SetVertex(6, x + a, y + a, z + a);
   b->SetVertex(7, x + a, y - a, z + a);
   gEve->AddElement(b);
   gEve->Redraw3D(kTRUE);
  
   // add overlay text
   TGLViewer* v = gEve->GetDefaultGLViewer();
   TDatime time;
   TGLAnnotation* ann = new TGLAnnotation(v, time.AsString(), 0.1, 0.9);
   ann->SetTextSize(0.1);// % of window diagonal

   // set timer to update text every second
   MyTimer* timer = new MyTimer(ann); 
   timer->SetTime(1000);
   timer->Reset();
   timer->TurnOn();
}
开发者ID:adevress,项目名称:root-1,代码行数:31,代码来源:annotation.C

示例3: Report_progress

void TT_generator::Report_progress()
{
  if (f_total_accepted==f_event_display || !f_keep_going) {
    TDatime dt;
    std::cout << "(" << dt.AsString() << ") total accepted: " << f_total_accepted << std::endl;
    f_event_display*=2;
  }
}   
开发者ID:elaird,项目名称:nuqe,代码行数:8,代码来源:TT_generator.C

示例4: plPanitkin

//==========================
//==========================
void plPanitkin(TString fname="./wrk/hist/run7067154.1.hist.root", int flag=0) {
  gROOT -> LoadMacro("StRoot/StEEmcPool/muEztPanitkin/EEqaPresenter.h");
  gROOT -> LoadMacro("StRoot/StEEmcPool/muEztPanitkin/EEqaPresenter.cxx");
 

  gStyle->SetPalette(1,0);

  eemcTwMaskFile = gEnv->GetValue("OnLine.eemcMask","eemcTwMask.dat");

  printf("input Histo=%s=\n",fname.Data());  
  fd=new TFile(fname);
  if(!fd->IsOpen()) {
    printf(" faild to open file=%s=, exit\n",fname.Data()); 
    return;  
  }
  assert(fd->IsOpen());

  // j1(); return;

  cc=new TCanvas("pani","pani",500,510);
  // cc=new TCanvas("pani","pani",700,710);
  cc->Range(0,0,1,1);
  TPad *pad0 = new TPad("pad0", "apd0",0.0,0.95,1.,1.);
  pad0->Draw();
  pad0->cd();

 TPaveText *pt = new TPaveText(0,0.,1,1);
  pt->Draw();
  TDatime dt;
  TString txt2="P-plot,  ";
  txt2+=fname+"  ";
  txt2+=dt.AsString();
  pt->AddText(txt2);
  txt2="--";
  pt->AddText(txt2);

  cc->cd();
  pd1 = new TPad("pad1", "apd1",0.0,0.0,1,.95);
  pd1->Draw();

  printf(" Ready. Type: plTw(1) ,...  plSmd(1) ,... plDSM(1) ,...  plAllps()  flag=%d\n",flag);

  if(flag==1) plTw(1);

  //plSummary();
  //  plTw(1);
  //  pd1->Print("tw.ps");
  // pd1->Print("tw.gif");
}
开发者ID:star-bnl,项目名称:star-emc,代码行数:51,代码来源:plPanitkin.C

示例5: Notify

   virtual Bool_t Notify()
   {
      // stop timer
      TurnOff();

      // so some action here
      TDatime d;
      m_label->SetText(d.AsString());
      gEve->GetDefaultGLViewer()->RequestDraw();

      // start timer
      SetTime(1000);
      Reset();
      TurnOn();
      return true;
   }
开发者ID:adevress,项目名称:root-1,代码行数:16,代码来源:annotation.C

示例6: Terminate

void KVEventSelector::Terminate()
{
   // The Terminate() function is the last function to be called during
   // a query. It always runs on the client, it can be used to present
   // the results graphically or save the results to file.
	//
	// This method call the user defined EndAnalysis
	// where user can do what she wants
	//

	TDatime now;
    Info("Terminate", "Analysis ends at %s", now.AsString());

   if( fCombinedOutputFile!="" ){
       Info("Terminate", "combine = %s", fCombinedOutputFile.Data());
       // combine histograms and trees from analysis into one file
       TString file1,file2;
       file1.Form("HistoFileFrom%s.root", ClassName());
       file2.Form("TreeFileFrom%s.root", ClassName());
       if(GetOutputList()->FindObject("ThereAreHistos")){
           if(GetOutputList()->FindObject(file2)){
               Info("Terminate", "both");
               SaveHistos();
               KVBase::CombineFiles(file1,file2,fCombinedOutputFile,kFALSE);
           }
           else
           {
               // no trees - just rename histo file
               Info("Terminate", "histo");
               SaveHistos(fCombinedOutputFile);
           }
       }
       else if(GetOutputList()->FindObject(file2)){
           // no histos - just rename tree file
           Info("Terminate", "tree");
           gSystem->Rename(file2, fCombinedOutputFile);
       }
       else  Info("Terminate", "none");
   }


	EndAnalysis();               //user end of analysis routine
	
}
开发者ID:pwigg,项目名称:kaliveda,代码行数:44,代码来源:KVEventSelector.cpp

示例7: TPad

//------------------------
TPad *makeTitle(TCanvas *c,char *core, int page) {
  c->Range(0,0,1,1);
  TPad *pad0 = new TPad("pad0", "apd0",0.0,0.95,1.,1.);
  pad0->Draw();
  pad0->cd();

  TPaveText *pt = new TPaveText(0,0.,1,1,"br");
  pt->Draw();
  TDatime dt;
  TString txt2=core;
  txt2+=", page=";
  txt2+=page;
  txt2+=",  ";
  txt2+=dt.AsString();
  pt->AddText(txt2);
  txt2="--";
  pt->AddText(txt2);

  c->cd();
  pad = new TPad("pad1", "apd1",0.0,0.0,1,.95);
  pad->Draw();
  return pad;
}
开发者ID:gdwebb,项目名称:UnderlyingEvent,代码行数:24,代码来源:plEana.C

示例8: chipSummary


//.........这里部分代码省略.........
// 	y -= 0.10;
// 	tl->DrawLatex(0.1, y, Form("Par1 defect: "));
// 	tl->DrawLatex(0.7, y, Form("%4d", nPar1Defect));


	// -- Operation Parameters
	c1->cd(16);
	
	y = 0.92;
	tl->SetTextSize(0.10);
	tl->SetTextFont(22);
	y -= 0.11;
	tl->DrawLatex(0.1, y, Form("Op. Parameters"));

	tl->SetTextFont(132);
	tl->SetTextSize(0.09);

	y -= 0.11;
	int vana(-1.);
        vana = dac_findParameter(dirName, "Vana", chipId);
	tl->DrawLatex(0.1, y, "VANA: ");
	if (vana >= 0.) tl->DrawLatex(0.6, y, Form("%3i DAC", vana));
	else tl->DrawLatex(0.7, y, "N/A");

	y -= 0.10;
	int caldel(-1.);
        caldel = dac_findParameter(dirName, "CalDel", chipId);
	tl->DrawLatex(0.1, y, "CALDEL: ");
	if (vana >= 0.) tl->DrawLatex(0.6, y, Form("%3d DAC", caldel));
	else tl->DrawLatex(0.7, y, "N/A");

	y -= 0.10;
	int vthrcomp(-1.);
        vthrcomp = dac_findParameter(dirName, "VthrComp", chipId);
	tl->DrawLatex(0.1, y, "VTHR: ");
	if (vana >= 0.) tl->DrawLatex(0.6, y, Form("%3d DAC", vthrcomp));
	else tl->DrawLatex(0.7, y, "N/A");

	y -= 0.10;
	int vtrim(-1.);
        vtrim = dac_findParameter(dirName, "Vtrim", chipId);
	tl->DrawLatex(0.1, y, "VTRIM: ");
	if (vana >= 0.) tl->DrawLatex(0.6, y, Form("%3d DAC", vtrim));
	else tl->DrawLatex(0.7, y, "N/A");
	
	y -= 0.10;
	int ibias(-1.);
        ibias = dac_findParameter(dirName, "Ibias_DAC", chipId);
	tl->DrawLatex(0.1, y, "IBIAS_DAC: ");
	if (vana >= 0.) tl->DrawLatex(0.6, y, Form("%3d DAC", ibias));
	else tl->DrawLatex(0.7, y, "N/A");
       
	y -= 0.10;
	int voffset(-1.);
        voffset = dac_findParameter(dirName, "VoffsetOp", chipId);
	tl->DrawLatex(0.1, y, "VOFFSETOP: ");
	if (vana >= 0.) tl->DrawLatex(0.6, y, Form("%3d DAC", voffset));
	else tl->DrawLatex(0.7, y, "N/A");

	// -- Page title
	c1->cd(0);
	tl->SetTextSize(0.04);
	tl->SetTextFont(22);
	tl->DrawLatex(0.02, 0.97, Form("%s (C%i)", noslash.Data(), chipId));

	TDatime date;
	tl->SetTextSize(0.02);
	tl->DrawLatex(0.75, 0.97, Form("%s", date.AsString()));

	c1->SaveAs(Form("%s/chipSummary_C%i.ps", dirName, chipId));
	c1->SaveAs(Form("%s/C%i.png", dirName, chipId));
		

	// -- Dump into logfile
	ofstream OUT(Form("%s/summary_C%i.txt", dirName, chipId));
	OUT << "nDeadPixel: "         << nDeadPixel << endl;
	OUT << "nNoisy1Pixel: "       << nNoisy1Pixel << endl;
	OUT << "nDeadTrimbits: "      << nDeadTrimbits << endl;
	OUT << "nDeadBumps: "         << nDeadBumps << endl;
	OUT << "nMaskDefect: "        << nMaskDefect << endl;
	OUT << "nAddressProblems: "   << nAddressProblems << endl;
	OUT << "nNoisy2Pixel: "       << nNoisy2Pixel << endl;
	OUT << "nTThrDefect: "        << nThrDefect << endl;
	OUT << "nGainDefect: "        << nGainDefect << endl;
	OUT << "nPedDefect: "         << nPedDefect << endl;
	OUT << "nParDefect: "         << nPar1Defect << endl;
	OUT << "nDoubleCounts: "      << nDoubleCounts << endl;
	OUT << "nDoubleFunctCounts: " << nDoubleFunctCounts << endl;
	OUT << "nDoublePerfCounts: "  << nDoublePerfCounts << endl;
	OUT << "nDoubleTrims: "       << nDoubleTrims << endl;
	OUT << "nDoublePHs: "         << nDoublePHs << endl;
        OUT << "nRootFileProblems: "  << nRootFileProblems << endl;
	OUT << "SCurve "              << nN_entries    << " " << mN << " " << sN << endl;
	OUT << "Threshold "           << nV_entries    << " " << mV  << " " << sV << endl;
	OUT << "Gain "                << nG_entries    << " " << mG << " " << sG << endl;
	OUT << "Pedestal "            << nP_entries    << " " << mP << " " << sP << endl;
	OUT << "Parameter1 "          << nPar1_entries << " " << mPar1 << " " << sPar1 << endl;
	OUT.close();
	
}
开发者ID:fnal,项目名称:elComandante,代码行数:101,代码来源:chipSummaryPage.C

示例9: LEDRef_evtdis


//.........这里部分代码省略.........
	  //cout << "hist idx " << idx << endl;
	  
	  if (idx < 0 || idx > TOTCHAN) { 
	    cout << "Hist idx out of range: " << idx << endl;
	  }
	  else { // reasonable range of idx
	    hfit[idx]->SetBinContent(in->GetTime(), in->GetSignal());
	  }

	} // LED Ref data only

      } // Raw data read
    
      // Next: let's actually plot the data..
      for (Int_t strip = strip_f; strip <= strip_l; strip++) {
	
	int idx = strip + NSTRIPS*gainv;
	
	// which set/column does the strip belong in
	int iset = strip / NSTRIPS_IN_SET; 	  
	int within_set = strip % NSTRIPS_IN_SET; 	  
	// on which pad should we plot it?
	int pad_id = (NSTRIPS_IN_SET-1-within_set)*NSETS + iset + 1;
	
	cout << "strip " << strip 
	     << ". set="<< iset << ", within_set=" << within_set
	     << ", pad=" << pad_id << endl;
	cc1->cd(pad_id);
	hfit[idx]->SetTitle("");
	hfit[idx]->SetFillColor(5);
	hfit[idx]->SetMaximum(ymax);
	hfit[idx]->SetMinimum(0);
	// we may or may not decide to fit the data
	if (dofit) {
	  f1[i]->SetParameter(0, 0); // initial guess; zero amplitude :=)
	  hfit[idx]->Fit(f1[i]);
	}
	hfit[idx]->Draw();
	if( numbering ) {
	  t->SetTextColor(clr[gainv]);
	  t->DrawTextNDC(0.65,0.65,ch_label[idx]);
	}
      }

      // add some extra text on the canvas
      // print a box showing run #, evt #, and timestamp
      cc1->cd();
      // first draw transparent pad
      TPad *trans = new TPad("trans","",0,0,1,1);
      trans->SetFillStyle(4000);
      trans->Draw();
      trans->cd();
      // then draw text
      TPaveText *label = new TPaveText(.2,.11,.8,.14,"NDC"); 
      //  label->Clear();
      label->SetBorderSize(1);
      label->SetFillColor(0);
      label->SetLineColor(clr[gainv]);
      label->SetTextColor(clr[gainv]);
      //label->SetFillStyle(0);
      TDatime d;
      d.Set(timestamp);
      sprintf(name,"Run %d, Event %d, Hist Max %d, %s",runno,iev,ymax,d.AsString());
      label->AddText(name);
      label->Draw();
      cc1->Update();
      cout << "Done" << endl;
      
      // some shenanigans to hold the plotting, if requested
      if (firstevent != lastevent) {
	if (delay == -1) {
	  // wait for character input before proceeding
	  cout << " enter y to proceed " << endl;
	  char dummy[2];
	  cin >> dummy;
	  cout << " read " << dummy << endl;
	  if (strcmp(dummy, "y")==0) {
	    cout << " ok, continuing with event " << iev+1 << endl;
	  }
	  else {
	    cout << " ok, exiting " << endl;
	    //exit(1);
	  }
	}
	else {
	  cout << "Sleeping for " << delay * 500 << endl;
	  gSystem->Sleep(delay * 500);
	}
      }

      // save plot, if setup/requested to do so
      char plotname[100];
      if (saveplot==1) {
	sprintf(plotname,"Run_%d_LEDRef_Ev%d_Gain%d_MaxHist%d.gif",
		runno,iev,gainv,ymax);  
	cout <<"SAVING plot:"<< plotname << endl;
	cc1->SaveAs(plotname);
      }

    } // event selection
开发者ID:alisw,项目名称:AliRoot,代码行数:101,代码来源:LEDRef_evtdis.C

示例10: cacheParameters

void ParameterCache::cacheParameters(MethodAbsScan *scanner, TString fileName){

	int totalCachedPoints=0;

	// cache default solutions
	//
	if ( m_arg->debug ) cout << "ParameterCache::cacheParameters() : ";
	cout << "saving parameters to: " << fileName << endl;

	ofstream outfile;
	outfile.open(fileName);

	vector<RooSlimFitResult*> solutions = scanner->getSolutions();

	outfile << "##### auto-generated by ParameterCache ####### " << endl;
	TDatime d;
	outfile << "##### printed on " << d.AsString() << " ######" << endl;
	outfile << Form("%-25s","# ParameterName") << " " << Form("%12s","value") << " " << Form("%12s","errLow") << " " << Form("%12s","errHigh") << endl;

	for (unsigned int i=0; i<solutions.size(); i++){

		outfile << endl;
		outfile << "----- SOLUTION " << totalCachedPoints << " -----" << endl;

		RooSlimFitResult *slimFitRes = solutions[i];
		printFitResultToOutStream(outfile,slimFitRes);
		totalCachedPoints++;
	}
	if ( m_arg->debug )cout << "ParameterCache::cacheParameters() : cached " << solutions.size() << " solutions" << endl;

	// cache also any specifically requested points
	//
	// 1D
	if (m_arg->savenuisances1d.size()>0){
		vector<float> &points = m_arg->savenuisances1d;
		for (int i=0; i<points.size(); i++){

			int iBin = scanner->getHCL()->FindBin(points[i]);
			RooSlimFitResult *r = scanner->curveResults[iBin-1];
			if (!r) {
				cout << "ParameterCache::cacheParameters() : ERROR : no fit result at this scan point!" << endl;
				return;
			}
			outfile << endl;
			outfile << "----- SOLUTION " << totalCachedPoints << " (--sn at "
				<< scanner->getScanVar1Name() << " = " << Form("%10.5f",points[i]) << ") -----" << endl;
			printFitResultToOutStream(outfile,r);
			totalCachedPoints++;
		}
		if ( m_arg->debug )	cout << "ParameterCache::cacheParameters() : cached " << totalCachedPoints-solutions.size() << " further points" << endl;
	}
	// 2D
	if (m_arg->savenuisances2dx.size()>0){
		vector<float> &pointsx = m_arg->savenuisances2dx;
		vector<float> &pointsy = m_arg->savenuisances2dy;

		if (pointsx.size() != pointsy.size() ) {
			cout << "ParameterCache::cacheParameters() : ERROR : vectors for savenuisances2dx(y) have different size" << endl;
			return;
		}

		for (int i=0; i<pointsx.size(); i++){
			int xBin = scanner->getHCL2d()->GetXaxis()->FindBin(pointsx[i]);
			int yBin = scanner->getHCL2d()->GetYaxis()->FindBin(pointsy[i]);
			if ( xBin<1 || xBin>scanner->getNPoints2dx() || yBin<1 || yBin>scanner->getNPoints2dy() ){
				cout << "ParameterCache::cacheParameters() : ERROR : specified point is out of scan range." << endl;
				continue;
			}

			RooSlimFitResult *r = scanner->curveResults2d[xBin-1][yBin-1];
			if (!r) {
				cout << "ParameterCache::cacheParameters() : ERROR : no fit result at this scan point!" << endl;
				return;
			}
			outfile << endl;
			outfile << "----- SOLUTION " << totalCachedPoints << " (not glob min just min at "
				<< scanner->getScanVar1Name() << " = " << pointsx[i] << " , "
				<< scanner->getScanVar2Name() << " = "
				<< pointsy[i] << " -----" << endl;
			printFitResultToOutStream(outfile,r);
			totalCachedPoints++;
		}
		if ( m_arg->debug ) cout << "ParameterCache::cacheParameters() : cached " << totalCachedPoints-solutions.size() << " further points" << endl;
	}
	outfile.close();
}
开发者ID:KonstantinSchubert,项目名称:gammacombo,代码行数:86,代码来源:ParameterCache.cpp

示例11: chipSummary


//.........这里部分代码省略.........
	sprintf(tCalDir, "%s/../T-calibration", dirName);

	if ( tCalFile ) {
	
	  analyse(tCalDir, chipId);
	}
	else {

	  c1->cd(14);
	  TGraph *graph = (TGraph*)f->Get(Form("TempCalibration_C%i", chipId));
	  if ( graph ) { graph->Draw("A*"); }
	  else { ++nRootFileProblems; }
	  tl->DrawLatex(0.1, 0.92, "Temperature calibration");
	}


	// -- Operation Parameters
	c1->cd(16);
	
	y = 0.92;
	tl->SetTextSize(0.10);
	tl->SetTextFont(22);
	y -= 0.11;
	tl->DrawLatex(0.1, y, Form("Op. Parameters"));

	tl->SetTextFont(132);
	tl->SetTextSize(0.09);

	y -= 0.11;
	int vana(-1.);
        vana = dac_findParameter(dirName, "Vana", chipId);
	tl->DrawLatex(0.1, y, "VANA: ");
	if (vana >= 0.) tl->DrawLatex(0.6, y, Form("%3i DAC", vana));
	else tl->DrawLatex(0.7, y, "N/A");

	y -= 0.10;
	int caldel(-1.);
        caldel = dac_findParameter(dirName, "CalDel", chipId);
	tl->DrawLatex(0.1, y, "CALDEL: ");
	if (vana >= 0.) tl->DrawLatex(0.6, y, Form("%3d DAC", caldel));
	else tl->DrawLatex(0.7, y, "N/A");

	y -= 0.10;
	int vthrcomp(-1.);
        vthrcomp = dac_findParameter(dirName, "VthrComp", chipId);
	tl->DrawLatex(0.1, y, "VTHR: ");
	if (vana >= 0.) tl->DrawLatex(0.6, y, Form("%3d DAC", vthrcomp));
	else tl->DrawLatex(0.7, y, "N/A");

	y -= 0.10;
	int vtrim(-1.);
        vtrim = dac_findParameter(dirName, "Vtrim", chipId);
	tl->DrawLatex(0.1, y, "VTRIM: ");
	if (vana >= 0.) tl->DrawLatex(0.6, y, Form("%3d DAC", vtrim));
	else tl->DrawLatex(0.7, y, "N/A");
	
	y -= 0.10;
	int ibias(-1.);
        ibias = dac_findParameter(dirName, "Ibias_DAC", chipId);
	tl->DrawLatex(0.1, y, "IBIAS_DAC: ");
	if (vana >= 0.) tl->DrawLatex(0.6, y, Form("%3d DAC", ibias));
	else tl->DrawLatex(0.7, y, "N/A");
       
	y -= 0.10;
	int voffset(-1.);
        voffset = dac_findParameter(dirName, "VoffsetOp", chipId);
	tl->DrawLatex(0.1, y, "VOFFSETOP: ");
	if (vana >= 0.) tl->DrawLatex(0.6, y, Form("%3d DAC", voffset));
	else tl->DrawLatex(0.7, y, "N/A");

	// -- Page title
	c1->cd(0);
	tl->SetTextSize(0.025);
	tl->SetTextFont(22);
	tl->DrawLatex(0.02, 0.97, Form("%s (Trim%i)", noslash.Data(),TrimVcal));

	TDatime date;
	tl->SetTextSize(0.02);
	tl->DrawLatex(0.75, 0.97, Form("%s", date.AsString()));

	c1->SaveAs(Form("%s/chipSummary_C%i_%i.ps", dirName, chipId,TrimVcal));
	c1->SaveAs(Form("%s/C%i_%i.gif", dirName, chipId,TrimVcal));
	

	// -- Dump into logfile
	ofstream OUT(Form("%s/summary_C%i_%i.txt", dirName, chipId,TrimVcal));
	OUT << "nDeadPixel: "         << nDeadPixel << endl;
	OUT << "nNoisyPixel: "        << nNoisyPixel << endl;
	OUT << "nDeadTrimbits: "      << nDeadTrimbits << endl;
	OUT << "nDeadBumps: "         << nDeadBumps << endl;
	OUT << "nMaskDefect: "        << nMaskDefect << endl;
	OUT << "nAddressProblems: "   << nAddressProblems << endl;
        OUT << "nRootFileProblems: "  << nRootFileProblems << endl;
	OUT << "SCurve "              << nN_entries << " " << mN << " " << sN << endl;
	OUT << "Threshold "           << nV_entries << " " << mV  << " " << sV << endl;
	OUT << "Gain "                << nG_entries << " " << mG << " " << sG << endl;
	OUT << "Pedestal "            << nP_entries << " " << mP << " " << sP << endl;
	OUT.close();
	
}
开发者ID:chwissing,项目名称:psi46expert,代码行数:101,代码来源:chipSummaryPage.C

示例12: ProcessRun

void KVINDRAOnlineDataAnalyser::ProcessRun()
{
   // Perform treatment of a given run

   //Open data file
   fRunFile = (KVRawDataReader*)gDataSet->OpenRunfile(GetDataType().Data() , fRunNumber);
   if (fRunFile->GetStatus() == KVGRUNetClientGanilReader::kSTATUS_NOHOST) {
      // cannot connect to ACQ host
      Error("ProcessRun", "Cannot connect to acquisition host machine. Check KVGRUNetClientGanilReader.AcqHostName");
      return;
   }
   //warning! real number of run may be different from that deduced from file name
   //we get the real run number from gMultiDetArray and use it to name any new files
   fRunNumber = gMultiDetArray->GetCurrentRunNumber();

   fEventNumber = 0; //event number

   cout << endl << "Reading ONLINE events from RUN# " << fRunNumber << endl;

   cout << "Starting analysis of data on : ";
   TDatime now;
   cout <<  now.AsString() << endl << endl;

   preInitRun();
   //call user's beginning of run
   InitRun();
   postInitRun();

   fDetEv = new KVDetectorEvent;

   //loop over events in file
   fGoEventLoop = kTRUE;
   fDumpEvents = kFALSE;
   while (fGoEventLoop) {
      Bool_t gotevent = fRunFile->GetNextEvent();

      if (gotevent) {
         fEventNumber++;

         //reconstruct hit groups
         KVSeqCollection* fired = fRunFile->GetFiredDataParameters();
         gMultiDetArray->GetDetectorEvent(fDetEv, fired);

         preAnalysis();
         //call user's analysis. stop if returns kFALSE.
         if (!Analysis()) break;
         postAnalysis();

         fDetEv->Clear();

         if (!((fEventNumber) % 10000)) cout << " ++++ " << fEventNumber << " events read ++++ " << endl;
      } else {
         // got no event - why ?
         Int_t status = fRunFile->GetStatus();
         switch (status) {
            case KVGRUNetClientGanilReader::kSTATUS_NOBUFF:
               Warning("ProcessRun", "Got no buffer from ACQHOST. Sleeping for 2 seconds.");
               gSystem->Sleep(2000);
               break;

            case KVGRUNetClientGanilReader::kSTATUS_NOEVENT:
               Warning("ProcessRun", "Got no event from ACQHOST. Sleeping for 2 seconds.");
               gSystem->Sleep(2000);
               break;

            case KVGRUNetClientGanilReader::kSTATUS_NOACQ:
               Warning("ProcessRun", "Acquisition is stopped. Sleeping for 5 seconds.");
               gSystem->Sleep(5000);
               break;
         }
      }
   }

   delete fDetEv;

   cout << "Ending analysis of run " << fRunNumber << " on : ";
   TDatime now2;
   cout <<  now2.AsString() << endl << endl;
   cout << endl << "Finished reading " << fEventNumber << " events" << endl << endl;

   preEndRun();
   //call user's end of run function
   EndRun();
   postEndRun();

   if (fMessageThread) {
      fMessageThread->Kill();
      TThread::Delete(fMessageThread);
      delete fMessageThread;
      fMessageThread = 0;
   }
}
开发者ID:GiuseppePast,项目名称:kaliveda,代码行数:92,代码来源:KVINDRAOnlineDataAnalyser.cpp


注:本文中的TDatime::AsString方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。