Esempio n. 1
0
void vhpt_mapping_insert(uintptr_t va, asid_t asid, tlb_entry_t entry)
{
	region_register_t rr_save, rr;
	size_t vrn;
	rid_t rid;
	uint64_t tag;
	
	vhpt_entry_t *ventry;
	
	vrn = va >> VRN_SHIFT;
	rid = ASID2RID(asid, vrn);
	
	rr_save.word = rr_read(vrn);
	rr.word = rr_save.word;
	rr.map.rid = rid;
	rr_write(vrn, rr.word);
	srlz_i();
	
	ventry = (vhpt_entry_t *) thash(va);
	tag = ttag(va);
	rr_write(vrn, rr_save.word);
	srlz_i();
	srlz_d();
	
	ventry->word[0] = entry.word[0];
	ventry->word[1] = entry.word[1];
	ventry->present.tag.tag_word = tag;
}
Esempio n. 2
0
//_____________________________________//
Bool_t UpdateTag(TString faliroot, TString froot, TString fgeant, 
		 TString turl, TString guid,
		 TString fperiod, TString fpass, TString fname) {
  cout<<"> Updating tags...."<<endl;

  const char * tagPattern = "tag.root";
  // Open the working directory
  void * dirp = gSystem->OpenDirectory(gSystem->pwd());
  const char * name = 0x0;
  // Add all files matching *pattern* to the chain
  while((name = gSystem->GetDirEntry(dirp))) {
    cout<<">>> Adding to chain file " << name << "...." << endl;
    if (strstr(name,tagPattern)) {
      TFile *f = TFile::Open(name,"read") ;
 
      AliRunTag *tag = 0x0;
      AliFileTag *flTag = 0x0;
      TTree *fTree = (TTree *)f->Get("T");
      if (!fTree) { f->Close(); continue; }
      fTree->SetBranchAddress("AliTAG",&tag);
   
      //Defining new tag objects
      AliRunTag *newTag = 0x0;
      TTree ttag("T","A Tree with event tags");
      TBranch * btag = ttag.Branch("AliTAG", &newTag);
      btag->SetCompressionLevel(9);
      
      cout<<">>>>> Found " << fTree->GetEntries() << " entries...." << endl;
      for(Int_t iTagFiles = 0; iTagFiles < fTree->GetEntries(); iTagFiles++) {
	fTree->GetEntry(0);
	newTag = new AliRunTag(*tag);
	newTag->SetAlirootVersion(faliroot);
	newTag->SetRootVersion(froot);
	newTag->SetGeant3Version(fgeant);
	newTag->SetLHCPeriod(fperiod);
	newTag->SetReconstructionPass(fpass);
	newTag->SetProductionName(fname);
 	cout << "Found " << newTag->GetNFiles() << " file tags" << endl;
 	for(Int_t j = 0; j < newTag->GetNFiles(); j++) {
 	  flTag = (AliFileTag *) newTag->GetFileTag(j);
 	  flTag->SetTURL(turl);
 	  flTag->SetGUID(guid);
 	}
	ttag.Fill();

	delete tag;
	delete newTag;
      }//tag file loop 

      TFile* ftag = TFile::Open(name, "recreate");
      ftag->cd();
      ttag.Write();
      ftag->Close();

    }//pattern check
  }//directory loop
  return kTRUE;
}
Esempio n. 3
0
//_____________________________________//
Bool_t UpdateTag(TString faliroot, TString froot, TString fgeant, TString turl, TString guid) {
  cout<<"Updating tags....."<<endl;

  const char * tagPattern = "tag.root";
  // Open the working directory
  void * dirp = gSystem->OpenDirectory(gSystem->pwd());
  const char * name = 0x0;
  // Add all files matching *pattern* to the chain
  while((name = gSystem->GetDirEntry(dirp))) {
    if (strstr(name,tagPattern)) {
      TFile *f = TFile::Open(name,"read") ;
 
      AliRunTag *tag = new AliRunTag;
      AliEventTag *evTag = new AliEventTag;
      TTree *fTree = (TTree *)f->Get("T");
      fTree->SetBranchAddress("AliTAG",&tag);
   
      //Defining new tag objects
      AliRunTag *newTag = new AliRunTag();
      TTree ttag("T","A Tree with event tags");
      TBranch * btag = ttag.Branch("AliTAG", &newTag);
      btag->SetCompressionLevel(9);
      for(Int_t iTagFiles = 0; iTagFiles < fTree->GetEntries(); iTagFiles++) {
	fTree->GetEntry(iTagFiles);
	newTag->SetRunId(tag->GetRunId());
	newTag->SetAlirootVersion(faliroot);
	newTag->SetRootVersion(froot);
	newTag->SetGeant3Version(fgeant);
	const TClonesArray *tagList = tag->GetEventTags();
	for(Int_t j = 0; j < tagList->GetEntries(); j++) {
	  evTag = (AliEventTag *) tagList->At(j);
	  evTag->SetTURL(turl);
	  evTag->SetGUID(guid);
	  newTag->AddEventTag(*evTag);
	}
	ttag.Fill();
	newTag->Clear();
      }//tag file loop 
  
      TFile* ftag = TFile::Open(name, "recreate");
      ftag->cd();
      ttag.Write();
      ftag->Close();
      
      delete tag;
      delete newTag;
    }//pattern check
  }//directory loop
  return kTRUE;
}