ViewVC Help
View File | Revision Log | Show Annotations | Root Listing
root/cvsroot/UserCode/cbrown/Development/Plotting/Modules/SampleClass.C
(Generate patch)

Comparing UserCode/cbrown/Development/Plotting/Modules/SampleClass.C (file contents):
Revision 1.21 by buchmann, Wed Jan 16 17:11:22 2013 UTC vs.
Revision 1.23 by buchmann, Thu Jan 17 17:21:38 2013 UTC

# Line 582 | Line 582 | TLegend* samplecollection::allbglegend(s
582    leg->SetBorderSize(0);
583    leg->SetLineColor(kWhite);
584    
585 <  TH1F *fakehistos[(this->collection).size()];
586 <  bool donealready[(this->collection).size()];
587 <  for(int i=0;i<(int)(this->collection).size();i++) donealready[i]=false;
585 >  int maxIgroup=0;
586 >  for(int isample=0;isample<(int)(this->collection).size();isample++) {
587 >    if((this->collection)[isample].groupindex>maxIgroup) maxIgroup=(this->collection)[isample].groupindex+1;
588 >  }
589 >  
590 >  TH1F *fakehistos[maxIgroup];
591 >  bool donealready[maxIgroup];
592 >  
593 >  for(int i=0;i<maxIgroup;i++) donealready[i]=false;
594    for(int isample=0;isample<(int)(this->collection).size();isample++) {
595      if((this->collection)[isample].is_data||(this->collection)[isample].is_signal) continue;
596  

Diff Legend

Removed lines
+ Added lines
< Changed lines
> Changed lines