Changeset 273 in svn
- Timestamp:
- Feb 16, 2009, 1:16:19 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Examples/LHCO_Only.cpp
r271 r273 72 72 73 73 string rootfile = argv[1]; 74 TFile ftest(rootfile.c_str(),"READ");75 if (!ftest.IsOpen()) { cout << "ERROR: file " << rootfile << " not found\n"; return -1;}76 ftest.Close();77 78 74 string logfile; 79 75 if(argc ==3) logfile=argv[2]; 76 80 77 LHCOConverter converter(rootfile,logfile); 81 78 converter.CopyRunLogFile(); 82 /* 83 //read the input TROOT file 84 string inputFile(argv[1]); 85 86 //create output log-file name 87 string forLog = inputFile; 88 string LogName = forLog.erase(forLog.find(".root")); 89 LogName = LogName+"_run.log"; 90 91 string line,buffer; 92 TChain chain("Analysis"); 93 chain.Add(inputFile.c_str()); 94 ExRootTreeReader *treeReaderT = new ExRootTreeReader(&chain); 95 96 //read the datacard input file 97 string LogRunFile(""); 98 if(argc==3) LogRunFile =argv[2]; 99 100 //Trigger information 101 TriggerTable *TRIGT = new TriggerTable(); 102 TRIGT->TriggerCardReader(TrigDatacard.c_str()); 103 TRIGT->PrintTriggerTable(LogName); 104 105 TClonesArray *branchElecTrig = treeReaderT->UseBranch("Electron"); 106 TClonesArray *branchMuonTrig = treeReaderT->UseBranch("Muon"); 107 TClonesArray *branchJetTrig = treeReaderT->UseBranch("Jet"); 108 TClonesArray *branchTauJetTrig = treeReaderT->UseBranch("TauJet"); 109 TClonesArray *branchPhotonTrig = treeReaderT->UseBranch("Photon"); 110 TClonesArray *branchETmisTrig = treeReaderT->UseBranch("ETmis"); 111 112 ExRootTreeWriter *treeWriterT = new ExRootTreeWriter(inputFile, "Trigger"); 113 ExRootTreeBranch *branchTrigger = treeWriterT->NewBranch("TrigResult", TRootTrigger::Class()); 114 115 Long64_t entryT, allEntriesT = treeReaderT->GetEntries(); 116 cout << "** Chain contains " << allEntriesT << " events" << endl; 117 for(entryT = 0; entryT < allEntriesT; ++entryT) 118 { 119 treeWriterT->Clear(); 120 treeReaderT->ReadEntry(entryT); 121 TRIGT->GetGlobalResult(branchElecTrig, branchMuonTrig,branchJetTrig, branchTauJetTrig,branchPhotonTrig, branchETmisTrig,branchTrigger); 122 treeWriterT->Fill(); 123 } 124 125 treeWriterT->Write(); 126 delete treeWriterT; 127 delete TRIGT; 128 */ 79 converter.ConvertExRootAnalysisToLHCO(); 129 80 130 81 cout << "** Exiting..." << endl; -
trunk/TODO
r264 r273 22 22 - libHector.so = libUtilities.so !!!!! 23 23 - FLAG_zdc <-> pas complet, notamment dans le fichier log 24 - LHCO http://cp3wks05.fynu.ucl.ac.be/Manual/lhco.html 25 - Hector @ 5 TeV
Note:
See TracChangeset
for help on using the changeset viewer.