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


C++ TObject::Print方法代码示例

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


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

示例1: next

microboone_geo(TString volName="")
{
  gSystem->Load("libGeom");
  gSystem->Load("libGdml");

  TGeoManager::Import("microboone.gdml");

  TList* mat = gGeoManager->GetListOfMaterials();
  TIter next(mat);
  TObject *obj;
  while (obj = next()) {
    obj->Print();
  }

  gGeoManager->CheckOverlaps(0.01);
  gGeoManager->PrintOverlaps();
  gGeoManager->SetMaxVisNodes(70000);

  //gGeoManager->GetTopVolume()->Draw();
  //if ( ! volName.IsNull() ) gGeoManager->FindVolumeFast(volName)->Draw("ogl");
  //gGeoManager->FindVolumeFast("volFieldCage")->Draw();

  TFile *tf = new TFile("microboone.root", "RECREATE");
 
  gGeoManager->Write();

  tf->Close();
}
开发者ID:Zepeng,项目名称:opticalsim,代码行数:28,代码来源:microboone_simplegeo.C

示例2: PrintOpt

//_____________________________________________________________________________
void THaHashList::PrintOpt( Option_t* opt ) const
{
  // Print all objects in the list. Pass option 'opt' through to each object
  // being printed. (This is the old ROOT 2.x behavior).

  TIter next(this);
  TObject* object;
  while((object = next()))
    object->Print(opt);
}
开发者ID:hansenjo,项目名称:analyzer,代码行数:11,代码来源:THaCutList.C

示例3: tables_read

void tables_read()
{
   // now open connection to database for read-only
   TSQLFile* f = new TSQLFile(dbname, "open", username, userpass);
   if (f->IsZombie()) { delete f; return; }

   // see list of keys
   f->ls();

   // get histogram from DB and draw it
   TH1* h1 = (TH1*) f->Get("histo");
   if (h1!=0) {
       h1->SetDirectory(0);
       h1->Draw();
   }

   // get TList with other objects
   TObject* obj = f->Get("list");
   cout << "Printout of TList object" << endl;
   if (obj!=0) obj->Print("*");
   delete obj;

   // and get TClonesArray
   obj = f->Get("clones");
   cout << "Printout of TClonesArray object" << endl;
   if (obj!=0) obj->Print("*");
   delete obj;

   // this is query to select data of hole class from different tables
   cout << "================ TBox QUERY ================ " << endl;
   cout << f->MakeSelectQuery(TBox::Class()) << endl;
   cout << "================ END of TBox QUERY ================ " << endl;

   cout << "================== TH1I QUERY ================ " << endl;
   cout << f->MakeSelectQuery(TH1I::Class()) << endl;
   cout << "================ END of TH1I QUERY ================ " << endl;

   // close connection to database
   delete f;
}
开发者ID:Y--,项目名称:root,代码行数:40,代码来源:sqltables.C

示例4: next

lbnend_geo(TString volName="")
{
  gSystem->Load("libGeom");
  gSystem->Load("libGdml");

  TGeoManager::Import("lbnend.gdml");

  drawopt optuboone[] = {
    {"volTPC",        kOrange-7},
    {"volTPCPlane",        kOrange-7},
    {"volTPCPlaneVert",        kOrange-7},
    {0, 0}
  };

  for (int i=0;; ++i) {
    if (optuboone[i].volume==0) break;
      gGeoManager->FindVolumeFast(optuboone[i].volume)->SetLineColor(optuboone[i].color);
  }
  
  TList* mat = gGeoManager->GetListOfMaterials();
  TIter next(mat);
  TObject *obj;
  while (obj = next()) {
    obj->Print();
  }

  gGeoManager->GetTopNode();
  gGeoManager->CheckOverlaps(1e-16);
  gGeoManager->PrintOverlaps();
  gGeoManager->SetMaxVisNodes(70000);

  //gGeoManager->GetTopVolume()->Draw();
  //if ( ! volName.IsNull() ) gGeoManager->FindVolumeFast(volName)->Draw("ogl");
  
  gGeoManager->FindVolumeFast("volWorld")->Draw("ogl");


  TFile *tf = new TFile("lbnend.root", "RECREATE");
 
  gGeoManager->Write();

  tf->Close();
}
开发者ID:Zepeng,项目名称:opticalsim,代码行数:43,代码来源:lbnend_geo.C

示例5: DumpGlobalTrigger


//.........这里部分代码省略.........
	// Setup the raw reader and HLTOUT handler.
	AliRawReader* rawReader = AliRawReader::Create(dataSource);
	if (rawReader == NULL)
	{
		cerr << "ERROR: Could not create raw reader for '" << dataSource << "'." << endl;
		if (file != NULL) delete file;
		return;
	}
	if (! rawReader->IsRawReaderValid())
	{
		cerr << "ERROR: Raw reader is not valid for '" << dataSource << "'." << endl;
		delete rawReader;
		if (file != NULL) delete file;
		return;
	}
	AliHLTOUT* hltout = AliHLTOUT::New(rawReader);
	if (hltout == NULL)
	{
		cerr << "ERROR: Could not create an AliHLTOUT object for '" << dataSource << "'." << endl;
		delete rawReader;
		if (file != NULL) delete file;
		return;
	}
	
	// Make sure that the lastEvent is greater than firstEvent.
	if (lastEvent < firstEvent) lastEvent = rawReader->GetNumberOfEvents();
	if (lastEvent < firstEvent) lastEvent = firstEvent;
	
	// Need to call NextEvent once here or we will start at the wrong event.
	if (! rawReader->NextEvent())
	{
		cout << "No events found in '" << dataSource << "'." << endl;
		AliHLTOUT::Delete(hltout);
		delete rawReader;
		if (file != NULL) delete file;
		return;
	}
	
	// Now step through the events.
	for (int i = 0; i < firstEvent; i++) rawReader->NextEvent();
	for (int i = firstEvent; i <= lastEvent; i++)
	{
		int result = hltout->Init();
		if (result != 0)
		{
			cerr << "ERROR: could not initialise HLTOUT." << endl;
			hltout->Reset();
			continue;
		}
		cout << "#################### Event " << i << " in " << dataSource
			<< " has event ID = " << hltout->EventId()
			<< " (0x" << hex << hltout->EventId() << dec << ")"
			<< " ####################" << endl;
		
		for (result = hltout->SelectFirstDataBlock();
		     result >= 0;
		     result = hltout->SelectNextDataBlock()
		    )
		{
			AliHLTComponentDataType dt;
			AliHLTUInt32_t spec = 0;
			hltout->GetDataBlockDescription(dt, spec);
			TObject* obj = hltout->GetDataObject();
			if (obj == NULL) continue;
			if (obj->IsA()->GetBaseClass("AliHLTGlobalTriggerDecision") != NULL)
			{
				if (dt != kAliHLTDataTypeGlobalTrigger)
				{
					cerr << "WARNING: Found an AliHLTGlobalTriggerDecision object in a data block of type '"
						<< AliHLTComponent::DataType2Text(dt).c_str()
						<< "' but expected '"
						<< AliHLTComponent::DataType2Text(kAliHLTDataTypeGlobalTrigger).c_str()
						<< "'." << endl;
				}
				if (file != NULL)
				{
					obj->Write(
						Form("HLTGlobalDecision_event_0x%llX", hltout->EventId()),
						TObject::kOverwrite
					);
				}
				obj->Print();
			}
			hltout->ReleaseDataObject(obj);
		}
		
		result = hltout->Reset();
		if (result != 0)
		{
			cerr << "ERROR: could not reset HLTOUT." << endl;
			hltout->Reset();
			continue;
		}
		rawReader->NextEvent();
	}
	
	AliHLTOUT::Delete(hltout);
	delete rawReader;
	if (file != NULL) delete file;
}
开发者ID:alisw,项目名称:AliRoot,代码行数:101,代码来源:DumpGlobalTrigger.C

示例6: HM_PHYSICS_V0001


//.........这里部分代码省略.........
  config.AddSymbol("domainPHSDDL", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"DAQRDOUT:PHS\\0\")");
  config.AddSymbol("domainCPVDDL", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"DAQRDOUT:CPV\\0\")");
  config.AddSymbol("domainPMDDDL", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"DAQRDOUT:PMD\\0\")");
  config.AddSymbol("domainMCHDDL", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"DAQRDOUT:MCH\\0\")");
  config.AddSymbol("domainMTRDDL", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"DAQRDOUT:MTR\\0\")");
  config.AddSymbol("domainFMDDDL", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"DAQRDOUT:FMD\\0\")");
  config.AddSymbol("domainT00DDL", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"DAQRDOUT:T00\\0\")");
  config.AddSymbol("domainV00DDL", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"DAQRDOUT:V00\\0\")");
  config.AddSymbol("domainZDCDDL", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"DAQRDOUT:ZDC\\0\")");
  config.AddSymbol("domainACODDL", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"DAQRDOUT:ACO\\0\")");
  config.AddSymbol("domainCTPDDL", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"DAQRDOUT:TRI\\0\")");
  config.AddSymbol("domainEMCDDL", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"DAQRDOUT:EMC\\0\")");

  // /////////////////////////////////////////////////////////////////////////////////////////	
  // -- DETECTOR READOUT DOMAINS - SPECIAL
  config.AddSymbol("domainALLDDL", "AliHLTTriggerDomain", "", "AliHLTTriggerDomain(\"DAQRDOUT:***\\0\")");
  
  // /////////////////////////////////////////////////////////////////////////////////////////	
  // NOTE: always make sure that the global HLT output and the HLT DDLs are included
  // in the readout, i.e. add domainHLTOUT|domainHLTDDL to the trigger domain

  // -- BarrelMultiplicity
  config.AddItem(
		 "BarrelMultiplicityTrigger", 
		 "domainHLTOUT|domainALLDDL", 
		 "H-TRACK_MULTIPLICITY-V0002.001-CENTRAL-ALL"
		 );

  config.AddItem(
		 "BarrelHighMultiplicity", 
		 "domainHLTOUT|domainALLDDL", 
		 "H-TRACK_MULTIPLICITY-V0002.002-CENTRAL-ALL"
		 );

  config.AddItem(
		 "BarrelPt_v01", 
		 "domainHLTOUT|domainALLDDL", 
		 "H-TRACK_MULTIPLICITY-V0002.003-CENTRAL-ALL"
		 );

  config.AddItem(
		 "BarrelPt_v01", 
		 "domainHLTOUT|domainALLDDL", 
		 "H-TRACK_MULTIPLICITY-V0002.004-CENTRAL-ALL"
		 );

  config.AddItem(
		 "BarrelPt_v01", 
		 "domainHLTOUT|domainALLDDL", 
		 "H-TRACK_MULTIPLICITY-V0002.005-CENTRAL-ALL"
		 );

  // -- Min bias trigger
  config.AddItem(
		 "true",
		 "domainALLDDL|domainHLTOUT", 
		 10, "H-MINBIAS_SCALE_DOWN-V0002.001-CENTRAL-ALL"
		 );

  
  // /////////////////////////////////////////////////////////////////////////////////////////	
  // default domain in case there is no global trigger
  // readout the output of the reconstruction
  // this refers to the domain domainHLTOUT|domainHLTDDL
  config.SetDefaultTriggerDescription("No HLT global trigger");

  // HLT payload also stored for not triggered events
  config.DefaultTriggerDomain().Add("*******", "HLT ");
  AliHLTReadoutList readoutlist;
  readoutlist.Enable(AliHLTReadoutList::kHLT);
  config.DefaultTriggerDomain().Add(readoutlist);
  
  
  TObject* menu = AliHLTGlobalTriggerConfig::Menu()->Clone();
  menu->Print();
  
  // /////////////////////////////////////////////////////////////////////////////////////////	
  // Write the trigger menu object to the CDB.
  AliCDBId id("HLT/ConfigHLT/HLTGlobalTrigger", firstRun, lastRun, version);
  AliCDBMetaData* metaData = new AliCDBMetaData();
  metaData->SetResponsible("ALICE HLT [email protected]");
  metaData->SetComment("HM-PHYSICS-V0001");
  storage->Put(menu, id, metaData);


  // /////////////////////////////////////////////////////////////////////////////////////////	
  // /////////////////////////////////////////////////////////////////////////////////////////	
  // /////////////////////////////////////////////////////////////////////////////////////////	
  //
  // component configurations
  gROOT->LoadMacro("$ALICE_ROOT/HLT/exa/makeComponentConfigurationObject.C");

  // /////////////////////////////////////////////////////////////////////////////////////////	
  // configuration of BarrelMultiplicityTrigger instances
  makeComponentConfigurationObject("HLT/ConfigHLT/BarrelMultiplicityTrigger", "-mintracks 10", cdbPath, firstRun, lastRun);
  makeComponentConfigurationObject("HLT/ConfigHLT/BarrelHighMultiplicity", "-mintracks 100"  , cdbPath, firstRun, lastRun);
  makeComponentConfigurationObject("HLT/ConfigHLT/BarrelPt_v01", "-mintracks 1 -minpt 0.5"   , cdbPath, firstRun, lastRun);
  makeComponentConfigurationObject("HLT/ConfigHLT/BarrelPt_v02", "-mintracks 1 -minpt 1.0"   , cdbPath, firstRun, lastRun);
  makeComponentConfigurationObject("HLT/ConfigHLT/BarrelPt_v03", "-mintracks 1 -minpt 5.0"   , cdbPath, firstRun, lastRun);
}
开发者ID:alisw,项目名称:AliRoot,代码行数:101,代码来源:HM-PHYSICS-V0001.C

示例7: cafZFlatNtupleMaker

void cafZFlatNtupleMaker(int ind, int partype, int syscode)
{
	gROOT->ProcessLine(".!date");
	gBenchmark->Start("metphoana_time");


	std::ostringstream ostr;
	ostr << ind;
	std::string base_dir("./");
	std::string str_ind = ostr.str();


	
	int datasets = 0;

		if (partype == 0) { //zee
			datasets = 8;
		} else if (partype == 1) { //zmumu
			datasets = 8;
		} else if (partype == 2) { //ztautau
			datasets = 2;
		}

	TStnAna* ap = new TStnAna();
	ap->GetInputModule()->SetPrintLevel(1);	// print file name as they are opened
	
	TStnCatalog* c = new TStnCatalog();
		
	TStnDataset *dsp[datasets];
	
		if (partype == 0) {
			dsp[0] = new TStnDataset("cdfpstn","ze1s6d");
			dsp[1] = new TStnDataset("cdfpstn","ze1sad");
			dsp[2] = new TStnDataset("cdfpstn","ze0scd");
			dsp[3] = new TStnDataset("cdfpstn","ze0sdd");
			dsp[4] = new TStnDataset("cdfpstn","ze0sed");
			dsp[5] = new TStnDataset("cdfpstn","ze0see");
			dsp[6] = new TStnDataset("cdfpstn","ze0seh");
			dsp[7] = new TStnDataset("cdfpstn","ze0sej");

			c->InitDataset(dsp[0]);
			c->InitDataset(dsp[1]);
			c->InitDataset(dsp[2]);
			c->InitDataset(dsp[3]);
			c->InitDataset(dsp[4]);
			c->InitDataset(dsp[5]);
			c->InitDataset(dsp[6]);
			c->InitDataset(dsp[7]);
			ap->AddDataset(dsp[0]);
			ap->AddDataset(dsp[1]);
			ap->AddDataset(dsp[2]);
			ap->AddDataset(dsp[3]);
			ap->AddDataset(dsp[4]);
			ap->AddDataset(dsp[5]);
			ap->AddDataset(dsp[6]);
			ap->AddDataset(dsp[7]);
		}

		if (partype == 1) {
			dsp[0] = new TStnDataset("cdfpstn","ze1s6m");
			dsp[1] = new TStnDataset("cdfpstn","ze1s9m");
			dsp[2] = new TStnDataset("cdfpstn","ze0sbm");
			dsp[3] = new TStnDataset("cdfpstn","ze0scm");
			dsp[4] = new TStnDataset("cdfpstn","ze0sdm");
			dsp[5] = new TStnDataset("cdfpstn","ze0sem");
			dsp[6] = new TStnDataset("cdfpstn","ze0sfm");
			dsp[7] = new TStnDataset("cdfpstn","ze0sgm");
			c->InitDataset(dsp[0]);
			c->InitDataset(dsp[1]);
			c->InitDataset(dsp[2]);
			c->InitDataset(dsp[3]);
			c->InitDataset(dsp[4]);
			c->InitDataset(dsp[5]);
			c->InitDataset(dsp[6]);
			c->InitDataset(dsp[7]);
			ap->AddDataset(dsp[0]);
			ap->AddDataset(dsp[1]);
			ap->AddDataset(dsp[2]);
			ap->AddDataset(dsp[3]);
			ap->AddDataset(dsp[4]);
			ap->AddDataset(dsp[5]);
			ap->AddDataset(dsp[6]);
			ap->AddDataset(dsp[7]);
		}

		if (partype == 2) {
			dsp[0] = new TStnDataset("cdfpstn","ze0s8t");
			dsp[1] = new TStnDataset("cdfpstn","ze0sat");
			c->InitDataset(dsp[0]);
			c->InitDataset(dsp[1]);
			ap->AddDataset(dsp[0]);
			ap->AddDataset(dsp[1]);
		}


		double sum=0;
		for (int i=0; i < datasets; i++) {
			std::cout << "Nfile="<< dsp[i]->GetNFiles() << std::endl;
			std::cout << "NEvts="<< dsp[i]->GetNEvents() << std::endl;
			sum+= dsp[i]->GetNEvents();
//.........这里部分代码省略.........
开发者ID:hkaushalya,项目名称:CDFPhoJets,代码行数:101,代码来源:cafMCZFlatNtupleMaker.C


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