Changeset 249 in svn
- Timestamp:
- Feb 5, 2009, 6:19:29 PM (16 years ago)
- Location:
- trunk
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Delphes.cpp
r246 r249 65 65 66 66 67 if(argc != 4 && argc != 3&& argc != 5) {67 if(argc != 3 && argc != 4 && argc != 5) { 68 68 cout << " Usage: " << argv[0] << " input_file output_file [detector_card] [trigger_card] " << endl; 69 69 cout << " input_list - list of files in Ntpl, StdHep of LHEF format," << endl; … … 138 138 139 139 140 //read the input TROOT file140 //read the output TROOT file 141 141 string inputFileList(argv[1]), outputfilename(argv[2]); 142 if(outputfilename.find(".root") > outputfilename.length() 143 cout << "output_file should be a .root file!\n";142 if(outputfilename.find(".root") > outputfilename.length()) { 143 cout <<"** ERROR: 'output_file' should be a .root file. Exiting... **"<< endl; 144 144 exit(1); 145 145 } … … 157 157 158 158 //read the datacard input file 159 string DetDatacard(""); 160 if(argc>=4)DetDatacard =argv[3]; 159 string DetDatacard(""); //for detector smearing parameters 160 string TrigDatacard("data/trigger.dat"); //for trigger selection 161 162 string lineCard1,lineCard2; 163 bool detecCard=false,trigCard=false; 164 if(argv[3]) 165 { 166 ifstream infile1(argv[3]); 167 infile1 >> lineCard1; // the first line determines the type of input files 168 if(strstr(lineCard1.c_str(),"DETECTOR") && detecCard==true) 169 cerr <<"** ERROR: A DETECTOR card has already been loaded **"<< endl; 170 else if(strstr(lineCard1.c_str(),"DETECTOR") && detecCard==false){DetDatacard =argv[3]; detecCard=true;} 171 else if(strstr(lineCard1.c_str(),"TRIGGER") && trigCard==true) 172 cerr <<"** ERROR: A TRIGGER card has already been loaded **"<< endl; 173 else if(strstr(lineCard1.c_str(),"TRIGGER") && trigCard==false){TrigDatacard =argv[3]; trigCard=true;} 174 } 175 if(argv[4]) 176 { 177 ifstream infile2(argv[4]); 178 infile2 >> lineCard2; // the first line determines the type of input files 179 if(strstr(lineCard2.c_str(),"DETECTOR") && detecCard==true) 180 cerr <<"** ERROR: A DETECTOR card has already been loaded **"<< endl; 181 else if(strstr(lineCard2.c_str(),"DETECTOR") && detecCard==false){DetDatacard =argv[4]; detecCard=true;} 182 else if(strstr(lineCard2.c_str(),"TRIGGER") && trigCard==true) 183 cerr <<"** ERROR: A TRIGGER card has already been loaded **"<< endl; 184 else if(strstr(lineCard2.c_str(),"TRIGGER") && trigCard==false){TrigDatacard =argv[4]; trigCard=true;} 185 } 161 186 162 187 //Smearing information … … 174 199 cout <<"** **"<< endl; 175 200 176 //read the trigger input file177 string TrigDatacard("data/trigger.dat");178 if(argc==5) TrigDatacard =argv[4];179 180 201 //Trigger information 202 cout <<"** ########### Start reading TRIGGER card ########## **"<< endl; 203 if(trigCard==false) 204 { 205 cout <<"** WARNING: Datadard not found, use default card **" << endl; 206 TrigDatacard="data/trigger.dat"; 207 } 181 208 TriggerTable *TRIGT = new TriggerTable(); 182 209 TRIGT->TriggerCardReader(TrigDatacard.c_str()); … … 184 211 if(DET->FLAG_trigger == 1) 185 212 { 186 cout <<"** ########### Start reading TRIGGER card ########## **"<< endl;187 213 cout << left << setw(40) <<"** Opening configuration card: "<<"" 188 214 << left << setw(20) << TrigDatacard <<"" … … 240 266 ExRootTreeReader *treeReader = new ExRootTreeReader(&chain); 241 267 const TClonesArray *branchGen = treeReader->UseBranch("Particle"); 268 242 269 TIter itGen((TCollection*)branchGen); 243 270 -
trunk/data/DataCardDet.dat
r150 r249 1 DETECTOR CARD # DO NOT REMOVE THIS IS A TAG! 2 1 3 # Detector extension, in pseudorapidity units 2 4 CEN_max_tracker 2.5 // Maximum tracker coverage -
trunk/data/trigger.dat
r209 r249 1 TRIGGER CARD # DO NOT REMOVE THIS IS A TAG! 2 3 1 4 # list of trigger algorithms 2 5 # trigger_name >> algorithm #comments -
trunk/src/SmearUtil.cc
r244 r249 380 380 ifstream fichier_a_lire(datacard.c_str()); 381 381 if(!fichier_a_lire.good()) { 382 cout <<"** Datadard not found, use default values**" << endl;382 cout <<"** WARNING: Datadard not found, use default values **" << endl; 383 383 return; 384 384 }
Note:
See TracChangeset
for help on using the changeset viewer.