// @(#)root/roostats:$Id$
// Author: Kyle Cranmer, George Lewis 
/*************************************************************************
 * Copyright (C) 1995-2008, Rene Brun and Fons Rademakers.               *
 * All rights reserved.                                                  *
 *                                                                       *
 * For the licensing terms see $ROOTSYS/LICENSE.                         *
 * For the list of contributors see $ROOTSYS/README/CREDITS.             *
 *************************************************************************/

//_________________________________________________
/*
BEGIN_HTML
<p>
</p>
END_HTML
*/
//

#include "TH1.h"
#include "RooStats/HistFactory/Sample.h"
#include "RooStats/HistFactory/HistFactoryException.h"

//#include "TClass.h"

RooStats::HistFactory::Sample::Sample() : 
  fNormalizeByTheory(false), fStatErrorActivate(false), fhNominal(), fhCountingHist(0) { ; }

// copy constructor (important for python)
RooStats::HistFactory::Sample::Sample(const Sample& other) :
  fName(other.fName), fInputFile(other.fInputFile),
  fHistoName(other.fHistoName), fHistoPath(other.fHistoPath),
  fChannelName(other.fChannelName),

  fOverallSysList(other.fOverallSysList),
  fNormFactorList(other.fNormFactorList),
  fHistoSysList(other.fHistoSysList),
  fHistoFactorList(other.fHistoFactorList),
  fShapeSysList(other.fShapeSysList),
  fShapeFactorList(other.fShapeFactorList),

  fStatError(other.fStatError),
  fNormalizeByTheory(other.fNormalizeByTheory),
  fStatErrorActivate(other.fStatErrorActivate),
  fhNominal(other.fhNominal),
  fhCountingHist(0)
  { 
    if( other.fhCountingHist ) {
      SetValue( other.fhCountingHist->GetBinContent(1) );
    }else{
      fhCountingHist = NULL;
    }
  }


RooStats::HistFactory::Sample::Sample(std::string SampName, std::string SampHistoName, std::string SampInputFile, std::string SampHistoPath) : 
  fName( SampName ),   fInputFile( SampInputFile), 
  fHistoName( SampHistoName ), fHistoPath( SampHistoPath ),
  fNormalizeByTheory(true), fStatErrorActivate(false), fhNominal(),
  fhCountingHist(0) { ; }

RooStats::HistFactory::Sample::Sample(std::string SampName) : 
  fName( SampName ),   fInputFile( "" ), 
  fHistoName( "" ), fHistoPath( "" ),
  fNormalizeByTheory(true), fStatErrorActivate(false),fhNominal(),
  fhCountingHist(0) { ; }

RooStats::HistFactory::Sample::~Sample() {
  if(fhCountingHist)
    delete fhCountingHist;
}

TH1* RooStats::HistFactory::Sample::GetHisto()  {
  TH1* histo = (TH1*) fhNominal.GetObject();
  return histo;
}


void RooStats::HistFactory::Sample::writeToFile( std::string OutputFileName, std::string DirName ) {

  TH1* histNominal = GetHisto();
  histNominal->Write();
  
  // Set the location of the data
  // in the output measurement
  
  fInputFile = OutputFileName;
  fHistoName = histNominal->GetName();
  fHistoPath = DirName;

  // Write this sample's StatError
  GetStatError().writeToFile( OutputFileName, DirName );

  // Must write all systematics that contain internal histograms
  // (This is not all systematics)
  for( unsigned int i = 0; i < GetHistoSysList().size(); ++i ) {
    GetHistoSysList().at(i).writeToFile( OutputFileName, DirName );
  }
  for( unsigned int i = 0; i < GetHistoFactorList().size(); ++i ) {
    GetHistoFactorList().at(i).writeToFile( OutputFileName, DirName );
  }
  for( unsigned int i = 0; i < GetShapeSysList().size(); ++i ) {
    GetShapeSysList().at(i).writeToFile( OutputFileName, DirName );
  }
  for( unsigned int i = 0; i < GetShapeFactorList().size(); ++i ) {
    GetShapeFactorList().at(i).writeToFile( OutputFileName, DirName );
  }

  return;

}


void RooStats::HistFactory::Sample::SetValue( Double_t val ) {

  // For use in a number counting measurement
  // Create a 1-bin histogram, 
  // fill it with this input value,
  // and set this Sample's histogram to that hist
  
  std::string SampleHistName = fName + "_hist";
  
  // Histogram has 1-bin (hard-coded)
  if(fhCountingHist)
    delete fhCountingHist;
  
  fhCountingHist = new TH1F( SampleHistName.c_str(), SampleHistName.c_str(), 1, 0, 1 );
  fhCountingHist->SetBinContent( 1, val );

  // Set the histogram of the internally held data
  // node of this channel to this newly created histogram
  SetHisto( fhCountingHist );

}



void RooStats::HistFactory::Sample::Print( std::ostream& stream ) {


  stream << "\t \t Name: " << fName
	 << "\t \t Channel: " << fChannelName
	 << "\t NormalizeByTheory: " << (fNormalizeByTheory ? "True" : "False")
	 << "\t StatErrorActivate: " << (fStatErrorActivate ? "True" : "False")
	 << std::endl;  

  stream << "\t \t \t \t " 
	 << "\t InputFile: " << fInputFile
	 << "\t HistName: " << fHistoName
	 << "\t HistoPath: " << fHistoPath
	 << "\t HistoAddress: " << GetHisto()
    // << "\t Type: " << GetHisto()->ClassName()
	 << std::endl;  

  if( fStatError.GetActivate() ) {
    stream << "\t \t \t StatError Activate: " << fStatError.GetActivate()
	   << "\t InputFile: " << fInputFile
	   << "\t HistName: " << fStatError.GetHistoName()
	   << "\t HistoPath: " << fStatError.GetHistoPath()
	   << "\t HistoAddress: " << fStatError.GetErrorHist()
         << std::endl;  
  }


  /*
  stream<< " NormalizeByTheory: ";
  if(NormalizeByTheory)  stream << "True";
  else                   stream << "False";

  stream<< " StatErrorActivate: ";
  if(StatErrorActivate)  stream << "True";
  else                   stream << "False";
  */


}  

void RooStats::HistFactory::Sample::PrintXML( std::ofstream& xml ) {
  
  
  // Create the sample tag
  xml << "    <Sample Name=\"" << fName << "\" "
      << " HistoPath=\"" << fHistoPath << "\" "
      << " HistoName=\"" << fHistoName << "\" "
      << " InputFile=\"" << fInputFile << "\" "
      << " NormalizeByTheory=\"" << (fNormalizeByTheory ? std::string("True") : std::string("False"))  << "\" "
      << ">" << std::endl;


  // Print Stat Error (if necessary)
  fStatError.PrintXML( xml );
  /*
  if( fStatError.GetActivate() ) {
    xml << "      <StatError Activate=\"" << (fStatError.GetActivate() ? std::string("True") : std::string("False"))  << "\" "
	<< " InputFile=\"" << fStatError.GetInputFile() << "\" "
	<< " HistoName=\"" << fStatError.GetHistoName() << "\" "
	<< " HistoPath=\"" << fStatError.GetHistoPath() << "\" "
	<< " /> " << std::endl;
  }
  */


  // Now, print the systematics:
  for( unsigned int i = 0; i < fOverallSysList.size(); ++i ) {
    RooStats::HistFactory::OverallSys sys = fOverallSysList.at(i);
    sys.PrintXML(xml);
    /*
    xml << "      <OverallSys Name=\"" << sys.GetName() << "\" "
	<< " High=\"" << sys.GetHigh() << "\" "
	<< " Low=\""  << sys.GetLow()  << "\" "
	<< "  /> " << std::endl;
    */
  }
  for( unsigned int i = 0; i < fNormFactorList.size(); ++i ) {
    RooStats::HistFactory::NormFactor sys = fNormFactorList.at(i);
    sys.PrintXML(xml);
    /*
    xml << "      <NormFactor Name=\"" << sys.GetName() << "\" "
	<< " Val=\""   << sys.GetVal()   << "\" "
	<< " High=\""  << sys.GetHigh()  << "\" "
	<< " Low=\""   << sys.GetLow()   << "\" "
	<< " Const=\"" << (sys.GetConst() ? std::string("True") : std::string("False")) << "\" "
	<< "  /> " << std::endl;
    */
  }
  for( unsigned int i = 0; i < fHistoSysList.size(); ++i ) {
    RooStats::HistFactory::HistoSys sys = fHistoSysList.at(i);
    sys.PrintXML(xml);
    /*
    xml << "      <HistoSys Name=\"" << sys.GetName() << "\" "

	<< " InputFileLow=\""  << sys.GetInputFileLow()  << "\" "
	<< " HistoNameLow=\""  << sys.GetHistoNameLow()  << "\" "
	<< " HistoPathLow=\""  << sys.GetHistoPathLow()  << "\" "

	<< " InputFileHigh=\""  << sys.GetInputFileHigh()  << "\" "
	<< " HistoNameHigh=\""  << sys.GetHistoNameHigh()  << "\" "
	<< " HistoPathHigh=\""  << sys.GetHistoPathHigh()  << "\" "
	<< "  /> " << std::endl;
    */
  }
  for( unsigned int i = 0; i < fHistoFactorList.size(); ++i ) {
    RooStats::HistFactory::HistoFactor sys = fHistoFactorList.at(i);
    sys.PrintXML(xml);
    /*
    xml << "      <HistoFactor Name=\"" << sys.GetName() << "\" "

	<< " InputFileLow=\""  << sys.GetInputFileLow()  << "\" "
	<< " HistoNameLow=\""  << sys.GetHistoNameLow()  << "\" "
	<< " HistoPathLow=\""  << sys.GetHistoPathLow()  << "\" "

	<< " InputFileHigh=\""  << sys.GetInputFileHigh()  << "\" "
	<< " HistoNameHigh=\""  << sys.GetHistoNameHigh()  << "\" "
	<< " HistoPathHigh=\""  << sys.GetHistoPathHigh()  << "\" "
	<< "  /> " << std::endl;
    */
  }
  for( unsigned int i = 0; i < fShapeSysList.size(); ++i ) {
    RooStats::HistFactory::ShapeSys sys = fShapeSysList.at(i);
    sys.PrintXML(xml);
    /*
    xml << "      <ShapeSys Name=\"" << sys.GetName() << "\" "

	<< " InputFile=\""  << sys.GetInputFile()  << "\" "
	<< " HistoName=\""  << sys.GetHistoName()  << "\" "
	<< " HistoPath=\""  << sys.GetHistoPath()  << "\" "
	<< " ConstraintType=\"" << std::string(Constraint::Name(sys.GetConstraintType())) << "\" "
	<< "  /> " << std::endl;
    */
  }
  for( unsigned int i = 0; i < fShapeFactorList.size(); ++i ) {
    RooStats::HistFactory::ShapeFactor sys = fShapeFactorList.at(i);
    sys.PrintXML(xml);
    /*
    xml << "      <ShapeFactor Name=\"" << sys.GetName() << "\" "
	<< "  /> " << std::endl;
    */
  }

  // Finally, close the tag
  xml << "    </Sample>" << std::endl;

}



// Some helper functions
// (Not strictly necessary because
//  methods are publicly accessable)


void RooStats::HistFactory::Sample::ActivateStatError() {
  
  fStatError.Activate( true );
  fStatError.SetUseHisto( false );

}


void RooStats::HistFactory::Sample::ActivateStatError( std::string StatHistoName, std::string StatInputFile, std::string StatHistoPath ) {


  fStatError.Activate( true );
  fStatError.SetUseHisto( true );

  fStatError.SetInputFile( StatInputFile );
  fStatError.SetHistoName( StatHistoName );
  fStatError.SetHistoPath( StatHistoPath );

}


void RooStats::HistFactory::Sample::AddOverallSys( std::string SysName, Double_t SysLow, Double_t SysHigh ) {

  RooStats::HistFactory::OverallSys sys;
  sys.SetName( SysName );
  sys.SetLow( SysLow );
  sys.SetHigh( SysHigh );

  fOverallSysList.push_back( sys );

}

void RooStats::HistFactory::Sample::AddOverallSys( const OverallSys& Sys ) {
  fOverallSysList.push_back(Sys);
}

void RooStats::HistFactory::Sample::AddNormFactor( std::string SysName, Double_t SysVal, Double_t SysLow, Double_t SysHigh, bool SysConst ) {

  RooStats::HistFactory::NormFactor norm;

  norm.SetName( SysName );
  norm.SetVal( SysVal );
  norm.SetLow( SysLow );
  norm.SetHigh( SysHigh );
  norm.SetConst( SysConst );

  fNormFactorList.push_back( norm );

}

void RooStats::HistFactory::Sample::AddNormFactor( const NormFactor& Factor ) {
  fNormFactorList.push_back( Factor );
}


void RooStats::HistFactory::Sample::AddHistoSys( std::string SysName, 
std::string SysHistoNameLow,  std::string SysHistoFileLow,  std::string SysHistoPathLow,
						 std::string SysHistoNameHigh, std::string SysHistoFileHigh, std::string SysHistoPathHigh ) {

  RooStats::HistFactory::HistoSys sys;
  sys.SetName( SysName );
  
  sys.SetHistoNameLow( SysHistoNameLow );
  sys.SetHistoPathLow( SysHistoPathLow );
  sys.SetInputFileLow( SysHistoFileLow );

  sys.SetHistoNameHigh( SysHistoNameHigh );
  sys.SetHistoPathHigh( SysHistoPathHigh );
  sys.SetInputFileHigh( SysHistoFileHigh );

  fHistoSysList.push_back( sys );

}

void RooStats::HistFactory::Sample::AddHistoSys( const HistoSys& Sys ) {
  fHistoSysList.push_back( Sys );
}


void RooStats::HistFactory::Sample::AddHistoFactor( std::string SysName, std::string SysHistoNameLow,  std::string SysHistoFileLow,  std::string SysHistoPathLow,  
						    std::string SysHistoNameHigh, std::string SysHistoFileHigh, std::string SysHistoPathHigh ) {

  RooStats::HistFactory::HistoFactor factor;
  factor.SetName( SysName );

  factor.SetHistoNameLow( SysHistoNameLow );
  factor.SetHistoPathLow( SysHistoPathLow );
  factor.SetInputFileLow( SysHistoFileLow );

  factor.SetHistoNameHigh( SysHistoNameHigh );
  factor.SetHistoPathHigh( SysHistoPathHigh );
  factor.SetInputFileHigh( SysHistoFileHigh );

  fHistoFactorList.push_back( factor );

}

void RooStats::HistFactory::Sample::AddHistoFactor( const HistoFactor& Factor ) {
  fHistoFactorList.push_back(Factor);
}


void RooStats::HistFactory::Sample::AddShapeFactor( std::string SysName ) {

  RooStats::HistFactory::ShapeFactor factor;
  factor.SetName( SysName );
  fShapeFactorList.push_back( factor );

}


void RooStats::HistFactory::Sample::AddShapeFactor( const ShapeFactor& Factor ) {
  fShapeFactorList.push_back(Factor);
}


void RooStats::HistFactory::Sample::AddShapeSys( std::string SysName, Constraint::Type SysConstraintType, std::string SysHistoName, std::string SysHistoFile, std::string SysHistoPath ) {

  RooStats::HistFactory::ShapeSys sys;
  sys.SetName( SysName );
  sys.SetConstraintType( SysConstraintType );

  sys.SetHistoName( SysHistoName );
  sys.SetHistoPath( SysHistoPath );
  sys.SetInputFile( SysHistoFile );

  fShapeSysList.push_back( sys );

}

void RooStats::HistFactory::Sample::AddShapeSys( const ShapeSys& Sys ) {
  fShapeSysList.push_back(Sys);
}
 Sample.cxx:1
 Sample.cxx:2
 Sample.cxx:3
 Sample.cxx:4
 Sample.cxx:5
 Sample.cxx:6
 Sample.cxx:7
 Sample.cxx:8
 Sample.cxx:9
 Sample.cxx:10
 Sample.cxx:11
 Sample.cxx:12
 Sample.cxx:13
 Sample.cxx:14
 Sample.cxx:15
 Sample.cxx:16
 Sample.cxx:17
 Sample.cxx:18
 Sample.cxx:19
 Sample.cxx:20
 Sample.cxx:21
 Sample.cxx:22
 Sample.cxx:23
 Sample.cxx:24
 Sample.cxx:25
 Sample.cxx:26
 Sample.cxx:27
 Sample.cxx:28
 Sample.cxx:29
 Sample.cxx:30
 Sample.cxx:31
 Sample.cxx:32
 Sample.cxx:33
 Sample.cxx:34
 Sample.cxx:35
 Sample.cxx:36
 Sample.cxx:37
 Sample.cxx:38
 Sample.cxx:39
 Sample.cxx:40
 Sample.cxx:41
 Sample.cxx:42
 Sample.cxx:43
 Sample.cxx:44
 Sample.cxx:45
 Sample.cxx:46
 Sample.cxx:47
 Sample.cxx:48
 Sample.cxx:49
 Sample.cxx:50
 Sample.cxx:51
 Sample.cxx:52
 Sample.cxx:53
 Sample.cxx:54
 Sample.cxx:55
 Sample.cxx:56
 Sample.cxx:57
 Sample.cxx:58
 Sample.cxx:59
 Sample.cxx:60
 Sample.cxx:61
 Sample.cxx:62
 Sample.cxx:63
 Sample.cxx:64
 Sample.cxx:65
 Sample.cxx:66
 Sample.cxx:67
 Sample.cxx:68
 Sample.cxx:69
 Sample.cxx:70
 Sample.cxx:71
 Sample.cxx:72
 Sample.cxx:73
 Sample.cxx:74
 Sample.cxx:75
 Sample.cxx:76
 Sample.cxx:77
 Sample.cxx:78
 Sample.cxx:79
 Sample.cxx:80
 Sample.cxx:81
 Sample.cxx:82
 Sample.cxx:83
 Sample.cxx:84
 Sample.cxx:85
 Sample.cxx:86
 Sample.cxx:87
 Sample.cxx:88
 Sample.cxx:89
 Sample.cxx:90
 Sample.cxx:91
 Sample.cxx:92
 Sample.cxx:93
 Sample.cxx:94
 Sample.cxx:95
 Sample.cxx:96
 Sample.cxx:97
 Sample.cxx:98
 Sample.cxx:99
 Sample.cxx:100
 Sample.cxx:101
 Sample.cxx:102
 Sample.cxx:103
 Sample.cxx:104
 Sample.cxx:105
 Sample.cxx:106
 Sample.cxx:107
 Sample.cxx:108
 Sample.cxx:109
 Sample.cxx:110
 Sample.cxx:111
 Sample.cxx:112
 Sample.cxx:113
 Sample.cxx:114
 Sample.cxx:115
 Sample.cxx:116
 Sample.cxx:117
 Sample.cxx:118
 Sample.cxx:119
 Sample.cxx:120
 Sample.cxx:121
 Sample.cxx:122
 Sample.cxx:123
 Sample.cxx:124
 Sample.cxx:125
 Sample.cxx:126
 Sample.cxx:127
 Sample.cxx:128
 Sample.cxx:129
 Sample.cxx:130
 Sample.cxx:131
 Sample.cxx:132
 Sample.cxx:133
 Sample.cxx:134
 Sample.cxx:135
 Sample.cxx:136
 Sample.cxx:137
 Sample.cxx:138
 Sample.cxx:139
 Sample.cxx:140
 Sample.cxx:141
 Sample.cxx:142
 Sample.cxx:143
 Sample.cxx:144
 Sample.cxx:145
 Sample.cxx:146
 Sample.cxx:147
 Sample.cxx:148
 Sample.cxx:149
 Sample.cxx:150
 Sample.cxx:151
 Sample.cxx:152
 Sample.cxx:153
 Sample.cxx:154
 Sample.cxx:155
 Sample.cxx:156
 Sample.cxx:157
 Sample.cxx:158
 Sample.cxx:159
 Sample.cxx:160
 Sample.cxx:161
 Sample.cxx:162
 Sample.cxx:163
 Sample.cxx:164
 Sample.cxx:165
 Sample.cxx:166
 Sample.cxx:167
 Sample.cxx:168
 Sample.cxx:169
 Sample.cxx:170
 Sample.cxx:171
 Sample.cxx:172
 Sample.cxx:173
 Sample.cxx:174
 Sample.cxx:175
 Sample.cxx:176
 Sample.cxx:177
 Sample.cxx:178
 Sample.cxx:179
 Sample.cxx:180
 Sample.cxx:181
 Sample.cxx:182
 Sample.cxx:183
 Sample.cxx:184
 Sample.cxx:185
 Sample.cxx:186
 Sample.cxx:187
 Sample.cxx:188
 Sample.cxx:189
 Sample.cxx:190
 Sample.cxx:191
 Sample.cxx:192
 Sample.cxx:193
 Sample.cxx:194
 Sample.cxx:195
 Sample.cxx:196
 Sample.cxx:197
 Sample.cxx:198
 Sample.cxx:199
 Sample.cxx:200
 Sample.cxx:201
 Sample.cxx:202
 Sample.cxx:203
 Sample.cxx:204
 Sample.cxx:205
 Sample.cxx:206
 Sample.cxx:207
 Sample.cxx:208
 Sample.cxx:209
 Sample.cxx:210
 Sample.cxx:211
 Sample.cxx:212
 Sample.cxx:213
 Sample.cxx:214
 Sample.cxx:215
 Sample.cxx:216
 Sample.cxx:217
 Sample.cxx:218
 Sample.cxx:219
 Sample.cxx:220
 Sample.cxx:221
 Sample.cxx:222
 Sample.cxx:223
 Sample.cxx:224
 Sample.cxx:225
 Sample.cxx:226
 Sample.cxx:227
 Sample.cxx:228
 Sample.cxx:229
 Sample.cxx:230
 Sample.cxx:231
 Sample.cxx:232
 Sample.cxx:233
 Sample.cxx:234
 Sample.cxx:235
 Sample.cxx:236
 Sample.cxx:237
 Sample.cxx:238
 Sample.cxx:239
 Sample.cxx:240
 Sample.cxx:241
 Sample.cxx:242
 Sample.cxx:243
 Sample.cxx:244
 Sample.cxx:245
 Sample.cxx:246
 Sample.cxx:247
 Sample.cxx:248
 Sample.cxx:249
 Sample.cxx:250
 Sample.cxx:251
 Sample.cxx:252
 Sample.cxx:253
 Sample.cxx:254
 Sample.cxx:255
 Sample.cxx:256
 Sample.cxx:257
 Sample.cxx:258
 Sample.cxx:259
 Sample.cxx:260
 Sample.cxx:261
 Sample.cxx:262
 Sample.cxx:263
 Sample.cxx:264
 Sample.cxx:265
 Sample.cxx:266
 Sample.cxx:267
 Sample.cxx:268
 Sample.cxx:269
 Sample.cxx:270
 Sample.cxx:271
 Sample.cxx:272
 Sample.cxx:273
 Sample.cxx:274
 Sample.cxx:275
 Sample.cxx:276
 Sample.cxx:277
 Sample.cxx:278
 Sample.cxx:279
 Sample.cxx:280
 Sample.cxx:281
 Sample.cxx:282
 Sample.cxx:283
 Sample.cxx:284
 Sample.cxx:285
 Sample.cxx:286
 Sample.cxx:287
 Sample.cxx:288
 Sample.cxx:289
 Sample.cxx:290
 Sample.cxx:291
 Sample.cxx:292
 Sample.cxx:293
 Sample.cxx:294
 Sample.cxx:295
 Sample.cxx:296
 Sample.cxx:297
 Sample.cxx:298
 Sample.cxx:299
 Sample.cxx:300
 Sample.cxx:301
 Sample.cxx:302
 Sample.cxx:303
 Sample.cxx:304
 Sample.cxx:305
 Sample.cxx:306
 Sample.cxx:307
 Sample.cxx:308
 Sample.cxx:309
 Sample.cxx:310
 Sample.cxx:311
 Sample.cxx:312
 Sample.cxx:313
 Sample.cxx:314
 Sample.cxx:315
 Sample.cxx:316
 Sample.cxx:317
 Sample.cxx:318
 Sample.cxx:319
 Sample.cxx:320
 Sample.cxx:321
 Sample.cxx:322
 Sample.cxx:323
 Sample.cxx:324
 Sample.cxx:325
 Sample.cxx:326
 Sample.cxx:327
 Sample.cxx:328
 Sample.cxx:329
 Sample.cxx:330
 Sample.cxx:331
 Sample.cxx:332
 Sample.cxx:333
 Sample.cxx:334
 Sample.cxx:335
 Sample.cxx:336
 Sample.cxx:337
 Sample.cxx:338
 Sample.cxx:339
 Sample.cxx:340
 Sample.cxx:341
 Sample.cxx:342
 Sample.cxx:343
 Sample.cxx:344
 Sample.cxx:345
 Sample.cxx:346
 Sample.cxx:347
 Sample.cxx:348
 Sample.cxx:349
 Sample.cxx:350
 Sample.cxx:351
 Sample.cxx:352
 Sample.cxx:353
 Sample.cxx:354
 Sample.cxx:355
 Sample.cxx:356
 Sample.cxx:357
 Sample.cxx:358
 Sample.cxx:359
 Sample.cxx:360
 Sample.cxx:361
 Sample.cxx:362
 Sample.cxx:363
 Sample.cxx:364
 Sample.cxx:365
 Sample.cxx:366
 Sample.cxx:367
 Sample.cxx:368
 Sample.cxx:369
 Sample.cxx:370
 Sample.cxx:371
 Sample.cxx:372
 Sample.cxx:373
 Sample.cxx:374
 Sample.cxx:375
 Sample.cxx:376
 Sample.cxx:377
 Sample.cxx:378
 Sample.cxx:379
 Sample.cxx:380
 Sample.cxx:381
 Sample.cxx:382
 Sample.cxx:383
 Sample.cxx:384
 Sample.cxx:385
 Sample.cxx:386
 Sample.cxx:387
 Sample.cxx:388
 Sample.cxx:389
 Sample.cxx:390
 Sample.cxx:391
 Sample.cxx:392
 Sample.cxx:393
 Sample.cxx:394
 Sample.cxx:395
 Sample.cxx:396
 Sample.cxx:397
 Sample.cxx:398
 Sample.cxx:399
 Sample.cxx:400
 Sample.cxx:401
 Sample.cxx:402
 Sample.cxx:403
 Sample.cxx:404
 Sample.cxx:405
 Sample.cxx:406
 Sample.cxx:407
 Sample.cxx:408
 Sample.cxx:409
 Sample.cxx:410
 Sample.cxx:411
 Sample.cxx:412
 Sample.cxx:413
 Sample.cxx:414
 Sample.cxx:415
 Sample.cxx:416
 Sample.cxx:417
 Sample.cxx:418
 Sample.cxx:419
 Sample.cxx:420
 Sample.cxx:421
 Sample.cxx:422
 Sample.cxx:423
 Sample.cxx:424