169 |
|
THStack DrawStack(string m_histoname,string m_var, int m_nbins, float m_minx, float m_maxx, string m_xlabel, string m_ylabel, TCut Cut, bool m_is_data, float luminosity, bool drawsignal); |
170 |
|
THStack DrawStack(string m_histoname,string m_var, vector<float> binning, string m_xlabel, string m_ylabel, TCut Cut, bool m_is_data, float luminosity, bool drawsignal); |
171 |
|
vector<int> FindSample(string what); |
172 |
+ |
vector<int> FindSampleBySampleName(string what); |
173 |
|
void ListSamples(); |
174 |
|
bool do_sample(int thissample, vector<int> &selected_samples); |
175 |
|
Color_t GetColor(string filename); |
493 |
|
hitcollection.push_back(isam); |
494 |
|
} else { |
495 |
|
} |
496 |
+ |
} |
497 |
+ |
if(hitcollection.size()==0) { |
498 |
+ |
hitcollection.push_back(-1); |
499 |
+ |
write_warning(__FUNCTION__,"Couldn't find sample "+string(what)+" using sample collection \""+string(this->name)+"\""); |
500 |
+ |
} |
501 |
+ |
return hitcollection; |
502 |
+ |
} |
503 |
+ |
|
504 |
+ |
vector<int> samplecollection::FindSampleBySampleName(string what) |
505 |
+ |
{ |
506 |
+ |
vector<int> hitcollection; |
507 |
+ |
for(unsigned int isam=0;isam<(this->collection).size();isam++) |
508 |
+ |
{ |
509 |
+ |
if(((this->collection)[isam].samplename).find(what)!=string::npos) { |
510 |
+ |
hitcollection.push_back(isam); |
511 |
+ |
} else { |
512 |
+ |
} |
513 |
|
} |
514 |
|
if(hitcollection.size()==0) { |
515 |
|
hitcollection.push_back(-1); |