197 |
|
dout << "Listing all " << this->nsamples << " sample(s) of the sample collection called " << this->name << " : " << endl; |
198 |
|
if(this->ndatasamples>0) { |
199 |
|
dout << "Data sample(s): " << endl; |
200 |
< |
for (int isamp=0;isamp<this->collection.size();isamp++) |
200 |
> |
for (int isamp=0;isamp<(int)this->collection.size();isamp++) |
201 |
|
{ |
202 |
|
if((this->collection)[isamp].is_data) dout << " - " << (this->collection)[isamp].samplename << " from " << (this->collection)[isamp].filename << endl; |
203 |
|
} |
204 |
|
} |
205 |
|
if(this->nmcsamples>0) { |
206 |
|
dout << "MC sample(s): " << endl; |
207 |
< |
for (int isamp=0;isamp<this->collection.size();isamp++) |
207 |
> |
for (int isamp=0;isamp<(int)this->collection.size();isamp++) |
208 |
|
{ |
209 |
|
if(!(this->collection)[isamp].is_data) dout << " - " << (this->collection)[isamp].samplename << " (" << (this->collection)[isamp].filename << ") xs=" << (this->collection)[isamp].xs << " pb, N(events)=" << (this->collection)[isamp].Nentries << endl; |
210 |
|
} |
231 |
|
bool samplecollection::do_sample(int thissample, vector<int> &selected_samples) |
232 |
|
{ |
233 |
|
bool drawit=false; |
234 |
< |
for(int isel=0;isel<selected_samples.size();isel++) |
234 |
> |
for(int isel=0;isel<(int)selected_samples.size();isel++) |
235 |
|
{ |
236 |
|
if(selected_samples[isel]==thissample) { |
237 |
|
drawit=true; |
263 |
|
bool do_only_selected_samples=false; |
264 |
|
if(onlyindex.size()>0&&onlyindex[0]!=-1) { |
265 |
|
if(Verbosity>0) {dout << "Requested to only draw sample corresponding to the following sample(s) : " << endl;} |
266 |
< |
for(int is=0;is<onlyindex.size();is++) { |
266 |
> |
for(int is=0;is<(int)onlyindex.size();is++) { |
267 |
|
if(Verbosity>0) dout << " - " << (this->collection)[onlyindex[is]].filename << " (sample index: " << onlyindex[is] << ")" << endl; |
268 |
|
} |
269 |
|
do_only_selected_samples=true; |
275 |
|
stringstream h_histoname; |
276 |
|
h_histoname<<"h_"<<m_histoname; |
277 |
|
float binningarray[binning.size()+1]; |
278 |
< |
for(int i=0;i<binning.size();i++) {binningarray[i]=binning[i];} |
278 |
> |
for(int i=0;i<(int)binning.size();i++) {binningarray[i]=binning[i];} |
279 |
|
TH1F *histo = new TH1F(m_histoname.c_str(),"",binning.size()-1,binningarray); |
280 |
|
histo->Sumw2(); |
281 |
|
|
335 |
|
bool do_only_selected_samples=false; |
336 |
|
if(onlyindex.size()>0&&onlyindex[0]!=-1) { |
337 |
|
if(Verbosity>0) {dout << "Requested to only draw sample corresponding to the following sample(s) : " << endl;} |
338 |
< |
for(int is=0;is<onlyindex.size();is++) { |
338 |
> |
for(int is=0;is<(int)onlyindex.size();is++) { |
339 |
|
if(Verbosity>0) dout << " - " << (this->collection)[onlyindex[is]].filename << " (sample index: " << onlyindex[is] << ")" << endl; |
340 |
|
} |
341 |
|
do_only_selected_samples=true; |
348 |
|
h_histoname<<"h_"<<m_histoname; |
349 |
|
float binningarray[binningx.size()+1]; |
350 |
|
float binningyarray[binningy.size()+1]; |
351 |
< |
for(int i=0;i<binningx.size();i++) {binningarray[i]=binningx[i];binningyarray[i]=binningy[i];} |
351 |
> |
for(int i=0;i<(int)binningx.size();i++) {binningarray[i]=binningx[i];binningyarray[i]=binningy[i];} |
352 |
|
TH2F *histo = new TH2F(m_histoname.c_str(),"",binningx.size()-1,binningarray,binningy.size(),binningyarray); |
353 |
|
histo->Sumw2(); |
354 |
|
|
418 |
|
for(int ih=0;ih<=this->ngroups;ih++) bookedhistos[ih]=0; |
419 |
|
|
420 |
|
float binningarray[binning.size()+1]; |
421 |
< |
for(int i=0;i<binning.size();i++) {binningarray[i]=binning[i];} |
421 |
> |
for(int i=0;i<(int)binning.size();i++) {binningarray[i]=binning[i];} |
422 |
|
|
423 |
|
for (unsigned int isample=0;isample<(this->collection).size();isample++) { |
424 |
|
if(!drawsignal&&(this->collection)[isample].is_signal) continue; |
466 |
|
thestack.Add(histogroups[ordered_indices[index]]); |
467 |
|
} |
468 |
|
*/ |
469 |
< |
for(int index=0;index<ordered_indices.size();index++) { |
469 |
> |
for(int index=0;index<(int)ordered_indices.size();index++) { |
470 |
|
thestack.Add(histogroups[ordered_indices[index]]); |
471 |
|
} |
472 |
|
return thestack; |
539 |
|
|
540 |
|
TH1F *fakehistos[(this->collection).size()]; |
541 |
|
bool donealready[(this->collection).size()]; |
542 |
< |
for(int i=0;i<(this->collection).size();i++) donealready[i]=false; |
543 |
< |
for(int isample=0;isample<(this->collection).size();isample++) { |
542 |
> |
for(int i=0;i<(int)(this->collection).size();i++) donealready[i]=false; |
543 |
> |
for(int isample=0;isample<(int)(this->collection).size();isample++) { |
544 |
|
if((this->collection)[isample].is_data||(this->collection)[isample].is_signal) continue; |
545 |
|
|
546 |
|
if(!donealready[(this->collection)[isample].groupindex]) { |
623 |
|
void samplecollection::PickUpEvents(string cut) { |
624 |
|
vector<string> output; |
625 |
|
vector<string> pickupfile; |
626 |
< |
for (int isamp=0;isamp<this->collection.size();isamp++) |
626 |
> |
for (int isamp=0;isamp<(int)this->collection.size();isamp++) |
627 |
|
{ |
628 |
|
if((this->collection)[isamp].is_data) { |
629 |
|
//we have a data sample ! |