/usr/include/root/RooStats/ToyMCStudy.h is in libroot-roofit-dev 5.34.19+dfsg-1.2.
This file is owned by root:root, with mode 0o644.
The actual contents of the file can be viewed below.
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 | // @(#)root/roostats:$Id$
// Author: Sven Kreiss and Kyle Cranmer June 2010
/*************************************************************************
* 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. *
*************************************************************************/
#ifndef ROOSTATS_ToyMCStudy
#define ROOSTATS_ToyMCStudy
//_________________________________________________
/*
BEGIN_HTML
<p>
ToyMCStudy is an implementation of RooAbsStudy for toy Monte Carlo sampling.
This class is automatically used by ToyMCSampler when given a ProofConfig.
This is also its intended use case.
</p>
END_HTML
*/
//
#ifndef ROOT_Rtypes
#include "Rtypes.h"
#endif
#include "RooAbsStudy.h"
#include "RooStats/ToyMCSampler.h"
#include "RooStats/SamplingDistribution.h"
#include "RooWorkspace.h"
#include "RooArgSet.h"
#include "RooDataSet.h"
#include "RooLinkedList.h"
#include "RooLinkedListIter.h"
#include <vector>
namespace RooStats {
class ToyMCStudy: public RooAbsStudy {
public:
// need to have constructor without arguments for proof
ToyMCStudy(const char *name = "ToyMCStudy", const char *title = "ToyMCStudy") :
RooAbsStudy(name, title),
fRandomSeed(0),
fToyMCSampler(NULL)
{
// In this case, this is the normal output. The SamplingDistribution
// instances are stored as detailed output.
storeDetailedOutput(kTRUE);
}
RooAbsStudy* clone(const char* /*newname*/="") const { return new ToyMCStudy(*this) ; }
virtual ~ToyMCStudy() {}
// RooAbsStudy interfaces
virtual Bool_t initialize(void);
virtual Bool_t execute(void);
virtual Bool_t finalize(void);
RooDataSet* merge();
void SetToyMCSampler(ToyMCSampler& t) { fToyMCSampler = &t; }
void SetParamPoint(const RooArgSet& paramPoint) { fParamPoint.add(paramPoint); }
void SetRandomSeed(unsigned int seed) { fRandomSeed = seed; }
protected:
unsigned int fRandomSeed;
ToyMCSampler *fToyMCSampler;
RooArgSet fParamPoint;
protected:
ClassDef(ToyMCStudy,2); // toy MC study for parallel processing
};
class ToyMCPayload : public TNamed {
public:
ToyMCPayload() {
// proof constructor, do not use
fDataSet = NULL;
}
ToyMCPayload(RooDataSet* sd)
{
fDataSet = sd;
}
virtual ~ToyMCPayload() {
}
RooDataSet* GetSamplingDistributions()
{
return fDataSet;
}
private:
RooDataSet* fDataSet;
protected:
ClassDef(ToyMCPayload,1);
};
}
#endif
|